From d4ede2e05b5d87436f2f58272ad0b8b289225ae8 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Mon, 20 Jul 2020 20:06:08 -0400 Subject: [PATCH 01/87] DUPLICATE: Bootsptrap the generic control plane with duplicated k8s code. cmd/kube-apiserver/app/* -> pkg/genericcontrolplane/* pkg/kubeapiserver/admission/* -> pkg/genericcontrolplane/admission/* --- pkg/genericcontrolplane/admission/config.go | 82 +++ .../admission/initializer.go | 76 ++ pkg/genericcontrolplane/aggregator.go | 325 ++++++++ pkg/genericcontrolplane/apiextensions.go | 105 +++ pkg/genericcontrolplane/server.go | 693 ++++++++++++++++++ 5 files changed, 1281 insertions(+) create mode 100644 pkg/genericcontrolplane/admission/config.go create mode 100644 pkg/genericcontrolplane/admission/initializer.go create mode 100644 pkg/genericcontrolplane/aggregator.go create mode 100644 pkg/genericcontrolplane/apiextensions.go create mode 100644 pkg/genericcontrolplane/server.go diff --git a/pkg/genericcontrolplane/admission/config.go b/pkg/genericcontrolplane/admission/config.go new file mode 100644 index 0000000000000..3c9314b5801d0 --- /dev/null +++ b/pkg/genericcontrolplane/admission/config.go @@ -0,0 +1,82 @@ +/* +Copyright 2018 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 admission + +import ( + "io/ioutil" + "net/http" + "time" + + "k8s.io/klog/v2" + + "go.opentelemetry.io/otel/trace" + + utilwait "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/admission" + webhookinit "k8s.io/apiserver/pkg/admission/plugin/webhook/initializer" + genericapiserver "k8s.io/apiserver/pkg/server" + egressselector "k8s.io/apiserver/pkg/server/egressselector" + "k8s.io/apiserver/pkg/util/webhook" + cacheddiscovery "k8s.io/client-go/discovery/cached/memory" + externalinformers "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/restmapper" + quotainstall "k8s.io/kubernetes/pkg/quota/v1/install" +) + +// Config holds the configuration needed to for initialize the admission plugins +type Config struct { + CloudConfigFile string + LoopbackClientConfig *rest.Config + ExternalInformers externalinformers.SharedInformerFactory +} + +// New sets up the plugins and admission start hooks needed for admission +func (c *Config) New(proxyTransport *http.Transport, egressSelector *egressselector.EgressSelector, serviceResolver webhook.ServiceResolver, tp *trace.TracerProvider) ([]admission.PluginInitializer, genericapiserver.PostStartHookFunc, error) { + webhookAuthResolverWrapper := webhook.NewDefaultAuthenticationInfoResolverWrapper(proxyTransport, egressSelector, c.LoopbackClientConfig, tp) + webhookPluginInitializer := webhookinit.NewPluginInitializer(webhookAuthResolverWrapper, serviceResolver) + + var cloudConfig []byte + if c.CloudConfigFile != "" { + var err error + cloudConfig, err = ioutil.ReadFile(c.CloudConfigFile) + if err != nil { + klog.Fatalf("Error reading from cloud configuration file %s: %#v", c.CloudConfigFile, err) + } + } + clientset, err := kubernetes.NewForConfig(c.LoopbackClientConfig) + if err != nil { + return nil, nil, err + } + + discoveryClient := cacheddiscovery.NewMemCacheClient(clientset.Discovery()) + discoveryRESTMapper := restmapper.NewDeferredDiscoveryRESTMapper(discoveryClient) + kubePluginInitializer := NewPluginInitializer( + cloudConfig, + discoveryRESTMapper, + quotainstall.NewQuotaConfigurationForAdmission(), + ) + + admissionPostStartHook := func(context genericapiserver.PostStartHookContext) error { + discoveryRESTMapper.Reset() + go utilwait.Until(discoveryRESTMapper.Reset, 30*time.Second, context.StopCh) + return nil + } + + return []admission.PluginInitializer{webhookPluginInitializer, kubePluginInitializer}, admissionPostStartHook, nil +} diff --git a/pkg/genericcontrolplane/admission/initializer.go b/pkg/genericcontrolplane/admission/initializer.go new file mode 100644 index 0000000000000..b913b5a76c8cc --- /dev/null +++ b/pkg/genericcontrolplane/admission/initializer.go @@ -0,0 +1,76 @@ +/* +Copyright 2016 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 admission + +import ( + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/admission/initializer" + quota "k8s.io/apiserver/pkg/quota/v1" +) + +// TODO add a `WantsToRun` which takes a stopCh. Might make it generic. + +// WantsCloudConfig defines a function which sets CloudConfig for admission plugins that need it. +type WantsCloudConfig interface { + SetCloudConfig([]byte) +} + +// WantsRESTMapper defines a function which sets RESTMapper for admission plugins that need it. +type WantsRESTMapper interface { + SetRESTMapper(meta.RESTMapper) +} + +// PluginInitializer is used for initialization of the Kubernetes specific admission plugins. +type PluginInitializer struct { + cloudConfig []byte + restMapper meta.RESTMapper + quotaConfiguration quota.Configuration +} + +var _ admission.PluginInitializer = &PluginInitializer{} + +// NewPluginInitializer constructs new instance of PluginInitializer +// TODO: switch these parameters to use the builder pattern or just make them +// all public, this construction method is pointless boilerplate. +func NewPluginInitializer( + cloudConfig []byte, + restMapper meta.RESTMapper, + quotaConfiguration quota.Configuration, +) *PluginInitializer { + return &PluginInitializer{ + cloudConfig: cloudConfig, + restMapper: restMapper, + quotaConfiguration: quotaConfiguration, + } +} + +// Initialize checks the initialization interfaces implemented by each plugin +// and provide the appropriate initialization data +func (i *PluginInitializer) Initialize(plugin admission.Interface) { + if wants, ok := plugin.(WantsCloudConfig); ok { + wants.SetCloudConfig(i.cloudConfig) + } + + if wants, ok := plugin.(WantsRESTMapper); ok { + wants.SetRESTMapper(i.restMapper) + } + + if wants, ok := plugin.(initializer.WantsQuotaConfiguration); ok { + wants.SetQuotaConfiguration(i.quotaConfiguration) + } +} diff --git a/pkg/genericcontrolplane/aggregator.go b/pkg/genericcontrolplane/aggregator.go new file mode 100644 index 0000000000000..0af0a910a56bc --- /dev/null +++ b/pkg/genericcontrolplane/aggregator.go @@ -0,0 +1,325 @@ +/* +Copyright 2017 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 app does all of the work necessary to create a Kubernetes +// APIServer by binding together the API, master and APIServer infrastructure. +// It can be configured and called directly or via the hyperkube framework. +package genericcontrolplane + +import ( + "fmt" + "net/http" + "strings" + "sync" + + "k8s.io/klog/v2" + + apiextensionsinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/admission" + genericfeatures "k8s.io/apiserver/pkg/features" + genericapiserver "k8s.io/apiserver/pkg/server" + "k8s.io/apiserver/pkg/server/healthz" + genericoptions "k8s.io/apiserver/pkg/server/options" + utilfeature "k8s.io/apiserver/pkg/util/feature" + kubeexternalinformers "k8s.io/client-go/informers" + "k8s.io/client-go/tools/cache" + v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" + v1helper "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/helper" + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" + aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" + aggregatorscheme "k8s.io/kube-aggregator/pkg/apiserver/scheme" + apiregistrationclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1" + informers "k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1" + "k8s.io/kube-aggregator/pkg/controllers/autoregister" + "k8s.io/kubernetes/cmd/kube-apiserver/app/options" + "k8s.io/kubernetes/pkg/controlplane/controller/crdregistration" +) + +func createAggregatorConfig( + kubeAPIServerConfig genericapiserver.Config, + commandOptions *options.ServerRunOptions, + externalInformers kubeexternalinformers.SharedInformerFactory, + serviceResolver aggregatorapiserver.ServiceResolver, + proxyTransport *http.Transport, + pluginInitializers []admission.PluginInitializer, +) (*aggregatorapiserver.Config, error) { + // make a shallow copy to let us twiddle a few things + // most of the config actually remains the same. We only need to mess with a couple items related to the particulars of the aggregator + genericConfig := kubeAPIServerConfig + genericConfig.PostStartHooks = map[string]genericapiserver.PostStartHookConfigEntry{} + genericConfig.RESTOptionsGetter = nil + // prevent generic API server from installing the OpenAPI handler. Aggregator server + // has its own customized OpenAPI handler. + genericConfig.SkipOpenAPIInstallation = true + + if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.StorageVersionAPI) && + utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIServerIdentity) { + // Add StorageVersionPrecondition handler to aggregator-apiserver. + // The handler will block write requests to built-in resources until the + // target resources' storage versions are up-to-date. + genericConfig.BuildHandlerChainFunc = genericapiserver.BuildHandlerChainWithStorageVersionPrecondition + } + + // override genericConfig.AdmissionControl with kube-aggregator's scheme, + // because aggregator apiserver should use its own scheme to convert its own resources. + err := commandOptions.Admission.ApplyTo( + &genericConfig, + externalInformers, + genericConfig.LoopbackClientConfig, + utilfeature.DefaultFeatureGate, + pluginInitializers...) + if err != nil { + return nil, err + } + + // copy the etcd options so we don't mutate originals. + etcdOptions := *commandOptions.Etcd + etcdOptions.StorageConfig.Paging = utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIListChunking) + etcdOptions.StorageConfig.Codec = aggregatorscheme.Codecs.LegacyCodec(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion) + etcdOptions.StorageConfig.EncodeVersioner = runtime.NewMultiGroupVersioner(v1.SchemeGroupVersion, schema.GroupKind{Group: v1beta1.GroupName}) + genericConfig.RESTOptionsGetter = &genericoptions.SimpleRestOptionsFactory{Options: etcdOptions} + + // override MergedResourceConfig with aggregator defaults and registry + if err := commandOptions.APIEnablement.ApplyTo( + &genericConfig, + aggregatorapiserver.DefaultAPIResourceConfigSource(), + aggregatorscheme.Scheme); err != nil { + return nil, err + } + + aggregatorConfig := &aggregatorapiserver.Config{ + GenericConfig: &genericapiserver.RecommendedConfig{ + Config: genericConfig, + SharedInformerFactory: externalInformers, + }, + ExtraConfig: aggregatorapiserver.ExtraConfig{ + ProxyClientCertFile: commandOptions.ProxyClientCertFile, + ProxyClientKeyFile: commandOptions.ProxyClientKeyFile, + ServiceResolver: serviceResolver, + ProxyTransport: proxyTransport, + }, + } + + // we need to clear the poststarthooks so we don't add them multiple times to all the servers (that fails) + aggregatorConfig.GenericConfig.PostStartHooks = map[string]genericapiserver.PostStartHookConfigEntry{} + + return aggregatorConfig, nil +} + +func createAggregatorServer(aggregatorConfig *aggregatorapiserver.Config, delegateAPIServer genericapiserver.DelegationTarget, apiExtensionInformers apiextensionsinformers.SharedInformerFactory) (*aggregatorapiserver.APIAggregator, error) { + aggregatorServer, err := aggregatorConfig.Complete().NewWithDelegate(delegateAPIServer) + if err != nil { + return nil, err + } + + // create controllers for auto-registration + apiRegistrationClient, err := apiregistrationclient.NewForConfig(aggregatorConfig.GenericConfig.LoopbackClientConfig) + if err != nil { + return nil, err + } + autoRegistrationController := autoregister.NewAutoRegisterController(aggregatorServer.APIRegistrationInformers.Apiregistration().V1().APIServices(), apiRegistrationClient) + apiServices := apiServicesToRegister(delegateAPIServer, autoRegistrationController) + crdRegistrationController := crdregistration.NewCRDRegistrationController( + apiExtensionInformers.Apiextensions().V1().CustomResourceDefinitions(), + autoRegistrationController) + + err = aggregatorServer.GenericAPIServer.AddPostStartHook("kube-apiserver-autoregistration", func(context genericapiserver.PostStartHookContext) error { + go crdRegistrationController.Run(5, context.StopCh) + go func() { + // let the CRD controller process the initial set of CRDs before starting the autoregistration controller. + // this prevents the autoregistration controller's initial sync from deleting APIServices for CRDs that still exist. + // we only need to do this if CRDs are enabled on this server. We can't use discovery because we are the source for discovery. + if aggregatorConfig.GenericConfig.MergedResourceConfig.AnyVersionForGroupEnabled("apiextensions.k8s.io") { + crdRegistrationController.WaitForInitialSync() + } + autoRegistrationController.Run(5, context.StopCh) + }() + return nil + }) + if err != nil { + return nil, err + } + + err = aggregatorServer.GenericAPIServer.AddBootSequenceHealthChecks( + makeAPIServiceAvailableHealthCheck( + "autoregister-completion", + apiServices, + aggregatorServer.APIRegistrationInformers.Apiregistration().V1().APIServices(), + ), + ) + if err != nil { + return nil, err + } + + return aggregatorServer, nil +} + +func makeAPIService(gv schema.GroupVersion) *v1.APIService { + apiServicePriority, ok := apiVersionPriorities[gv] + if !ok { + // if we aren't found, then we shouldn't register ourselves because it could result in a CRD group version + // being permanently stuck in the APIServices list. + klog.Infof("Skipping APIService creation for %v", gv) + return nil + } + return &v1.APIService{ + ObjectMeta: metav1.ObjectMeta{Name: gv.Version + "." + gv.Group}, + Spec: v1.APIServiceSpec{ + Group: gv.Group, + Version: gv.Version, + GroupPriorityMinimum: apiServicePriority.group, + VersionPriority: apiServicePriority.version, + }, + } +} + +// makeAPIServiceAvailableHealthCheck returns a healthz check that returns healthy +// once all of the specified services have been observed to be available at least once. +func makeAPIServiceAvailableHealthCheck(name string, apiServices []*v1.APIService, apiServiceInformer informers.APIServiceInformer) healthz.HealthChecker { + // Track the auto-registered API services that have not been observed to be available yet + pendingServiceNamesLock := &sync.RWMutex{} + pendingServiceNames := sets.NewString() + for _, service := range apiServices { + pendingServiceNames.Insert(service.Name) + } + + // When an APIService in the list is seen as available, remove it from the pending list + handleAPIServiceChange := func(service *v1.APIService) { + pendingServiceNamesLock.Lock() + defer pendingServiceNamesLock.Unlock() + if !pendingServiceNames.Has(service.Name) { + return + } + if v1helper.IsAPIServiceConditionTrue(service, v1.Available) { + pendingServiceNames.Delete(service.Name) + } + } + + // Watch add/update events for APIServices + apiServiceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { handleAPIServiceChange(obj.(*v1.APIService)) }, + UpdateFunc: func(old, new interface{}) { handleAPIServiceChange(new.(*v1.APIService)) }, + }) + + // Don't return healthy until the pending list is empty + return healthz.NamedCheck(name, func(r *http.Request) error { + pendingServiceNamesLock.RLock() + defer pendingServiceNamesLock.RUnlock() + if pendingServiceNames.Len() > 0 { + return fmt.Errorf("missing APIService: %v", pendingServiceNames.List()) + } + return nil + }) +} + +// priority defines group priority that is used in discovery. This controls +// group position in the kubectl output. +type priority struct { + // group indicates the order of the group relative to other groups. + group int32 + // version indicates the relative order of the version inside of its group. + version int32 +} + +// The proper way to resolve this letting the aggregator know the desired group and version-within-group order of the underlying servers +// is to refactor the genericapiserver.DelegationTarget to include a list of priorities based on which APIs were installed. +// This requires the APIGroupInfo struct to evolve and include the concept of priorities and to avoid mistakes, the core storage map there needs to be updated. +// That ripples out every bit as far as you'd expect, so for 1.7 we'll include the list here instead of being built up during storage. +var apiVersionPriorities = map[schema.GroupVersion]priority{ + {Group: "", Version: "v1"}: {group: 18000, version: 1}, + // to my knowledge, nothing below here collides + {Group: "apps", Version: "v1"}: {group: 17800, version: 15}, + {Group: "events.k8s.io", Version: "v1"}: {group: 17750, version: 15}, + {Group: "events.k8s.io", Version: "v1beta1"}: {group: 17750, version: 5}, + {Group: "authentication.k8s.io", Version: "v1"}: {group: 17700, version: 15}, + {Group: "authentication.k8s.io", Version: "v1beta1"}: {group: 17700, version: 9}, + {Group: "authorization.k8s.io", Version: "v1"}: {group: 17600, version: 15}, + {Group: "authorization.k8s.io", Version: "v1beta1"}: {group: 17600, version: 9}, + {Group: "autoscaling", Version: "v1"}: {group: 17500, version: 15}, + {Group: "autoscaling", Version: "v2beta1"}: {group: 17500, version: 9}, + {Group: "autoscaling", Version: "v2beta2"}: {group: 17500, version: 1}, + {Group: "batch", Version: "v1"}: {group: 17400, version: 15}, + {Group: "batch", Version: "v1beta1"}: {group: 17400, version: 9}, + {Group: "batch", Version: "v2alpha1"}: {group: 17400, version: 9}, + {Group: "certificates.k8s.io", Version: "v1"}: {group: 17300, version: 15}, + {Group: "certificates.k8s.io", Version: "v1beta1"}: {group: 17300, version: 9}, + {Group: "networking.k8s.io", Version: "v1"}: {group: 17200, version: 15}, + {Group: "networking.k8s.io", Version: "v1beta1"}: {group: 17200, version: 9}, + {Group: "extensions", Version: "v1beta1"}: {group: 17150, version: 1}, // prioritize below networking.k8s.io, which contains the GA version of Ingress, the only resource remaining in extensions/v1beta1 + {Group: "policy", Version: "v1"}: {group: 17100, version: 15}, + {Group: "policy", Version: "v1beta1"}: {group: 17100, version: 9}, + {Group: "rbac.authorization.k8s.io", Version: "v1"}: {group: 17000, version: 15}, + {Group: "rbac.authorization.k8s.io", Version: "v1beta1"}: {group: 17000, version: 12}, + {Group: "rbac.authorization.k8s.io", Version: "v1alpha1"}: {group: 17000, version: 9}, + {Group: "storage.k8s.io", Version: "v1"}: {group: 16800, version: 15}, + {Group: "storage.k8s.io", Version: "v1beta1"}: {group: 16800, version: 9}, + {Group: "storage.k8s.io", Version: "v1alpha1"}: {group: 16800, version: 1}, + {Group: "apiextensions.k8s.io", Version: "v1"}: {group: 16700, version: 15}, + {Group: "apiextensions.k8s.io", Version: "v1beta1"}: {group: 16700, version: 9}, + {Group: "admissionregistration.k8s.io", Version: "v1"}: {group: 16700, version: 15}, + {Group: "admissionregistration.k8s.io", Version: "v1beta1"}: {group: 16700, version: 12}, + {Group: "scheduling.k8s.io", Version: "v1"}: {group: 16600, version: 15}, + {Group: "scheduling.k8s.io", Version: "v1beta1"}: {group: 16600, version: 12}, + {Group: "scheduling.k8s.io", Version: "v1alpha1"}: {group: 16600, version: 9}, + {Group: "coordination.k8s.io", Version: "v1"}: {group: 16500, version: 15}, + {Group: "coordination.k8s.io", Version: "v1beta1"}: {group: 16500, version: 9}, + {Group: "node.k8s.io", Version: "v1"}: {group: 16300, version: 15}, + {Group: "node.k8s.io", Version: "v1alpha1"}: {group: 16300, version: 1}, + {Group: "node.k8s.io", Version: "v1beta1"}: {group: 16300, version: 9}, + {Group: "discovery.k8s.io", Version: "v1"}: {group: 16200, version: 15}, + {Group: "discovery.k8s.io", Version: "v1beta1"}: {group: 16200, version: 12}, + {Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"}: {group: 16100, version: 12}, + {Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16100, version: 9}, + {Group: "internal.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16000, version: 9}, + // Append a new group to the end of the list if unsure. + // You can use min(existing group)-100 as the initial value for a group. + // Version can be set to 9 (to have space around) for a new group. +} + +func apiServicesToRegister(delegateAPIServer genericapiserver.DelegationTarget, registration autoregister.AutoAPIServiceRegistration) []*v1.APIService { + apiServices := []*v1.APIService{} + + for _, curr := range delegateAPIServer.ListedPaths() { + if curr == "/api/v1" { + apiService := makeAPIService(schema.GroupVersion{Group: "", Version: "v1"}) + registration.AddAPIServiceToSyncOnStart(apiService) + apiServices = append(apiServices, apiService) + continue + } + + if !strings.HasPrefix(curr, "/apis/") { + continue + } + // this comes back in a list that looks like /apis/rbac.authorization.k8s.io/v1alpha1 + tokens := strings.Split(curr, "/") + if len(tokens) != 4 { + continue + } + + apiService := makeAPIService(schema.GroupVersion{Group: tokens[2], Version: tokens[3]}) + if apiService == nil { + continue + } + registration.AddAPIServiceToSyncOnStart(apiService) + apiServices = append(apiServices, apiService) + } + + return apiServices +} diff --git a/pkg/genericcontrolplane/apiextensions.go b/pkg/genericcontrolplane/apiextensions.go new file mode 100644 index 0000000000000..0f8575c3d6eae --- /dev/null +++ b/pkg/genericcontrolplane/apiextensions.go @@ -0,0 +1,105 @@ +/* +Copyright 2017 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 app does all of the work necessary to create a Kubernetes +// APIServer by binding together the API, master and APIServer infrastructure. +// It can be configured and called directly or via the hyperkube framework. +package genericcontrolplane + +import ( + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + apiextensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" + apiextensionsoptions "k8s.io/apiextensions-apiserver/pkg/cmd/server/options" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/features" + genericapiserver "k8s.io/apiserver/pkg/server" + genericoptions "k8s.io/apiserver/pkg/server/options" + "k8s.io/apiserver/pkg/util/feature" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/apiserver/pkg/util/webhook" + kubeexternalinformers "k8s.io/client-go/informers" + "k8s.io/kubernetes/cmd/kube-apiserver/app/options" +) + +func createAPIExtensionsConfig( + kubeAPIServerConfig genericapiserver.Config, + externalInformers kubeexternalinformers.SharedInformerFactory, + pluginInitializers []admission.PluginInitializer, + commandOptions *options.ServerRunOptions, + masterCount int, + serviceResolver webhook.ServiceResolver, + authResolverWrapper webhook.AuthenticationInfoResolverWrapper, +) (*apiextensionsapiserver.Config, error) { + // make a shallow copy to let us twiddle a few things + // most of the config actually remains the same. We only need to mess with a couple items related to the particulars of the apiextensions + genericConfig := kubeAPIServerConfig + genericConfig.PostStartHooks = map[string]genericapiserver.PostStartHookConfigEntry{} + genericConfig.RESTOptionsGetter = nil + + // override genericConfig.AdmissionControl with apiextensions' scheme, + // because apiextensions apiserver should use its own scheme to convert resources. + err := commandOptions.Admission.ApplyTo( + &genericConfig, + externalInformers, + genericConfig.LoopbackClientConfig, + feature.DefaultFeatureGate, + pluginInitializers...) + if err != nil { + return nil, err + } + + // copy the etcd options so we don't mutate originals. + etcdOptions := *commandOptions.Etcd + etcdOptions.StorageConfig.Paging = utilfeature.DefaultFeatureGate.Enabled(features.APIListChunking) + // this is where the true decodable levels come from. + etcdOptions.StorageConfig.Codec = apiextensionsapiserver.Codecs.LegacyCodec(v1beta1.SchemeGroupVersion, v1.SchemeGroupVersion) + // prefer the more compact serialization (v1beta1) for storage until http://issue.k8s.io/82292 is resolved for objects whose v1 serialization is too big but whose v1beta1 serialization can be stored + etcdOptions.StorageConfig.EncodeVersioner = runtime.NewMultiGroupVersioner(v1beta1.SchemeGroupVersion, schema.GroupKind{Group: v1beta1.GroupName}) + genericConfig.RESTOptionsGetter = &genericoptions.SimpleRestOptionsFactory{Options: etcdOptions} + + // override MergedResourceConfig with apiextensions defaults and registry + if err := commandOptions.APIEnablement.ApplyTo( + &genericConfig, + apiextensionsapiserver.DefaultAPIResourceConfigSource(), + apiextensionsapiserver.Scheme); err != nil { + return nil, err + } + + apiextensionsConfig := &apiextensionsapiserver.Config{ + GenericConfig: &genericapiserver.RecommendedConfig{ + Config: genericConfig, + SharedInformerFactory: externalInformers, + }, + ExtraConfig: apiextensionsapiserver.ExtraConfig{ + CRDRESTOptionsGetter: apiextensionsoptions.NewCRDRESTOptionsGetter(etcdOptions), + MasterCount: masterCount, + AuthResolverWrapper: authResolverWrapper, + ServiceResolver: serviceResolver, + }, + } + + // we need to clear the poststarthooks so we don't add them multiple times to all the servers (that fails) + apiextensionsConfig.GenericConfig.PostStartHooks = map[string]genericapiserver.PostStartHookConfigEntry{} + + return apiextensionsConfig, nil +} + +func createAPIExtensionsServer(apiextensionsConfig *apiextensionsapiserver.Config, delegateAPIServer genericapiserver.DelegationTarget) (*apiextensionsapiserver.CustomResourceDefinitions, error) { + return apiextensionsConfig.Complete().New(delegateAPIServer) +} diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go new file mode 100644 index 0000000000000..a01df9d16002a --- /dev/null +++ b/pkg/genericcontrolplane/server.go @@ -0,0 +1,693 @@ +/* +Copyright 2014 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 app does all of the work necessary to create a Kubernetes +// APIServer by binding together the API, master and APIServer infrastructure. +// It can be configured and called directly or via the hyperkube framework. +package genericcontrolplane + +import ( + "crypto/tls" + "fmt" + "net" + "net/http" + "net/url" + "os" + "strings" + "time" + + "github.com/spf13/cobra" + "github.com/spf13/pflag" + + extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + utilnet "k8s.io/apimachinery/pkg/util/net" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/authorization/authorizer" + openapinamer "k8s.io/apiserver/pkg/endpoints/openapi" + genericfeatures "k8s.io/apiserver/pkg/features" + genericapiserver "k8s.io/apiserver/pkg/server" + "k8s.io/apiserver/pkg/server/egressselector" + "k8s.io/apiserver/pkg/server/filters" + serveroptions "k8s.io/apiserver/pkg/server/options" + serverstorage "k8s.io/apiserver/pkg/server/storage" + utilfeature "k8s.io/apiserver/pkg/util/feature" + utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" + "k8s.io/apiserver/pkg/util/webhook" + clientgoinformers "k8s.io/client-go/informers" + clientgoclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/util/keyutil" + cliflag "k8s.io/component-base/cli/flag" + "k8s.io/component-base/cli/globalflag" + _ "k8s.io/component-base/metrics/prometheus/workqueue" // for workqueue metric registration + "k8s.io/component-base/term" + "k8s.io/component-base/version" + "k8s.io/component-base/version/verflag" + "k8s.io/klog/v2" + aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" + aggregatorscheme "k8s.io/kube-aggregator/pkg/apiserver/scheme" + + "k8s.io/kubernetes/cmd/kube-apiserver/app/options" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/capabilities" + "k8s.io/kubernetes/pkg/controlplane" + "k8s.io/kubernetes/pkg/controlplane/reconcilers" + generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" + "k8s.io/kubernetes/pkg/kubeapiserver" + kubeapiserveradmission "k8s.io/kubernetes/pkg/kubeapiserver/admission" + kubeauthenticator "k8s.io/kubernetes/pkg/kubeapiserver/authenticator" + "k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes" + rbacrest "k8s.io/kubernetes/pkg/registry/rbac/rest" + "k8s.io/kubernetes/pkg/serviceaccount" +) + +// TODO: delete this check after insecure flags removed in v1.24 +func checkNonZeroInsecurePort(fs *pflag.FlagSet) error { + for _, name := range options.InsecurePortFlags { + val, err := fs.GetInt(name) + if err != nil { + return err + } + if val != 0 { + return fmt.Errorf("invalid port value %d: only zero is allowed", val) + } + } + return nil +} + +// NewAPIServerCommand creates a *cobra.Command object with default parameters +func NewAPIServerCommand() *cobra.Command { + s := options.NewServerRunOptions() + cmd := &cobra.Command{ + Use: "kube-apiserver", + Long: `The Kubernetes API server validates and configures data +for the api objects which include pods, services, replicationcontrollers, and +others. The API Server services REST operations and provides the frontend to the +cluster's shared state through which all other components interact.`, + + // stop printing usage when the command errors + SilenceUsage: true, + PersistentPreRunE: func(*cobra.Command, []string) error { + // silence client-go warnings. + // kube-apiserver loopback clients should not log self-issued warnings. + rest.SetDefaultWarningHandler(rest.NoWarnings{}) + return nil + }, + RunE: func(cmd *cobra.Command, args []string) error { + verflag.PrintAndExitIfRequested() + fs := cmd.Flags() + cliflag.PrintFlags(fs) + + err := checkNonZeroInsecurePort(fs) + if err != nil { + return err + } + // set default options + completedOptions, err := Complete(s) + if err != nil { + return err + } + + // validate options + if errs := completedOptions.Validate(); len(errs) != 0 { + return utilerrors.NewAggregate(errs) + } + + return Run(completedOptions, genericapiserver.SetupSignalHandler()) + }, + Args: func(cmd *cobra.Command, args []string) error { + for _, arg := range args { + if len(arg) > 0 { + return fmt.Errorf("%q does not take any arguments, got %q", cmd.CommandPath(), args) + } + } + return nil + }, + } + + fs := cmd.Flags() + namedFlagSets := s.Flags() + verflag.AddFlags(namedFlagSets.FlagSet("global")) + globalflag.AddGlobalFlags(namedFlagSets.FlagSet("global"), cmd.Name()) + options.AddCustomGlobalFlags(namedFlagSets.FlagSet("generic")) + for _, f := range namedFlagSets.FlagSets { + fs.AddFlagSet(f) + } + + cols, _, _ := term.TerminalSize(cmd.OutOrStdout()) + cliflag.SetUsageAndHelpFunc(cmd, namedFlagSets, cols) + + return cmd +} + +// Run runs the specified APIServer. This should never exit. +func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) error { + // To help debugging, immediately log version + klog.Infof("Version: %+v", version.Get()) + + server, err := CreateServerChain(completeOptions, stopCh) + if err != nil { + return err + } + + prepared, err := server.PrepareRun() + if err != nil { + return err + } + + return prepared.Run(stopCh) +} + +// CreateServerChain creates the apiservers connected via delegation. +func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan struct{}) (*aggregatorapiserver.APIAggregator, error) { + kubeAPIServerConfig, serviceResolver, pluginInitializer, err := CreateKubeAPIServerConfig(completedOptions) + if err != nil { + return nil, err + } + + // If additional API servers are added, they should be gated. + apiExtensionsConfig, err := createAPIExtensionsConfig(*kubeAPIServerConfig.GenericConfig, kubeAPIServerConfig.ExtraConfig.VersionedInformers, pluginInitializer, completedOptions.ServerRunOptions, completedOptions.MasterCount, + serviceResolver, webhook.NewDefaultAuthenticationInfoResolverWrapper(kubeAPIServerConfig.ExtraConfig.ProxyTransport, kubeAPIServerConfig.GenericConfig.EgressSelector, kubeAPIServerConfig.GenericConfig.LoopbackClientConfig, kubeAPIServerConfig.GenericConfig.TracerProvider)) + if err != nil { + return nil, err + } + apiExtensionsServer, err := createAPIExtensionsServer(apiExtensionsConfig, genericapiserver.NewEmptyDelegate()) + if err != nil { + return nil, err + } + + kubeAPIServer, err := CreateKubeAPIServer(kubeAPIServerConfig, apiExtensionsServer.GenericAPIServer) + if err != nil { + return nil, err + } + + // aggregator comes last in the chain + aggregatorConfig, err := createAggregatorConfig(*kubeAPIServerConfig.GenericConfig, completedOptions.ServerRunOptions, kubeAPIServerConfig.ExtraConfig.VersionedInformers, serviceResolver, kubeAPIServerConfig.ExtraConfig.ProxyTransport, pluginInitializer) + if err != nil { + return nil, err + } + aggregatorServer, err := createAggregatorServer(aggregatorConfig, kubeAPIServer.GenericAPIServer, apiExtensionsServer.Informers) + if err != nil { + // we don't need special handling for innerStopCh because the aggregator server doesn't create any go routines + return nil, err + } + + return aggregatorServer, nil +} + +// CreateKubeAPIServer creates and wires a workable kube-apiserver +func CreateKubeAPIServer(kubeAPIServerConfig *controlplane.Config, delegateAPIServer genericapiserver.DelegationTarget) (*controlplane.Instance, error) { + kubeAPIServer, err := kubeAPIServerConfig.Complete().New(delegateAPIServer) + if err != nil { + return nil, err + } + + return kubeAPIServer, nil +} + +// CreateProxyTransport creates the dialer infrastructure to connect to the nodes. +func CreateProxyTransport() *http.Transport { + var proxyDialerFn utilnet.DialFunc + // Proxying to pods and services is IP-based... don't expect to be able to verify the hostname + proxyTLSClientConfig := &tls.Config{InsecureSkipVerify: true} + proxyTransport := utilnet.SetTransportDefaults(&http.Transport{ + DialContext: proxyDialerFn, + TLSClientConfig: proxyTLSClientConfig, + }) + return proxyTransport +} + +// CreateKubeAPIServerConfig creates all the resources for running the API server, but runs none of them +func CreateKubeAPIServerConfig(s completedServerRunOptions) ( + *controlplane.Config, + aggregatorapiserver.ServiceResolver, + []admission.PluginInitializer, + error, +) { + proxyTransport := CreateProxyTransport() + + genericConfig, versionedInformers, serviceResolver, pluginInitializers, admissionPostStartHook, storageFactory, err := buildGenericConfig(s.ServerRunOptions, proxyTransport) + if err != nil { + return nil, nil, nil, err + } + + capabilities.Initialize(capabilities.Capabilities{ + AllowPrivileged: s.AllowPrivileged, + // TODO(vmarmol): Implement support for HostNetworkSources. + PrivilegedSources: capabilities.PrivilegedSources{ + HostNetworkSources: []string{}, + HostPIDSources: []string{}, + HostIPCSources: []string{}, + }, + PerConnectionBandwidthLimitBytesPerSec: s.MaxConnectionBytesPerSec, + }) + + s.Metrics.Apply() + serviceaccount.RegisterMetrics() + + s.Logs.Apply() + + config := &controlplane.Config{ + GenericConfig: genericConfig, + ExtraConfig: controlplane.ExtraConfig{ + APIResourceConfigSource: storageFactory.APIResourceConfigSource, + StorageFactory: storageFactory, + EventTTL: s.EventTTL, + KubeletClientConfig: s.KubeletConfig, + EnableLogsSupport: s.EnableLogsHandler, + ProxyTransport: proxyTransport, + + ServiceIPRange: s.PrimaryServiceClusterIPRange, + APIServerServiceIP: s.APIServerServiceIP, + SecondaryServiceIPRange: s.SecondaryServiceClusterIPRange, + + APIServerServicePort: 443, + + ServiceNodePortRange: s.ServiceNodePortRange, + KubernetesServiceNodePort: s.KubernetesServiceNodePort, + + EndpointReconcilerType: reconcilers.Type(s.EndpointReconcilerType), + MasterCount: s.MasterCount, + + ServiceAccountIssuer: s.ServiceAccountIssuer, + ServiceAccountMaxExpiration: s.ServiceAccountTokenMaxExpiration, + ExtendExpiration: s.Authentication.ServiceAccounts.ExtendExpiration, + + VersionedInformers: versionedInformers, + + IdentityLeaseDurationSeconds: s.IdentityLeaseDurationSeconds, + IdentityLeaseRenewIntervalSeconds: s.IdentityLeaseRenewIntervalSeconds, + }, + } + + clientCAProvider, err := s.Authentication.ClientCert.GetClientCAContentProvider() + if err != nil { + return nil, nil, nil, err + } + config.ExtraConfig.ClusterAuthenticationInfo.ClientCA = clientCAProvider + + requestHeaderConfig, err := s.Authentication.RequestHeader.ToAuthenticationRequestHeaderConfig() + if err != nil { + return nil, nil, nil, err + } + if requestHeaderConfig != nil { + config.ExtraConfig.ClusterAuthenticationInfo.RequestHeaderCA = requestHeaderConfig.CAContentProvider + config.ExtraConfig.ClusterAuthenticationInfo.RequestHeaderAllowedNames = requestHeaderConfig.AllowedClientNames + config.ExtraConfig.ClusterAuthenticationInfo.RequestHeaderExtraHeaderPrefixes = requestHeaderConfig.ExtraHeaderPrefixes + config.ExtraConfig.ClusterAuthenticationInfo.RequestHeaderGroupHeaders = requestHeaderConfig.GroupHeaders + config.ExtraConfig.ClusterAuthenticationInfo.RequestHeaderUsernameHeaders = requestHeaderConfig.UsernameHeaders + } + + if err := config.GenericConfig.AddPostStartHook("start-kube-apiserver-admission-initializer", admissionPostStartHook); err != nil { + return nil, nil, nil, err + } + + if config.GenericConfig.EgressSelector != nil { + // Use the config.GenericConfig.EgressSelector lookup to find the dialer to connect to the kubelet + config.ExtraConfig.KubeletClientConfig.Lookup = config.GenericConfig.EgressSelector.Lookup + + // Use the config.GenericConfig.EgressSelector lookup as the transport used by the "proxy" subresources. + networkContext := egressselector.Cluster.AsNetworkContext() + dialer, err := config.GenericConfig.EgressSelector.Lookup(networkContext) + if err != nil { + return nil, nil, nil, err + } + c := proxyTransport.Clone() + c.DialContext = dialer + config.ExtraConfig.ProxyTransport = c + } + + // Load the public keys. + var pubKeys []interface{} + for _, f := range s.Authentication.ServiceAccounts.KeyFiles { + keys, err := keyutil.PublicKeysFromFile(f) + if err != nil { + return nil, nil, nil, fmt.Errorf("failed to parse key file %q: %v", f, err) + } + pubKeys = append(pubKeys, keys...) + } + // Plumb the required metadata through ExtraConfig. + config.ExtraConfig.ServiceAccountIssuerURL = s.Authentication.ServiceAccounts.Issuers[0] + config.ExtraConfig.ServiceAccountJWKSURI = s.Authentication.ServiceAccounts.JWKSURI + config.ExtraConfig.ServiceAccountPublicKeys = pubKeys + + return config, serviceResolver, pluginInitializers, nil +} + +// BuildGenericConfig takes the master server options and produces the genericapiserver.Config associated with it +func buildGenericConfig( + s *options.ServerRunOptions, + proxyTransport *http.Transport, +) ( + genericConfig *genericapiserver.Config, + versionedInformers clientgoinformers.SharedInformerFactory, + serviceResolver aggregatorapiserver.ServiceResolver, + pluginInitializers []admission.PluginInitializer, + admissionPostStartHook genericapiserver.PostStartHookFunc, + storageFactory *serverstorage.DefaultStorageFactory, + lastErr error, +) { + genericConfig = genericapiserver.NewConfig(legacyscheme.Codecs) + genericConfig.MergedResourceConfig = controlplane.DefaultAPIResourceConfigSource() + + if lastErr = s.GenericServerRunOptions.ApplyTo(genericConfig); lastErr != nil { + return + } + + if lastErr = s.SecureServing.ApplyTo(&genericConfig.SecureServing, &genericConfig.LoopbackClientConfig); lastErr != nil { + return + } + if lastErr = s.Features.ApplyTo(genericConfig); lastErr != nil { + return + } + if lastErr = s.APIEnablement.ApplyTo(genericConfig, controlplane.DefaultAPIResourceConfigSource(), legacyscheme.Scheme); lastErr != nil { + return + } + if lastErr = s.EgressSelector.ApplyTo(genericConfig); lastErr != nil { + return + } + if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIServerTracing) { + if lastErr = s.Traces.ApplyTo(genericConfig.EgressSelector, genericConfig); lastErr != nil { + return + } + } + + genericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(generatedopenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(legacyscheme.Scheme, extensionsapiserver.Scheme, aggregatorscheme.Scheme)) + genericConfig.OpenAPIConfig.Info.Title = "Kubernetes" + genericConfig.LongRunningFunc = filters.BasicLongRunningRequestCheck( + sets.NewString("watch", "proxy"), + sets.NewString("attach", "exec", "proxy", "log", "portforward"), + ) + + kubeVersion := version.Get() + genericConfig.Version = &kubeVersion + + storageFactoryConfig := kubeapiserver.NewStorageFactoryConfig() + storageFactoryConfig.APIResourceConfig = genericConfig.MergedResourceConfig + completedStorageFactoryConfig, err := storageFactoryConfig.Complete(s.Etcd) + if err != nil { + lastErr = err + return + } + storageFactory, lastErr = completedStorageFactoryConfig.New() + if lastErr != nil { + return + } + if genericConfig.EgressSelector != nil { + storageFactory.StorageConfig.Transport.EgressLookup = genericConfig.EgressSelector.Lookup + } + if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIServerTracing) && genericConfig.TracerProvider != nil { + storageFactory.StorageConfig.Transport.TracerProvider = genericConfig.TracerProvider + } + if lastErr = s.Etcd.ApplyWithStorageFactoryTo(storageFactory, genericConfig); lastErr != nil { + return + } + + // Use protobufs for self-communication. + // Since not every generic apiserver has to support protobufs, we + // cannot default to it in generic apiserver and need to explicitly + // set it in kube-apiserver. + genericConfig.LoopbackClientConfig.ContentConfig.ContentType = "application/vnd.kubernetes.protobuf" + // Disable compression for self-communication, since we are going to be + // on a fast local network + genericConfig.LoopbackClientConfig.DisableCompression = true + + kubeClientConfig := genericConfig.LoopbackClientConfig + clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) + if err != nil { + lastErr = fmt.Errorf("failed to create real external clientset: %v", err) + return + } + versionedInformers = clientgoinformers.NewSharedInformerFactory(clientgoExternalClient, 10*time.Minute) + + // Authentication.ApplyTo requires already applied OpenAPIConfig and EgressSelector if present + if lastErr = s.Authentication.ApplyTo(&genericConfig.Authentication, genericConfig.SecureServing, genericConfig.EgressSelector, genericConfig.OpenAPIConfig, clientgoExternalClient, versionedInformers); lastErr != nil { + return + } + + genericConfig.Authorization.Authorizer, genericConfig.RuleResolver, err = BuildAuthorizer(s, genericConfig.EgressSelector, versionedInformers) + if err != nil { + lastErr = fmt.Errorf("invalid authorization config: %v", err) + return + } + if !sets.NewString(s.Authorization.Modes...).Has(modes.ModeRBAC) { + genericConfig.DisabledPostStartHooks.Insert(rbacrest.PostStartHookName) + } + + lastErr = s.Audit.ApplyTo(genericConfig) + if lastErr != nil { + return + } + + admissionConfig := &kubeapiserveradmission.Config{ + ExternalInformers: versionedInformers, + LoopbackClientConfig: genericConfig.LoopbackClientConfig, + CloudConfigFile: s.CloudProvider.CloudConfigFile, + } + serviceResolver = buildServiceResolver(s.EnableAggregatorRouting, genericConfig.LoopbackClientConfig.Host, versionedInformers) + pluginInitializers, admissionPostStartHook, err = admissionConfig.New(proxyTransport, genericConfig.EgressSelector, serviceResolver, genericConfig.TracerProvider) + if err != nil { + lastErr = fmt.Errorf("failed to create admission plugin initializer: %v", err) + return + } + + err = s.Admission.ApplyTo( + genericConfig, + versionedInformers, + kubeClientConfig, + utilfeature.DefaultFeatureGate, + pluginInitializers...) + if err != nil { + lastErr = fmt.Errorf("failed to initialize admission: %v", err) + return + } + + if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && s.GenericServerRunOptions.EnablePriorityAndFairness { + genericConfig.FlowControl, lastErr = BuildPriorityAndFairness(s, clientgoExternalClient, versionedInformers) + } + + return +} + +// BuildAuthorizer constructs the authorizer +func BuildAuthorizer(s *options.ServerRunOptions, EgressSelector *egressselector.EgressSelector, versionedInformers clientgoinformers.SharedInformerFactory) (authorizer.Authorizer, authorizer.RuleResolver, error) { + authorizationConfig := s.Authorization.ToAuthorizationConfig(versionedInformers) + + if EgressSelector != nil { + egressDialer, err := EgressSelector.Lookup(egressselector.ControlPlane.AsNetworkContext()) + if err != nil { + return nil, nil, err + } + authorizationConfig.CustomDial = egressDialer + } + + return authorizationConfig.New() +} + +// BuildPriorityAndFairness constructs the guts of the API Priority and Fairness filter +func BuildPriorityAndFairness(s *options.ServerRunOptions, extclient clientgoclientset.Interface, versionedInformer clientgoinformers.SharedInformerFactory) (utilflowcontrol.Interface, error) { + if s.GenericServerRunOptions.MaxRequestsInFlight+s.GenericServerRunOptions.MaxMutatingRequestsInFlight <= 0 { + return nil, fmt.Errorf("invalid configuration: MaxRequestsInFlight=%d and MaxMutatingRequestsInFlight=%d; they must add up to something positive", s.GenericServerRunOptions.MaxRequestsInFlight, s.GenericServerRunOptions.MaxMutatingRequestsInFlight) + } + return utilflowcontrol.New( + versionedInformer, + extclient.FlowcontrolV1beta1(), + s.GenericServerRunOptions.MaxRequestsInFlight+s.GenericServerRunOptions.MaxMutatingRequestsInFlight, + s.GenericServerRunOptions.RequestTimeout/4, + ), nil +} + +// completedServerRunOptions is a private wrapper that enforces a call of Complete() before Run can be invoked. +type completedServerRunOptions struct { + *options.ServerRunOptions +} + +// Complete set default ServerRunOptions. +// Should be called after kube-apiserver flags parsed. +func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { + var options completedServerRunOptions + // set defaults + if err := s.GenericServerRunOptions.DefaultAdvertiseAddress(s.SecureServing.SecureServingOptions); err != nil { + return options, err + } + + // process s.ServiceClusterIPRange from list to Primary and Secondary + // we process secondary only if provided by user + apiServerServiceIP, primaryServiceIPRange, secondaryServiceIPRange, err := getServiceIPAndRanges(s.ServiceClusterIPRanges) + if err != nil { + return options, err + } + s.PrimaryServiceClusterIPRange = primaryServiceIPRange + s.SecondaryServiceClusterIPRange = secondaryServiceIPRange + s.APIServerServiceIP = apiServerServiceIP + + if err := s.SecureServing.MaybeDefaultWithSelfSignedCerts(s.GenericServerRunOptions.AdvertiseAddress.String(), []string{"kubernetes.default.svc", "kubernetes.default", "kubernetes"}, []net.IP{apiServerServiceIP}); err != nil { + return options, fmt.Errorf("error creating self-signed certificates: %v", err) + } + + if len(s.GenericServerRunOptions.ExternalHost) == 0 { + if len(s.GenericServerRunOptions.AdvertiseAddress) > 0 { + s.GenericServerRunOptions.ExternalHost = s.GenericServerRunOptions.AdvertiseAddress.String() + } else { + if hostname, err := os.Hostname(); err == nil { + s.GenericServerRunOptions.ExternalHost = hostname + } else { + return options, fmt.Errorf("error finding host name: %v", err) + } + } + klog.Infof("external host was not specified, using %v", s.GenericServerRunOptions.ExternalHost) + } + + s.Authentication.ApplyAuthorization(s.Authorization) + + // Use (ServiceAccountSigningKeyFile != "") as a proxy to the user enabling + // TokenRequest functionality. This defaulting was convenient, but messed up + // a lot of people when they rotated their serving cert with no idea it was + // connected to their service account keys. We are taking this opportunity to + // remove this problematic defaulting. + if s.ServiceAccountSigningKeyFile == "" { + // Default to the private server key for service account token signing + if len(s.Authentication.ServiceAccounts.KeyFiles) == 0 && s.SecureServing.ServerCert.CertKey.KeyFile != "" { + if kubeauthenticator.IsValidServiceAccountKeyFile(s.SecureServing.ServerCert.CertKey.KeyFile) { + s.Authentication.ServiceAccounts.KeyFiles = []string{s.SecureServing.ServerCert.CertKey.KeyFile} + } else { + klog.Warning("No TLS key provided, service account token authentication disabled") + } + } + } + + if s.ServiceAccountSigningKeyFile != "" && len(s.Authentication.ServiceAccounts.Issuers) != 0 && s.Authentication.ServiceAccounts.Issuers[0] != "" { + sk, err := keyutil.PrivateKeyFromFile(s.ServiceAccountSigningKeyFile) + if err != nil { + return options, fmt.Errorf("failed to parse service-account-issuer-key-file: %v", err) + } + if s.Authentication.ServiceAccounts.MaxExpiration != 0 { + lowBound := time.Hour + upBound := time.Duration(1<<32) * time.Second + if s.Authentication.ServiceAccounts.MaxExpiration < lowBound || + s.Authentication.ServiceAccounts.MaxExpiration > upBound { + return options, fmt.Errorf("the service-account-max-token-expiration must be between 1 hour and 2^32 seconds") + } + if s.Authentication.ServiceAccounts.ExtendExpiration { + if s.Authentication.ServiceAccounts.MaxExpiration < serviceaccount.WarnOnlyBoundTokenExpirationSeconds*time.Second { + klog.Warningf("service-account-extend-token-expiration is true, in order to correctly trigger safe transition logic, service-account-max-token-expiration must be set longer than %d seconds (currently %s)", serviceaccount.WarnOnlyBoundTokenExpirationSeconds, s.Authentication.ServiceAccounts.MaxExpiration) + } + if s.Authentication.ServiceAccounts.MaxExpiration < serviceaccount.ExpirationExtensionSeconds*time.Second { + klog.Warningf("service-account-extend-token-expiration is true, enabling tokens valid up to %d seconds, which is longer than service-account-max-token-expiration set to %s seconds", serviceaccount.ExpirationExtensionSeconds, s.Authentication.ServiceAccounts.MaxExpiration) + } + } + } + + s.ServiceAccountIssuer, err = serviceaccount.JWTTokenGenerator(s.Authentication.ServiceAccounts.Issuers[0], sk) + if err != nil { + return options, fmt.Errorf("failed to build token generator: %v", err) + } + s.ServiceAccountTokenMaxExpiration = s.Authentication.ServiceAccounts.MaxExpiration + } + + if s.Etcd.EnableWatchCache { + sizes := kubeapiserver.DefaultWatchCacheSizes() + // Ensure that overrides parse correctly. + userSpecified, err := serveroptions.ParseWatchCacheSizes(s.Etcd.WatchCacheSizes) + if err != nil { + return options, err + } + for resource, size := range userSpecified { + sizes[resource] = size + } + s.Etcd.WatchCacheSizes, err = serveroptions.WriteWatchCacheSizes(sizes) + if err != nil { + return options, err + } + } + + for key, value := range s.APIEnablement.RuntimeConfig { + if key == "v1" || strings.HasPrefix(key, "v1/") || + key == "api/v1" || strings.HasPrefix(key, "api/v1/") { + delete(s.APIEnablement.RuntimeConfig, key) + s.APIEnablement.RuntimeConfig["/v1"] = value + } + if key == "api/legacy" { + delete(s.APIEnablement.RuntimeConfig, key) + } + } + + options.ServerRunOptions = s + return options, nil +} + +func buildServiceResolver(enabledAggregatorRouting bool, hostname string, informer clientgoinformers.SharedInformerFactory) webhook.ServiceResolver { + var serviceResolver webhook.ServiceResolver + if enabledAggregatorRouting { + serviceResolver = aggregatorapiserver.NewEndpointServiceResolver( + informer.Core().V1().Services().Lister(), + informer.Core().V1().Endpoints().Lister(), + ) + } else { + serviceResolver = aggregatorapiserver.NewClusterIPServiceResolver( + informer.Core().V1().Services().Lister(), + ) + } + // resolve kubernetes.default.svc locally + if localHost, err := url.Parse(hostname); err == nil { + serviceResolver = aggregatorapiserver.NewLoopbackServiceResolver(serviceResolver, localHost) + } + return serviceResolver +} + +func getServiceIPAndRanges(serviceClusterIPRanges string) (net.IP, net.IPNet, net.IPNet, error) { + serviceClusterIPRangeList := []string{} + if serviceClusterIPRanges != "" { + serviceClusterIPRangeList = strings.Split(serviceClusterIPRanges, ",") + } + + var apiServerServiceIP net.IP + var primaryServiceIPRange net.IPNet + var secondaryServiceIPRange net.IPNet + var err error + // nothing provided by user, use default range (only applies to the Primary) + if len(serviceClusterIPRangeList) == 0 { + var primaryServiceClusterCIDR net.IPNet + primaryServiceIPRange, apiServerServiceIP, err = controlplane.ServiceIPRange(primaryServiceClusterCIDR) + if err != nil { + return net.IP{}, net.IPNet{}, net.IPNet{}, fmt.Errorf("error determining service IP ranges: %v", err) + } + return apiServerServiceIP, primaryServiceIPRange, net.IPNet{}, nil + } + + _, primaryServiceClusterCIDR, err := net.ParseCIDR(serviceClusterIPRangeList[0]) + if err != nil { + return net.IP{}, net.IPNet{}, net.IPNet{}, fmt.Errorf("service-cluster-ip-range[0] is not a valid cidr") + } + + primaryServiceIPRange, apiServerServiceIP, err = controlplane.ServiceIPRange(*(primaryServiceClusterCIDR)) + if err != nil { + return net.IP{}, net.IPNet{}, net.IPNet{}, fmt.Errorf("error determining service IP ranges for primary service cidr: %v", err) + } + + // user provided at least two entries + // note: validation asserts that the list is max of two dual stack entries + if len(serviceClusterIPRangeList) > 1 { + _, secondaryServiceClusterCIDR, err := net.ParseCIDR(serviceClusterIPRangeList[1]) + if err != nil { + return net.IP{}, net.IPNet{}, net.IPNet{}, fmt.Errorf("service-cluster-ip-range[1] is not an ip net") + } + secondaryServiceIPRange = *secondaryServiceClusterCIDR + } + return apiServerServiceIP, primaryServiceIPRange, secondaryServiceIPRange, nil +} From 4c9d920e4fcc90c294ad0b48267e13bca158ed02 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Mon, 20 Jul 2020 21:27:06 -0400 Subject: [PATCH 02/87] NEW: Generic control plane based of the upstream kube-apiserver --- pkg/genericcontrolplane/admission/config.go | 25 +- .../admission/initializer.go | 7 - pkg/genericcontrolplane/aggregator.go | 31 +- pkg/genericcontrolplane/server.go | 327 +----------------- 4 files changed, 18 insertions(+), 372 deletions(-) diff --git a/pkg/genericcontrolplane/admission/config.go b/pkg/genericcontrolplane/admission/config.go index 3c9314b5801d0..64f04cd0c83d0 100644 --- a/pkg/genericcontrolplane/admission/config.go +++ b/pkg/genericcontrolplane/admission/config.go @@ -17,20 +17,11 @@ limitations under the License. package admission import ( - "io/ioutil" - "net/http" "time" - "k8s.io/klog/v2" - - "go.opentelemetry.io/otel/trace" - utilwait "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/admission" - webhookinit "k8s.io/apiserver/pkg/admission/plugin/webhook/initializer" genericapiserver "k8s.io/apiserver/pkg/server" - egressselector "k8s.io/apiserver/pkg/server/egressselector" - "k8s.io/apiserver/pkg/util/webhook" cacheddiscovery "k8s.io/client-go/discovery/cached/memory" externalinformers "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" @@ -47,18 +38,7 @@ type Config struct { } // New sets up the plugins and admission start hooks needed for admission -func (c *Config) New(proxyTransport *http.Transport, egressSelector *egressselector.EgressSelector, serviceResolver webhook.ServiceResolver, tp *trace.TracerProvider) ([]admission.PluginInitializer, genericapiserver.PostStartHookFunc, error) { - webhookAuthResolverWrapper := webhook.NewDefaultAuthenticationInfoResolverWrapper(proxyTransport, egressSelector, c.LoopbackClientConfig, tp) - webhookPluginInitializer := webhookinit.NewPluginInitializer(webhookAuthResolverWrapper, serviceResolver) - - var cloudConfig []byte - if c.CloudConfigFile != "" { - var err error - cloudConfig, err = ioutil.ReadFile(c.CloudConfigFile) - if err != nil { - klog.Fatalf("Error reading from cloud configuration file %s: %#v", c.CloudConfigFile, err) - } - } +func (c *Config) New() ([]admission.PluginInitializer, genericapiserver.PostStartHookFunc, error) { clientset, err := kubernetes.NewForConfig(c.LoopbackClientConfig) if err != nil { return nil, nil, err @@ -67,7 +47,6 @@ func (c *Config) New(proxyTransport *http.Transport, egressSelector *egressselec discoveryClient := cacheddiscovery.NewMemCacheClient(clientset.Discovery()) discoveryRESTMapper := restmapper.NewDeferredDiscoveryRESTMapper(discoveryClient) kubePluginInitializer := NewPluginInitializer( - cloudConfig, discoveryRESTMapper, quotainstall.NewQuotaConfigurationForAdmission(), ) @@ -78,5 +57,5 @@ func (c *Config) New(proxyTransport *http.Transport, egressSelector *egressselec return nil } - return []admission.PluginInitializer{webhookPluginInitializer, kubePluginInitializer}, admissionPostStartHook, nil + return []admission.PluginInitializer{kubePluginInitializer}, admissionPostStartHook, nil } diff --git a/pkg/genericcontrolplane/admission/initializer.go b/pkg/genericcontrolplane/admission/initializer.go index b913b5a76c8cc..921e392d39e44 100644 --- a/pkg/genericcontrolplane/admission/initializer.go +++ b/pkg/genericcontrolplane/admission/initializer.go @@ -37,7 +37,6 @@ type WantsRESTMapper interface { // PluginInitializer is used for initialization of the Kubernetes specific admission plugins. type PluginInitializer struct { - cloudConfig []byte restMapper meta.RESTMapper quotaConfiguration quota.Configuration } @@ -48,12 +47,10 @@ var _ admission.PluginInitializer = &PluginInitializer{} // TODO: switch these parameters to use the builder pattern or just make them // all public, this construction method is pointless boilerplate. func NewPluginInitializer( - cloudConfig []byte, restMapper meta.RESTMapper, quotaConfiguration quota.Configuration, ) *PluginInitializer { return &PluginInitializer{ - cloudConfig: cloudConfig, restMapper: restMapper, quotaConfiguration: quotaConfiguration, } @@ -62,10 +59,6 @@ func NewPluginInitializer( // Initialize checks the initialization interfaces implemented by each plugin // and provide the appropriate initialization data func (i *PluginInitializer) Initialize(plugin admission.Interface) { - if wants, ok := plugin.(WantsCloudConfig); ok { - wants.SetCloudConfig(i.cloudConfig) - } - if wants, ok := plugin.(WantsRESTMapper); ok { wants.SetRESTMapper(i.restMapper) } diff --git a/pkg/genericcontrolplane/aggregator.go b/pkg/genericcontrolplane/aggregator.go index 0af0a910a56bc..3b82520b19fee 100644 --- a/pkg/genericcontrolplane/aggregator.go +++ b/pkg/genericcontrolplane/aggregator.go @@ -48,7 +48,7 @@ import ( apiregistrationclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1" informers "k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1" "k8s.io/kube-aggregator/pkg/controllers/autoregister" - "k8s.io/kubernetes/cmd/kube-apiserver/app/options" + "k8s.io/kubernetes/pkg/genericcontrolplane/options" "k8s.io/kubernetes/pkg/controlplane/controller/crdregistration" ) @@ -245,52 +245,23 @@ type priority struct { var apiVersionPriorities = map[schema.GroupVersion]priority{ {Group: "", Version: "v1"}: {group: 18000, version: 1}, // to my knowledge, nothing below here collides - {Group: "apps", Version: "v1"}: {group: 17800, version: 15}, {Group: "events.k8s.io", Version: "v1"}: {group: 17750, version: 15}, {Group: "events.k8s.io", Version: "v1beta1"}: {group: 17750, version: 5}, {Group: "authentication.k8s.io", Version: "v1"}: {group: 17700, version: 15}, {Group: "authentication.k8s.io", Version: "v1beta1"}: {group: 17700, version: 9}, {Group: "authorization.k8s.io", Version: "v1"}: {group: 17600, version: 15}, {Group: "authorization.k8s.io", Version: "v1beta1"}: {group: 17600, version: 9}, - {Group: "autoscaling", Version: "v1"}: {group: 17500, version: 15}, - {Group: "autoscaling", Version: "v2beta1"}: {group: 17500, version: 9}, - {Group: "autoscaling", Version: "v2beta2"}: {group: 17500, version: 1}, - {Group: "batch", Version: "v1"}: {group: 17400, version: 15}, - {Group: "batch", Version: "v1beta1"}: {group: 17400, version: 9}, - {Group: "batch", Version: "v2alpha1"}: {group: 17400, version: 9}, {Group: "certificates.k8s.io", Version: "v1"}: {group: 17300, version: 15}, {Group: "certificates.k8s.io", Version: "v1beta1"}: {group: 17300, version: 9}, - {Group: "networking.k8s.io", Version: "v1"}: {group: 17200, version: 15}, - {Group: "networking.k8s.io", Version: "v1beta1"}: {group: 17200, version: 9}, {Group: "extensions", Version: "v1beta1"}: {group: 17150, version: 1}, // prioritize below networking.k8s.io, which contains the GA version of Ingress, the only resource remaining in extensions/v1beta1 - {Group: "policy", Version: "v1"}: {group: 17100, version: 15}, - {Group: "policy", Version: "v1beta1"}: {group: 17100, version: 9}, {Group: "rbac.authorization.k8s.io", Version: "v1"}: {group: 17000, version: 15}, {Group: "rbac.authorization.k8s.io", Version: "v1beta1"}: {group: 17000, version: 12}, {Group: "rbac.authorization.k8s.io", Version: "v1alpha1"}: {group: 17000, version: 9}, - {Group: "storage.k8s.io", Version: "v1"}: {group: 16800, version: 15}, - {Group: "storage.k8s.io", Version: "v1beta1"}: {group: 16800, version: 9}, - {Group: "storage.k8s.io", Version: "v1alpha1"}: {group: 16800, version: 1}, {Group: "apiextensions.k8s.io", Version: "v1"}: {group: 16700, version: 15}, - {Group: "apiextensions.k8s.io", Version: "v1beta1"}: {group: 16700, version: 9}, - {Group: "admissionregistration.k8s.io", Version: "v1"}: {group: 16700, version: 15}, - {Group: "admissionregistration.k8s.io", Version: "v1beta1"}: {group: 16700, version: 12}, - {Group: "scheduling.k8s.io", Version: "v1"}: {group: 16600, version: 15}, - {Group: "scheduling.k8s.io", Version: "v1beta1"}: {group: 16600, version: 12}, - {Group: "scheduling.k8s.io", Version: "v1alpha1"}: {group: 16600, version: 9}, {Group: "coordination.k8s.io", Version: "v1"}: {group: 16500, version: 15}, {Group: "coordination.k8s.io", Version: "v1beta1"}: {group: 16500, version: 9}, - {Group: "node.k8s.io", Version: "v1"}: {group: 16300, version: 15}, - {Group: "node.k8s.io", Version: "v1alpha1"}: {group: 16300, version: 1}, - {Group: "node.k8s.io", Version: "v1beta1"}: {group: 16300, version: 9}, - {Group: "discovery.k8s.io", Version: "v1"}: {group: 16200, version: 15}, - {Group: "discovery.k8s.io", Version: "v1beta1"}: {group: 16200, version: 12}, {Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"}: {group: 16100, version: 12}, {Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16100, version: 9}, - {Group: "internal.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16000, version: 9}, - // Append a new group to the end of the list if unsure. - // You can use min(existing group)-100 as the initial value for a group. - // Version can be set to 9 (to have space around) for a new group. } func apiServicesToRegister(delegateAPIServer genericapiserver.DelegationTarget, registration autoregister.AutoAPIServiceRegistration) []*v1.APIService { diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index a01df9d16002a..fa97d834cc350 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -20,21 +20,14 @@ limitations under the License. package genericcontrolplane import ( - "crypto/tls" "fmt" - "net" - "net/http" - "net/url" "os" "strings" "time" - "github.com/spf13/cobra" - "github.com/spf13/pflag" - extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" - utilerrors "k8s.io/apimachinery/pkg/util/errors" - utilnet "k8s.io/apimachinery/pkg/util/net" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" @@ -43,118 +36,27 @@ import ( genericapiserver "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/egressselector" "k8s.io/apiserver/pkg/server/filters" - serveroptions "k8s.io/apiserver/pkg/server/options" serverstorage "k8s.io/apiserver/pkg/server/storage" utilfeature "k8s.io/apiserver/pkg/util/feature" utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" "k8s.io/apiserver/pkg/util/webhook" clientgoinformers "k8s.io/client-go/informers" clientgoclientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" "k8s.io/client-go/util/keyutil" - cliflag "k8s.io/component-base/cli/flag" - "k8s.io/component-base/cli/globalflag" _ "k8s.io/component-base/metrics/prometheus/workqueue" // for workqueue metric registration - "k8s.io/component-base/term" "k8s.io/component-base/version" - "k8s.io/component-base/version/verflag" "k8s.io/klog/v2" aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" - aggregatorscheme "k8s.io/kube-aggregator/pkg/apiserver/scheme" - "k8s.io/kubernetes/cmd/kube-apiserver/app/options" - "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/kubernetes/pkg/capabilities" "k8s.io/kubernetes/pkg/controlplane" - "k8s.io/kubernetes/pkg/controlplane/reconcilers" generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" + controlplaneadmission "k8s.io/kubernetes/pkg/genericcontrolplane/admission" "k8s.io/kubernetes/pkg/kubeapiserver" - kubeapiserveradmission "k8s.io/kubernetes/pkg/kubeapiserver/admission" - kubeauthenticator "k8s.io/kubernetes/pkg/kubeapiserver/authenticator" "k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes" rbacrest "k8s.io/kubernetes/pkg/registry/rbac/rest" "k8s.io/kubernetes/pkg/serviceaccount" ) -// TODO: delete this check after insecure flags removed in v1.24 -func checkNonZeroInsecurePort(fs *pflag.FlagSet) error { - for _, name := range options.InsecurePortFlags { - val, err := fs.GetInt(name) - if err != nil { - return err - } - if val != 0 { - return fmt.Errorf("invalid port value %d: only zero is allowed", val) - } - } - return nil -} - -// NewAPIServerCommand creates a *cobra.Command object with default parameters -func NewAPIServerCommand() *cobra.Command { - s := options.NewServerRunOptions() - cmd := &cobra.Command{ - Use: "kube-apiserver", - Long: `The Kubernetes API server validates and configures data -for the api objects which include pods, services, replicationcontrollers, and -others. The API Server services REST operations and provides the frontend to the -cluster's shared state through which all other components interact.`, - - // stop printing usage when the command errors - SilenceUsage: true, - PersistentPreRunE: func(*cobra.Command, []string) error { - // silence client-go warnings. - // kube-apiserver loopback clients should not log self-issued warnings. - rest.SetDefaultWarningHandler(rest.NoWarnings{}) - return nil - }, - RunE: func(cmd *cobra.Command, args []string) error { - verflag.PrintAndExitIfRequested() - fs := cmd.Flags() - cliflag.PrintFlags(fs) - - err := checkNonZeroInsecurePort(fs) - if err != nil { - return err - } - // set default options - completedOptions, err := Complete(s) - if err != nil { - return err - } - - // validate options - if errs := completedOptions.Validate(); len(errs) != 0 { - return utilerrors.NewAggregate(errs) - } - - return Run(completedOptions, genericapiserver.SetupSignalHandler()) - }, - Args: func(cmd *cobra.Command, args []string) error { - for _, arg := range args { - if len(arg) > 0 { - return fmt.Errorf("%q does not take any arguments, got %q", cmd.CommandPath(), args) - } - } - return nil - }, - } - - fs := cmd.Flags() - namedFlagSets := s.Flags() - verflag.AddFlags(namedFlagSets.FlagSet("global")) - globalflag.AddGlobalFlags(namedFlagSets.FlagSet("global"), cmd.Name()) - options.AddCustomGlobalFlags(namedFlagSets.FlagSet("generic")) - for _, f := range namedFlagSets.FlagSets { - fs.AddFlagSet(f) - } - - cols, _, _ := term.TerminalSize(cmd.OutOrStdout()) - cliflag.SetUsageAndHelpFunc(cmd, namedFlagSets, cols) - - return cmd -} - // Run runs the specified APIServer. This should never exit. func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) error { // To help debugging, immediately log version @@ -169,7 +71,6 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro if err != nil { return err } - return prepared.Run(stopCh) } @@ -182,13 +83,13 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan // If additional API servers are added, they should be gated. apiExtensionsConfig, err := createAPIExtensionsConfig(*kubeAPIServerConfig.GenericConfig, kubeAPIServerConfig.ExtraConfig.VersionedInformers, pluginInitializer, completedOptions.ServerRunOptions, completedOptions.MasterCount, - serviceResolver, webhook.NewDefaultAuthenticationInfoResolverWrapper(kubeAPIServerConfig.ExtraConfig.ProxyTransport, kubeAPIServerConfig.GenericConfig.EgressSelector, kubeAPIServerConfig.GenericConfig.LoopbackClientConfig, kubeAPIServerConfig.GenericConfig.TracerProvider)) + serviceResolver, webhook.NewDefaultAuthenticationInfoResolverWrapper(nil, kubeAPIServerConfig.GenericConfig.EgressSelector, kubeAPIServerConfig.GenericConfig.LoopbackClientConfig, kubeAPIServerConfig.GenericConfig.TracerProvider)) if err != nil { return nil, err } apiExtensionsServer, err := createAPIExtensionsServer(apiExtensionsConfig, genericapiserver.NewEmptyDelegate()) if err != nil { - return nil, err + return nil, fmt.Errorf("create api extensions: %v", err) } kubeAPIServer, err := CreateKubeAPIServer(kubeAPIServerConfig, apiExtensionsServer.GenericAPIServer) @@ -197,7 +98,7 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan } // aggregator comes last in the chain - aggregatorConfig, err := createAggregatorConfig(*kubeAPIServerConfig.GenericConfig, completedOptions.ServerRunOptions, kubeAPIServerConfig.ExtraConfig.VersionedInformers, serviceResolver, kubeAPIServerConfig.ExtraConfig.ProxyTransport, pluginInitializer) + aggregatorConfig, err := createAggregatorConfig(*kubeAPIServerConfig.GenericConfig, completedOptions.ServerRunOptions, kubeAPIServerConfig.ExtraConfig.VersionedInformers, serviceResolver, nil, pluginInitializer) if err != nil { return nil, err } @@ -220,18 +121,6 @@ func CreateKubeAPIServer(kubeAPIServerConfig *controlplane.Config, delegateAPISe return kubeAPIServer, nil } -// CreateProxyTransport creates the dialer infrastructure to connect to the nodes. -func CreateProxyTransport() *http.Transport { - var proxyDialerFn utilnet.DialFunc - // Proxying to pods and services is IP-based... don't expect to be able to verify the hostname - proxyTLSClientConfig := &tls.Config{InsecureSkipVerify: true} - proxyTransport := utilnet.SetTransportDefaults(&http.Transport{ - DialContext: proxyDialerFn, - TLSClientConfig: proxyTLSClientConfig, - }) - return proxyTransport -} - // CreateKubeAPIServerConfig creates all the resources for running the API server, but runs none of them func CreateKubeAPIServerConfig(s completedServerRunOptions) ( *controlplane.Config, @@ -239,24 +128,11 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( []admission.PluginInitializer, error, ) { - proxyTransport := CreateProxyTransport() - - genericConfig, versionedInformers, serviceResolver, pluginInitializers, admissionPostStartHook, storageFactory, err := buildGenericConfig(s.ServerRunOptions, proxyTransport) + genericConfig, versionedInformers, serviceResolver, pluginInitializers, admissionPostStartHook, storageFactory, err := buildGenericConfig(s.ServerRunOptions) if err != nil { return nil, nil, nil, err } - capabilities.Initialize(capabilities.Capabilities{ - AllowPrivileged: s.AllowPrivileged, - // TODO(vmarmol): Implement support for HostNetworkSources. - PrivilegedSources: capabilities.PrivilegedSources{ - HostNetworkSources: []string{}, - HostPIDSources: []string{}, - HostIPCSources: []string{}, - }, - PerConnectionBandwidthLimitBytesPerSec: s.MaxConnectionBytesPerSec, - }) - s.Metrics.Apply() serviceaccount.RegisterMetrics() @@ -268,25 +144,7 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( APIResourceConfigSource: storageFactory.APIResourceConfigSource, StorageFactory: storageFactory, EventTTL: s.EventTTL, - KubeletClientConfig: s.KubeletConfig, EnableLogsSupport: s.EnableLogsHandler, - ProxyTransport: proxyTransport, - - ServiceIPRange: s.PrimaryServiceClusterIPRange, - APIServerServiceIP: s.APIServerServiceIP, - SecondaryServiceIPRange: s.SecondaryServiceClusterIPRange, - - APIServerServicePort: 443, - - ServiceNodePortRange: s.ServiceNodePortRange, - KubernetesServiceNodePort: s.KubernetesServiceNodePort, - - EndpointReconcilerType: reconcilers.Type(s.EndpointReconcilerType), - MasterCount: s.MasterCount, - - ServiceAccountIssuer: s.ServiceAccountIssuer, - ServiceAccountMaxExpiration: s.ServiceAccountTokenMaxExpiration, - ExtendExpiration: s.Authentication.ServiceAccounts.ExtendExpiration, VersionedInformers: versionedInformers, @@ -317,21 +175,6 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( return nil, nil, nil, err } - if config.GenericConfig.EgressSelector != nil { - // Use the config.GenericConfig.EgressSelector lookup to find the dialer to connect to the kubelet - config.ExtraConfig.KubeletClientConfig.Lookup = config.GenericConfig.EgressSelector.Lookup - - // Use the config.GenericConfig.EgressSelector lookup as the transport used by the "proxy" subresources. - networkContext := egressselector.Cluster.AsNetworkContext() - dialer, err := config.GenericConfig.EgressSelector.Lookup(networkContext) - if err != nil { - return nil, nil, nil, err - } - c := proxyTransport.Clone() - c.DialContext = dialer - config.ExtraConfig.ProxyTransport = c - } - // Load the public keys. var pubKeys []interface{} for _, f := range s.Authentication.ServiceAccounts.KeyFiles { @@ -352,7 +195,6 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( // BuildGenericConfig takes the master server options and produces the genericapiserver.Config associated with it func buildGenericConfig( s *options.ServerRunOptions, - proxyTransport *http.Transport, ) ( genericConfig *genericapiserver.Config, versionedInformers clientgoinformers.SharedInformerFactory, @@ -362,8 +204,7 @@ func buildGenericConfig( storageFactory *serverstorage.DefaultStorageFactory, lastErr error, ) { - genericConfig = genericapiserver.NewConfig(legacyscheme.Codecs) - genericConfig.MergedResourceConfig = controlplane.DefaultAPIResourceConfigSource() + genericConfig = genericapiserver.NewConfig(serializer.NewCodecFactory(runtime.NewScheme())) if lastErr = s.GenericServerRunOptions.ApplyTo(genericConfig); lastErr != nil { return @@ -375,7 +216,7 @@ func buildGenericConfig( if lastErr = s.Features.ApplyTo(genericConfig); lastErr != nil { return } - if lastErr = s.APIEnablement.ApplyTo(genericConfig, controlplane.DefaultAPIResourceConfigSource(), legacyscheme.Scheme); lastErr != nil { + if lastErr = s.APIEnablement.ApplyTo(genericConfig, serverstorage.NewResourceConfig(), runtime.NewScheme()); lastErr != nil { return } if lastErr = s.EgressSelector.ApplyTo(genericConfig); lastErr != nil { @@ -387,7 +228,7 @@ func buildGenericConfig( } } - genericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(generatedopenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(legacyscheme.Scheme, extensionsapiserver.Scheme, aggregatorscheme.Scheme)) + genericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(generatedopenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(extensionsapiserver.Scheme)) genericConfig.OpenAPIConfig.Info.Title = "Kubernetes" genericConfig.LongRunningFunc = filters.BasicLongRunningRequestCheck( sets.NewString("watch", "proxy"), @@ -454,13 +295,11 @@ func buildGenericConfig( return } - admissionConfig := &kubeapiserveradmission.Config{ + admissionConfig := &controlplaneadmission.Config{ ExternalInformers: versionedInformers, LoopbackClientConfig: genericConfig.LoopbackClientConfig, - CloudConfigFile: s.CloudProvider.CloudConfigFile, } - serviceResolver = buildServiceResolver(s.EnableAggregatorRouting, genericConfig.LoopbackClientConfig.Host, versionedInformers) - pluginInitializers, admissionPostStartHook, err = admissionConfig.New(proxyTransport, genericConfig.EgressSelector, serviceResolver, genericConfig.TracerProvider) + pluginInitializers, admissionPostStartHook, err = admissionConfig.New() if err != nil { lastErr = fmt.Errorf("failed to create admission plugin initializer: %v", err) return @@ -485,11 +324,11 @@ func buildGenericConfig( } // BuildAuthorizer constructs the authorizer -func BuildAuthorizer(s *options.ServerRunOptions, EgressSelector *egressselector.EgressSelector, versionedInformers clientgoinformers.SharedInformerFactory) (authorizer.Authorizer, authorizer.RuleResolver, error) { +func BuildAuthorizer(s *options.ServerRunOptions, egressSelector *egressselector.EgressSelector, versionedInformers clientgoinformers.SharedInformerFactory) (authorizer.Authorizer, authorizer.RuleResolver, error) { authorizationConfig := s.Authorization.ToAuthorizationConfig(versionedInformers) - if EgressSelector != nil { - egressDialer, err := EgressSelector.Lookup(egressselector.ControlPlane.AsNetworkContext()) + if egressSelector != nil { + egressDialer, err := egressSelector.Lookup(egressselector.ControlPlane.AsNetworkContext()) if err != nil { return nil, nil, err } @@ -526,20 +365,6 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { return options, err } - // process s.ServiceClusterIPRange from list to Primary and Secondary - // we process secondary only if provided by user - apiServerServiceIP, primaryServiceIPRange, secondaryServiceIPRange, err := getServiceIPAndRanges(s.ServiceClusterIPRanges) - if err != nil { - return options, err - } - s.PrimaryServiceClusterIPRange = primaryServiceIPRange - s.SecondaryServiceClusterIPRange = secondaryServiceIPRange - s.APIServerServiceIP = apiServerServiceIP - - if err := s.SecureServing.MaybeDefaultWithSelfSignedCerts(s.GenericServerRunOptions.AdvertiseAddress.String(), []string{"kubernetes.default.svc", "kubernetes.default", "kubernetes"}, []net.IP{apiServerServiceIP}); err != nil { - return options, fmt.Errorf("error creating self-signed certificates: %v", err) - } - if len(s.GenericServerRunOptions.ExternalHost) == 0 { if len(s.GenericServerRunOptions.AdvertiseAddress) > 0 { s.GenericServerRunOptions.ExternalHost = s.GenericServerRunOptions.AdvertiseAddress.String() @@ -555,67 +380,6 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { s.Authentication.ApplyAuthorization(s.Authorization) - // Use (ServiceAccountSigningKeyFile != "") as a proxy to the user enabling - // TokenRequest functionality. This defaulting was convenient, but messed up - // a lot of people when they rotated their serving cert with no idea it was - // connected to their service account keys. We are taking this opportunity to - // remove this problematic defaulting. - if s.ServiceAccountSigningKeyFile == "" { - // Default to the private server key for service account token signing - if len(s.Authentication.ServiceAccounts.KeyFiles) == 0 && s.SecureServing.ServerCert.CertKey.KeyFile != "" { - if kubeauthenticator.IsValidServiceAccountKeyFile(s.SecureServing.ServerCert.CertKey.KeyFile) { - s.Authentication.ServiceAccounts.KeyFiles = []string{s.SecureServing.ServerCert.CertKey.KeyFile} - } else { - klog.Warning("No TLS key provided, service account token authentication disabled") - } - } - } - - if s.ServiceAccountSigningKeyFile != "" && len(s.Authentication.ServiceAccounts.Issuers) != 0 && s.Authentication.ServiceAccounts.Issuers[0] != "" { - sk, err := keyutil.PrivateKeyFromFile(s.ServiceAccountSigningKeyFile) - if err != nil { - return options, fmt.Errorf("failed to parse service-account-issuer-key-file: %v", err) - } - if s.Authentication.ServiceAccounts.MaxExpiration != 0 { - lowBound := time.Hour - upBound := time.Duration(1<<32) * time.Second - if s.Authentication.ServiceAccounts.MaxExpiration < lowBound || - s.Authentication.ServiceAccounts.MaxExpiration > upBound { - return options, fmt.Errorf("the service-account-max-token-expiration must be between 1 hour and 2^32 seconds") - } - if s.Authentication.ServiceAccounts.ExtendExpiration { - if s.Authentication.ServiceAccounts.MaxExpiration < serviceaccount.WarnOnlyBoundTokenExpirationSeconds*time.Second { - klog.Warningf("service-account-extend-token-expiration is true, in order to correctly trigger safe transition logic, service-account-max-token-expiration must be set longer than %d seconds (currently %s)", serviceaccount.WarnOnlyBoundTokenExpirationSeconds, s.Authentication.ServiceAccounts.MaxExpiration) - } - if s.Authentication.ServiceAccounts.MaxExpiration < serviceaccount.ExpirationExtensionSeconds*time.Second { - klog.Warningf("service-account-extend-token-expiration is true, enabling tokens valid up to %d seconds, which is longer than service-account-max-token-expiration set to %s seconds", serviceaccount.ExpirationExtensionSeconds, s.Authentication.ServiceAccounts.MaxExpiration) - } - } - } - - s.ServiceAccountIssuer, err = serviceaccount.JWTTokenGenerator(s.Authentication.ServiceAccounts.Issuers[0], sk) - if err != nil { - return options, fmt.Errorf("failed to build token generator: %v", err) - } - s.ServiceAccountTokenMaxExpiration = s.Authentication.ServiceAccounts.MaxExpiration - } - - if s.Etcd.EnableWatchCache { - sizes := kubeapiserver.DefaultWatchCacheSizes() - // Ensure that overrides parse correctly. - userSpecified, err := serveroptions.ParseWatchCacheSizes(s.Etcd.WatchCacheSizes) - if err != nil { - return options, err - } - for resource, size := range userSpecified { - sizes[resource] = size - } - s.Etcd.WatchCacheSizes, err = serveroptions.WriteWatchCacheSizes(sizes) - if err != nil { - return options, err - } - } - for key, value := range s.APIEnablement.RuntimeConfig { if key == "v1" || strings.HasPrefix(key, "v1/") || key == "api/v1" || strings.HasPrefix(key, "api/v1/") { @@ -630,64 +394,3 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { options.ServerRunOptions = s return options, nil } - -func buildServiceResolver(enabledAggregatorRouting bool, hostname string, informer clientgoinformers.SharedInformerFactory) webhook.ServiceResolver { - var serviceResolver webhook.ServiceResolver - if enabledAggregatorRouting { - serviceResolver = aggregatorapiserver.NewEndpointServiceResolver( - informer.Core().V1().Services().Lister(), - informer.Core().V1().Endpoints().Lister(), - ) - } else { - serviceResolver = aggregatorapiserver.NewClusterIPServiceResolver( - informer.Core().V1().Services().Lister(), - ) - } - // resolve kubernetes.default.svc locally - if localHost, err := url.Parse(hostname); err == nil { - serviceResolver = aggregatorapiserver.NewLoopbackServiceResolver(serviceResolver, localHost) - } - return serviceResolver -} - -func getServiceIPAndRanges(serviceClusterIPRanges string) (net.IP, net.IPNet, net.IPNet, error) { - serviceClusterIPRangeList := []string{} - if serviceClusterIPRanges != "" { - serviceClusterIPRangeList = strings.Split(serviceClusterIPRanges, ",") - } - - var apiServerServiceIP net.IP - var primaryServiceIPRange net.IPNet - var secondaryServiceIPRange net.IPNet - var err error - // nothing provided by user, use default range (only applies to the Primary) - if len(serviceClusterIPRangeList) == 0 { - var primaryServiceClusterCIDR net.IPNet - primaryServiceIPRange, apiServerServiceIP, err = controlplane.ServiceIPRange(primaryServiceClusterCIDR) - if err != nil { - return net.IP{}, net.IPNet{}, net.IPNet{}, fmt.Errorf("error determining service IP ranges: %v", err) - } - return apiServerServiceIP, primaryServiceIPRange, net.IPNet{}, nil - } - - _, primaryServiceClusterCIDR, err := net.ParseCIDR(serviceClusterIPRangeList[0]) - if err != nil { - return net.IP{}, net.IPNet{}, net.IPNet{}, fmt.Errorf("service-cluster-ip-range[0] is not a valid cidr") - } - - primaryServiceIPRange, apiServerServiceIP, err = controlplane.ServiceIPRange(*(primaryServiceClusterCIDR)) - if err != nil { - return net.IP{}, net.IPNet{}, net.IPNet{}, fmt.Errorf("error determining service IP ranges for primary service cidr: %v", err) - } - - // user provided at least two entries - // note: validation asserts that the list is max of two dual stack entries - if len(serviceClusterIPRangeList) > 1 { - _, secondaryServiceClusterCIDR, err := net.ParseCIDR(serviceClusterIPRangeList[1]) - if err != nil { - return net.IP{}, net.IPNet{}, net.IPNet{}, fmt.Errorf("service-cluster-ip-range[1] is not an ip net") - } - secondaryServiceIPRange = *secondaryServiceClusterCIDR - } - return apiServerServiceIP, primaryServiceIPRange, secondaryServiceIPRange, nil -} From 59a083f58ff6ae15acf873e201e23265b68d85af Mon Sep 17 00:00:00 2001 From: David Festal Date: Wed, 11 Aug 2021 11:52:42 +0200 Subject: [PATCH 03/87] DUPLICATE: Bootstrap the creation of a minimal kcp config ... stripped down from kube-apiserver, based on the following duplicated k8s files: pkg/controlplane/instance.go -> pkg/genericcontrolplane/apis/apis.go pkg/kubeapiserver/options/authentication.go -> pkg/genericcontrolplane/options.go cmd/kube-apiserver/app/options/options.go -> pkg/genericcontrolplane/options/options.go --- pkg/genericcontrolplane/apis/apis.go | 696 +++++++++++++++++++++ pkg/genericcontrolplane/options.go | 527 ++++++++++++++++ pkg/genericcontrolplane/options/options.go | 275 ++++++++ 3 files changed, 1498 insertions(+) create mode 100644 pkg/genericcontrolplane/apis/apis.go create mode 100644 pkg/genericcontrolplane/options.go create mode 100644 pkg/genericcontrolplane/options/options.go diff --git a/pkg/genericcontrolplane/apis/apis.go b/pkg/genericcontrolplane/apis/apis.go new file mode 100644 index 0000000000000..2c293124d132e --- /dev/null +++ b/pkg/genericcontrolplane/apis/apis.go @@ -0,0 +1,696 @@ +/* +Copyright 2014 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 apis + +import ( + "context" + "fmt" + "net" + "net/http" + "reflect" + "strconv" + "time" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + apiserverinternalv1alpha1 "k8s.io/api/apiserverinternal/v1alpha1" + appsv1 "k8s.io/api/apps/v1" + authenticationv1 "k8s.io/api/authentication/v1" + authenticationv1beta1 "k8s.io/api/authentication/v1beta1" + authorizationapiv1 "k8s.io/api/authorization/v1" + authorizationapiv1beta1 "k8s.io/api/authorization/v1beta1" + autoscalingapiv1 "k8s.io/api/autoscaling/v1" + autoscalingapiv2beta1 "k8s.io/api/autoscaling/v2beta1" + autoscalingapiv2beta2 "k8s.io/api/autoscaling/v2beta2" + batchapiv1 "k8s.io/api/batch/v1" + batchapiv1beta1 "k8s.io/api/batch/v1beta1" + certificatesapiv1 "k8s.io/api/certificates/v1" + certificatesapiv1beta1 "k8s.io/api/certificates/v1beta1" + coordinationapiv1 "k8s.io/api/coordination/v1" + coordinationapiv1beta1 "k8s.io/api/coordination/v1beta1" + apiv1 "k8s.io/api/core/v1" + discoveryv1 "k8s.io/api/discovery/v1" + discoveryv1beta1 "k8s.io/api/discovery/v1beta1" + eventsv1 "k8s.io/api/events/v1" + eventsv1beta1 "k8s.io/api/events/v1beta1" + extensionsapiv1beta1 "k8s.io/api/extensions/v1beta1" + flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + networkingapiv1 "k8s.io/api/networking/v1" + networkingapiv1beta1 "k8s.io/api/networking/v1beta1" + nodev1 "k8s.io/api/node/v1" + nodev1alpha1 "k8s.io/api/node/v1alpha1" + nodev1beta1 "k8s.io/api/node/v1beta1" + policyapiv1 "k8s.io/api/policy/v1" + policyapiv1beta1 "k8s.io/api/policy/v1beta1" + rbacv1 "k8s.io/api/rbac/v1" + rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" + rbacv1beta1 "k8s.io/api/rbac/v1beta1" + schedulingapiv1 "k8s.io/api/scheduling/v1" + schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" + schedulingapiv1beta1 "k8s.io/api/scheduling/v1beta1" + storageapiv1 "k8s.io/api/storage/v1" + storageapiv1alpha1 "k8s.io/api/storage/v1alpha1" + storageapiv1beta1 "k8s.io/api/storage/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/clock" + utilnet "k8s.io/apimachinery/pkg/util/net" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/endpoints/discovery" + apiserverfeatures "k8s.io/apiserver/pkg/features" + "k8s.io/apiserver/pkg/registry/generic" + genericapiserver "k8s.io/apiserver/pkg/server" + "k8s.io/apiserver/pkg/server/dynamiccertificates" + serverstorage "k8s.io/apiserver/pkg/server/storage" + storagefactory "k8s.io/apiserver/pkg/storage/storagebackend/factory" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" + corev1client "k8s.io/client-go/kubernetes/typed/core/v1" + discoveryclient "k8s.io/client-go/kubernetes/typed/discovery/v1" + "k8s.io/component-helpers/apimachinery/lease" + "k8s.io/klog/v2" + api "k8s.io/kubernetes/pkg/apis/core" + flowcontrolv1beta1 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta1" + "k8s.io/kubernetes/pkg/controlplane/controller/apiserverleasegc" + "k8s.io/kubernetes/pkg/controlplane/controller/clusterauthenticationtrust" + "k8s.io/kubernetes/pkg/controlplane/reconcilers" + kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" + kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" + "k8s.io/kubernetes/pkg/routes" + "k8s.io/kubernetes/pkg/serviceaccount" + nodeutil "k8s.io/kubernetes/pkg/util/node" + + // RESTStorage installers + admissionregistrationrest "k8s.io/kubernetes/pkg/registry/admissionregistration/rest" + apiserverinternalrest "k8s.io/kubernetes/pkg/registry/apiserverinternal/rest" + appsrest "k8s.io/kubernetes/pkg/registry/apps/rest" + authenticationrest "k8s.io/kubernetes/pkg/registry/authentication/rest" + authorizationrest "k8s.io/kubernetes/pkg/registry/authorization/rest" + autoscalingrest "k8s.io/kubernetes/pkg/registry/autoscaling/rest" + batchrest "k8s.io/kubernetes/pkg/registry/batch/rest" + certificatesrest "k8s.io/kubernetes/pkg/registry/certificates/rest" + coordinationrest "k8s.io/kubernetes/pkg/registry/coordination/rest" + corerest "k8s.io/kubernetes/pkg/registry/core/rest" + discoveryrest "k8s.io/kubernetes/pkg/registry/discovery/rest" + eventsrest "k8s.io/kubernetes/pkg/registry/events/rest" + extensionsrest "k8s.io/kubernetes/pkg/registry/extensions/rest" + flowcontrolrest "k8s.io/kubernetes/pkg/registry/flowcontrol/rest" + networkingrest "k8s.io/kubernetes/pkg/registry/networking/rest" + noderest "k8s.io/kubernetes/pkg/registry/node/rest" + policyrest "k8s.io/kubernetes/pkg/registry/policy/rest" + rbacrest "k8s.io/kubernetes/pkg/registry/rbac/rest" + schedulingrest "k8s.io/kubernetes/pkg/registry/scheduling/rest" + storagerest "k8s.io/kubernetes/pkg/registry/storage/rest" +) + +const ( + // DefaultEndpointReconcilerInterval is the default amount of time for how often the endpoints for + // the kubernetes Service are reconciled. + DefaultEndpointReconcilerInterval = 10 * time.Second + // DefaultEndpointReconcilerTTL is the default TTL timeout for the storage layer + DefaultEndpointReconcilerTTL = 15 * time.Second + // IdentityLeaseComponentLabelKey is used to apply a component label to identity lease objects, indicating: + // 1. the lease is an identity lease (different from leader election leases) + // 2. which component owns this lease + IdentityLeaseComponentLabelKey = "k8s.io/component" + // KubeAPIServer defines variable used internally when referring to kube-apiserver component + KubeAPIServer = "kube-apiserver" + // KubeAPIServerIdentityLeaseLabelSelector selects kube-apiserver identity leases + KubeAPIServerIdentityLeaseLabelSelector = IdentityLeaseComponentLabelKey + "=" + KubeAPIServer +) + +// ExtraConfig defines extra configuration for the master +type ExtraConfig struct { + ClusterAuthenticationInfo clusterauthenticationtrust.ClusterAuthenticationInfo + + APIResourceConfigSource serverstorage.APIResourceConfigSource + StorageFactory serverstorage.StorageFactory + EndpointReconcilerConfig EndpointReconcilerConfig + EventTTL time.Duration + KubeletClientConfig kubeletclient.KubeletClientConfig + + EnableLogsSupport bool + ProxyTransport *http.Transport + + // Values to build the IP addresses used by discovery + // The range of IPs to be assigned to services with type=ClusterIP or greater + ServiceIPRange net.IPNet + // The IP address for the GenericAPIServer service (must be inside ServiceIPRange) + APIServerServiceIP net.IP + + // dual stack services, the range represents an alternative IP range for service IP + // must be of different family than primary (ServiceIPRange) + SecondaryServiceIPRange net.IPNet + // the secondary IP address the GenericAPIServer service (must be inside SecondaryServiceIPRange) + SecondaryAPIServerServiceIP net.IP + + // Port for the apiserver service. + APIServerServicePort int + + // TODO, we can probably group service related items into a substruct to make it easier to configure + // the API server items and `Extra*` fields likely fit nicely together. + + // The range of ports to be assigned to services with type=NodePort or greater + ServiceNodePortRange utilnet.PortRange + // Additional ports to be exposed on the GenericAPIServer service + // extraServicePorts is injectable in the event that more ports + // (other than the default 443/tcp) are exposed on the GenericAPIServer + // and those ports need to be load balanced by the GenericAPIServer + // service because this pkg is linked by out-of-tree projects + // like openshift which want to use the GenericAPIServer but also do + // more stuff. + ExtraServicePorts []apiv1.ServicePort + // Additional ports to be exposed on the GenericAPIServer endpoints + // Port names should align with ports defined in ExtraServicePorts + ExtraEndpointPorts []apiv1.EndpointPort + // If non-zero, the "kubernetes" services uses this port as NodePort. + KubernetesServiceNodePort int + + // Number of masters running; all masters must be started with the + // same value for this field. (Numbers > 1 currently untested.) + MasterCount int + + // MasterEndpointReconcileTTL sets the time to live in seconds of an + // endpoint record recorded by each master. The endpoints are checked at an + // interval that is 2/3 of this value and this value defaults to 15s if + // unset. In very large clusters, this value may be increased to reduce the + // possibility that the master endpoint record expires (due to other load + // on the etcd server) and causes masters to drop in and out of the + // kubernetes service record. It is not recommended to set this value below + // 15s. + MasterEndpointReconcileTTL time.Duration + + // Selects which reconciler to use + EndpointReconcilerType reconcilers.Type + + ServiceAccountIssuer serviceaccount.TokenGenerator + ServiceAccountMaxExpiration time.Duration + ExtendExpiration bool + + // ServiceAccountIssuerDiscovery + ServiceAccountIssuerURL string + ServiceAccountJWKSURI string + ServiceAccountPublicKeys []interface{} + + VersionedInformers informers.SharedInformerFactory + + IdentityLeaseDurationSeconds int + IdentityLeaseRenewIntervalSeconds int +} + +// Config defines configuration for the master +type Config struct { + GenericConfig *genericapiserver.Config + ExtraConfig ExtraConfig +} + +type completedConfig struct { + GenericConfig genericapiserver.CompletedConfig + ExtraConfig *ExtraConfig +} + +// CompletedConfig embeds a private pointer that cannot be instantiated outside of this package +type CompletedConfig struct { + *completedConfig +} + +// EndpointReconcilerConfig holds the endpoint reconciler and endpoint reconciliation interval to be +// used by the master. +type EndpointReconcilerConfig struct { + Reconciler reconcilers.EndpointReconciler + Interval time.Duration +} + +// Instance contains state for a Kubernetes cluster api server instance. +type Instance struct { + GenericAPIServer *genericapiserver.GenericAPIServer + + ClusterAuthenticationInfo clusterauthenticationtrust.ClusterAuthenticationInfo +} + +func (c *Config) createMasterCountReconciler() reconcilers.EndpointReconciler { + endpointClient := corev1client.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) + endpointSliceClient := discoveryclient.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) + endpointsAdapter := reconcilers.NewEndpointsAdapter(endpointClient, endpointSliceClient) + + return reconcilers.NewMasterCountEndpointReconciler(c.ExtraConfig.MasterCount, endpointsAdapter) +} + +func (c *Config) createNoneReconciler() reconcilers.EndpointReconciler { + return reconcilers.NewNoneEndpointReconciler() +} + +func (c *Config) createLeaseReconciler() reconcilers.EndpointReconciler { + endpointClient := corev1client.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) + endpointSliceClient := discoveryclient.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) + endpointsAdapter := reconcilers.NewEndpointsAdapter(endpointClient, endpointSliceClient) + + ttl := c.ExtraConfig.MasterEndpointReconcileTTL + config, err := c.ExtraConfig.StorageFactory.NewConfig(api.Resource("apiServerIPInfo")) + if err != nil { + klog.Fatalf("Error determining service IP ranges: %v", err) + } + leaseStorage, _, err := storagefactory.Create(*config, nil) + if err != nil { + klog.Fatalf("Error creating storage factory: %v", err) + } + masterLeases := reconcilers.NewLeases(leaseStorage, "/masterleases/", ttl) + + return reconcilers.NewLeaseEndpointReconciler(endpointsAdapter, masterLeases) +} + +func (c *Config) createEndpointReconciler() reconcilers.EndpointReconciler { + klog.Infof("Using reconciler: %v", c.ExtraConfig.EndpointReconcilerType) + switch c.ExtraConfig.EndpointReconcilerType { + // there are numerous test dependencies that depend on a default controller + case "", reconcilers.MasterCountReconcilerType: + return c.createMasterCountReconciler() + case reconcilers.LeaseEndpointReconcilerType: + return c.createLeaseReconciler() + case reconcilers.NoneEndpointReconcilerType: + return c.createNoneReconciler() + default: + klog.Fatalf("Reconciler not implemented: %v", c.ExtraConfig.EndpointReconcilerType) + } + return nil +} + +// Complete fills in any fields not set that are required to have valid data. It's mutating the receiver. +func (c *Config) Complete() CompletedConfig { + cfg := completedConfig{ + c.GenericConfig.Complete(c.ExtraConfig.VersionedInformers), + &c.ExtraConfig, + } + + serviceIPRange, apiServerServiceIP, err := ServiceIPRange(cfg.ExtraConfig.ServiceIPRange) + if err != nil { + klog.Fatalf("Error determining service IP ranges: %v", err) + } + if cfg.ExtraConfig.ServiceIPRange.IP == nil { + cfg.ExtraConfig.ServiceIPRange = serviceIPRange + } + if cfg.ExtraConfig.APIServerServiceIP == nil { + cfg.ExtraConfig.APIServerServiceIP = apiServerServiceIP + } + + discoveryAddresses := discovery.DefaultAddresses{DefaultAddress: cfg.GenericConfig.ExternalAddress} + discoveryAddresses.CIDRRules = append(discoveryAddresses.CIDRRules, + discovery.CIDRRule{IPRange: cfg.ExtraConfig.ServiceIPRange, Address: net.JoinHostPort(cfg.ExtraConfig.APIServerServiceIP.String(), strconv.Itoa(cfg.ExtraConfig.APIServerServicePort))}) + cfg.GenericConfig.DiscoveryAddresses = discoveryAddresses + + if cfg.ExtraConfig.ServiceNodePortRange.Size == 0 { + // TODO: Currently no way to specify an empty range (do we need to allow this?) + // We should probably allow this for clouds that don't require NodePort to do load-balancing (GCE) + // but then that breaks the strict nestedness of ServiceType. + // Review post-v1 + cfg.ExtraConfig.ServiceNodePortRange = kubeoptions.DefaultServiceNodePortRange + klog.Infof("Node port range unspecified. Defaulting to %v.", cfg.ExtraConfig.ServiceNodePortRange) + } + + if cfg.ExtraConfig.EndpointReconcilerConfig.Interval == 0 { + cfg.ExtraConfig.EndpointReconcilerConfig.Interval = DefaultEndpointReconcilerInterval + } + + if cfg.ExtraConfig.MasterEndpointReconcileTTL == 0 { + cfg.ExtraConfig.MasterEndpointReconcileTTL = DefaultEndpointReconcilerTTL + } + + if cfg.ExtraConfig.EndpointReconcilerConfig.Reconciler == nil { + cfg.ExtraConfig.EndpointReconcilerConfig.Reconciler = c.createEndpointReconciler() + } + + return CompletedConfig{&cfg} +} + +// New returns a new instance of Master from the given config. +// Certain config fields will be set to a default value if unset. +// Certain config fields must be specified, including: +// KubeletClientConfig +func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) (*Instance, error) { + if reflect.DeepEqual(c.ExtraConfig.KubeletClientConfig, kubeletclient.KubeletClientConfig{}) { + return nil, fmt.Errorf("Master.New() called with empty config.KubeletClientConfig") + } + + s, err := c.GenericConfig.New("kube-apiserver", delegationTarget) + if err != nil { + return nil, err + } + + if c.ExtraConfig.EnableLogsSupport { + routes.Logs{}.Install(s.Handler.GoRestfulContainer) + } + + // Metadata and keys are expected to only change across restarts at present, + // so we just marshal immediately and serve the cached JSON bytes. + md, err := serviceaccount.NewOpenIDMetadata( + c.ExtraConfig.ServiceAccountIssuerURL, + c.ExtraConfig.ServiceAccountJWKSURI, + c.GenericConfig.ExternalAddress, + c.ExtraConfig.ServiceAccountPublicKeys, + ) + if err != nil { + // If there was an error, skip installing the endpoints and log the + // error, but continue on. We don't return the error because the + // metadata responses require additional, backwards incompatible + // validation of command-line options. + msg := fmt.Sprintf("Could not construct pre-rendered responses for"+ + " ServiceAccountIssuerDiscovery endpoints. Endpoints will not be"+ + " enabled. Error: %v", err) + if c.ExtraConfig.ServiceAccountIssuerURL != "" { + // The user likely expects this feature to be enabled if issuer URL is + // set and the feature gate is enabled. In the future, if there is no + // longer a feature gate and issuer URL is not set, the user may not + // expect this feature to be enabled. We log the former case as an Error + // and the latter case as an Info. + klog.Error(msg) + } else { + klog.Info(msg) + } + } else { + routes.NewOpenIDMetadataServer(md.ConfigJSON, md.PublicKeysetJSON). + Install(s.Handler.GoRestfulContainer) + } + + m := &Instance{ + GenericAPIServer: s, + ClusterAuthenticationInfo: c.ExtraConfig.ClusterAuthenticationInfo, + } + + // install legacy rest storage + if c.ExtraConfig.APIResourceConfigSource.VersionEnabled(apiv1.SchemeGroupVersion) { + legacyRESTStorageProvider := corerest.LegacyRESTStorageProvider{ + StorageFactory: c.ExtraConfig.StorageFactory, + ProxyTransport: c.ExtraConfig.ProxyTransport, + KubeletClientConfig: c.ExtraConfig.KubeletClientConfig, + EventTTL: c.ExtraConfig.EventTTL, + ServiceIPRange: c.ExtraConfig.ServiceIPRange, + SecondaryServiceIPRange: c.ExtraConfig.SecondaryServiceIPRange, + ServiceNodePortRange: c.ExtraConfig.ServiceNodePortRange, + LoopbackClientConfig: c.GenericConfig.LoopbackClientConfig, + ServiceAccountIssuer: c.ExtraConfig.ServiceAccountIssuer, + ExtendExpiration: c.ExtraConfig.ExtendExpiration, + ServiceAccountMaxExpiration: c.ExtraConfig.ServiceAccountMaxExpiration, + APIAudiences: c.GenericConfig.Authentication.APIAudiences, + } + if err := m.InstallLegacyAPI(&c, c.GenericConfig.RESTOptionsGetter, legacyRESTStorageProvider); err != nil { + return nil, err + } + } + + // The order here is preserved in discovery. + // If resources with identical names exist in more than one of these groups (e.g. "deployments.apps"" and "deployments.extensions"), + // the order of this list determines which group an unqualified resource name (e.g. "deployments") should prefer. + // This priority order is used for local discovery, but it ends up aggregated in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go + // with specific priorities. + // TODO: describe the priority all the way down in the RESTStorageProviders and plumb it back through the various discovery + // handlers that we have. + restStorageProviders := []RESTStorageProvider{ + apiserverinternalrest.StorageProvider{}, + authenticationrest.RESTStorageProvider{Authenticator: c.GenericConfig.Authentication.Authenticator, APIAudiences: c.GenericConfig.Authentication.APIAudiences}, + authorizationrest.RESTStorageProvider{Authorizer: c.GenericConfig.Authorization.Authorizer, RuleResolver: c.GenericConfig.RuleResolver}, + autoscalingrest.RESTStorageProvider{}, + batchrest.RESTStorageProvider{}, + certificatesrest.RESTStorageProvider{}, + coordinationrest.RESTStorageProvider{}, + discoveryrest.StorageProvider{}, + extensionsrest.RESTStorageProvider{}, + networkingrest.RESTStorageProvider{}, + noderest.RESTStorageProvider{}, + policyrest.RESTStorageProvider{}, + rbacrest.RESTStorageProvider{Authorizer: c.GenericConfig.Authorization.Authorizer}, + schedulingrest.RESTStorageProvider{}, + storagerest.RESTStorageProvider{}, + flowcontrolrest.RESTStorageProvider{}, + // keep apps after extensions so legacy clients resolve the extensions versions of shared resource names. + // See https://github.com/kubernetes/kubernetes/issues/42392 + appsrest.StorageProvider{}, + admissionregistrationrest.RESTStorageProvider{}, + eventsrest.RESTStorageProvider{TTL: c.ExtraConfig.EventTTL}, + } + if err := m.InstallAPIs(c.ExtraConfig.APIResourceConfigSource, c.GenericConfig.RESTOptionsGetter, restStorageProviders...); err != nil { + return nil, err + } + + m.GenericAPIServer.AddPostStartHookOrDie("start-cluster-authentication-info-controller", func(hookContext genericapiserver.PostStartHookContext) error { + kubeClient, err := kubernetes.NewForConfig(hookContext.LoopbackClientConfig) + if err != nil { + return err + } + controller := clusterauthenticationtrust.NewClusterAuthenticationTrustController(m.ClusterAuthenticationInfo, kubeClient) + + // prime values and start listeners + if m.ClusterAuthenticationInfo.ClientCA != nil { + m.ClusterAuthenticationInfo.ClientCA.AddListener(controller) + if controller, ok := m.ClusterAuthenticationInfo.ClientCA.(dynamiccertificates.ControllerRunner); ok { + // runonce to be sure that we have a value. + if err := controller.RunOnce(); err != nil { + runtime.HandleError(err) + } + go controller.Run(1, hookContext.StopCh) + } + } + if m.ClusterAuthenticationInfo.RequestHeaderCA != nil { + m.ClusterAuthenticationInfo.RequestHeaderCA.AddListener(controller) + if controller, ok := m.ClusterAuthenticationInfo.RequestHeaderCA.(dynamiccertificates.ControllerRunner); ok { + // runonce to be sure that we have a value. + if err := controller.RunOnce(); err != nil { + runtime.HandleError(err) + } + go controller.Run(1, hookContext.StopCh) + } + } + + go controller.Run(1, hookContext.StopCh) + return nil + }) + + if utilfeature.DefaultFeatureGate.Enabled(apiserverfeatures.APIServerIdentity) { + m.GenericAPIServer.AddPostStartHookOrDie("start-kube-apiserver-identity-lease-controller", func(hookContext genericapiserver.PostStartHookContext) error { + kubeClient, err := kubernetes.NewForConfig(hookContext.LoopbackClientConfig) + if err != nil { + return err + } + controller := lease.NewController( + clock.RealClock{}, + kubeClient, + m.GenericAPIServer.APIServerID, + int32(c.ExtraConfig.IdentityLeaseDurationSeconds), + nil, + time.Duration(c.ExtraConfig.IdentityLeaseRenewIntervalSeconds)*time.Second, + metav1.NamespaceSystem, + labelAPIServerHeartbeat) + go controller.Run(wait.NeverStop) + return nil + }) + m.GenericAPIServer.AddPostStartHookOrDie("start-kube-apiserver-identity-lease-garbage-collector", func(hookContext genericapiserver.PostStartHookContext) error { + kubeClient, err := kubernetes.NewForConfig(hookContext.LoopbackClientConfig) + if err != nil { + return err + } + go apiserverleasegc.NewAPIServerLeaseGC( + kubeClient, + time.Duration(c.ExtraConfig.IdentityLeaseDurationSeconds)*time.Second, + metav1.NamespaceSystem, + KubeAPIServerIdentityLeaseLabelSelector, + ).Run(wait.NeverStop) + return nil + }) + } + + return m, nil +} + +func labelAPIServerHeartbeat(lease *coordinationapiv1.Lease) error { + if lease.Labels == nil { + lease.Labels = map[string]string{} + } + // This label indicates that kube-apiserver owns this identity lease object + lease.Labels[IdentityLeaseComponentLabelKey] = KubeAPIServer + return nil +} + +// InstallLegacyAPI will install the legacy APIs for the restStorageProviders if they are enabled. +func (m *Instance) InstallLegacyAPI(c *completedConfig, restOptionsGetter generic.RESTOptionsGetter, legacyRESTStorageProvider corerest.LegacyRESTStorageProvider) error { + legacyRESTStorage, apiGroupInfo, err := legacyRESTStorageProvider.NewLegacyRESTStorage(restOptionsGetter) + if err != nil { + return fmt.Errorf("error building core storage: %v", err) + } + + controllerName := "bootstrap-controller" + coreClient := corev1client.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) + bootstrapController := c.NewBootstrapController(legacyRESTStorage, coreClient, coreClient, coreClient, coreClient.RESTClient()) + m.GenericAPIServer.AddPostStartHookOrDie(controllerName, bootstrapController.PostStartHook) + m.GenericAPIServer.AddPreShutdownHookOrDie(controllerName, bootstrapController.PreShutdownHook) + + if err := m.GenericAPIServer.InstallLegacyAPIGroup(genericapiserver.DefaultLegacyAPIPrefix, &apiGroupInfo); err != nil { + return fmt.Errorf("error in registering group versions: %v", err) + } + return nil +} + +// RESTStorageProvider is a factory type for REST storage. +type RESTStorageProvider interface { + GroupName() string + NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool, error) +} + +// InstallAPIs will install the APIs for the restStorageProviders if they are enabled. +func (m *Instance) InstallAPIs(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter, restStorageProviders ...RESTStorageProvider) error { + apiGroupsInfo := []*genericapiserver.APIGroupInfo{} + + // used later in the loop to filter the served resource by those that have expired. + resourceExpirationEvaluator, err := genericapiserver.NewResourceExpirationEvaluator(*m.GenericAPIServer.Version) + if err != nil { + return err + } + + for _, restStorageBuilder := range restStorageProviders { + groupName := restStorageBuilder.GroupName() + if !apiResourceConfigSource.AnyVersionForGroupEnabled(groupName) { + klog.V(1).Infof("Skipping disabled API group %q.", groupName) + continue + } + apiGroupInfo, enabled, err := restStorageBuilder.NewRESTStorage(apiResourceConfigSource, restOptionsGetter) + if err != nil { + return fmt.Errorf("problem initializing API group %q : %v", groupName, err) + } + if !enabled { + klog.Warningf("API group %q is not enabled, skipping.", groupName) + continue + } + + // Remove resources that serving kinds that are removed. + // We do this here so that we don't accidentally serve versions without resources or openapi information that for kinds we don't serve. + // This is a spot above the construction of individual storage handlers so that no sig accidentally forgets to check. + resourceExpirationEvaluator.RemoveDeletedKinds(groupName, apiGroupInfo.Scheme, apiGroupInfo.VersionedResourcesStorageMap) + if len(apiGroupInfo.VersionedResourcesStorageMap) == 0 { + klog.V(1).Infof("Removing API group %v because it is time to stop serving it because it has no versions per APILifecycle.", groupName) + continue + } + + klog.V(1).Infof("Enabling API group %q.", groupName) + + if postHookProvider, ok := restStorageBuilder.(genericapiserver.PostStartHookProvider); ok { + name, hook, err := postHookProvider.PostStartHook() + if err != nil { + klog.Fatalf("Error building PostStartHook: %v", err) + } + m.GenericAPIServer.AddPostStartHookOrDie(name, hook) + } + + apiGroupsInfo = append(apiGroupsInfo, &apiGroupInfo) + } + + if err := m.GenericAPIServer.InstallAPIGroups(apiGroupsInfo...); err != nil { + return fmt.Errorf("error in registering group versions: %v", err) + } + return nil +} + +type nodeAddressProvider struct { + nodeClient corev1client.NodeInterface +} + +func (n nodeAddressProvider) externalAddresses() ([]string, error) { + preferredAddressTypes := []apiv1.NodeAddressType{ + apiv1.NodeExternalIP, + } + nodes, err := n.nodeClient.List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return nil, err + } + var matchErr error + addrs := []string{} + for ix := range nodes.Items { + node := &nodes.Items[ix] + addr, err := nodeutil.GetPreferredNodeAddress(node, preferredAddressTypes) + if err != nil { + if _, ok := err.(*nodeutil.NoMatchError); ok { + matchErr = err + continue + } + return nil, err + } + addrs = append(addrs, addr) + } + if len(addrs) == 0 && matchErr != nil { + // We only return an error if we have items. + // Currently we return empty list/no error if Items is empty. + // We do this for backward compatibility reasons. + return nil, matchErr + } + return addrs, nil +} + +// DefaultAPIResourceConfigSource returns default configuration for an APIResource. +func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig { + ret := serverstorage.NewResourceConfig() + // NOTE: GroupVersions listed here will be enabled by default. Don't put alpha versions in the list. + ret.EnableVersions( + admissionregistrationv1.SchemeGroupVersion, + admissionregistrationv1beta1.SchemeGroupVersion, + apiv1.SchemeGroupVersion, + appsv1.SchemeGroupVersion, + authenticationv1.SchemeGroupVersion, + authenticationv1beta1.SchemeGroupVersion, + authorizationapiv1.SchemeGroupVersion, + authorizationapiv1beta1.SchemeGroupVersion, + autoscalingapiv1.SchemeGroupVersion, + autoscalingapiv2beta1.SchemeGroupVersion, + autoscalingapiv2beta2.SchemeGroupVersion, + batchapiv1.SchemeGroupVersion, + batchapiv1beta1.SchemeGroupVersion, + certificatesapiv1.SchemeGroupVersion, + certificatesapiv1beta1.SchemeGroupVersion, + coordinationapiv1.SchemeGroupVersion, + coordinationapiv1beta1.SchemeGroupVersion, + discoveryv1.SchemeGroupVersion, + discoveryv1beta1.SchemeGroupVersion, + eventsv1.SchemeGroupVersion, + eventsv1beta1.SchemeGroupVersion, + extensionsapiv1beta1.SchemeGroupVersion, + networkingapiv1.SchemeGroupVersion, + networkingapiv1beta1.SchemeGroupVersion, + nodev1.SchemeGroupVersion, + nodev1beta1.SchemeGroupVersion, + policyapiv1.SchemeGroupVersion, + policyapiv1beta1.SchemeGroupVersion, + rbacv1.SchemeGroupVersion, + rbacv1beta1.SchemeGroupVersion, + storageapiv1.SchemeGroupVersion, + storageapiv1beta1.SchemeGroupVersion, + schedulingapiv1beta1.SchemeGroupVersion, + schedulingapiv1.SchemeGroupVersion, + flowcontrolv1beta1.SchemeGroupVersion, + ) + // enable non-deprecated beta resources in extensions/v1beta1 explicitly so we have a full list of what's possible to serve + ret.EnableResources( + extensionsapiv1beta1.SchemeGroupVersion.WithResource("ingresses"), + ) + // disable alpha versions explicitly so we have a full list of what's possible to serve + ret.DisableVersions( + apiserverinternalv1alpha1.SchemeGroupVersion, + nodev1alpha1.SchemeGroupVersion, + rbacv1alpha1.SchemeGroupVersion, + schedulingv1alpha1.SchemeGroupVersion, + storageapiv1alpha1.SchemeGroupVersion, + flowcontrolv1alpha1.SchemeGroupVersion, + ) + + return ret +} diff --git a/pkg/genericcontrolplane/options.go b/pkg/genericcontrolplane/options.go new file mode 100644 index 0000000000000..19bbf2a0dc7e5 --- /dev/null +++ b/pkg/genericcontrolplane/options.go @@ -0,0 +1,527 @@ +/* +Copyright 2016 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 genericcontrolplane + +import ( + "errors" + "fmt" + "net/url" + "strings" + "time" + + "github.com/spf13/pflag" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/authentication/authenticator" + genericapiserver "k8s.io/apiserver/pkg/server" + "k8s.io/apiserver/pkg/server/egressselector" + genericoptions "k8s.io/apiserver/pkg/server/options" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" + cliflag "k8s.io/component-base/cli/flag" + "k8s.io/klog/v2" + openapicommon "k8s.io/kube-openapi/pkg/common" + + serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" + kubeauthenticator "k8s.io/kubernetes/pkg/kubeapiserver/authenticator" + authzmodes "k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes" + "k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap" +) + +// BuiltInAuthenticationOptions contains all build-in authentication options for API Server +type BuiltInAuthenticationOptions struct { + APIAudiences []string + Anonymous *AnonymousAuthenticationOptions + BootstrapToken *BootstrapTokenAuthenticationOptions + ClientCert *genericoptions.ClientCertAuthenticationOptions + OIDC *OIDCAuthenticationOptions + RequestHeader *genericoptions.RequestHeaderAuthenticationOptions + ServiceAccounts *ServiceAccountAuthenticationOptions + TokenFile *TokenFileAuthenticationOptions + WebHook *WebHookAuthenticationOptions + + TokenSuccessCacheTTL time.Duration + TokenFailureCacheTTL time.Duration +} + +// AnonymousAuthenticationOptions contains anonymous authentication options for API Server +type AnonymousAuthenticationOptions struct { + Allow bool +} + +// BootstrapTokenAuthenticationOptions contains bootstrap token authentication options for API Server +type BootstrapTokenAuthenticationOptions struct { + Enable bool +} + +// OIDCAuthenticationOptions contains OIDC authentication options for API Server +type OIDCAuthenticationOptions struct { + CAFile string + ClientID string + IssuerURL string + UsernameClaim string + UsernamePrefix string + GroupsClaim string + GroupsPrefix string + SigningAlgs []string + RequiredClaims map[string]string +} + +// ServiceAccountAuthenticationOptions contains service account authentication options for API Server +type ServiceAccountAuthenticationOptions struct { + KeyFiles []string + Lookup bool + Issuers []string + JWKSURI string + MaxExpiration time.Duration + ExtendExpiration bool +} + +// TokenFileAuthenticationOptions contains token file authentication options for API Server +type TokenFileAuthenticationOptions struct { + TokenFile string +} + +// WebHookAuthenticationOptions contains web hook authentication options for API Server +type WebHookAuthenticationOptions struct { + ConfigFile string + Version string + CacheTTL time.Duration + + // RetryBackoff specifies the backoff parameters for the authentication webhook retry logic. + // This allows us to configure the sleep time at each iteration and the maximum number of retries allowed + // before we fail the webhook call in order to limit the fan out that ensues when the system is degraded. + RetryBackoff *wait.Backoff +} + +// NewBuiltInAuthenticationOptions create a new BuiltInAuthenticationOptions, just set default token cache TTL +func NewBuiltInAuthenticationOptions() *BuiltInAuthenticationOptions { + return &BuiltInAuthenticationOptions{ + TokenSuccessCacheTTL: 10 * time.Second, + TokenFailureCacheTTL: 0 * time.Second, + } +} + +// WithAll set default value for every build-in authentication option +func (o *BuiltInAuthenticationOptions) WithAll() *BuiltInAuthenticationOptions { + return o. + WithAnonymous(). + WithBootstrapToken(). + WithClientCert(). + WithOIDC(). + WithRequestHeader(). + WithServiceAccounts(). + WithTokenFile(). + WithWebHook() +} + +// WithAnonymous set default value for anonymous authentication +func (o *BuiltInAuthenticationOptions) WithAnonymous() *BuiltInAuthenticationOptions { + o.Anonymous = &AnonymousAuthenticationOptions{Allow: true} + return o +} + +// WithBootstrapToken set default value for bootstrap token authentication +func (o *BuiltInAuthenticationOptions) WithBootstrapToken() *BuiltInAuthenticationOptions { + o.BootstrapToken = &BootstrapTokenAuthenticationOptions{} + return o +} + +// WithClientCert set default value for client cert +func (o *BuiltInAuthenticationOptions) WithClientCert() *BuiltInAuthenticationOptions { + o.ClientCert = &genericoptions.ClientCertAuthenticationOptions{} + return o +} + +// WithOIDC set default value for OIDC authentication +func (o *BuiltInAuthenticationOptions) WithOIDC() *BuiltInAuthenticationOptions { + o.OIDC = &OIDCAuthenticationOptions{} + return o +} + +// WithRequestHeader set default value for request header authentication +func (o *BuiltInAuthenticationOptions) WithRequestHeader() *BuiltInAuthenticationOptions { + o.RequestHeader = &genericoptions.RequestHeaderAuthenticationOptions{} + return o +} + +// WithServiceAccounts set default value for service account authentication +func (o *BuiltInAuthenticationOptions) WithServiceAccounts() *BuiltInAuthenticationOptions { + o.ServiceAccounts = &ServiceAccountAuthenticationOptions{Lookup: true, ExtendExpiration: true} + return o +} + +// WithTokenFile set default value for token file authentication +func (o *BuiltInAuthenticationOptions) WithTokenFile() *BuiltInAuthenticationOptions { + o.TokenFile = &TokenFileAuthenticationOptions{} + return o +} + +// WithWebHook set default value for web hook authentication +func (o *BuiltInAuthenticationOptions) WithWebHook() *BuiltInAuthenticationOptions { + o.WebHook = &WebHookAuthenticationOptions{ + Version: "v1beta1", + CacheTTL: 2 * time.Minute, + RetryBackoff: genericoptions.DefaultAuthWebhookRetryBackoff(), + } + return o +} + +// Validate checks invalid config combination +func (o *BuiltInAuthenticationOptions) Validate() []error { + var allErrors []error + + if o.OIDC != nil && (len(o.OIDC.IssuerURL) > 0) != (len(o.OIDC.ClientID) > 0) { + allErrors = append(allErrors, fmt.Errorf("oidc-issuer-url and oidc-client-id should be specified together")) + } + + if o.ServiceAccounts != nil && len(o.ServiceAccounts.Issuers) > 0 { + seen := make(map[string]bool) + for _, issuer := range o.ServiceAccounts.Issuers { + if strings.Contains(issuer, ":") { + if _, err := url.Parse(issuer); err != nil { + allErrors = append(allErrors, fmt.Errorf("service-account-issuer %q contained a ':' but was not a valid URL: %v", issuer, err)) + continue + } + } + if issuer == "" { + allErrors = append(allErrors, fmt.Errorf("service-account-issuer should not be an empty string")) + continue + } + if seen[issuer] { + allErrors = append(allErrors, fmt.Errorf("service-account-issuer %q is already specified", issuer)) + continue + } + seen[issuer] = true + } + } + + if o.ServiceAccounts != nil { + if len(o.ServiceAccounts.Issuers) == 0 { + allErrors = append(allErrors, errors.New("service-account-issuer is a required flag")) + } + if len(o.ServiceAccounts.KeyFiles) == 0 { + allErrors = append(allErrors, errors.New("service-account-key-file is a required flag")) + } + + // Validate the JWKS URI when it is explicitly set. + // When unset, it is later derived from ExternalHost. + if o.ServiceAccounts.JWKSURI != "" { + if u, err := url.Parse(o.ServiceAccounts.JWKSURI); err != nil { + allErrors = append(allErrors, fmt.Errorf("service-account-jwks-uri must be a valid URL: %v", err)) + } else if u.Scheme != "https" { + allErrors = append(allErrors, fmt.Errorf("service-account-jwks-uri requires https scheme, parsed as: %v", u.String())) + } + } + } + + if o.WebHook != nil { + retryBackoff := o.WebHook.RetryBackoff + if retryBackoff != nil && retryBackoff.Steps <= 0 { + allErrors = append(allErrors, fmt.Errorf("number of webhook retry attempts must be greater than 0, but is: %d", retryBackoff.Steps)) + } + } + + return allErrors +} + +// AddFlags returns flags of authentication for a API Server +func (o *BuiltInAuthenticationOptions) AddFlags(fs *pflag.FlagSet) { + fs.StringSliceVar(&o.APIAudiences, "api-audiences", o.APIAudiences, ""+ + "Identifiers of the API. The service account token authenticator will validate that "+ + "tokens used against the API are bound to at least one of these audiences. If the "+ + "--service-account-issuer flag is configured and this flag is not, this field "+ + "defaults to a single element list containing the issuer URL.") + + if o.Anonymous != nil { + fs.BoolVar(&o.Anonymous.Allow, "anonymous-auth", o.Anonymous.Allow, ""+ + "Enables anonymous requests to the secure port of the API server. "+ + "Requests that are not rejected by another authentication method are treated as anonymous requests. "+ + "Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated.") + } + + if o.BootstrapToken != nil { + fs.BoolVar(&o.BootstrapToken.Enable, "enable-bootstrap-token-auth", o.BootstrapToken.Enable, ""+ + "Enable to allow secrets of type 'bootstrap.kubernetes.io/token' in the 'kube-system' "+ + "namespace to be used for TLS bootstrapping authentication.") + } + + if o.ClientCert != nil { + o.ClientCert.AddFlags(fs) + } + + if o.OIDC != nil { + fs.StringVar(&o.OIDC.IssuerURL, "oidc-issuer-url", o.OIDC.IssuerURL, ""+ + "The URL of the OpenID issuer, only HTTPS scheme will be accepted. "+ + "If set, it will be used to verify the OIDC JSON Web Token (JWT).") + + fs.StringVar(&o.OIDC.ClientID, "oidc-client-id", o.OIDC.ClientID, + "The client ID for the OpenID Connect client, must be set if oidc-issuer-url is set.") + + fs.StringVar(&o.OIDC.CAFile, "oidc-ca-file", o.OIDC.CAFile, ""+ + "If set, the OpenID server's certificate will be verified by one of the authorities "+ + "in the oidc-ca-file, otherwise the host's root CA set will be used.") + + fs.StringVar(&o.OIDC.UsernameClaim, "oidc-username-claim", "sub", ""+ + "The OpenID claim to use as the user name. Note that claims other than the default ('sub') "+ + "is not guaranteed to be unique and immutable. This flag is experimental, please see "+ + "the authentication documentation for further details.") + + fs.StringVar(&o.OIDC.UsernamePrefix, "oidc-username-prefix", "", ""+ + "If provided, all usernames will be prefixed with this value. If not provided, "+ + "username claims other than 'email' are prefixed by the issuer URL to avoid "+ + "clashes. To skip any prefixing, provide the value '-'.") + + fs.StringVar(&o.OIDC.GroupsClaim, "oidc-groups-claim", "", ""+ + "If provided, the name of a custom OpenID Connect claim for specifying user groups. "+ + "The claim value is expected to be a string or array of strings. This flag is experimental, "+ + "please see the authentication documentation for further details.") + + fs.StringVar(&o.OIDC.GroupsPrefix, "oidc-groups-prefix", "", ""+ + "If provided, all groups will be prefixed with this value to prevent conflicts with "+ + "other authentication strategies.") + + fs.StringSliceVar(&o.OIDC.SigningAlgs, "oidc-signing-algs", []string{"RS256"}, ""+ + "Comma-separated list of allowed JOSE asymmetric signing algorithms. JWTs with a "+ + "'alg' header value not in this list will be rejected. "+ + "Values are defined by RFC 7518 https://tools.ietf.org/html/rfc7518#section-3.1.") + + fs.Var(cliflag.NewMapStringStringNoSplit(&o.OIDC.RequiredClaims), "oidc-required-claim", ""+ + "A key=value pair that describes a required claim in the ID Token. "+ + "If set, the claim is verified to be present in the ID Token with a matching value. "+ + "Repeat this flag to specify multiple claims.") + } + + if o.RequestHeader != nil { + o.RequestHeader.AddFlags(fs) + } + + if o.ServiceAccounts != nil { + fs.StringArrayVar(&o.ServiceAccounts.KeyFiles, "service-account-key-file", o.ServiceAccounts.KeyFiles, ""+ + "File containing PEM-encoded x509 RSA or ECDSA private or public keys, used to verify "+ + "ServiceAccount tokens. The specified file can contain multiple keys, and the flag can "+ + "be specified multiple times with different files. If unspecified, "+ + "--tls-private-key-file is used. Must be specified when "+ + "--service-account-signing-key is provided") + + fs.BoolVar(&o.ServiceAccounts.Lookup, "service-account-lookup", o.ServiceAccounts.Lookup, + "If true, validate ServiceAccount tokens exist in etcd as part of authentication.") + + fs.StringArrayVar(&o.ServiceAccounts.Issuers, "service-account-issuer", o.ServiceAccounts.Issuers, ""+ + "Identifier of the service account token issuer. The issuer will assert this identifier "+ + "in \"iss\" claim of issued tokens. This value is a string or URI. If this option is not "+ + "a valid URI per the OpenID Discovery 1.0 spec, the ServiceAccountIssuerDiscovery feature "+ + "will remain disabled, even if the feature gate is set to true. It is highly recommended "+ + "that this value comply with the OpenID spec: https://openid.net/specs/openid-connect-discovery-1_0.html. "+ + "In practice, this means that service-account-issuer must be an https URL. It is also highly "+ + "recommended that this URL be capable of serving OpenID discovery documents at "+ + "{service-account-issuer}/.well-known/openid-configuration. "+ + "When this flag is specified multiple times, the first is used to generate tokens "+ + "and all are used to determine which issuers are accepted.") + + fs.StringVar(&o.ServiceAccounts.JWKSURI, "service-account-jwks-uri", o.ServiceAccounts.JWKSURI, ""+ + "Overrides the URI for the JSON Web Key Set in the discovery doc served at "+ + "/.well-known/openid-configuration. This flag is useful if the discovery doc"+ + "and key set are served to relying parties from a URL other than the "+ + "API server's external (as auto-detected or overridden with external-hostname). "+ + "Only valid if the ServiceAccountIssuerDiscovery feature gate is enabled.") + + // Deprecated in 1.13 + fs.StringSliceVar(&o.APIAudiences, "service-account-api-audiences", o.APIAudiences, ""+ + "Identifiers of the API. The service account token authenticator will validate that "+ + "tokens used against the API are bound to at least one of these audiences.") + fs.MarkDeprecated("service-account-api-audiences", "Use --api-audiences") + + fs.DurationVar(&o.ServiceAccounts.MaxExpiration, "service-account-max-token-expiration", o.ServiceAccounts.MaxExpiration, ""+ + "The maximum validity duration of a token created by the service account token issuer. If an otherwise valid "+ + "TokenRequest with a validity duration larger than this value is requested, a token will be issued with a validity duration of this value.") + + fs.BoolVar(&o.ServiceAccounts.ExtendExpiration, "service-account-extend-token-expiration", o.ServiceAccounts.ExtendExpiration, ""+ + "Turns on projected service account expiration extension during token generation, "+ + "which helps safe transition from legacy token to bound service account token feature. "+ + "If this flag is enabled, admission injected tokens would be extended up to 1 year to "+ + "prevent unexpected failure during transition, ignoring value of service-account-max-token-expiration.") + } + + if o.TokenFile != nil { + fs.StringVar(&o.TokenFile.TokenFile, "token-auth-file", o.TokenFile.TokenFile, ""+ + "If set, the file that will be used to secure the secure port of the API server "+ + "via token authentication.") + } + + if o.WebHook != nil { + fs.StringVar(&o.WebHook.ConfigFile, "authentication-token-webhook-config-file", o.WebHook.ConfigFile, ""+ + "File with webhook configuration for token authentication in kubeconfig format. "+ + "The API server will query the remote service to determine authentication for bearer tokens.") + + fs.StringVar(&o.WebHook.Version, "authentication-token-webhook-version", o.WebHook.Version, ""+ + "The API version of the authentication.k8s.io TokenReview to send to and expect from the webhook.") + + fs.DurationVar(&o.WebHook.CacheTTL, "authentication-token-webhook-cache-ttl", o.WebHook.CacheTTL, + "The duration to cache responses from the webhook token authenticator.") + } +} + +// ToAuthenticationConfig convert BuiltInAuthenticationOptions to kubeauthenticator.Config +func (o *BuiltInAuthenticationOptions) ToAuthenticationConfig() (kubeauthenticator.Config, error) { + ret := kubeauthenticator.Config{ + TokenSuccessCacheTTL: o.TokenSuccessCacheTTL, + TokenFailureCacheTTL: o.TokenFailureCacheTTL, + } + + if o.Anonymous != nil { + ret.Anonymous = o.Anonymous.Allow + } + + if o.BootstrapToken != nil { + ret.BootstrapToken = o.BootstrapToken.Enable + } + + if o.ClientCert != nil { + var err error + ret.ClientCAContentProvider, err = o.ClientCert.GetClientCAContentProvider() + if err != nil { + return kubeauthenticator.Config{}, err + } + } + + if o.OIDC != nil { + ret.OIDCCAFile = o.OIDC.CAFile + ret.OIDCClientID = o.OIDC.ClientID + ret.OIDCGroupsClaim = o.OIDC.GroupsClaim + ret.OIDCGroupsPrefix = o.OIDC.GroupsPrefix + ret.OIDCIssuerURL = o.OIDC.IssuerURL + ret.OIDCUsernameClaim = o.OIDC.UsernameClaim + ret.OIDCUsernamePrefix = o.OIDC.UsernamePrefix + ret.OIDCSigningAlgs = o.OIDC.SigningAlgs + ret.OIDCRequiredClaims = o.OIDC.RequiredClaims + } + + if o.RequestHeader != nil { + var err error + ret.RequestHeaderConfig, err = o.RequestHeader.ToAuthenticationRequestHeaderConfig() + if err != nil { + return kubeauthenticator.Config{}, err + } + } + + ret.APIAudiences = o.APIAudiences + if o.ServiceAccounts != nil { + if len(o.ServiceAccounts.Issuers) != 0 && len(o.APIAudiences) == 0 { + ret.APIAudiences = authenticator.Audiences(o.ServiceAccounts.Issuers) + } + ret.ServiceAccountKeyFiles = o.ServiceAccounts.KeyFiles + ret.ServiceAccountIssuers = o.ServiceAccounts.Issuers + ret.ServiceAccountLookup = o.ServiceAccounts.Lookup + } + + if o.TokenFile != nil { + ret.TokenAuthFile = o.TokenFile.TokenFile + } + + if o.WebHook != nil { + ret.WebhookTokenAuthnConfigFile = o.WebHook.ConfigFile + ret.WebhookTokenAuthnVersion = o.WebHook.Version + ret.WebhookTokenAuthnCacheTTL = o.WebHook.CacheTTL + ret.WebhookRetryBackoff = o.WebHook.RetryBackoff + + if len(o.WebHook.ConfigFile) > 0 && o.WebHook.CacheTTL > 0 { + if o.TokenSuccessCacheTTL > 0 && o.WebHook.CacheTTL < o.TokenSuccessCacheTTL { + klog.Warningf("the webhook cache ttl of %s is shorter than the overall cache ttl of %s for successful token authentication attempts.", o.WebHook.CacheTTL, o.TokenSuccessCacheTTL) + } + if o.TokenFailureCacheTTL > 0 && o.WebHook.CacheTTL < o.TokenFailureCacheTTL { + klog.Warningf("the webhook cache ttl of %s is shorter than the overall cache ttl of %s for failed token authentication attempts.", o.WebHook.CacheTTL, o.TokenFailureCacheTTL) + } + } + } + + return ret, nil +} + +// ApplyTo requires already applied OpenAPIConfig and EgressSelector if present. +func (o *BuiltInAuthenticationOptions) ApplyTo(authInfo *genericapiserver.AuthenticationInfo, secureServing *genericapiserver.SecureServingInfo, egressSelector *egressselector.EgressSelector, openAPIConfig *openapicommon.Config, extclient kubernetes.Interface, versionedInformer informers.SharedInformerFactory) error { + if o == nil { + return nil + } + + if openAPIConfig == nil { + return errors.New("uninitialized OpenAPIConfig") + } + + authenticatorConfig, err := o.ToAuthenticationConfig() + if err != nil { + return err + } + + if authenticatorConfig.ClientCAContentProvider != nil { + if err = authInfo.ApplyClientCert(authenticatorConfig.ClientCAContentProvider, secureServing); err != nil { + return fmt.Errorf("unable to load client CA file: %v", err) + } + } + if authenticatorConfig.RequestHeaderConfig != nil && authenticatorConfig.RequestHeaderConfig.CAContentProvider != nil { + if err = authInfo.ApplyClientCert(authenticatorConfig.RequestHeaderConfig.CAContentProvider, secureServing); err != nil { + return fmt.Errorf("unable to load client CA file: %v", err) + } + } + + authInfo.APIAudiences = o.APIAudiences + if o.ServiceAccounts != nil && len(o.ServiceAccounts.Issuers) != 0 && len(o.APIAudiences) == 0 { + authInfo.APIAudiences = authenticator.Audiences(o.ServiceAccounts.Issuers) + } + + authenticatorConfig.ServiceAccountTokenGetter = serviceaccountcontroller.NewGetterFromClient( + extclient, + versionedInformer.Core().V1().Secrets().Lister(), + versionedInformer.Core().V1().ServiceAccounts().Lister(), + versionedInformer.Core().V1().Pods().Lister(), + ) + + authenticatorConfig.BootstrapTokenAuthenticator = bootstrap.NewTokenAuthenticator( + versionedInformer.Core().V1().Secrets().Lister().Secrets(metav1.NamespaceSystem), + ) + + if egressSelector != nil { + egressDialer, err := egressSelector.Lookup(egressselector.ControlPlane.AsNetworkContext()) + if err != nil { + return err + } + authenticatorConfig.CustomDial = egressDialer + } + + authInfo.Authenticator, openAPIConfig.SecurityDefinitions, err = authenticatorConfig.New() + if err != nil { + return err + } + + return nil +} + +// ApplyAuthorization will conditionally modify the authentication options based on the authorization options +func (o *BuiltInAuthenticationOptions) ApplyAuthorization(authorization *BuiltInAuthorizationOptions) { + if o == nil || authorization == nil || o.Anonymous == nil { + return + } + + // authorization ModeAlwaysAllow cannot be combined with AnonymousAuth. + // in such a case the AnonymousAuth is stomped to false and you get a message + if o.Anonymous.Allow && sets.NewString(authorization.Modes...).Has(authzmodes.ModeAlwaysAllow) { + klog.Warningf("AnonymousAuth is not allowed with the AlwaysAllow authorizer. Resetting AnonymousAuth to false. You should use a different authorizer") + o.Anonymous.Allow = false + } +} diff --git a/pkg/genericcontrolplane/options/options.go b/pkg/genericcontrolplane/options/options.go new file mode 100644 index 0000000000000..32c777c192f4b --- /dev/null +++ b/pkg/genericcontrolplane/options/options.go @@ -0,0 +1,275 @@ +/* +Copyright 2014 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 options contains flags and options for initializing an apiserver +package options + +import ( + "net" + "strings" + "time" + + "github.com/spf13/pflag" + utilnet "k8s.io/apimachinery/pkg/util/net" + genericoptions "k8s.io/apiserver/pkg/server/options" + "k8s.io/apiserver/pkg/storage/storagebackend" + cliflag "k8s.io/component-base/cli/flag" + "k8s.io/component-base/logs" + "k8s.io/component-base/metrics" + + api "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/kubernetes/pkg/cluster/ports" + "k8s.io/kubernetes/pkg/controlplane/reconcilers" + _ "k8s.io/kubernetes/pkg/features" // add the kubernetes feature gates + kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" + kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" + "k8s.io/kubernetes/pkg/serviceaccount" +) + +// InsecurePortFlags are dummy flags, they are kept only for compatibility and will be removed in v1.24. +// TODO: remove these flags in v1.24. +var InsecurePortFlags = []string{"insecure-port", "port"} + +// ServerRunOptions runs a kubernetes api server. +type ServerRunOptions struct { + GenericServerRunOptions *genericoptions.ServerRunOptions + Etcd *genericoptions.EtcdOptions + SecureServing *genericoptions.SecureServingOptionsWithLoopback + Audit *genericoptions.AuditOptions + Features *genericoptions.FeatureOptions + Admission *kubeoptions.AdmissionOptions + Authentication *kubeoptions.BuiltInAuthenticationOptions + Authorization *kubeoptions.BuiltInAuthorizationOptions + CloudProvider *kubeoptions.CloudProviderOptions + APIEnablement *genericoptions.APIEnablementOptions + EgressSelector *genericoptions.EgressSelectorOptions + Metrics *metrics.Options + Logs *logs.Options + Traces *genericoptions.TracingOptions + + AllowPrivileged bool + EnableLogsHandler bool + EventTTL time.Duration + KubeletConfig kubeletclient.KubeletClientConfig + KubernetesServiceNodePort int + MaxConnectionBytesPerSec int64 + // ServiceClusterIPRange is mapped to input provided by user + ServiceClusterIPRanges string + // PrimaryServiceClusterIPRange and SecondaryServiceClusterIPRange are the results + // of parsing ServiceClusterIPRange into actual values + PrimaryServiceClusterIPRange net.IPNet + SecondaryServiceClusterIPRange net.IPNet + // APIServerServiceIP is the first valid IP from PrimaryServiceClusterIPRange + APIServerServiceIP net.IP + + ServiceNodePortRange utilnet.PortRange + + ProxyClientCertFile string + ProxyClientKeyFile string + + EnableAggregatorRouting bool + + MasterCount int + EndpointReconcilerType string + + IdentityLeaseDurationSeconds int + IdentityLeaseRenewIntervalSeconds int + + ServiceAccountSigningKeyFile string + ServiceAccountIssuer serviceaccount.TokenGenerator + ServiceAccountTokenMaxExpiration time.Duration + + ShowHiddenMetricsForVersion string +} + +// NewServerRunOptions creates a new ServerRunOptions object with default parameters +func NewServerRunOptions() *ServerRunOptions { + s := ServerRunOptions{ + GenericServerRunOptions: genericoptions.NewServerRunOptions(), + Etcd: genericoptions.NewEtcdOptions(storagebackend.NewDefaultConfig(kubeoptions.DefaultEtcdPathPrefix, nil)), + SecureServing: kubeoptions.NewSecureServingOptions(), + Audit: genericoptions.NewAuditOptions(), + Features: genericoptions.NewFeatureOptions(), + Admission: kubeoptions.NewAdmissionOptions(), + Authentication: kubeoptions.NewBuiltInAuthenticationOptions().WithAll(), + Authorization: kubeoptions.NewBuiltInAuthorizationOptions(), + CloudProvider: kubeoptions.NewCloudProviderOptions(), + APIEnablement: genericoptions.NewAPIEnablementOptions(), + EgressSelector: genericoptions.NewEgressSelectorOptions(), + Metrics: metrics.NewOptions(), + Logs: logs.NewOptions(), + Traces: genericoptions.NewTracingOptions(), + + EnableLogsHandler: true, + EventTTL: 1 * time.Hour, + MasterCount: 1, + EndpointReconcilerType: string(reconcilers.LeaseEndpointReconcilerType), + IdentityLeaseDurationSeconds: 3600, + IdentityLeaseRenewIntervalSeconds: 10, + KubeletConfig: kubeletclient.KubeletClientConfig{ + Port: ports.KubeletPort, + ReadOnlyPort: ports.KubeletReadOnlyPort, + PreferredAddressTypes: []string{ + // --override-hostname + string(api.NodeHostName), + + // internal, preferring DNS if reported + string(api.NodeInternalDNS), + string(api.NodeInternalIP), + + // external, preferring DNS if reported + string(api.NodeExternalDNS), + string(api.NodeExternalIP), + }, + HTTPTimeout: time.Duration(5) * time.Second, + }, + ServiceNodePortRange: kubeoptions.DefaultServiceNodePortRange, + } + + // Overwrite the default for storage data format. + s.Etcd.DefaultStorageMediaType = "application/vnd.kubernetes.protobuf" + + return &s +} + +// TODO: remove these insecure flags in v1.24 +func addDummyInsecureFlags(fs *pflag.FlagSet) { + var ( + bindAddr = net.IPv4(127, 0, 0, 1) + bindPort int + ) + + for _, name := range []string{"insecure-bind-address", "address"} { + fs.IPVar(&bindAddr, name, bindAddr, ""+ + "The IP address on which to serve the insecure port (set to 0.0.0.0 or :: for listening in all interfaces and IP families).") + fs.MarkDeprecated(name, "This flag has no effect now and will be removed in v1.24.") + } + + for _, name := range InsecurePortFlags { + fs.IntVar(&bindPort, name, bindPort, ""+ + "The port on which to serve unsecured, unauthenticated access.") + fs.MarkDeprecated(name, "This flag has no effect now and will be removed in v1.24.") + } +} + +// Flags returns flags for a specific APIServer by section name +func (s *ServerRunOptions) Flags() (fss cliflag.NamedFlagSets) { + // Add the generic flags. + s.GenericServerRunOptions.AddUniversalFlags(fss.FlagSet("generic")) + s.Etcd.AddFlags(fss.FlagSet("etcd")) + s.SecureServing.AddFlags(fss.FlagSet("secure serving")) + addDummyInsecureFlags(fss.FlagSet("insecure serving")) + s.Audit.AddFlags(fss.FlagSet("auditing")) + s.Features.AddFlags(fss.FlagSet("features")) + s.Authentication.AddFlags(fss.FlagSet("authentication")) + s.Authorization.AddFlags(fss.FlagSet("authorization")) + s.CloudProvider.AddFlags(fss.FlagSet("cloud provider")) + s.APIEnablement.AddFlags(fss.FlagSet("API enablement")) + s.EgressSelector.AddFlags(fss.FlagSet("egress selector")) + s.Admission.AddFlags(fss.FlagSet("admission")) + s.Metrics.AddFlags(fss.FlagSet("metrics")) + s.Logs.AddFlags(fss.FlagSet("logs")) + s.Traces.AddFlags(fss.FlagSet("traces")) + + // Note: the weird ""+ in below lines seems to be the only way to get gofmt to + // arrange these text blocks sensibly. Grrr. + fs := fss.FlagSet("misc") + fs.DurationVar(&s.EventTTL, "event-ttl", s.EventTTL, + "Amount of time to retain events.") + + fs.BoolVar(&s.AllowPrivileged, "allow-privileged", s.AllowPrivileged, + "If true, allow privileged containers. [default=false]") + + fs.BoolVar(&s.EnableLogsHandler, "enable-logs-handler", s.EnableLogsHandler, + "If true, install a /logs handler for the apiserver logs.") + fs.MarkDeprecated("enable-logs-handler", "This flag will be removed in v1.19") + + fs.Int64Var(&s.MaxConnectionBytesPerSec, "max-connection-bytes-per-sec", s.MaxConnectionBytesPerSec, ""+ + "If non-zero, throttle each user connection to this number of bytes/sec. "+ + "Currently only applies to long-running requests.") + + fs.IntVar(&s.MasterCount, "apiserver-count", s.MasterCount, + "The number of apiservers running in the cluster, must be a positive number. (In use when --endpoint-reconciler-type=master-count is enabled.)") + + fs.StringVar(&s.EndpointReconcilerType, "endpoint-reconciler-type", string(s.EndpointReconcilerType), + "Use an endpoint reconciler ("+strings.Join(reconcilers.AllTypes.Names(), ", ")+")") + + fs.IntVar(&s.IdentityLeaseDurationSeconds, "identity-lease-duration-seconds", s.IdentityLeaseDurationSeconds, + "The duration of kube-apiserver lease in seconds, must be a positive number. (In use when the APIServerIdentity feature gate is enabled.)") + + fs.IntVar(&s.IdentityLeaseRenewIntervalSeconds, "identity-lease-renew-interval-seconds", s.IdentityLeaseRenewIntervalSeconds, + "The interval of kube-apiserver renewing its lease in seconds, must be a positive number. (In use when the APIServerIdentity feature gate is enabled.)") + + // See #14282 for details on how to test/try this option out. + // TODO: remove this comment once this option is tested in CI. + fs.IntVar(&s.KubernetesServiceNodePort, "kubernetes-service-node-port", s.KubernetesServiceNodePort, ""+ + "If non-zero, the Kubernetes master service (which apiserver creates/maintains) will be "+ + "of type NodePort, using this as the value of the port. If zero, the Kubernetes master "+ + "service will be of type ClusterIP.") + + fs.StringVar(&s.ServiceClusterIPRanges, "service-cluster-ip-range", s.ServiceClusterIPRanges, ""+ + "A CIDR notation IP range from which to assign service cluster IPs. This must not "+ + "overlap with any IP ranges assigned to nodes or pods. Max of two dual-stack CIDRs is allowed.") + + fs.Var(&s.ServiceNodePortRange, "service-node-port-range", ""+ + "A port range to reserve for services with NodePort visibility. "+ + "Example: '30000-32767'. Inclusive at both ends of the range.") + + // Kubelet related flags: + fs.StringSliceVar(&s.KubeletConfig.PreferredAddressTypes, "kubelet-preferred-address-types", s.KubeletConfig.PreferredAddressTypes, + "List of the preferred NodeAddressTypes to use for kubelet connections.") + + fs.UintVar(&s.KubeletConfig.Port, "kubelet-port", s.KubeletConfig.Port, + "DEPRECATED: kubelet port.") + fs.MarkDeprecated("kubelet-port", "kubelet-port is deprecated and will be removed.") + + fs.UintVar(&s.KubeletConfig.ReadOnlyPort, "kubelet-read-only-port", s.KubeletConfig.ReadOnlyPort, + "DEPRECATED: kubelet read only port.") + fs.MarkDeprecated("kubelet-read-only-port", "kubelet-read-only-port is deprecated and will be removed.") + + fs.DurationVar(&s.KubeletConfig.HTTPTimeout, "kubelet-timeout", s.KubeletConfig.HTTPTimeout, + "Timeout for kubelet operations.") + + fs.StringVar(&s.KubeletConfig.CertFile, "kubelet-client-certificate", s.KubeletConfig.CertFile, + "Path to a client cert file for TLS.") + + fs.StringVar(&s.KubeletConfig.KeyFile, "kubelet-client-key", s.KubeletConfig.KeyFile, + "Path to a client key file for TLS.") + + fs.StringVar(&s.KubeletConfig.CAFile, "kubelet-certificate-authority", s.KubeletConfig.CAFile, + "Path to a cert file for the certificate authority.") + + fs.StringVar(&s.ProxyClientCertFile, "proxy-client-cert-file", s.ProxyClientCertFile, ""+ + "Client certificate used to prove the identity of the aggregator or kube-apiserver "+ + "when it must call out during a request. This includes proxying requests to a user "+ + "api-server and calling out to webhook admission plugins. It is expected that this "+ + "cert includes a signature from the CA in the --requestheader-client-ca-file flag. "+ + "That CA is published in the 'extension-apiserver-authentication' configmap in "+ + "the kube-system namespace. Components receiving calls from kube-aggregator should "+ + "use that CA to perform their half of the mutual TLS verification.") + fs.StringVar(&s.ProxyClientKeyFile, "proxy-client-key-file", s.ProxyClientKeyFile, ""+ + "Private key for the client certificate used to prove the identity of the aggregator or kube-apiserver "+ + "when it must call out during a request. This includes proxying requests to a user "+ + "api-server and calling out to webhook admission plugins.") + + fs.BoolVar(&s.EnableAggregatorRouting, "enable-aggregator-routing", s.EnableAggregatorRouting, + "Turns on aggregator routing requests to endpoints IP rather than cluster IP.") + + fs.StringVar(&s.ServiceAccountSigningKeyFile, "service-account-signing-key-file", s.ServiceAccountSigningKeyFile, ""+ + "Path to the file that contains the current private key of the service account token issuer. The issuer will sign issued ID tokens with this private key.") + + return fss +} From dd87be05b342325878a73854d39cdcb290dec97d Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Mon, 3 Aug 2020 18:44:25 -0400 Subject: [PATCH 04/87] NEW: Minimal kcp config, stripped down from kube-apiserver --- pkg/genericcontrolplane/apiextensions.go | 5 +- pkg/genericcontrolplane/apis/apis.go | 364 ++-------------- pkg/genericcontrolplane/options.go | 475 +-------------------- pkg/genericcontrolplane/options/options.go | 191 +-------- pkg/genericcontrolplane/server.go | 204 +++++---- 5 files changed, 176 insertions(+), 1063 deletions(-) diff --git a/pkg/genericcontrolplane/apiextensions.go b/pkg/genericcontrolplane/apiextensions.go index 0f8575c3d6eae..a72e9b0ae4f48 100644 --- a/pkg/genericcontrolplane/apiextensions.go +++ b/pkg/genericcontrolplane/apiextensions.go @@ -34,7 +34,7 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/util/webhook" kubeexternalinformers "k8s.io/client-go/informers" - "k8s.io/kubernetes/cmd/kube-apiserver/app/options" + "k8s.io/kubernetes/pkg/genericcontrolplane/options" ) func createAPIExtensionsConfig( @@ -42,7 +42,6 @@ func createAPIExtensionsConfig( externalInformers kubeexternalinformers.SharedInformerFactory, pluginInitializers []admission.PluginInitializer, commandOptions *options.ServerRunOptions, - masterCount int, serviceResolver webhook.ServiceResolver, authResolverWrapper webhook.AuthenticationInfoResolverWrapper, ) (*apiextensionsapiserver.Config, error) { @@ -88,7 +87,7 @@ func createAPIExtensionsConfig( }, ExtraConfig: apiextensionsapiserver.ExtraConfig{ CRDRESTOptionsGetter: apiextensionsoptions.NewCRDRESTOptionsGetter(etcdOptions), - MasterCount: masterCount, + MasterCount: 3, AuthResolverWrapper: authResolverWrapper, ServiceResolver: serviceResolver, }, diff --git a/pkg/genericcontrolplane/apis/apis.go b/pkg/genericcontrolplane/apis/apis.go index 2c293124d132e..34d9e66ef19d7 100644 --- a/pkg/genericcontrolplane/apis/apis.go +++ b/pkg/genericcontrolplane/apis/apis.go @@ -19,55 +19,21 @@ package apis import ( "context" "fmt" - "net" "net/http" - "reflect" - "strconv" "time" - admissionregistrationv1 "k8s.io/api/admissionregistration/v1" - admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" apiserverinternalv1alpha1 "k8s.io/api/apiserverinternal/v1alpha1" - appsv1 "k8s.io/api/apps/v1" authenticationv1 "k8s.io/api/authentication/v1" - authenticationv1beta1 "k8s.io/api/authentication/v1beta1" authorizationapiv1 "k8s.io/api/authorization/v1" - authorizationapiv1beta1 "k8s.io/api/authorization/v1beta1" - autoscalingapiv1 "k8s.io/api/autoscaling/v1" - autoscalingapiv2beta1 "k8s.io/api/autoscaling/v2beta1" - autoscalingapiv2beta2 "k8s.io/api/autoscaling/v2beta2" - batchapiv1 "k8s.io/api/batch/v1" - batchapiv1beta1 "k8s.io/api/batch/v1beta1" certificatesapiv1 "k8s.io/api/certificates/v1" - certificatesapiv1beta1 "k8s.io/api/certificates/v1beta1" coordinationapiv1 "k8s.io/api/coordination/v1" - coordinationapiv1beta1 "k8s.io/api/coordination/v1beta1" apiv1 "k8s.io/api/core/v1" - discoveryv1 "k8s.io/api/discovery/v1" - discoveryv1beta1 "k8s.io/api/discovery/v1beta1" eventsv1 "k8s.io/api/events/v1" - eventsv1beta1 "k8s.io/api/events/v1beta1" - extensionsapiv1beta1 "k8s.io/api/extensions/v1beta1" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" - networkingapiv1 "k8s.io/api/networking/v1" - networkingapiv1beta1 "k8s.io/api/networking/v1beta1" - nodev1 "k8s.io/api/node/v1" - nodev1alpha1 "k8s.io/api/node/v1alpha1" - nodev1beta1 "k8s.io/api/node/v1beta1" - policyapiv1 "k8s.io/api/policy/v1" - policyapiv1beta1 "k8s.io/api/policy/v1beta1" rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" - rbacv1beta1 "k8s.io/api/rbac/v1beta1" - schedulingapiv1 "k8s.io/api/scheduling/v1" - schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" - schedulingapiv1beta1 "k8s.io/api/scheduling/v1beta1" - storageapiv1 "k8s.io/api/storage/v1" - storageapiv1alpha1 "k8s.io/api/storage/v1alpha1" - storageapiv1beta1 "k8s.io/api/storage/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/clock" - utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/endpoints/discovery" @@ -76,46 +42,28 @@ import ( genericapiserver "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/dynamiccertificates" serverstorage "k8s.io/apiserver/pkg/server/storage" - storagefactory "k8s.io/apiserver/pkg/storage/storagebackend/factory" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - discoveryclient "k8s.io/client-go/kubernetes/typed/discovery/v1" "k8s.io/component-helpers/apimachinery/lease" "k8s.io/klog/v2" - api "k8s.io/kubernetes/pkg/apis/core" flowcontrolv1beta1 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta1" "k8s.io/kubernetes/pkg/controlplane/controller/apiserverleasegc" "k8s.io/kubernetes/pkg/controlplane/controller/clusterauthenticationtrust" - "k8s.io/kubernetes/pkg/controlplane/reconcilers" - kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" - kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/routes" "k8s.io/kubernetes/pkg/serviceaccount" nodeutil "k8s.io/kubernetes/pkg/util/node" // RESTStorage installers - admissionregistrationrest "k8s.io/kubernetes/pkg/registry/admissionregistration/rest" apiserverinternalrest "k8s.io/kubernetes/pkg/registry/apiserverinternal/rest" - appsrest "k8s.io/kubernetes/pkg/registry/apps/rest" authenticationrest "k8s.io/kubernetes/pkg/registry/authentication/rest" authorizationrest "k8s.io/kubernetes/pkg/registry/authorization/rest" - autoscalingrest "k8s.io/kubernetes/pkg/registry/autoscaling/rest" - batchrest "k8s.io/kubernetes/pkg/registry/batch/rest" certificatesrest "k8s.io/kubernetes/pkg/registry/certificates/rest" coordinationrest "k8s.io/kubernetes/pkg/registry/coordination/rest" - corerest "k8s.io/kubernetes/pkg/registry/core/rest" - discoveryrest "k8s.io/kubernetes/pkg/registry/discovery/rest" eventsrest "k8s.io/kubernetes/pkg/registry/events/rest" - extensionsrest "k8s.io/kubernetes/pkg/registry/extensions/rest" flowcontrolrest "k8s.io/kubernetes/pkg/registry/flowcontrol/rest" - networkingrest "k8s.io/kubernetes/pkg/registry/networking/rest" - noderest "k8s.io/kubernetes/pkg/registry/node/rest" - policyrest "k8s.io/kubernetes/pkg/registry/policy/rest" rbacrest "k8s.io/kubernetes/pkg/registry/rbac/rest" - schedulingrest "k8s.io/kubernetes/pkg/registry/scheduling/rest" - storagerest "k8s.io/kubernetes/pkg/registry/storage/rest" ) const ( @@ -138,66 +86,16 @@ const ( type ExtraConfig struct { ClusterAuthenticationInfo clusterauthenticationtrust.ClusterAuthenticationInfo - APIResourceConfigSource serverstorage.APIResourceConfigSource - StorageFactory serverstorage.StorageFactory - EndpointReconcilerConfig EndpointReconcilerConfig - EventTTL time.Duration - KubeletClientConfig kubeletclient.KubeletClientConfig + APIResourceConfigSource serverstorage.APIResourceConfigSource + StorageFactory serverstorage.StorageFactory + EventTTL time.Duration EnableLogsSupport bool ProxyTransport *http.Transport - // Values to build the IP addresses used by discovery - // The range of IPs to be assigned to services with type=ClusterIP or greater - ServiceIPRange net.IPNet - // The IP address for the GenericAPIServer service (must be inside ServiceIPRange) - APIServerServiceIP net.IP - - // dual stack services, the range represents an alternative IP range for service IP - // must be of different family than primary (ServiceIPRange) - SecondaryServiceIPRange net.IPNet - // the secondary IP address the GenericAPIServer service (must be inside SecondaryServiceIPRange) - SecondaryAPIServerServiceIP net.IP - // Port for the apiserver service. APIServerServicePort int - // TODO, we can probably group service related items into a substruct to make it easier to configure - // the API server items and `Extra*` fields likely fit nicely together. - - // The range of ports to be assigned to services with type=NodePort or greater - ServiceNodePortRange utilnet.PortRange - // Additional ports to be exposed on the GenericAPIServer service - // extraServicePorts is injectable in the event that more ports - // (other than the default 443/tcp) are exposed on the GenericAPIServer - // and those ports need to be load balanced by the GenericAPIServer - // service because this pkg is linked by out-of-tree projects - // like openshift which want to use the GenericAPIServer but also do - // more stuff. - ExtraServicePorts []apiv1.ServicePort - // Additional ports to be exposed on the GenericAPIServer endpoints - // Port names should align with ports defined in ExtraServicePorts - ExtraEndpointPorts []apiv1.EndpointPort - // If non-zero, the "kubernetes" services uses this port as NodePort. - KubernetesServiceNodePort int - - // Number of masters running; all masters must be started with the - // same value for this field. (Numbers > 1 currently untested.) - MasterCount int - - // MasterEndpointReconcileTTL sets the time to live in seconds of an - // endpoint record recorded by each master. The endpoints are checked at an - // interval that is 2/3 of this value and this value defaults to 15s if - // unset. In very large clusters, this value may be increased to reduce the - // possibility that the master endpoint record expires (due to other load - // on the etcd server) and causes masters to drop in and out of the - // kubernetes service record. It is not recommended to set this value below - // 15s. - MasterEndpointReconcileTTL time.Duration - - // Selects which reconciler to use - EndpointReconcilerType reconcilers.Type - ServiceAccountIssuer serviceaccount.TokenGenerator ServiceAccountMaxExpiration time.Duration ExtendExpiration bool @@ -229,67 +127,13 @@ type CompletedConfig struct { *completedConfig } -// EndpointReconcilerConfig holds the endpoint reconciler and endpoint reconciliation interval to be -// used by the master. -type EndpointReconcilerConfig struct { - Reconciler reconcilers.EndpointReconciler - Interval time.Duration -} - -// Instance contains state for a Kubernetes cluster api server instance. -type Instance struct { +// ControlPlane contains state for a Kubernetes cluster master/api server. +type ControlPlane struct { GenericAPIServer *genericapiserver.GenericAPIServer ClusterAuthenticationInfo clusterauthenticationtrust.ClusterAuthenticationInfo } -func (c *Config) createMasterCountReconciler() reconcilers.EndpointReconciler { - endpointClient := corev1client.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) - endpointSliceClient := discoveryclient.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) - endpointsAdapter := reconcilers.NewEndpointsAdapter(endpointClient, endpointSliceClient) - - return reconcilers.NewMasterCountEndpointReconciler(c.ExtraConfig.MasterCount, endpointsAdapter) -} - -func (c *Config) createNoneReconciler() reconcilers.EndpointReconciler { - return reconcilers.NewNoneEndpointReconciler() -} - -func (c *Config) createLeaseReconciler() reconcilers.EndpointReconciler { - endpointClient := corev1client.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) - endpointSliceClient := discoveryclient.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) - endpointsAdapter := reconcilers.NewEndpointsAdapter(endpointClient, endpointSliceClient) - - ttl := c.ExtraConfig.MasterEndpointReconcileTTL - config, err := c.ExtraConfig.StorageFactory.NewConfig(api.Resource("apiServerIPInfo")) - if err != nil { - klog.Fatalf("Error determining service IP ranges: %v", err) - } - leaseStorage, _, err := storagefactory.Create(*config, nil) - if err != nil { - klog.Fatalf("Error creating storage factory: %v", err) - } - masterLeases := reconcilers.NewLeases(leaseStorage, "/masterleases/", ttl) - - return reconcilers.NewLeaseEndpointReconciler(endpointsAdapter, masterLeases) -} - -func (c *Config) createEndpointReconciler() reconcilers.EndpointReconciler { - klog.Infof("Using reconciler: %v", c.ExtraConfig.EndpointReconcilerType) - switch c.ExtraConfig.EndpointReconcilerType { - // there are numerous test dependencies that depend on a default controller - case "", reconcilers.MasterCountReconcilerType: - return c.createMasterCountReconciler() - case reconcilers.LeaseEndpointReconcilerType: - return c.createLeaseReconciler() - case reconcilers.NoneEndpointReconcilerType: - return c.createNoneReconciler() - default: - klog.Fatalf("Reconciler not implemented: %v", c.ExtraConfig.EndpointReconcilerType) - } - return nil -} - // Complete fills in any fields not set that are required to have valid data. It's mutating the receiver. func (c *Config) Complete() CompletedConfig { cfg := completedConfig{ @@ -297,56 +141,18 @@ func (c *Config) Complete() CompletedConfig { &c.ExtraConfig, } - serviceIPRange, apiServerServiceIP, err := ServiceIPRange(cfg.ExtraConfig.ServiceIPRange) - if err != nil { - klog.Fatalf("Error determining service IP ranges: %v", err) - } - if cfg.ExtraConfig.ServiceIPRange.IP == nil { - cfg.ExtraConfig.ServiceIPRange = serviceIPRange - } - if cfg.ExtraConfig.APIServerServiceIP == nil { - cfg.ExtraConfig.APIServerServiceIP = apiServerServiceIP - } - discoveryAddresses := discovery.DefaultAddresses{DefaultAddress: cfg.GenericConfig.ExternalAddress} - discoveryAddresses.CIDRRules = append(discoveryAddresses.CIDRRules, - discovery.CIDRRule{IPRange: cfg.ExtraConfig.ServiceIPRange, Address: net.JoinHostPort(cfg.ExtraConfig.APIServerServiceIP.String(), strconv.Itoa(cfg.ExtraConfig.APIServerServicePort))}) cfg.GenericConfig.DiscoveryAddresses = discoveryAddresses - if cfg.ExtraConfig.ServiceNodePortRange.Size == 0 { - // TODO: Currently no way to specify an empty range (do we need to allow this?) - // We should probably allow this for clouds that don't require NodePort to do load-balancing (GCE) - // but then that breaks the strict nestedness of ServiceType. - // Review post-v1 - cfg.ExtraConfig.ServiceNodePortRange = kubeoptions.DefaultServiceNodePortRange - klog.Infof("Node port range unspecified. Defaulting to %v.", cfg.ExtraConfig.ServiceNodePortRange) - } - - if cfg.ExtraConfig.EndpointReconcilerConfig.Interval == 0 { - cfg.ExtraConfig.EndpointReconcilerConfig.Interval = DefaultEndpointReconcilerInterval - } - - if cfg.ExtraConfig.MasterEndpointReconcileTTL == 0 { - cfg.ExtraConfig.MasterEndpointReconcileTTL = DefaultEndpointReconcilerTTL - } - - if cfg.ExtraConfig.EndpointReconcilerConfig.Reconciler == nil { - cfg.ExtraConfig.EndpointReconcilerConfig.Reconciler = c.createEndpointReconciler() - } - return CompletedConfig{&cfg} } -// New returns a new instance of Master from the given config. +// New returns a new instance of ControlPlane from the given config. // Certain config fields will be set to a default value if unset. // Certain config fields must be specified, including: // KubeletClientConfig -func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) (*Instance, error) { - if reflect.DeepEqual(c.ExtraConfig.KubeletClientConfig, kubeletclient.KubeletClientConfig{}) { - return nil, fmt.Errorf("Master.New() called with empty config.KubeletClientConfig") - } - - s, err := c.GenericConfig.New("kube-apiserver", delegationTarget) +func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) (*ControlPlane, error) { + s, err := c.GenericConfig.New("kube-control-plane", delegationTarget) if err != nil { return nil, err } @@ -355,63 +161,42 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) routes.Logs{}.Install(s.Handler.GoRestfulContainer) } - // Metadata and keys are expected to only change across restarts at present, - // so we just marshal immediately and serve the cached JSON bytes. - md, err := serviceaccount.NewOpenIDMetadata( - c.ExtraConfig.ServiceAccountIssuerURL, - c.ExtraConfig.ServiceAccountJWKSURI, - c.GenericConfig.ExternalAddress, - c.ExtraConfig.ServiceAccountPublicKeys, - ) - if err != nil { - // If there was an error, skip installing the endpoints and log the - // error, but continue on. We don't return the error because the - // metadata responses require additional, backwards incompatible - // validation of command-line options. - msg := fmt.Sprintf("Could not construct pre-rendered responses for"+ - " ServiceAccountIssuerDiscovery endpoints. Endpoints will not be"+ - " enabled. Error: %v", err) - if c.ExtraConfig.ServiceAccountIssuerURL != "" { - // The user likely expects this feature to be enabled if issuer URL is - // set and the feature gate is enabled. In the future, if there is no - // longer a feature gate and issuer URL is not set, the user may not - // expect this feature to be enabled. We log the former case as an Error - // and the latter case as an Info. - klog.Error(msg) - } else { - klog.Info(msg) - } - } else { - routes.NewOpenIDMetadataServer(md.ConfigJSON, md.PublicKeysetJSON). - Install(s.Handler.GoRestfulContainer) - } - - m := &Instance{ + // // Metadata and keys are expected to only change across restarts at present, + // // so we just marshal immediately and serve the cached JSON bytes. + // md, err := serviceaccount.NewOpenIDMetadata( + // c.ExtraConfig.ServiceAccountIssuerURL, + // c.ExtraConfig.ServiceAccountJWKSURI, + // c.GenericConfig.ExternalAddress, + // c.ExtraConfig.ServiceAccountPublicKeys, + // ) + // if err != nil { + // // If there was an error, skip installing the endpoints and log the + // // error, but continue on. We don't return the error because the + // // metadata responses require additional, backwards incompatible + // // validation of command-line options. + // msg := fmt.Sprintf("Could not construct pre-rendered responses for"+ + // " ServiceAccountIssuerDiscovery endpoints. Endpoints will not be"+ + // " enabled. Error: %v", err) + // if c.ExtraConfig.ServiceAccountIssuerURL != "" { + // // The user likely expects this feature to be enabled if issuer URL is + // // set and the feature gate is enabled. In the future, if there is no + // // longer a feature gate and issuer URL is not set, the user may not + // // expect this feature to be enabled. We log the former case as an Error + // // and the latter case as an Info. + // klog.Error(msg) + // } else { + // klog.Info(msg) + // } + // } else { + // routes.NewOpenIDMetadataServer(md.ConfigJSON, md.PublicKeysetJSON). + // Install(s.Handler.GoRestfulContainer) + // } + + m := &ControlPlane{ GenericAPIServer: s, ClusterAuthenticationInfo: c.ExtraConfig.ClusterAuthenticationInfo, } - // install legacy rest storage - if c.ExtraConfig.APIResourceConfigSource.VersionEnabled(apiv1.SchemeGroupVersion) { - legacyRESTStorageProvider := corerest.LegacyRESTStorageProvider{ - StorageFactory: c.ExtraConfig.StorageFactory, - ProxyTransport: c.ExtraConfig.ProxyTransport, - KubeletClientConfig: c.ExtraConfig.KubeletClientConfig, - EventTTL: c.ExtraConfig.EventTTL, - ServiceIPRange: c.ExtraConfig.ServiceIPRange, - SecondaryServiceIPRange: c.ExtraConfig.SecondaryServiceIPRange, - ServiceNodePortRange: c.ExtraConfig.ServiceNodePortRange, - LoopbackClientConfig: c.GenericConfig.LoopbackClientConfig, - ServiceAccountIssuer: c.ExtraConfig.ServiceAccountIssuer, - ExtendExpiration: c.ExtraConfig.ExtendExpiration, - ServiceAccountMaxExpiration: c.ExtraConfig.ServiceAccountMaxExpiration, - APIAudiences: c.GenericConfig.Authentication.APIAudiences, - } - if err := m.InstallLegacyAPI(&c, c.GenericConfig.RESTOptionsGetter, legacyRESTStorageProvider); err != nil { - return nil, err - } - } - // The order here is preserved in discovery. // If resources with identical names exist in more than one of these groups (e.g. "deployments.apps"" and "deployments.extensions"), // the order of this list determines which group an unqualified resource name (e.g. "deployments") should prefer. @@ -423,23 +208,10 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) apiserverinternalrest.StorageProvider{}, authenticationrest.RESTStorageProvider{Authenticator: c.GenericConfig.Authentication.Authenticator, APIAudiences: c.GenericConfig.Authentication.APIAudiences}, authorizationrest.RESTStorageProvider{Authorizer: c.GenericConfig.Authorization.Authorizer, RuleResolver: c.GenericConfig.RuleResolver}, - autoscalingrest.RESTStorageProvider{}, - batchrest.RESTStorageProvider{}, certificatesrest.RESTStorageProvider{}, coordinationrest.RESTStorageProvider{}, - discoveryrest.StorageProvider{}, - extensionsrest.RESTStorageProvider{}, - networkingrest.RESTStorageProvider{}, - noderest.RESTStorageProvider{}, - policyrest.RESTStorageProvider{}, rbacrest.RESTStorageProvider{Authorizer: c.GenericConfig.Authorization.Authorizer}, - schedulingrest.RESTStorageProvider{}, - storagerest.RESTStorageProvider{}, flowcontrolrest.RESTStorageProvider{}, - // keep apps after extensions so legacy clients resolve the extensions versions of shared resource names. - // See https://github.com/kubernetes/kubernetes/issues/42392 - appsrest.StorageProvider{}, - admissionregistrationrest.RESTStorageProvider{}, eventsrest.RESTStorageProvider{TTL: c.ExtraConfig.EventTTL}, } if err := m.InstallAPIs(c.ExtraConfig.APIResourceConfigSource, c.GenericConfig.RESTOptionsGetter, restStorageProviders...); err != nil { @@ -524,25 +296,6 @@ func labelAPIServerHeartbeat(lease *coordinationapiv1.Lease) error { return nil } -// InstallLegacyAPI will install the legacy APIs for the restStorageProviders if they are enabled. -func (m *Instance) InstallLegacyAPI(c *completedConfig, restOptionsGetter generic.RESTOptionsGetter, legacyRESTStorageProvider corerest.LegacyRESTStorageProvider) error { - legacyRESTStorage, apiGroupInfo, err := legacyRESTStorageProvider.NewLegacyRESTStorage(restOptionsGetter) - if err != nil { - return fmt.Errorf("error building core storage: %v", err) - } - - controllerName := "bootstrap-controller" - coreClient := corev1client.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) - bootstrapController := c.NewBootstrapController(legacyRESTStorage, coreClient, coreClient, coreClient, coreClient.RESTClient()) - m.GenericAPIServer.AddPostStartHookOrDie(controllerName, bootstrapController.PostStartHook) - m.GenericAPIServer.AddPreShutdownHookOrDie(controllerName, bootstrapController.PreShutdownHook) - - if err := m.GenericAPIServer.InstallLegacyAPIGroup(genericapiserver.DefaultLegacyAPIPrefix, &apiGroupInfo); err != nil { - return fmt.Errorf("error in registering group versions: %v", err) - } - return nil -} - // RESTStorageProvider is a factory type for REST storage. type RESTStorageProvider interface { GroupName() string @@ -550,7 +303,7 @@ type RESTStorageProvider interface { } // InstallAPIs will install the APIs for the restStorageProviders if they are enabled. -func (m *Instance) InstallAPIs(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter, restStorageProviders ...RESTStorageProvider) error { +func (m *ControlPlane) InstallAPIs(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter, restStorageProviders ...RESTStorageProvider) error { apiGroupsInfo := []*genericapiserver.APIGroupInfo{} // used later in the loop to filter the served resource by those that have expired. @@ -642,53 +395,18 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig { ret := serverstorage.NewResourceConfig() // NOTE: GroupVersions listed here will be enabled by default. Don't put alpha versions in the list. ret.EnableVersions( - admissionregistrationv1.SchemeGroupVersion, - admissionregistrationv1beta1.SchemeGroupVersion, - apiv1.SchemeGroupVersion, - appsv1.SchemeGroupVersion, authenticationv1.SchemeGroupVersion, - authenticationv1beta1.SchemeGroupVersion, authorizationapiv1.SchemeGroupVersion, - authorizationapiv1beta1.SchemeGroupVersion, - autoscalingapiv1.SchemeGroupVersion, - autoscalingapiv2beta1.SchemeGroupVersion, - autoscalingapiv2beta2.SchemeGroupVersion, - batchapiv1.SchemeGroupVersion, - batchapiv1beta1.SchemeGroupVersion, certificatesapiv1.SchemeGroupVersion, - certificatesapiv1beta1.SchemeGroupVersion, coordinationapiv1.SchemeGroupVersion, - coordinationapiv1beta1.SchemeGroupVersion, - discoveryv1.SchemeGroupVersion, - discoveryv1beta1.SchemeGroupVersion, eventsv1.SchemeGroupVersion, - eventsv1beta1.SchemeGroupVersion, - extensionsapiv1beta1.SchemeGroupVersion, - networkingapiv1.SchemeGroupVersion, - networkingapiv1beta1.SchemeGroupVersion, - nodev1.SchemeGroupVersion, - nodev1beta1.SchemeGroupVersion, - policyapiv1.SchemeGroupVersion, - policyapiv1beta1.SchemeGroupVersion, rbacv1.SchemeGroupVersion, - rbacv1beta1.SchemeGroupVersion, - storageapiv1.SchemeGroupVersion, - storageapiv1beta1.SchemeGroupVersion, - schedulingapiv1beta1.SchemeGroupVersion, - schedulingapiv1.SchemeGroupVersion, flowcontrolv1beta1.SchemeGroupVersion, ) - // enable non-deprecated beta resources in extensions/v1beta1 explicitly so we have a full list of what's possible to serve - ret.EnableResources( - extensionsapiv1beta1.SchemeGroupVersion.WithResource("ingresses"), - ) // disable alpha versions explicitly so we have a full list of what's possible to serve ret.DisableVersions( apiserverinternalv1alpha1.SchemeGroupVersion, - nodev1alpha1.SchemeGroupVersion, rbacv1alpha1.SchemeGroupVersion, - schedulingv1alpha1.SchemeGroupVersion, - storageapiv1alpha1.SchemeGroupVersion, flowcontrolv1alpha1.SchemeGroupVersion, ) diff --git a/pkg/genericcontrolplane/options.go b/pkg/genericcontrolplane/options.go index 19bbf2a0dc7e5..45ceee939c514 100644 --- a/pkg/genericcontrolplane/options.go +++ b/pkg/genericcontrolplane/options.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2014 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. @@ -19,443 +19,16 @@ package genericcontrolplane import ( "errors" "fmt" - "net/url" - "strings" - "time" - "github.com/spf13/pflag" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/authentication/authenticator" - genericapiserver "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/egressselector" - genericoptions "k8s.io/apiserver/pkg/server/options" - "k8s.io/client-go/informers" - "k8s.io/client-go/kubernetes" - cliflag "k8s.io/component-base/cli/flag" - "k8s.io/klog/v2" openapicommon "k8s.io/kube-openapi/pkg/common" - serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" - kubeauthenticator "k8s.io/kubernetes/pkg/kubeapiserver/authenticator" - authzmodes "k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes" - "k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap" + "k8s.io/kubernetes/pkg/kubeapiserver/options" + genericapiserver "k8s.io/apiserver/pkg/server" ) -// BuiltInAuthenticationOptions contains all build-in authentication options for API Server -type BuiltInAuthenticationOptions struct { - APIAudiences []string - Anonymous *AnonymousAuthenticationOptions - BootstrapToken *BootstrapTokenAuthenticationOptions - ClientCert *genericoptions.ClientCertAuthenticationOptions - OIDC *OIDCAuthenticationOptions - RequestHeader *genericoptions.RequestHeaderAuthenticationOptions - ServiceAccounts *ServiceAccountAuthenticationOptions - TokenFile *TokenFileAuthenticationOptions - WebHook *WebHookAuthenticationOptions - - TokenSuccessCacheTTL time.Duration - TokenFailureCacheTTL time.Duration -} - -// AnonymousAuthenticationOptions contains anonymous authentication options for API Server -type AnonymousAuthenticationOptions struct { - Allow bool -} - -// BootstrapTokenAuthenticationOptions contains bootstrap token authentication options for API Server -type BootstrapTokenAuthenticationOptions struct { - Enable bool -} - -// OIDCAuthenticationOptions contains OIDC authentication options for API Server -type OIDCAuthenticationOptions struct { - CAFile string - ClientID string - IssuerURL string - UsernameClaim string - UsernamePrefix string - GroupsClaim string - GroupsPrefix string - SigningAlgs []string - RequiredClaims map[string]string -} - -// ServiceAccountAuthenticationOptions contains service account authentication options for API Server -type ServiceAccountAuthenticationOptions struct { - KeyFiles []string - Lookup bool - Issuers []string - JWKSURI string - MaxExpiration time.Duration - ExtendExpiration bool -} - -// TokenFileAuthenticationOptions contains token file authentication options for API Server -type TokenFileAuthenticationOptions struct { - TokenFile string -} - -// WebHookAuthenticationOptions contains web hook authentication options for API Server -type WebHookAuthenticationOptions struct { - ConfigFile string - Version string - CacheTTL time.Duration - - // RetryBackoff specifies the backoff parameters for the authentication webhook retry logic. - // This allows us to configure the sleep time at each iteration and the maximum number of retries allowed - // before we fail the webhook call in order to limit the fan out that ensues when the system is degraded. - RetryBackoff *wait.Backoff -} - -// NewBuiltInAuthenticationOptions create a new BuiltInAuthenticationOptions, just set default token cache TTL -func NewBuiltInAuthenticationOptions() *BuiltInAuthenticationOptions { - return &BuiltInAuthenticationOptions{ - TokenSuccessCacheTTL: 10 * time.Second, - TokenFailureCacheTTL: 0 * time.Second, - } -} - -// WithAll set default value for every build-in authentication option -func (o *BuiltInAuthenticationOptions) WithAll() *BuiltInAuthenticationOptions { - return o. - WithAnonymous(). - WithBootstrapToken(). - WithClientCert(). - WithOIDC(). - WithRequestHeader(). - WithServiceAccounts(). - WithTokenFile(). - WithWebHook() -} - -// WithAnonymous set default value for anonymous authentication -func (o *BuiltInAuthenticationOptions) WithAnonymous() *BuiltInAuthenticationOptions { - o.Anonymous = &AnonymousAuthenticationOptions{Allow: true} - return o -} - -// WithBootstrapToken set default value for bootstrap token authentication -func (o *BuiltInAuthenticationOptions) WithBootstrapToken() *BuiltInAuthenticationOptions { - o.BootstrapToken = &BootstrapTokenAuthenticationOptions{} - return o -} - -// WithClientCert set default value for client cert -func (o *BuiltInAuthenticationOptions) WithClientCert() *BuiltInAuthenticationOptions { - o.ClientCert = &genericoptions.ClientCertAuthenticationOptions{} - return o -} - -// WithOIDC set default value for OIDC authentication -func (o *BuiltInAuthenticationOptions) WithOIDC() *BuiltInAuthenticationOptions { - o.OIDC = &OIDCAuthenticationOptions{} - return o -} - -// WithRequestHeader set default value for request header authentication -func (o *BuiltInAuthenticationOptions) WithRequestHeader() *BuiltInAuthenticationOptions { - o.RequestHeader = &genericoptions.RequestHeaderAuthenticationOptions{} - return o -} - -// WithServiceAccounts set default value for service account authentication -func (o *BuiltInAuthenticationOptions) WithServiceAccounts() *BuiltInAuthenticationOptions { - o.ServiceAccounts = &ServiceAccountAuthenticationOptions{Lookup: true, ExtendExpiration: true} - return o -} - -// WithTokenFile set default value for token file authentication -func (o *BuiltInAuthenticationOptions) WithTokenFile() *BuiltInAuthenticationOptions { - o.TokenFile = &TokenFileAuthenticationOptions{} - return o -} - -// WithWebHook set default value for web hook authentication -func (o *BuiltInAuthenticationOptions) WithWebHook() *BuiltInAuthenticationOptions { - o.WebHook = &WebHookAuthenticationOptions{ - Version: "v1beta1", - CacheTTL: 2 * time.Minute, - RetryBackoff: genericoptions.DefaultAuthWebhookRetryBackoff(), - } - return o -} - -// Validate checks invalid config combination -func (o *BuiltInAuthenticationOptions) Validate() []error { - var allErrors []error - - if o.OIDC != nil && (len(o.OIDC.IssuerURL) > 0) != (len(o.OIDC.ClientID) > 0) { - allErrors = append(allErrors, fmt.Errorf("oidc-issuer-url and oidc-client-id should be specified together")) - } - - if o.ServiceAccounts != nil && len(o.ServiceAccounts.Issuers) > 0 { - seen := make(map[string]bool) - for _, issuer := range o.ServiceAccounts.Issuers { - if strings.Contains(issuer, ":") { - if _, err := url.Parse(issuer); err != nil { - allErrors = append(allErrors, fmt.Errorf("service-account-issuer %q contained a ':' but was not a valid URL: %v", issuer, err)) - continue - } - } - if issuer == "" { - allErrors = append(allErrors, fmt.Errorf("service-account-issuer should not be an empty string")) - continue - } - if seen[issuer] { - allErrors = append(allErrors, fmt.Errorf("service-account-issuer %q is already specified", issuer)) - continue - } - seen[issuer] = true - } - } - - if o.ServiceAccounts != nil { - if len(o.ServiceAccounts.Issuers) == 0 { - allErrors = append(allErrors, errors.New("service-account-issuer is a required flag")) - } - if len(o.ServiceAccounts.KeyFiles) == 0 { - allErrors = append(allErrors, errors.New("service-account-key-file is a required flag")) - } - - // Validate the JWKS URI when it is explicitly set. - // When unset, it is later derived from ExternalHost. - if o.ServiceAccounts.JWKSURI != "" { - if u, err := url.Parse(o.ServiceAccounts.JWKSURI); err != nil { - allErrors = append(allErrors, fmt.Errorf("service-account-jwks-uri must be a valid URL: %v", err)) - } else if u.Scheme != "https" { - allErrors = append(allErrors, fmt.Errorf("service-account-jwks-uri requires https scheme, parsed as: %v", u.String())) - } - } - } - - if o.WebHook != nil { - retryBackoff := o.WebHook.RetryBackoff - if retryBackoff != nil && retryBackoff.Steps <= 0 { - allErrors = append(allErrors, fmt.Errorf("number of webhook retry attempts must be greater than 0, but is: %d", retryBackoff.Steps)) - } - } - - return allErrors -} - -// AddFlags returns flags of authentication for a API Server -func (o *BuiltInAuthenticationOptions) AddFlags(fs *pflag.FlagSet) { - fs.StringSliceVar(&o.APIAudiences, "api-audiences", o.APIAudiences, ""+ - "Identifiers of the API. The service account token authenticator will validate that "+ - "tokens used against the API are bound to at least one of these audiences. If the "+ - "--service-account-issuer flag is configured and this flag is not, this field "+ - "defaults to a single element list containing the issuer URL.") - - if o.Anonymous != nil { - fs.BoolVar(&o.Anonymous.Allow, "anonymous-auth", o.Anonymous.Allow, ""+ - "Enables anonymous requests to the secure port of the API server. "+ - "Requests that are not rejected by another authentication method are treated as anonymous requests. "+ - "Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated.") - } - - if o.BootstrapToken != nil { - fs.BoolVar(&o.BootstrapToken.Enable, "enable-bootstrap-token-auth", o.BootstrapToken.Enable, ""+ - "Enable to allow secrets of type 'bootstrap.kubernetes.io/token' in the 'kube-system' "+ - "namespace to be used for TLS bootstrapping authentication.") - } - - if o.ClientCert != nil { - o.ClientCert.AddFlags(fs) - } - - if o.OIDC != nil { - fs.StringVar(&o.OIDC.IssuerURL, "oidc-issuer-url", o.OIDC.IssuerURL, ""+ - "The URL of the OpenID issuer, only HTTPS scheme will be accepted. "+ - "If set, it will be used to verify the OIDC JSON Web Token (JWT).") - - fs.StringVar(&o.OIDC.ClientID, "oidc-client-id", o.OIDC.ClientID, - "The client ID for the OpenID Connect client, must be set if oidc-issuer-url is set.") - - fs.StringVar(&o.OIDC.CAFile, "oidc-ca-file", o.OIDC.CAFile, ""+ - "If set, the OpenID server's certificate will be verified by one of the authorities "+ - "in the oidc-ca-file, otherwise the host's root CA set will be used.") - - fs.StringVar(&o.OIDC.UsernameClaim, "oidc-username-claim", "sub", ""+ - "The OpenID claim to use as the user name. Note that claims other than the default ('sub') "+ - "is not guaranteed to be unique and immutable. This flag is experimental, please see "+ - "the authentication documentation for further details.") - - fs.StringVar(&o.OIDC.UsernamePrefix, "oidc-username-prefix", "", ""+ - "If provided, all usernames will be prefixed with this value. If not provided, "+ - "username claims other than 'email' are prefixed by the issuer URL to avoid "+ - "clashes. To skip any prefixing, provide the value '-'.") - - fs.StringVar(&o.OIDC.GroupsClaim, "oidc-groups-claim", "", ""+ - "If provided, the name of a custom OpenID Connect claim for specifying user groups. "+ - "The claim value is expected to be a string or array of strings. This flag is experimental, "+ - "please see the authentication documentation for further details.") - - fs.StringVar(&o.OIDC.GroupsPrefix, "oidc-groups-prefix", "", ""+ - "If provided, all groups will be prefixed with this value to prevent conflicts with "+ - "other authentication strategies.") - - fs.StringSliceVar(&o.OIDC.SigningAlgs, "oidc-signing-algs", []string{"RS256"}, ""+ - "Comma-separated list of allowed JOSE asymmetric signing algorithms. JWTs with a "+ - "'alg' header value not in this list will be rejected. "+ - "Values are defined by RFC 7518 https://tools.ietf.org/html/rfc7518#section-3.1.") - - fs.Var(cliflag.NewMapStringStringNoSplit(&o.OIDC.RequiredClaims), "oidc-required-claim", ""+ - "A key=value pair that describes a required claim in the ID Token. "+ - "If set, the claim is verified to be present in the ID Token with a matching value. "+ - "Repeat this flag to specify multiple claims.") - } - - if o.RequestHeader != nil { - o.RequestHeader.AddFlags(fs) - } - - if o.ServiceAccounts != nil { - fs.StringArrayVar(&o.ServiceAccounts.KeyFiles, "service-account-key-file", o.ServiceAccounts.KeyFiles, ""+ - "File containing PEM-encoded x509 RSA or ECDSA private or public keys, used to verify "+ - "ServiceAccount tokens. The specified file can contain multiple keys, and the flag can "+ - "be specified multiple times with different files. If unspecified, "+ - "--tls-private-key-file is used. Must be specified when "+ - "--service-account-signing-key is provided") - - fs.BoolVar(&o.ServiceAccounts.Lookup, "service-account-lookup", o.ServiceAccounts.Lookup, - "If true, validate ServiceAccount tokens exist in etcd as part of authentication.") - - fs.StringArrayVar(&o.ServiceAccounts.Issuers, "service-account-issuer", o.ServiceAccounts.Issuers, ""+ - "Identifier of the service account token issuer. The issuer will assert this identifier "+ - "in \"iss\" claim of issued tokens. This value is a string or URI. If this option is not "+ - "a valid URI per the OpenID Discovery 1.0 spec, the ServiceAccountIssuerDiscovery feature "+ - "will remain disabled, even if the feature gate is set to true. It is highly recommended "+ - "that this value comply with the OpenID spec: https://openid.net/specs/openid-connect-discovery-1_0.html. "+ - "In practice, this means that service-account-issuer must be an https URL. It is also highly "+ - "recommended that this URL be capable of serving OpenID discovery documents at "+ - "{service-account-issuer}/.well-known/openid-configuration. "+ - "When this flag is specified multiple times, the first is used to generate tokens "+ - "and all are used to determine which issuers are accepted.") - - fs.StringVar(&o.ServiceAccounts.JWKSURI, "service-account-jwks-uri", o.ServiceAccounts.JWKSURI, ""+ - "Overrides the URI for the JSON Web Key Set in the discovery doc served at "+ - "/.well-known/openid-configuration. This flag is useful if the discovery doc"+ - "and key set are served to relying parties from a URL other than the "+ - "API server's external (as auto-detected or overridden with external-hostname). "+ - "Only valid if the ServiceAccountIssuerDiscovery feature gate is enabled.") - - // Deprecated in 1.13 - fs.StringSliceVar(&o.APIAudiences, "service-account-api-audiences", o.APIAudiences, ""+ - "Identifiers of the API. The service account token authenticator will validate that "+ - "tokens used against the API are bound to at least one of these audiences.") - fs.MarkDeprecated("service-account-api-audiences", "Use --api-audiences") - - fs.DurationVar(&o.ServiceAccounts.MaxExpiration, "service-account-max-token-expiration", o.ServiceAccounts.MaxExpiration, ""+ - "The maximum validity duration of a token created by the service account token issuer. If an otherwise valid "+ - "TokenRequest with a validity duration larger than this value is requested, a token will be issued with a validity duration of this value.") - - fs.BoolVar(&o.ServiceAccounts.ExtendExpiration, "service-account-extend-token-expiration", o.ServiceAccounts.ExtendExpiration, ""+ - "Turns on projected service account expiration extension during token generation, "+ - "which helps safe transition from legacy token to bound service account token feature. "+ - "If this flag is enabled, admission injected tokens would be extended up to 1 year to "+ - "prevent unexpected failure during transition, ignoring value of service-account-max-token-expiration.") - } - - if o.TokenFile != nil { - fs.StringVar(&o.TokenFile.TokenFile, "token-auth-file", o.TokenFile.TokenFile, ""+ - "If set, the file that will be used to secure the secure port of the API server "+ - "via token authentication.") - } - - if o.WebHook != nil { - fs.StringVar(&o.WebHook.ConfigFile, "authentication-token-webhook-config-file", o.WebHook.ConfigFile, ""+ - "File with webhook configuration for token authentication in kubeconfig format. "+ - "The API server will query the remote service to determine authentication for bearer tokens.") - - fs.StringVar(&o.WebHook.Version, "authentication-token-webhook-version", o.WebHook.Version, ""+ - "The API version of the authentication.k8s.io TokenReview to send to and expect from the webhook.") - - fs.DurationVar(&o.WebHook.CacheTTL, "authentication-token-webhook-cache-ttl", o.WebHook.CacheTTL, - "The duration to cache responses from the webhook token authenticator.") - } -} - -// ToAuthenticationConfig convert BuiltInAuthenticationOptions to kubeauthenticator.Config -func (o *BuiltInAuthenticationOptions) ToAuthenticationConfig() (kubeauthenticator.Config, error) { - ret := kubeauthenticator.Config{ - TokenSuccessCacheTTL: o.TokenSuccessCacheTTL, - TokenFailureCacheTTL: o.TokenFailureCacheTTL, - } - - if o.Anonymous != nil { - ret.Anonymous = o.Anonymous.Allow - } - - if o.BootstrapToken != nil { - ret.BootstrapToken = o.BootstrapToken.Enable - } - - if o.ClientCert != nil { - var err error - ret.ClientCAContentProvider, err = o.ClientCert.GetClientCAContentProvider() - if err != nil { - return kubeauthenticator.Config{}, err - } - } - - if o.OIDC != nil { - ret.OIDCCAFile = o.OIDC.CAFile - ret.OIDCClientID = o.OIDC.ClientID - ret.OIDCGroupsClaim = o.OIDC.GroupsClaim - ret.OIDCGroupsPrefix = o.OIDC.GroupsPrefix - ret.OIDCIssuerURL = o.OIDC.IssuerURL - ret.OIDCUsernameClaim = o.OIDC.UsernameClaim - ret.OIDCUsernamePrefix = o.OIDC.UsernamePrefix - ret.OIDCSigningAlgs = o.OIDC.SigningAlgs - ret.OIDCRequiredClaims = o.OIDC.RequiredClaims - } - - if o.RequestHeader != nil { - var err error - ret.RequestHeaderConfig, err = o.RequestHeader.ToAuthenticationRequestHeaderConfig() - if err != nil { - return kubeauthenticator.Config{}, err - } - } - - ret.APIAudiences = o.APIAudiences - if o.ServiceAccounts != nil { - if len(o.ServiceAccounts.Issuers) != 0 && len(o.APIAudiences) == 0 { - ret.APIAudiences = authenticator.Audiences(o.ServiceAccounts.Issuers) - } - ret.ServiceAccountKeyFiles = o.ServiceAccounts.KeyFiles - ret.ServiceAccountIssuers = o.ServiceAccounts.Issuers - ret.ServiceAccountLookup = o.ServiceAccounts.Lookup - } - - if o.TokenFile != nil { - ret.TokenAuthFile = o.TokenFile.TokenFile - } - - if o.WebHook != nil { - ret.WebhookTokenAuthnConfigFile = o.WebHook.ConfigFile - ret.WebhookTokenAuthnVersion = o.WebHook.Version - ret.WebhookTokenAuthnCacheTTL = o.WebHook.CacheTTL - ret.WebhookRetryBackoff = o.WebHook.RetryBackoff - - if len(o.WebHook.ConfigFile) > 0 && o.WebHook.CacheTTL > 0 { - if o.TokenSuccessCacheTTL > 0 && o.WebHook.CacheTTL < o.TokenSuccessCacheTTL { - klog.Warningf("the webhook cache ttl of %s is shorter than the overall cache ttl of %s for successful token authentication attempts.", o.WebHook.CacheTTL, o.TokenSuccessCacheTTL) - } - if o.TokenFailureCacheTTL > 0 && o.WebHook.CacheTTL < o.TokenFailureCacheTTL { - klog.Warningf("the webhook cache ttl of %s is shorter than the overall cache ttl of %s for failed token authentication attempts.", o.WebHook.CacheTTL, o.TokenFailureCacheTTL) - } - } - } - - return ret, nil -} - -// ApplyTo requires already applied OpenAPIConfig and EgressSelector if present. -func (o *BuiltInAuthenticationOptions) ApplyTo(authInfo *genericapiserver.AuthenticationInfo, secureServing *genericapiserver.SecureServingInfo, egressSelector *egressselector.EgressSelector, openAPIConfig *openapicommon.Config, extclient kubernetes.Interface, versionedInformer informers.SharedInformerFactory) error { +// AuthenticationApplyTo requires already applied OpenAPIConfig and EgressSelector if present. +func AuthenticationApplyTo(o *options.BuiltInAuthenticationOptions, authInfo *genericapiserver.AuthenticationInfo, secureServing *genericapiserver.SecureServingInfo, egressSelector *egressselector.EgressSelector, openAPIConfig *openapicommon.Config) error { if o == nil { return nil } @@ -481,20 +54,20 @@ func (o *BuiltInAuthenticationOptions) ApplyTo(authInfo *genericapiserver.Authen } authInfo.APIAudiences = o.APIAudiences - if o.ServiceAccounts != nil && len(o.ServiceAccounts.Issuers) != 0 && len(o.APIAudiences) == 0 { - authInfo.APIAudiences = authenticator.Audiences(o.ServiceAccounts.Issuers) - } + // if o.ServiceAccounts != nil && len(o.ServiceAccounts.Issuers) != 0 && len(o.APIAudiences) == 0 { + // authInfo.APIAudiences = authenticator.Audiences(o.ServiceAccounts.Issuers) + // } - authenticatorConfig.ServiceAccountTokenGetter = serviceaccountcontroller.NewGetterFromClient( - extclient, - versionedInformer.Core().V1().Secrets().Lister(), - versionedInformer.Core().V1().ServiceAccounts().Lister(), - versionedInformer.Core().V1().Pods().Lister(), - ) + // authenticatorConfig.ServiceAccountTokenGetter = serviceaccountcontroller.NewGetterFromClient( + // extclient, + // versionedInformer.Core().V1().Secrets().Lister(), + // versionedInformer.Core().V1().ServiceAccounts().Lister(), + // versionedInformer.Core().V1().Pods().Lister(), + // ) - authenticatorConfig.BootstrapTokenAuthenticator = bootstrap.NewTokenAuthenticator( - versionedInformer.Core().V1().Secrets().Lister().Secrets(metav1.NamespaceSystem), - ) + // authenticatorConfig.BootstrapTokenAuthenticator = bootstrap.NewTokenAuthenticator( + // versionedInformer.Core().V1().Secrets().Lister().Secrets(metav1.NamespaceSystem), + // ) if egressSelector != nil { egressDialer, err := egressSelector.Lookup(egressselector.ControlPlane.AsNetworkContext()) @@ -511,17 +84,3 @@ func (o *BuiltInAuthenticationOptions) ApplyTo(authInfo *genericapiserver.Authen return nil } - -// ApplyAuthorization will conditionally modify the authentication options based on the authorization options -func (o *BuiltInAuthenticationOptions) ApplyAuthorization(authorization *BuiltInAuthorizationOptions) { - if o == nil || authorization == nil || o.Anonymous == nil { - return - } - - // authorization ModeAlwaysAllow cannot be combined with AnonymousAuth. - // in such a case the AnonymousAuth is stomped to false and you get a message - if o.Anonymous.Allow && sets.NewString(authorization.Modes...).Has(authzmodes.ModeAlwaysAllow) { - klog.Warningf("AnonymousAuth is not allowed with the AlwaysAllow authorizer. Resetting AnonymousAuth to false. You should use a different authorizer") - o.Anonymous.Allow = false - } -} diff --git a/pkg/genericcontrolplane/options/options.go b/pkg/genericcontrolplane/options/options.go index 32c777c192f4b..1e11183ea95ea 100644 --- a/pkg/genericcontrolplane/options/options.go +++ b/pkg/genericcontrolplane/options/options.go @@ -14,28 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package options contains flags and options for initializing an apiserver package options import ( - "net" - "strings" "time" - "github.com/spf13/pflag" - utilnet "k8s.io/apimachinery/pkg/util/net" genericoptions "k8s.io/apiserver/pkg/server/options" "k8s.io/apiserver/pkg/storage/storagebackend" - cliflag "k8s.io/component-base/cli/flag" "k8s.io/component-base/logs" "k8s.io/component-base/metrics" - api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/cluster/ports" - "k8s.io/kubernetes/pkg/controlplane/reconcilers" - _ "k8s.io/kubernetes/pkg/features" // add the kubernetes feature gates kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" - kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/serviceaccount" ) @@ -50,41 +39,23 @@ type ServerRunOptions struct { SecureServing *genericoptions.SecureServingOptionsWithLoopback Audit *genericoptions.AuditOptions Features *genericoptions.FeatureOptions - Admission *kubeoptions.AdmissionOptions + Admission *genericoptions.AdmissionOptions Authentication *kubeoptions.BuiltInAuthenticationOptions - Authorization *kubeoptions.BuiltInAuthorizationOptions - CloudProvider *kubeoptions.CloudProviderOptions APIEnablement *genericoptions.APIEnablementOptions EgressSelector *genericoptions.EgressSelectorOptions Metrics *metrics.Options Logs *logs.Options Traces *genericoptions.TracingOptions - AllowPrivileged bool - EnableLogsHandler bool - EventTTL time.Duration - KubeletConfig kubeletclient.KubeletClientConfig - KubernetesServiceNodePort int - MaxConnectionBytesPerSec int64 - // ServiceClusterIPRange is mapped to input provided by user - ServiceClusterIPRanges string - // PrimaryServiceClusterIPRange and SecondaryServiceClusterIPRange are the results - // of parsing ServiceClusterIPRange into actual values - PrimaryServiceClusterIPRange net.IPNet - SecondaryServiceClusterIPRange net.IPNet - // APIServerServiceIP is the first valid IP from PrimaryServiceClusterIPRange - APIServerServiceIP net.IP - - ServiceNodePortRange utilnet.PortRange + EnableLogsHandler bool + EventTTL time.Duration + MaxConnectionBytesPerSec int64 ProxyClientCertFile string ProxyClientKeyFile string EnableAggregatorRouting bool - MasterCount int - EndpointReconcilerType string - IdentityLeaseDurationSeconds int IdentityLeaseRenewIntervalSeconds int @@ -103,10 +74,8 @@ func NewServerRunOptions() *ServerRunOptions { SecureServing: kubeoptions.NewSecureServingOptions(), Audit: genericoptions.NewAuditOptions(), Features: genericoptions.NewFeatureOptions(), - Admission: kubeoptions.NewAdmissionOptions(), + Admission: genericoptions.NewAdmissionOptions(), Authentication: kubeoptions.NewBuiltInAuthenticationOptions().WithAll(), - Authorization: kubeoptions.NewBuiltInAuthorizationOptions(), - CloudProvider: kubeoptions.NewCloudProviderOptions(), APIEnablement: genericoptions.NewAPIEnablementOptions(), EgressSelector: genericoptions.NewEgressSelectorOptions(), Metrics: metrics.NewOptions(), @@ -115,28 +84,9 @@ func NewServerRunOptions() *ServerRunOptions { EnableLogsHandler: true, EventTTL: 1 * time.Hour, - MasterCount: 1, - EndpointReconcilerType: string(reconcilers.LeaseEndpointReconcilerType), + IdentityLeaseDurationSeconds: 3600, IdentityLeaseRenewIntervalSeconds: 10, - KubeletConfig: kubeletclient.KubeletClientConfig{ - Port: ports.KubeletPort, - ReadOnlyPort: ports.KubeletReadOnlyPort, - PreferredAddressTypes: []string{ - // --override-hostname - string(api.NodeHostName), - - // internal, preferring DNS if reported - string(api.NodeInternalDNS), - string(api.NodeInternalIP), - - // external, preferring DNS if reported - string(api.NodeExternalDNS), - string(api.NodeExternalIP), - }, - HTTPTimeout: time.Duration(5) * time.Second, - }, - ServiceNodePortRange: kubeoptions.DefaultServiceNodePortRange, } // Overwrite the default for storage data format. @@ -144,132 +94,3 @@ func NewServerRunOptions() *ServerRunOptions { return &s } - -// TODO: remove these insecure flags in v1.24 -func addDummyInsecureFlags(fs *pflag.FlagSet) { - var ( - bindAddr = net.IPv4(127, 0, 0, 1) - bindPort int - ) - - for _, name := range []string{"insecure-bind-address", "address"} { - fs.IPVar(&bindAddr, name, bindAddr, ""+ - "The IP address on which to serve the insecure port (set to 0.0.0.0 or :: for listening in all interfaces and IP families).") - fs.MarkDeprecated(name, "This flag has no effect now and will be removed in v1.24.") - } - - for _, name := range InsecurePortFlags { - fs.IntVar(&bindPort, name, bindPort, ""+ - "The port on which to serve unsecured, unauthenticated access.") - fs.MarkDeprecated(name, "This flag has no effect now and will be removed in v1.24.") - } -} - -// Flags returns flags for a specific APIServer by section name -func (s *ServerRunOptions) Flags() (fss cliflag.NamedFlagSets) { - // Add the generic flags. - s.GenericServerRunOptions.AddUniversalFlags(fss.FlagSet("generic")) - s.Etcd.AddFlags(fss.FlagSet("etcd")) - s.SecureServing.AddFlags(fss.FlagSet("secure serving")) - addDummyInsecureFlags(fss.FlagSet("insecure serving")) - s.Audit.AddFlags(fss.FlagSet("auditing")) - s.Features.AddFlags(fss.FlagSet("features")) - s.Authentication.AddFlags(fss.FlagSet("authentication")) - s.Authorization.AddFlags(fss.FlagSet("authorization")) - s.CloudProvider.AddFlags(fss.FlagSet("cloud provider")) - s.APIEnablement.AddFlags(fss.FlagSet("API enablement")) - s.EgressSelector.AddFlags(fss.FlagSet("egress selector")) - s.Admission.AddFlags(fss.FlagSet("admission")) - s.Metrics.AddFlags(fss.FlagSet("metrics")) - s.Logs.AddFlags(fss.FlagSet("logs")) - s.Traces.AddFlags(fss.FlagSet("traces")) - - // Note: the weird ""+ in below lines seems to be the only way to get gofmt to - // arrange these text blocks sensibly. Grrr. - fs := fss.FlagSet("misc") - fs.DurationVar(&s.EventTTL, "event-ttl", s.EventTTL, - "Amount of time to retain events.") - - fs.BoolVar(&s.AllowPrivileged, "allow-privileged", s.AllowPrivileged, - "If true, allow privileged containers. [default=false]") - - fs.BoolVar(&s.EnableLogsHandler, "enable-logs-handler", s.EnableLogsHandler, - "If true, install a /logs handler for the apiserver logs.") - fs.MarkDeprecated("enable-logs-handler", "This flag will be removed in v1.19") - - fs.Int64Var(&s.MaxConnectionBytesPerSec, "max-connection-bytes-per-sec", s.MaxConnectionBytesPerSec, ""+ - "If non-zero, throttle each user connection to this number of bytes/sec. "+ - "Currently only applies to long-running requests.") - - fs.IntVar(&s.MasterCount, "apiserver-count", s.MasterCount, - "The number of apiservers running in the cluster, must be a positive number. (In use when --endpoint-reconciler-type=master-count is enabled.)") - - fs.StringVar(&s.EndpointReconcilerType, "endpoint-reconciler-type", string(s.EndpointReconcilerType), - "Use an endpoint reconciler ("+strings.Join(reconcilers.AllTypes.Names(), ", ")+")") - - fs.IntVar(&s.IdentityLeaseDurationSeconds, "identity-lease-duration-seconds", s.IdentityLeaseDurationSeconds, - "The duration of kube-apiserver lease in seconds, must be a positive number. (In use when the APIServerIdentity feature gate is enabled.)") - - fs.IntVar(&s.IdentityLeaseRenewIntervalSeconds, "identity-lease-renew-interval-seconds", s.IdentityLeaseRenewIntervalSeconds, - "The interval of kube-apiserver renewing its lease in seconds, must be a positive number. (In use when the APIServerIdentity feature gate is enabled.)") - - // See #14282 for details on how to test/try this option out. - // TODO: remove this comment once this option is tested in CI. - fs.IntVar(&s.KubernetesServiceNodePort, "kubernetes-service-node-port", s.KubernetesServiceNodePort, ""+ - "If non-zero, the Kubernetes master service (which apiserver creates/maintains) will be "+ - "of type NodePort, using this as the value of the port. If zero, the Kubernetes master "+ - "service will be of type ClusterIP.") - - fs.StringVar(&s.ServiceClusterIPRanges, "service-cluster-ip-range", s.ServiceClusterIPRanges, ""+ - "A CIDR notation IP range from which to assign service cluster IPs. This must not "+ - "overlap with any IP ranges assigned to nodes or pods. Max of two dual-stack CIDRs is allowed.") - - fs.Var(&s.ServiceNodePortRange, "service-node-port-range", ""+ - "A port range to reserve for services with NodePort visibility. "+ - "Example: '30000-32767'. Inclusive at both ends of the range.") - - // Kubelet related flags: - fs.StringSliceVar(&s.KubeletConfig.PreferredAddressTypes, "kubelet-preferred-address-types", s.KubeletConfig.PreferredAddressTypes, - "List of the preferred NodeAddressTypes to use for kubelet connections.") - - fs.UintVar(&s.KubeletConfig.Port, "kubelet-port", s.KubeletConfig.Port, - "DEPRECATED: kubelet port.") - fs.MarkDeprecated("kubelet-port", "kubelet-port is deprecated and will be removed.") - - fs.UintVar(&s.KubeletConfig.ReadOnlyPort, "kubelet-read-only-port", s.KubeletConfig.ReadOnlyPort, - "DEPRECATED: kubelet read only port.") - fs.MarkDeprecated("kubelet-read-only-port", "kubelet-read-only-port is deprecated and will be removed.") - - fs.DurationVar(&s.KubeletConfig.HTTPTimeout, "kubelet-timeout", s.KubeletConfig.HTTPTimeout, - "Timeout for kubelet operations.") - - fs.StringVar(&s.KubeletConfig.CertFile, "kubelet-client-certificate", s.KubeletConfig.CertFile, - "Path to a client cert file for TLS.") - - fs.StringVar(&s.KubeletConfig.KeyFile, "kubelet-client-key", s.KubeletConfig.KeyFile, - "Path to a client key file for TLS.") - - fs.StringVar(&s.KubeletConfig.CAFile, "kubelet-certificate-authority", s.KubeletConfig.CAFile, - "Path to a cert file for the certificate authority.") - - fs.StringVar(&s.ProxyClientCertFile, "proxy-client-cert-file", s.ProxyClientCertFile, ""+ - "Client certificate used to prove the identity of the aggregator or kube-apiserver "+ - "when it must call out during a request. This includes proxying requests to a user "+ - "api-server and calling out to webhook admission plugins. It is expected that this "+ - "cert includes a signature from the CA in the --requestheader-client-ca-file flag. "+ - "That CA is published in the 'extension-apiserver-authentication' configmap in "+ - "the kube-system namespace. Components receiving calls from kube-aggregator should "+ - "use that CA to perform their half of the mutual TLS verification.") - fs.StringVar(&s.ProxyClientKeyFile, "proxy-client-key-file", s.ProxyClientKeyFile, ""+ - "Private key for the client certificate used to prove the identity of the aggregator or kube-apiserver "+ - "when it must call out during a request. This includes proxying requests to a user "+ - "api-server and calling out to webhook admission plugins.") - - fs.BoolVar(&s.EnableAggregatorRouting, "enable-aggregator-routing", s.EnableAggregatorRouting, - "Turns on aggregator routing requests to endpoints IP rather than cluster IP.") - - fs.StringVar(&s.ServiceAccountSigningKeyFile, "service-account-signing-key-file", s.ServiceAccountSigningKeyFile, ""+ - "Path to the file that contains the current private key of the service account token issuer. The issuer will sign issued ID tokens with this private key.") - - return fss -} diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index fa97d834cc350..d540e58a36e50 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -26,11 +26,10 @@ import ( "time" extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" + "k8s.io/apiserver/pkg/authorization/union" openapinamer "k8s.io/apiserver/pkg/endpoints/openapi" genericfeatures "k8s.io/apiserver/pkg/features" genericapiserver "k8s.io/apiserver/pkg/server" @@ -42,19 +41,24 @@ import ( "k8s.io/apiserver/pkg/util/webhook" clientgoinformers "k8s.io/client-go/informers" clientgoclientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/util/keyutil" _ "k8s.io/component-base/metrics/prometheus/workqueue" // for workqueue metric registration "k8s.io/component-base/version" "k8s.io/klog/v2" aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" - "k8s.io/kubernetes/cmd/kube-apiserver/app/options" - "k8s.io/kubernetes/pkg/controlplane" + "k8s.io/kubernetes/pkg/api/legacyscheme" generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" - controlplaneadmission "k8s.io/kubernetes/pkg/genericcontrolplane/admission" + "k8s.io/kubernetes/pkg/genericcontrolplane/apis" + "k8s.io/kubernetes/pkg/genericcontrolplane/options" "k8s.io/kubernetes/pkg/kubeapiserver" - "k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes" - rbacrest "k8s.io/kubernetes/pkg/registry/rbac/rest" "k8s.io/kubernetes/pkg/serviceaccount" + "k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac" +) + +const Include = "kube-control-plane" + +const ( + etcdRetryLimit = 60 + etcdRetryInterval = 1 * time.Second ) // Run runs the specified APIServer. This should never exit. @@ -82,10 +86,10 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan } // If additional API servers are added, they should be gated. - apiExtensionsConfig, err := createAPIExtensionsConfig(*kubeAPIServerConfig.GenericConfig, kubeAPIServerConfig.ExtraConfig.VersionedInformers, pluginInitializer, completedOptions.ServerRunOptions, completedOptions.MasterCount, + apiExtensionsConfig, err := createAPIExtensionsConfig(*kubeAPIServerConfig.GenericConfig, kubeAPIServerConfig.ExtraConfig.VersionedInformers, pluginInitializer, completedOptions.ServerRunOptions, serviceResolver, webhook.NewDefaultAuthenticationInfoResolverWrapper(nil, kubeAPIServerConfig.GenericConfig.EgressSelector, kubeAPIServerConfig.GenericConfig.LoopbackClientConfig, kubeAPIServerConfig.GenericConfig.TracerProvider)) if err != nil { - return nil, err + return nil, fmt.Errorf("configure api extensions: %v", err) } apiExtensionsServer, err := createAPIExtensionsServer(apiExtensionsConfig, genericapiserver.NewEmptyDelegate()) if err != nil { @@ -112,7 +116,7 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan } // CreateKubeAPIServer creates and wires a workable kube-apiserver -func CreateKubeAPIServer(kubeAPIServerConfig *controlplane.Config, delegateAPIServer genericapiserver.DelegationTarget) (*controlplane.Instance, error) { +func CreateKubeAPIServer(kubeAPIServerConfig *apis.Config, delegateAPIServer genericapiserver.DelegationTarget) (*apis.ControlPlane, error) { kubeAPIServer, err := kubeAPIServerConfig.Complete().New(delegateAPIServer) if err != nil { return nil, err @@ -123,12 +127,12 @@ func CreateKubeAPIServer(kubeAPIServerConfig *controlplane.Config, delegateAPISe // CreateKubeAPIServerConfig creates all the resources for running the API server, but runs none of them func CreateKubeAPIServerConfig(s completedServerRunOptions) ( - *controlplane.Config, + *apis.Config, aggregatorapiserver.ServiceResolver, []admission.PluginInitializer, error, ) { - genericConfig, versionedInformers, serviceResolver, pluginInitializers, admissionPostStartHook, storageFactory, err := buildGenericConfig(s.ServerRunOptions) + genericConfig, serviceResolver, pluginInitializers, storageFactory, err := BuildGenericConfig(s.ServerRunOptions) if err != nil { return nil, nil, nil, err } @@ -136,11 +140,18 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( s.Metrics.Apply() serviceaccount.RegisterMetrics() + kubeClientConfig := genericConfig.LoopbackClientConfig + clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) + if err != nil { + return nil, nil, nil, fmt.Errorf("failed to create real external clientset: %v", err) + } + versionedInformers := clientgoinformers.NewSharedInformerFactory(clientgoExternalClient, 10*time.Minute) + s.Logs.Apply() - config := &controlplane.Config{ + config := &apis.Config{ GenericConfig: genericConfig, - ExtraConfig: controlplane.ExtraConfig{ + ExtraConfig: apis.ExtraConfig{ APIResourceConfigSource: storageFactory.APIResourceConfigSource, StorageFactory: storageFactory, EventTTL: s.EventTTL, @@ -171,40 +182,39 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( config.ExtraConfig.ClusterAuthenticationInfo.RequestHeaderUsernameHeaders = requestHeaderConfig.UsernameHeaders } - if err := config.GenericConfig.AddPostStartHook("start-kube-apiserver-admission-initializer", admissionPostStartHook); err != nil { - return nil, nil, nil, err - } - - // Load the public keys. - var pubKeys []interface{} - for _, f := range s.Authentication.ServiceAccounts.KeyFiles { - keys, err := keyutil.PublicKeysFromFile(f) - if err != nil { - return nil, nil, nil, fmt.Errorf("failed to parse key file %q: %v", f, err) - } - pubKeys = append(pubKeys, keys...) - } - // Plumb the required metadata through ExtraConfig. - config.ExtraConfig.ServiceAccountIssuerURL = s.Authentication.ServiceAccounts.Issuers[0] - config.ExtraConfig.ServiceAccountJWKSURI = s.Authentication.ServiceAccounts.JWKSURI - config.ExtraConfig.ServiceAccountPublicKeys = pubKeys + // if err := config.GenericConfig.AddPostStartHook("start-kube-apiserver-admission-initializer", admissionPostStartHook); err != nil { + // return nil, nil, nil, err + // } + + // // Load the public keys. + // var pubKeys []interface{} + // for _, f := range s.Authentication.ServiceAccounts.KeyFiles { + // keys, err := keyutil.PublicKeysFromFile(f) + // if err != nil { + // return nil, nil, nil, fmt.Errorf("failed to parse key file %q: %v", f, err) + // } + // pubKeys = append(pubKeys, keys...) + // } + // // Plumb the required metadata through ExtraConfig. + // config.ExtraConfig.ServiceAccountIssuerURL = s.Authentication.ServiceAccounts.Issuers[0] + // config.ExtraConfig.ServiceAccountJWKSURI = s.Authentication.ServiceAccounts.JWKSURI + // config.ExtraConfig.ServiceAccountPublicKeys = pubKeys return config, serviceResolver, pluginInitializers, nil } // BuildGenericConfig takes the master server options and produces the genericapiserver.Config associated with it -func buildGenericConfig( +func BuildGenericConfig( s *options.ServerRunOptions, ) ( genericConfig *genericapiserver.Config, - versionedInformers clientgoinformers.SharedInformerFactory, serviceResolver aggregatorapiserver.ServiceResolver, pluginInitializers []admission.PluginInitializer, - admissionPostStartHook genericapiserver.PostStartHookFunc, + // admissionPostStartHook genericapiserver.PostStartHookFunc, storageFactory *serverstorage.DefaultStorageFactory, lastErr error, ) { - genericConfig = genericapiserver.NewConfig(serializer.NewCodecFactory(runtime.NewScheme())) + genericConfig = genericapiserver.NewConfig(legacyscheme.Codecs) if lastErr = s.GenericServerRunOptions.ApplyTo(genericConfig); lastErr != nil { return @@ -216,7 +226,7 @@ func buildGenericConfig( if lastErr = s.Features.ApplyTo(genericConfig); lastErr != nil { return } - if lastErr = s.APIEnablement.ApplyTo(genericConfig, serverstorage.NewResourceConfig(), runtime.NewScheme()); lastErr != nil { + if lastErr = s.APIEnablement.ApplyTo(genericConfig, apis.DefaultAPIResourceConfigSource(), legacyscheme.Scheme); lastErr != nil { return } if lastErr = s.EgressSelector.ApplyTo(genericConfig); lastErr != nil { @@ -268,74 +278,78 @@ func buildGenericConfig( // on a fast local network genericConfig.LoopbackClientConfig.DisableCompression = true - kubeClientConfig := genericConfig.LoopbackClientConfig - clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) - if err != nil { - lastErr = fmt.Errorf("failed to create real external clientset: %v", err) - return - } - versionedInformers = clientgoinformers.NewSharedInformerFactory(clientgoExternalClient, 10*time.Minute) + // kubeClientConfig := genericConfig.LoopbackClientConfig + // clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) + // if err != nil { + // lastErr = fmt.Errorf("failed to create real external clientset: %v", err) + // return + // } + // versionedInformers = clientgoinformers.NewSharedInformerFactory(clientgoExternalClient, 10*time.Minute) // Authentication.ApplyTo requires already applied OpenAPIConfig and EgressSelector if present - if lastErr = s.Authentication.ApplyTo(&genericConfig.Authentication, genericConfig.SecureServing, genericConfig.EgressSelector, genericConfig.OpenAPIConfig, clientgoExternalClient, versionedInformers); lastErr != nil { + if lastErr = AuthenticationApplyTo(s.Authentication, &genericConfig.Authentication, genericConfig.SecureServing, genericConfig.EgressSelector, genericConfig.OpenAPIConfig); lastErr != nil { return } - genericConfig.Authorization.Authorizer, genericConfig.RuleResolver, err = BuildAuthorizer(s, genericConfig.EgressSelector, versionedInformers) - if err != nil { - lastErr = fmt.Errorf("invalid authorization config: %v", err) - return - } - if !sets.NewString(s.Authorization.Modes...).Has(modes.ModeRBAC) { - genericConfig.DisabledPostStartHooks.Insert(rbacrest.PostStartHookName) - } - - lastErr = s.Audit.ApplyTo(genericConfig) - if lastErr != nil { - return - } - - admissionConfig := &controlplaneadmission.Config{ - ExternalInformers: versionedInformers, - LoopbackClientConfig: genericConfig.LoopbackClientConfig, - } - pluginInitializers, admissionPostStartHook, err = admissionConfig.New() - if err != nil { - lastErr = fmt.Errorf("failed to create admission plugin initializer: %v", err) - return - } - - err = s.Admission.ApplyTo( - genericConfig, - versionedInformers, - kubeClientConfig, - utilfeature.DefaultFeatureGate, - pluginInitializers...) - if err != nil { - lastErr = fmt.Errorf("failed to initialize admission: %v", err) - return - } - - if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && s.GenericServerRunOptions.EnablePriorityAndFairness { - genericConfig.FlowControl, lastErr = BuildPriorityAndFairness(s, clientgoExternalClient, versionedInformers) - } + // genericConfig.Authorization.Authorizer, genericConfig.RuleResolver, err = BuildAuthorizer(s, genericConfig.EgressSelector, versionedInformers) + // if err != nil { + // lastErr = fmt.Errorf("invalid authorization config: %v", err) + // return + // } + // if !sets.NewString(s.Authorization.Modes...).Has(modes.ModeRBAC) { + // genericConfig.DisabledPostStartHooks.Insert(rbacrest.PostStartHookName) + // } + + // lastErr = s.Audit.ApplyTo(genericConfig) + // if lastErr != nil { + // return + // } + + // admissionConfig := &controlplaneadmission.Config{ + // ExternalInformers: versionedInformers, + // LoopbackClientConfig: genericConfig.LoopbackClientConfig, + // } + // pluginInitializers, admissionPostStartHook, err = admissionConfig.New() + // if err != nil { + // lastErr = fmt.Errorf("failed to create admission plugin initializer: %v", err) + // return + // } + + // err = s.Admission.ApplyTo( + // genericConfig, + // versionedInformers, + // kubeClientConfig, + // utilfeature.DefaultFeatureGate, + // pluginInitializers...) + // if err != nil { + // lastErr = fmt.Errorf("failed to initialize admission: %v", err) + // return + // } + + // if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && s.GenericServerRunOptions.EnablePriorityAndFairness { + // genericConfig.FlowControl, lastErr = BuildPriorityAndFairness(s, clientgoExternalClient, versionedInformers) + // } return } // BuildAuthorizer constructs the authorizer func BuildAuthorizer(s *options.ServerRunOptions, egressSelector *egressselector.EgressSelector, versionedInformers clientgoinformers.SharedInformerFactory) (authorizer.Authorizer, authorizer.RuleResolver, error) { - authorizationConfig := s.Authorization.ToAuthorizationConfig(versionedInformers) + var ( + authorizers []authorizer.Authorizer + ruleResolvers []authorizer.RuleResolver + ) - if egressSelector != nil { - egressDialer, err := egressSelector.Lookup(egressselector.ControlPlane.AsNetworkContext()) - if err != nil { - return nil, nil, err - } - authorizationConfig.CustomDial = egressDialer - } + rbacAuthorizer := rbac.New( + &rbac.RoleGetter{Lister: versionedInformers.Rbac().V1().Roles().Lister()}, + &rbac.RoleBindingLister{Lister: versionedInformers.Rbac().V1().RoleBindings().Lister()}, + &rbac.ClusterRoleGetter{Lister: versionedInformers.Rbac().V1().ClusterRoles().Lister()}, + &rbac.ClusterRoleBindingLister{Lister: versionedInformers.Rbac().V1().ClusterRoleBindings().Lister()}, + ) + authorizers = append(authorizers, rbacAuthorizer) + ruleResolvers = append(ruleResolvers, rbacAuthorizer) - return authorizationConfig.New() + return union.New(authorizers...), union.NewRuleResolvers(ruleResolvers...), nil } // BuildPriorityAndFairness constructs the guts of the API Priority and Fairness filter @@ -365,6 +379,10 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { return options, err } + if err := s.SecureServing.MaybeDefaultWithSelfSignedCerts(s.GenericServerRunOptions.AdvertiseAddress.String(), nil, nil); err != nil { + return options, fmt.Errorf("error creating self-signed certificates: %v", err) + } + if len(s.GenericServerRunOptions.ExternalHost) == 0 { if len(s.GenericServerRunOptions.AdvertiseAddress) > 0 { s.GenericServerRunOptions.ExternalHost = s.GenericServerRunOptions.AdvertiseAddress.String() @@ -378,8 +396,6 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { klog.Infof("external host was not specified, using %v", s.GenericServerRunOptions.ExternalHost) } - s.Authentication.ApplyAuthorization(s.Authorization) - for key, value := range s.APIEnablement.RuntimeConfig { if key == "v1" || strings.HasPrefix(key, "v1/") || key == "api/v1" || strings.HasPrefix(key, "api/v1/") { From 34e5eb910bca835e753bd8a7a88c4d0fa2c10202 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sun, 1 Nov 2020 14:51:18 -0500 Subject: [PATCH 05/87] NEW: Turn on authorization in the config --- pkg/genericcontrolplane/server.go | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index d540e58a36e50..b586d2b967bf1 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -33,7 +33,6 @@ import ( openapinamer "k8s.io/apiserver/pkg/endpoints/openapi" genericfeatures "k8s.io/apiserver/pkg/features" genericapiserver "k8s.io/apiserver/pkg/server" - "k8s.io/apiserver/pkg/server/egressselector" "k8s.io/apiserver/pkg/server/filters" serverstorage "k8s.io/apiserver/pkg/server/storage" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -278,26 +277,26 @@ func BuildGenericConfig( // on a fast local network genericConfig.LoopbackClientConfig.DisableCompression = true - // kubeClientConfig := genericConfig.LoopbackClientConfig - // clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) - // if err != nil { - // lastErr = fmt.Errorf("failed to create real external clientset: %v", err) - // return - // } - // versionedInformers = clientgoinformers.NewSharedInformerFactory(clientgoExternalClient, 10*time.Minute) + kubeClientConfig := genericConfig.LoopbackClientConfig + clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) + if err != nil { + lastErr = fmt.Errorf("failed to create real external clientset: %v", err) + return + } + versionedInformers := clientgoinformers.NewSharedInformerFactory(clientgoExternalClient, 10*time.Minute) // Authentication.ApplyTo requires already applied OpenAPIConfig and EgressSelector if present if lastErr = AuthenticationApplyTo(s.Authentication, &genericConfig.Authentication, genericConfig.SecureServing, genericConfig.EgressSelector, genericConfig.OpenAPIConfig); lastErr != nil { return } - // genericConfig.Authorization.Authorizer, genericConfig.RuleResolver, err = BuildAuthorizer(s, genericConfig.EgressSelector, versionedInformers) - // if err != nil { - // lastErr = fmt.Errorf("invalid authorization config: %v", err) - // return - // } + genericConfig.Authorization.Authorizer, genericConfig.RuleResolver, err = BuildAuthorizer(s, versionedInformers) + if err != nil { + lastErr = fmt.Errorf("invalid authorization config: %v", err) + return + } // if !sets.NewString(s.Authorization.Modes...).Has(modes.ModeRBAC) { - // genericConfig.DisabledPostStartHooks.Insert(rbacrest.PostStartHookName) + // genericConfig.DisabledPostStartHooks.Insert(rbacrest.PostStartHookName) // } // lastErr = s.Audit.ApplyTo(genericConfig) @@ -334,7 +333,7 @@ func BuildGenericConfig( } // BuildAuthorizer constructs the authorizer -func BuildAuthorizer(s *options.ServerRunOptions, egressSelector *egressselector.EgressSelector, versionedInformers clientgoinformers.SharedInformerFactory) (authorizer.Authorizer, authorizer.RuleResolver, error) { +func BuildAuthorizer(s *options.ServerRunOptions, versionedInformers clientgoinformers.SharedInformerFactory) (authorizer.Authorizer, authorizer.RuleResolver, error) { var ( authorizers []authorizer.Authorizer ruleResolvers []authorizer.RuleResolver From 3d6ac63b7be3058500d226020117891016c262ee Mon Sep 17 00:00:00 2001 From: David Festal Date: Wed, 4 Aug 2021 18:32:42 +0200 Subject: [PATCH 06/87] DUPLICATE: Bootstrap the addition of a genericcontrolplane core group Bootstrapped files are copied from existing k8s code: pkg/api/legacyscheme/scheme.go -> pkg/api/genericcontrolplanescheme/scheme.go pkg/apis/core/install/install.go -> pkg/apis/core/install/genericcontrolplane/install.go pkg/apis/core/register.go -> pkg/apis/core/register_generic_control_plane.go pkg/apis/core/v1/register.go -> pkg/apis/core/v1/register_generic_control_plane.go staging/src/k8s.io/api/core/v1/register.go -> staging/src/k8s.io/api/core/v1/register_generic_control_plane.go pkg/registry/core/rest/storage_core.go -> pkg/registry/core/rest/genericcontrolplane/storage_core.go --- pkg/api/genericcontrolplanescheme/scheme.go | 37 ++ .../install/genericcontrolplane/install.go | 38 ++ .../core/register_generic_control_plane.go | 103 +++++ .../core/v1/register_generic_control_plane.go | 46 +++ .../rest/genericcontrolplane/storage_core.go | 378 ++++++++++++++++++ .../core/v1/register_generic_control_plane.go | 99 +++++ 6 files changed, 701 insertions(+) create mode 100644 pkg/api/genericcontrolplanescheme/scheme.go create mode 100644 pkg/apis/core/install/genericcontrolplane/install.go create mode 100644 pkg/apis/core/register_generic_control_plane.go create mode 100644 pkg/apis/core/v1/register_generic_control_plane.go create mode 100644 pkg/registry/core/rest/genericcontrolplane/storage_core.go create mode 100644 staging/src/k8s.io/api/core/v1/register_generic_control_plane.go diff --git a/pkg/api/genericcontrolplanescheme/scheme.go b/pkg/api/genericcontrolplanescheme/scheme.go new file mode 100644 index 0000000000000..0006416c9804f --- /dev/null +++ b/pkg/api/genericcontrolplanescheme/scheme.go @@ -0,0 +1,37 @@ +/* +Copyright 2014 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 genericcontrolplanescheme + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" +) + +var ( + // Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered. + // NOTE: If you are copying this file to start a new api group, STOP! Copy the + // extensions group instead. This Scheme is special and should appear ONLY in + // the api group, unless you really know what you're doing. + // TODO(lavalamp): make the above error impossible. + Scheme = runtime.NewScheme() + + // Codecs provides access to encoding and decoding for the scheme + Codecs = serializer.NewCodecFactory(Scheme) + + // ParameterCodec handles versioning of objects that are converted to query parameters. + ParameterCodec = runtime.NewParameterCodec(Scheme) +) diff --git a/pkg/apis/core/install/genericcontrolplane/install.go b/pkg/apis/core/install/genericcontrolplane/install.go new file mode 100644 index 0000000000000..dd33f29dfffc6 --- /dev/null +++ b/pkg/apis/core/install/genericcontrolplane/install.go @@ -0,0 +1,38 @@ +/* +Copyright 2014 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 install installs the v1 monolithic api, making it available as an +// option to all of the API encoding/decoding machinery. +package genericcontrolplane + +import ( + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/kubernetes/pkg/apis/core/v1" +) + +func init() { + Install(legacyscheme.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(scheme *runtime.Scheme) { + utilruntime.Must(core.AddToScheme(scheme)) + utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion)) +} diff --git a/pkg/apis/core/register_generic_control_plane.go b/pkg/apis/core/register_generic_control_plane.go new file mode 100644 index 0000000000000..36856ef6cc7bb --- /dev/null +++ b/pkg/apis/core/register_generic_control_plane.go @@ -0,0 +1,103 @@ +/* +Copyright 2014 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 core + +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 use in this package +const GroupName = "" + +// 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 object to register various known types + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + + // AddToScheme represents a func that can be used to apply all the registered + // funcs in a scheme + AddToScheme = SchemeBuilder.AddToScheme +) + +func addKnownTypes(scheme *runtime.Scheme) error { + if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil { + return err + } + scheme.AddKnownTypes(SchemeGroupVersion, + &Pod{}, + &PodList{}, + &PodStatusResult{}, + &PodTemplate{}, + &PodTemplateList{}, + &ReplicationControllerList{}, + &ReplicationController{}, + &ServiceList{}, + &Service{}, + &ServiceProxyOptions{}, + &NodeList{}, + &Node{}, + &NodeProxyOptions{}, + &Endpoints{}, + &EndpointsList{}, + &Binding{}, + &Event{}, + &EventList{}, + &List{}, + &LimitRange{}, + &LimitRangeList{}, + &ResourceQuota{}, + &ResourceQuotaList{}, + &Namespace{}, + &NamespaceList{}, + &ServiceAccount{}, + &ServiceAccountList{}, + &Secret{}, + &SecretList{}, + &PersistentVolume{}, + &PersistentVolumeList{}, + &PersistentVolumeClaim{}, + &PersistentVolumeClaimList{}, + &PodAttachOptions{}, + &PodLogOptions{}, + &PodExecOptions{}, + &PodPortForwardOptions{}, + &PodProxyOptions{}, + &ComponentStatus{}, + &ComponentStatusList{}, + &SerializedReference{}, + &RangeAllocation{}, + &ConfigMap{}, + &ConfigMapList{}, + &EphemeralContainers{}, + ) + + return nil +} diff --git a/pkg/apis/core/v1/register_generic_control_plane.go b/pkg/apis/core/v1/register_generic_control_plane.go new file mode 100644 index 0000000000000..adf620fa4fd7b --- /dev/null +++ b/pkg/apis/core/v1/register_generic_control_plane.go @@ -0,0 +1,46 @@ +/* +Copyright 2017 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 v1 + +import ( + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + localSchemeBuilder = &v1.SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs) +} + +// TODO: remove these global variables +// GroupName is the group name use in this package +const GroupName = "" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/pkg/registry/core/rest/genericcontrolplane/storage_core.go b/pkg/registry/core/rest/genericcontrolplane/storage_core.go new file mode 100644 index 0000000000000..6a1cc7af85f59 --- /dev/null +++ b/pkg/registry/core/rest/genericcontrolplane/storage_core.go @@ -0,0 +1,378 @@ +/* +Copyright 2016 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 genericcontrolplane + +import ( + "crypto/tls" + "fmt" + "net" + "net/http" + "net/url" + "strings" + "time" + + "k8s.io/klog/v2" + + "k8s.io/apimachinery/pkg/runtime/schema" + utilnet "k8s.io/apimachinery/pkg/util/net" + "k8s.io/apiserver/pkg/authentication/authenticator" + "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/registry/rest" + genericapiserver "k8s.io/apiserver/pkg/server" + serverstorage "k8s.io/apiserver/pkg/server/storage" + "k8s.io/apiserver/pkg/storage/etcd3" + utilfeature "k8s.io/apiserver/pkg/util/feature" + policyclient "k8s.io/client-go/kubernetes/typed/policy/v1" + restclient "k8s.io/client-go/rest" + "k8s.io/kubernetes/pkg/api/legacyscheme" + api "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/kubernetes/pkg/cluster/ports" + "k8s.io/kubernetes/pkg/features" + kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" + "k8s.io/kubernetes/pkg/registry/core/componentstatus" + configmapstore "k8s.io/kubernetes/pkg/registry/core/configmap/storage" + endpointsstore "k8s.io/kubernetes/pkg/registry/core/endpoint/storage" + eventstore "k8s.io/kubernetes/pkg/registry/core/event/storage" + limitrangestore "k8s.io/kubernetes/pkg/registry/core/limitrange/storage" + namespacestore "k8s.io/kubernetes/pkg/registry/core/namespace/storage" + nodestore "k8s.io/kubernetes/pkg/registry/core/node/storage" + pvstore "k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage" + pvcstore "k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage" + podstore "k8s.io/kubernetes/pkg/registry/core/pod/storage" + podtemplatestore "k8s.io/kubernetes/pkg/registry/core/podtemplate/storage" + "k8s.io/kubernetes/pkg/registry/core/rangeallocation" + controllerstore "k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage" + resourcequotastore "k8s.io/kubernetes/pkg/registry/core/resourcequota/storage" + secretstore "k8s.io/kubernetes/pkg/registry/core/secret/storage" + "k8s.io/kubernetes/pkg/registry/core/service/allocator" + serviceallocator "k8s.io/kubernetes/pkg/registry/core/service/allocator/storage" + "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" + "k8s.io/kubernetes/pkg/registry/core/service/portallocator" + servicestore "k8s.io/kubernetes/pkg/registry/core/service/storage" + serviceaccountstore "k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage" + kubeschedulerconfig "k8s.io/kubernetes/pkg/scheduler/apis/config" + "k8s.io/kubernetes/pkg/serviceaccount" + utilsnet "k8s.io/utils/net" +) + +// LegacyRESTStorageProvider provides information needed to build RESTStorage for core, but +// does NOT implement the "normal" RESTStorageProvider (yet!) +type LegacyRESTStorageProvider struct { + StorageFactory serverstorage.StorageFactory + // Used for custom proxy dialing, and proxy TLS options + ProxyTransport http.RoundTripper + KubeletClientConfig kubeletclient.KubeletClientConfig + EventTTL time.Duration + + // ServiceIPRange is used to build cluster IPs for discovery. + ServiceIPRange net.IPNet + // allocates ips for secondary service cidr in dual stack clusters + SecondaryServiceIPRange net.IPNet + ServiceNodePortRange utilnet.PortRange + + ServiceAccountIssuer serviceaccount.TokenGenerator + ServiceAccountMaxExpiration time.Duration + ExtendExpiration bool + + APIAudiences authenticator.Audiences + + LoopbackClientConfig *restclient.Config +} + +// LegacyRESTStorage returns stateful information about particular instances of REST storage to +// master.go for wiring controllers. +// TODO remove this by running the controller as a poststarthook +type LegacyRESTStorage struct { + ServiceClusterIPAllocator rangeallocation.RangeRegistry + SecondaryServiceClusterIPAllocator rangeallocation.RangeRegistry + ServiceNodePortAllocator rangeallocation.RangeRegistry +} + +func (c LegacyRESTStorageProvider) NewLegacyRESTStorage(restOptionsGetter generic.RESTOptionsGetter) (LegacyRESTStorage, genericapiserver.APIGroupInfo, error) { + apiGroupInfo := genericapiserver.APIGroupInfo{ + PrioritizedVersions: legacyscheme.Scheme.PrioritizedVersionsForGroup(""), + VersionedResourcesStorageMap: map[string]map[string]rest.Storage{}, + Scheme: legacyscheme.Scheme, + ParameterCodec: legacyscheme.ParameterCodec, + NegotiatedSerializer: legacyscheme.Codecs, + } + + podDisruptionClient, err := policyclient.NewForConfig(c.LoopbackClientConfig) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + restStorage := LegacyRESTStorage{} + + podTemplateStorage, err := podtemplatestore.NewREST(restOptionsGetter) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + eventStorage, err := eventstore.NewREST(restOptionsGetter, uint64(c.EventTTL.Seconds())) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + limitRangeStorage, err := limitrangestore.NewREST(restOptionsGetter) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + resourceQuotaStorage, resourceQuotaStatusStorage, err := resourcequotastore.NewREST(restOptionsGetter) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + secretStorage, err := secretstore.NewREST(restOptionsGetter) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + persistentVolumeStorage, persistentVolumeStatusStorage, err := pvstore.NewREST(restOptionsGetter) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + persistentVolumeClaimStorage, persistentVolumeClaimStatusStorage, err := pvcstore.NewREST(restOptionsGetter) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + configMapStorage, err := configmapstore.NewREST(restOptionsGetter) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + namespaceStorage, namespaceStatusStorage, namespaceFinalizeStorage, err := namespacestore.NewREST(restOptionsGetter) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + endpointsStorage, err := endpointsstore.NewREST(restOptionsGetter) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + nodeStorage, err := nodestore.NewStorage(restOptionsGetter, c.KubeletClientConfig, c.ProxyTransport) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + podStorage, err := podstore.NewStorage( + restOptionsGetter, + nodeStorage.KubeletConnectionInfo, + c.ProxyTransport, + podDisruptionClient, + ) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + var serviceAccountStorage *serviceaccountstore.REST + if c.ServiceAccountIssuer != nil { + serviceAccountStorage, err = serviceaccountstore.NewREST(restOptionsGetter, c.ServiceAccountIssuer, c.APIAudiences, c.ServiceAccountMaxExpiration, podStorage.Pod.Store, secretStorage.Store, c.ExtendExpiration) + } else { + serviceAccountStorage, err = serviceaccountstore.NewREST(restOptionsGetter, nil, nil, 0, nil, nil, false) + } + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + var serviceClusterIPRegistry rangeallocation.RangeRegistry + serviceClusterIPRange := c.ServiceIPRange + if serviceClusterIPRange.IP == nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, fmt.Errorf("service clusterIPRange is missing") + } + + serviceStorageConfig, err := c.StorageFactory.NewConfig(api.Resource("services")) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + serviceClusterIPAllocator, err := ipallocator.NewAllocatorCIDRRange(&serviceClusterIPRange, func(max int, rangeSpec string) (allocator.Interface, error) { + mem := allocator.NewAllocationMap(max, rangeSpec) + // TODO etcdallocator package to return a storage interface via the storageFactory + etcd, err := serviceallocator.NewEtcd(mem, "/ranges/serviceips", api.Resource("serviceipallocations"), serviceStorageConfig) + if err != nil { + return nil, err + } + serviceClusterIPRegistry = etcd + return etcd, nil + }) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, fmt.Errorf("cannot create cluster IP allocator: %v", err) + } + restStorage.ServiceClusterIPAllocator = serviceClusterIPRegistry + + // allocator for secondary service ip range + var secondaryServiceClusterIPAllocator ipallocator.Interface + if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && c.SecondaryServiceIPRange.IP != nil { + var secondaryServiceClusterIPRegistry rangeallocation.RangeRegistry + secondaryServiceClusterIPAllocator, err = ipallocator.NewAllocatorCIDRRange(&c.SecondaryServiceIPRange, func(max int, rangeSpec string) (allocator.Interface, error) { + mem := allocator.NewAllocationMap(max, rangeSpec) + // TODO etcdallocator package to return a storage interface via the storageFactory + etcd, err := serviceallocator.NewEtcd(mem, "/ranges/secondaryserviceips", api.Resource("serviceipallocations"), serviceStorageConfig) + if err != nil { + return nil, err + } + secondaryServiceClusterIPRegistry = etcd + return etcd, nil + }) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, fmt.Errorf("cannot create cluster secondary IP allocator: %v", err) + } + restStorage.SecondaryServiceClusterIPAllocator = secondaryServiceClusterIPRegistry + } + + var serviceNodePortRegistry rangeallocation.RangeRegistry + serviceNodePortAllocator, err := portallocator.NewPortAllocatorCustom(c.ServiceNodePortRange, func(max int, rangeSpec string) (allocator.Interface, error) { + mem := allocator.NewAllocationMap(max, rangeSpec) + // TODO etcdallocator package to return a storage interface via the storageFactory + etcd, err := serviceallocator.NewEtcd(mem, "/ranges/servicenodeports", api.Resource("servicenodeportallocations"), serviceStorageConfig) + if err != nil { + return nil, err + } + serviceNodePortRegistry = etcd + return etcd, nil + }) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, fmt.Errorf("cannot create cluster port allocator: %v", err) + } + restStorage.ServiceNodePortAllocator = serviceNodePortRegistry + + controllerStorage, err := controllerstore.NewStorage(restOptionsGetter) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + serviceRESTStorage, serviceStatusStorage, err := servicestore.NewGenericREST(restOptionsGetter, serviceClusterIPRange, secondaryServiceClusterIPAllocator != nil) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + + serviceRest, serviceRestProxy := servicestore.NewREST(serviceRESTStorage, + endpointsStorage, + podStorage.Pod, + serviceClusterIPAllocator, + secondaryServiceClusterIPAllocator, + serviceNodePortAllocator, + c.ProxyTransport) + + restStorageMap := map[string]rest.Storage{ + "pods": podStorage.Pod, + "pods/attach": podStorage.Attach, + "pods/status": podStorage.Status, + "pods/log": podStorage.Log, + "pods/exec": podStorage.Exec, + "pods/portforward": podStorage.PortForward, + "pods/proxy": podStorage.Proxy, + "pods/binding": podStorage.Binding, + "bindings": podStorage.LegacyBinding, + + "podTemplates": podTemplateStorage, + + "replicationControllers": controllerStorage.Controller, + "replicationControllers/status": controllerStorage.Status, + + "services": serviceRest, + "services/proxy": serviceRestProxy, + "services/status": serviceStatusStorage, + + "endpoints": endpointsStorage, + + "nodes": nodeStorage.Node, + "nodes/status": nodeStorage.Status, + "nodes/proxy": nodeStorage.Proxy, + + "events": eventStorage, + + "limitRanges": limitRangeStorage, + "resourceQuotas": resourceQuotaStorage, + "resourceQuotas/status": resourceQuotaStatusStorage, + "namespaces": namespaceStorage, + "namespaces/status": namespaceStatusStorage, + "namespaces/finalize": namespaceFinalizeStorage, + "secrets": secretStorage, + "serviceAccounts": serviceAccountStorage, + "persistentVolumes": persistentVolumeStorage, + "persistentVolumes/status": persistentVolumeStatusStorage, + "persistentVolumeClaims": persistentVolumeClaimStorage, + "persistentVolumeClaims/status": persistentVolumeClaimStatusStorage, + "configMaps": configMapStorage, + + "componentStatuses": componentstatus.NewStorage(componentStatusStorage{c.StorageFactory}.serversToValidate), + } + if legacyscheme.Scheme.IsVersionRegistered(schema.GroupVersion{Group: "autoscaling", Version: "v1"}) { + restStorageMap["replicationControllers/scale"] = controllerStorage.Scale + } + if podStorage.Eviction != nil { + restStorageMap["pods/eviction"] = podStorage.Eviction + } + if serviceAccountStorage.Token != nil { + restStorageMap["serviceaccounts/token"] = serviceAccountStorage.Token + } + if utilfeature.DefaultFeatureGate.Enabled(features.EphemeralContainers) { + restStorageMap["pods/ephemeralcontainers"] = podStorage.EphemeralContainers + } + apiGroupInfo.VersionedResourcesStorageMap["v1"] = restStorageMap + + return restStorage, apiGroupInfo, nil +} + +func (p LegacyRESTStorageProvider) GroupName() string { + return api.GroupName +} + +type componentStatusStorage struct { + storageFactory serverstorage.StorageFactory +} + +func (s componentStatusStorage) serversToValidate() map[string]*componentstatus.Server { + // this is fragile, which assumes that the default port is being used + // TODO: switch to secure port until these components remove the ability to serve insecurely. + serversToValidate := map[string]*componentstatus.Server{ + "controller-manager": {EnableHTTPS: true, TLSConfig: &tls.Config{InsecureSkipVerify: true}, Addr: "127.0.0.1", Port: ports.KubeControllerManagerPort, Path: "/healthz"}, + "scheduler": {Addr: "127.0.0.1", Port: kubeschedulerconfig.DefaultInsecureSchedulerPort, Path: "/healthz"}, + } + + for ix, machine := range s.storageFactory.Backends() { + etcdUrl, err := url.Parse(machine.Server) + if err != nil { + klog.Errorf("Failed to parse etcd url for validation: %v", err) + continue + } + var port int + var addr string + if strings.Contains(etcdUrl.Host, ":") { + var portString string + addr, portString, err = net.SplitHostPort(etcdUrl.Host) + if err != nil { + klog.Errorf("Failed to split host/port: %s (%v)", etcdUrl.Host, err) + continue + } + port, _ = utilsnet.ParsePort(portString, true) + } else { + addr = etcdUrl.Host + port = 2379 + } + // TODO: etcd health checking should be abstracted in the storage tier + serversToValidate[fmt.Sprintf("etcd-%d", ix)] = &componentstatus.Server{ + Addr: addr, + EnableHTTPS: etcdUrl.Scheme == "https", + TLSConfig: machine.TLSConfig, + Port: port, + Path: "/health", + Validate: etcd3.EtcdHealthCheck, + } + } + return serversToValidate +} diff --git a/staging/src/k8s.io/api/core/v1/register_generic_control_plane.go b/staging/src/k8s.io/api/core/v1/register_generic_control_plane.go new file mode 100644 index 0000000000000..1aac0cb41e0de --- /dev/null +++ b/staging/src/k8s.io/api/core/v1/register_generic_control_plane.go @@ -0,0 +1,99 @@ +/* +Copyright 2015 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 v1 + +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 use in this package +const GroupName = "" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &Pod{}, + &PodList{}, + &PodStatusResult{}, + &PodTemplate{}, + &PodTemplateList{}, + &ReplicationController{}, + &ReplicationControllerList{}, + &Service{}, + &ServiceProxyOptions{}, + &ServiceList{}, + &Endpoints{}, + &EndpointsList{}, + &Node{}, + &NodeList{}, + &NodeProxyOptions{}, + &Binding{}, + &Event{}, + &EventList{}, + &List{}, + &LimitRange{}, + &LimitRangeList{}, + &ResourceQuota{}, + &ResourceQuotaList{}, + &Namespace{}, + &NamespaceList{}, + &Secret{}, + &SecretList{}, + &ServiceAccount{}, + &ServiceAccountList{}, + &PersistentVolume{}, + &PersistentVolumeList{}, + &PersistentVolumeClaim{}, + &PersistentVolumeClaimList{}, + &PodAttachOptions{}, + &PodLogOptions{}, + &PodExecOptions{}, + &PodPortForwardOptions{}, + &PodProxyOptions{}, + &ComponentStatus{}, + &ComponentStatusList{}, + &SerializedReference{}, + &RangeAllocation{}, + &ConfigMap{}, + &ConfigMapList{}, + ) + + // Add common types + scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{}) + + // Add the watch version that applies + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} From b847e3e7cf092605fb34b48ef67ee7505768afd4 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sun, 1 Nov 2020 10:34:43 -0500 Subject: [PATCH 07/87] NEW: Add a controlplane core group that drops the legacy group "" Some of the core API group is required for generic control plane server startup - specifically events and namespaces - and so the core API group must be installed. Instead of loading it as the legacy group, attempt to make it a standard API group and adapt the generic startup code as necessary to enable that. --- pkg/api/genericcontrolplanescheme/scheme.go | 10 +- .../install/genericcontrolplane/install.go | 11 +- .../core/register_generic_control_plane.go | 80 ++--- .../core/v1/register_generic_control_plane.go | 21 +- pkg/genericcontrolplane/apis/apis.go | 53 +++- .../apis/import_known_versions.go | 21 ++ .../apis/install/install.go | 40 +++ pkg/genericcontrolplane/options/options.go | 7 +- pkg/genericcontrolplane/server.go | 10 +- .../rest/genericcontrolplane/storage_core.go | 279 +----------------- pkg/registry/rbac/rest/storage_rbac.go | 3 + .../core/v1/register_generic_control_plane.go | 68 ++--- 12 files changed, 194 insertions(+), 409 deletions(-) create mode 100644 pkg/genericcontrolplane/apis/import_known_versions.go create mode 100644 pkg/genericcontrolplane/apis/install/install.go diff --git a/pkg/api/genericcontrolplanescheme/scheme.go b/pkg/api/genericcontrolplanescheme/scheme.go index 0006416c9804f..41cbdd58f4fba 100644 --- a/pkg/api/genericcontrolplanescheme/scheme.go +++ b/pkg/api/genericcontrolplanescheme/scheme.go @@ -22,11 +22,11 @@ import ( ) var ( - // Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered. - // NOTE: If you are copying this file to start a new api group, STOP! Copy the - // extensions group instead. This Scheme is special and should appear ONLY in - // the api group, unless you really know what you're doing. - // TODO(lavalamp): make the above error impossible. + // Scheme is the default instance of runtime.Scheme to which control plane types + // in the Kubernetes API are already registered. + // NOTE: If you are copying this file to start a new api group, STOP! This Scheme + // is special and should appear ONLY in the api group, unless you really know what + // you're doing. Scheme = runtime.NewScheme() // Codecs provides access to encoding and decoding for the scheme diff --git a/pkg/apis/core/install/genericcontrolplane/install.go b/pkg/apis/core/install/genericcontrolplane/install.go index dd33f29dfffc6..a33dd9593ffba 100644 --- a/pkg/apis/core/install/genericcontrolplane/install.go +++ b/pkg/apis/core/install/genericcontrolplane/install.go @@ -21,18 +21,13 @@ package genericcontrolplane import ( "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/apis/core/v1" + v1 "k8s.io/kubernetes/pkg/apis/core/v1" ) -func init() { - Install(legacyscheme.Scheme) -} - // Install registers the API group and adds types to a scheme func Install(scheme *runtime.Scheme) { - utilruntime.Must(core.AddToScheme(scheme)) - utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(core.AddToGenericControlPlaneScheme(scheme)) + utilruntime.Must(v1.AddToControlPlaneScheme(scheme)) utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion)) } diff --git a/pkg/apis/core/register_generic_control_plane.go b/pkg/apis/core/register_generic_control_plane.go index 36856ef6cc7bb..5e3301741e41c 100644 --- a/pkg/apis/core/register_generic_control_plane.go +++ b/pkg/apis/core/register_generic_control_plane.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2020 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. @@ -22,52 +22,26 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -// GroupName is the group name use in this package -const GroupName = "" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var ( + // GenericControlPlaneGroupName is the name of the group when installed in the generic control plane + GenericControlPlaneGroupName = "core" -// Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} + // GenericControlPlaneSchemeGroupVersion is group version used to register these objects + GenericControlPlaneSchemeGroupVersion = schema.GroupVersion{Group: GenericControlPlaneGroupName, Version: "v1"} -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} + // GenericControlPlaneSchemeBuilder object to register various known types for the control plane + GenericControlPlaneSchemeBuilder = runtime.NewSchemeBuilder(addGenericControlPlaneKnownTypes) -var ( - // SchemeBuilder object to register various known types - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - - // AddToScheme represents a func that can be used to apply all the registered + // AddToGenericControlPlaneScheme represents a func that can be used to apply all the registered // funcs in a scheme - AddToScheme = SchemeBuilder.AddToScheme + AddToGenericControlPlaneScheme = GenericControlPlaneSchemeBuilder.AddToScheme ) -func addKnownTypes(scheme *runtime.Scheme) error { +func addGenericControlPlaneKnownTypes(scheme *runtime.Scheme) error { if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil { return err } scheme.AddKnownTypes(SchemeGroupVersion, - &Pod{}, - &PodList{}, - &PodStatusResult{}, - &PodTemplate{}, - &PodTemplateList{}, - &ReplicationControllerList{}, - &ReplicationController{}, - &ServiceList{}, - &Service{}, - &ServiceProxyOptions{}, - &NodeList{}, - &Node{}, - &NodeProxyOptions{}, - &Endpoints{}, - &EndpointsList{}, - &Binding{}, &Event{}, &EventList{}, &List{}, @@ -81,22 +55,30 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ServiceAccountList{}, &Secret{}, &SecretList{}, - &PersistentVolume{}, - &PersistentVolumeList{}, - &PersistentVolumeClaim{}, - &PersistentVolumeClaimList{}, - &PodAttachOptions{}, - &PodLogOptions{}, - &PodExecOptions{}, - &PodPortForwardOptions{}, - &PodProxyOptions{}, - &ComponentStatus{}, - &ComponentStatusList{}, &SerializedReference{}, &RangeAllocation{}, &ConfigMap{}, &ConfigMapList{}, - &EphemeralContainers{}, + ) + + scheme.AddKnownTypes(GenericControlPlaneSchemeGroupVersion, + &Event{}, + &EventList{}, + &List{}, + &LimitRange{}, + &LimitRangeList{}, + &ResourceQuota{}, + &ResourceQuotaList{}, + &Namespace{}, + &NamespaceList{}, + &ServiceAccount{}, + &ServiceAccountList{}, + &Secret{}, + &SecretList{}, + &SerializedReference{}, + &RangeAllocation{}, + &ConfigMap{}, + &ConfigMapList{}, ) return nil diff --git a/pkg/apis/core/v1/register_generic_control_plane.go b/pkg/apis/core/v1/register_generic_control_plane.go index adf620fa4fd7b..d882b754a43ea 100644 --- a/pkg/apis/core/v1/register_generic_control_plane.go +++ b/pkg/apis/core/v1/register_generic_control_plane.go @@ -17,30 +17,17 @@ limitations under the License. package v1 import ( - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime/schema" + v1 "k8s.io/api/core/v1" ) var ( - localSchemeBuilder = &v1.SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme + localGenericControlPlaneSchemeBuilder = &v1.GenericControlPlaneSchemeBuilder + AddToControlPlaneScheme = localGenericControlPlaneSchemeBuilder.AddToScheme ) func init() { // We only register manually written functions here. The registration of the // generated functions takes place in the generated files. The separation // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs) -} - -// TODO: remove these global variables -// GroupName is the group name use in this package -const GroupName = "" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() + localGenericControlPlaneSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs, RegisterConversions) } diff --git a/pkg/genericcontrolplane/apis/apis.go b/pkg/genericcontrolplane/apis/apis.go index 34d9e66ef19d7..105cec0acdf6c 100644 --- a/pkg/genericcontrolplane/apis/apis.go +++ b/pkg/genericcontrolplane/apis/apis.go @@ -27,8 +27,8 @@ import ( authorizationapiv1 "k8s.io/api/authorization/v1" certificatesapiv1 "k8s.io/api/certificates/v1" coordinationapiv1 "k8s.io/api/coordination/v1" - apiv1 "k8s.io/api/core/v1" eventsv1 "k8s.io/api/events/v1" + corev1 "k8s.io/api/core/v1" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -61,6 +61,7 @@ import ( authorizationrest "k8s.io/kubernetes/pkg/registry/authorization/rest" certificatesrest "k8s.io/kubernetes/pkg/registry/certificates/rest" coordinationrest "k8s.io/kubernetes/pkg/registry/coordination/rest" + corerest "k8s.io/kubernetes/pkg/registry/core/rest/genericcontrolplane" eventsrest "k8s.io/kubernetes/pkg/registry/events/rest" flowcontrolrest "k8s.io/kubernetes/pkg/registry/flowcontrol/rest" rbacrest "k8s.io/kubernetes/pkg/registry/rbac/rest" @@ -127,8 +128,8 @@ type CompletedConfig struct { *completedConfig } -// ControlPlane contains state for a Kubernetes cluster master/api server. -type ControlPlane struct { +// GenericControlPlane contains state for a Kubernetes cluster master/api server. +type GenericControlPlane struct { GenericAPIServer *genericapiserver.GenericAPIServer ClusterAuthenticationInfo clusterauthenticationtrust.ClusterAuthenticationInfo @@ -147,11 +148,11 @@ func (c *Config) Complete() CompletedConfig { return CompletedConfig{&cfg} } -// New returns a new instance of ControlPlane from the given config. +// New returns a new instance of GenericControlPlane from the given config. // Certain config fields will be set to a default value if unset. // Certain config fields must be specified, including: // KubeletClientConfig -func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) (*ControlPlane, error) { +func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) (*GenericControlPlane, error) { s, err := c.GenericConfig.New("kube-control-plane", delegationTarget) if err != nil { return nil, err @@ -192,11 +193,25 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) // Install(s.Handler.GoRestfulContainer) // } - m := &ControlPlane{ + m := &GenericControlPlane{ GenericAPIServer: s, ClusterAuthenticationInfo: c.ExtraConfig.ClusterAuthenticationInfo, } + // install legacy rest storage + if c.ExtraConfig.APIResourceConfigSource.VersionEnabled(corev1.SchemeGroupVersion) { + legacyRESTStorageProvider := corerest.LegacyRESTStorageProvider{ + StorageFactory: c.ExtraConfig.StorageFactory, + EventTTL: c.ExtraConfig.EventTTL, + ServiceAccountIssuer: c.ExtraConfig.ServiceAccountIssuer, + ServiceAccountMaxExpiration: c.ExtraConfig.ServiceAccountMaxExpiration, + APIAudiences: c.GenericConfig.Authentication.APIAudiences, + } + if err := m.InstallLegacyAPI(&c, c.GenericConfig.RESTOptionsGetter, legacyRESTStorageProvider); err != nil { + return nil, err + } + } + // The order here is preserved in discovery. // If resources with identical names exist in more than one of these groups (e.g. "deployments.apps"" and "deployments.extensions"), // the order of this list determines which group an unqualified resource name (e.g. "deployments") should prefer. @@ -303,7 +318,7 @@ type RESTStorageProvider interface { } // InstallAPIs will install the APIs for the restStorageProviders if they are enabled. -func (m *ControlPlane) InstallAPIs(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter, restStorageProviders ...RESTStorageProvider) error { +func (m *GenericControlPlane) InstallAPIs(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter, restStorageProviders ...RESTStorageProvider) error { apiGroupsInfo := []*genericapiserver.APIGroupInfo{} // used later in the loop to filter the served resource by those that have expired. @@ -355,13 +370,32 @@ func (m *ControlPlane) InstallAPIs(apiResourceConfigSource serverstorage.APIReso return nil } +// InstallLegacyAPI will install the legacy APIs for the restStorageProviders if they are enabled. +func (m *GenericControlPlane) InstallLegacyAPI(c *completedConfig, restOptionsGetter generic.RESTOptionsGetter, legacyRESTStorageProvider corerest.LegacyRESTStorageProvider) error { + _, apiGroupInfo, err := legacyRESTStorageProvider.NewLegacyRESTStorage(restOptionsGetter) + if err != nil { + return fmt.Errorf("error building core storage: %v", err) + } + + // controllerName := "bootstrap-controller" + // coreClient := corev1client.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig) + // bootstrapController := c.NewBootstrapController(legacyRESTStorage, coreClient, coreClient, coreClient, coreClient.RESTClient()) + // m.GenericAPIServer.AddPostStartHookOrDie(controllerName, bootstrapController.PostStartHook) + // m.GenericAPIServer.AddPreShutdownHookOrDie(controllerName, bootstrapController.PreShutdownHook) + + if err := m.GenericAPIServer.InstallLegacyAPIGroup(genericapiserver.DefaultLegacyAPIPrefix, &apiGroupInfo); err != nil { + return fmt.Errorf("error in registering group versions: %v", err) + } + return nil +} + type nodeAddressProvider struct { nodeClient corev1client.NodeInterface } func (n nodeAddressProvider) externalAddresses() ([]string, error) { - preferredAddressTypes := []apiv1.NodeAddressType{ - apiv1.NodeExternalIP, + preferredAddressTypes := []corev1.NodeAddressType{ + corev1.NodeExternalIP, } nodes, err := n.nodeClient.List(context.TODO(), metav1.ListOptions{}) if err != nil { @@ -395,6 +429,7 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig { ret := serverstorage.NewResourceConfig() // NOTE: GroupVersions listed here will be enabled by default. Don't put alpha versions in the list. ret.EnableVersions( + corev1.SchemeGroupVersion, authenticationv1.SchemeGroupVersion, authorizationapiv1.SchemeGroupVersion, certificatesapiv1.SchemeGroupVersion, diff --git a/pkg/genericcontrolplane/apis/import_known_versions.go b/pkg/genericcontrolplane/apis/import_known_versions.go new file mode 100644 index 0000000000000..c781b149df3f7 --- /dev/null +++ b/pkg/genericcontrolplane/apis/import_known_versions.go @@ -0,0 +1,21 @@ +/* +Copyright 2020 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 apis + +import ( + _ "k8s.io/kubernetes/pkg/genericcontrolplane/apis/install" +) diff --git a/pkg/genericcontrolplane/apis/install/install.go b/pkg/genericcontrolplane/apis/install/install.go new file mode 100644 index 0000000000000..77185919c6fb9 --- /dev/null +++ b/pkg/genericcontrolplane/apis/install/install.go @@ -0,0 +1,40 @@ +/* +Copyright 2020 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 install + +import ( + "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" + authenticationinstall "k8s.io/kubernetes/pkg/apis/authentication/install" + authorizationinstall "k8s.io/kubernetes/pkg/apis/authorization/install" + certificatesinstall "k8s.io/kubernetes/pkg/apis/certificates/install" + coordinationinstall "k8s.io/kubernetes/pkg/apis/coordination/install" + genericcontrolplaneinstall "k8s.io/kubernetes/pkg/apis/core/install/genericcontrolplane" + eventsinstall "k8s.io/kubernetes/pkg/apis/events/install" + flowcontrolinstall "k8s.io/kubernetes/pkg/apis/flowcontrol/install" + rbacinstall "k8s.io/kubernetes/pkg/apis/rbac/install" +) + +func init() { + genericcontrolplaneinstall.Install(genericcontrolplanescheme.Scheme) + authenticationinstall.Install(genericcontrolplanescheme.Scheme) + authorizationinstall.Install(genericcontrolplanescheme.Scheme) + certificatesinstall.Install(genericcontrolplanescheme.Scheme) + coordinationinstall.Install(genericcontrolplanescheme.Scheme) + rbacinstall.Install(genericcontrolplanescheme.Scheme) + flowcontrolinstall.Install(genericcontrolplanescheme.Scheme) + eventsinstall.Install(genericcontrolplanescheme.Scheme) +} diff --git a/pkg/genericcontrolplane/options/options.go b/pkg/genericcontrolplane/options/options.go index 1e11183ea95ea..1e9ffbeee7d18 100644 --- a/pkg/genericcontrolplane/options/options.go +++ b/pkg/genericcontrolplane/options/options.go @@ -19,6 +19,8 @@ package options import ( "time" + "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating" + "k8s.io/apiserver/pkg/admission/plugin/webhook/validating" genericoptions "k8s.io/apiserver/pkg/server/options" "k8s.io/apiserver/pkg/storage/storagebackend" "k8s.io/component-base/logs" @@ -71,7 +73,7 @@ func NewServerRunOptions() *ServerRunOptions { s := ServerRunOptions{ GenericServerRunOptions: genericoptions.NewServerRunOptions(), Etcd: genericoptions.NewEtcdOptions(storagebackend.NewDefaultConfig(kubeoptions.DefaultEtcdPathPrefix, nil)), - SecureServing: kubeoptions.NewSecureServingOptions(), + SecureServing: kubeoptions.NewSecureServingOptions().WithLoopback(), Audit: genericoptions.NewAuditOptions(), Features: genericoptions.NewFeatureOptions(), Admission: genericoptions.NewAdmissionOptions(), @@ -89,6 +91,9 @@ func NewServerRunOptions() *ServerRunOptions { IdentityLeaseRenewIntervalSeconds: 10, } + // TODO: turn off the admission webhooks for now + s.Admission.DefaultOffPlugins.Insert(validating.PluginName, mutating.PluginName) + // Overwrite the default for storage data format. s.Etcd.DefaultStorageMediaType = "application/vnd.kubernetes.protobuf" diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index b586d2b967bf1..158e8415a8ee8 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -44,7 +44,7 @@ import ( "k8s.io/component-base/version" "k8s.io/klog/v2" aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" - "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" "k8s.io/kubernetes/pkg/genericcontrolplane/apis" "k8s.io/kubernetes/pkg/genericcontrolplane/options" @@ -115,7 +115,7 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan } // CreateKubeAPIServer creates and wires a workable kube-apiserver -func CreateKubeAPIServer(kubeAPIServerConfig *apis.Config, delegateAPIServer genericapiserver.DelegationTarget) (*apis.ControlPlane, error) { +func CreateKubeAPIServer(kubeAPIServerConfig *apis.Config, delegateAPIServer genericapiserver.DelegationTarget) (*apis.GenericControlPlane, error) { kubeAPIServer, err := kubeAPIServerConfig.Complete().New(delegateAPIServer) if err != nil { return nil, err @@ -213,7 +213,7 @@ func BuildGenericConfig( storageFactory *serverstorage.DefaultStorageFactory, lastErr error, ) { - genericConfig = genericapiserver.NewConfig(legacyscheme.Codecs) + genericConfig = genericapiserver.NewConfig(genericcontrolplanescheme.Codecs) if lastErr = s.GenericServerRunOptions.ApplyTo(genericConfig); lastErr != nil { return @@ -225,7 +225,7 @@ func BuildGenericConfig( if lastErr = s.Features.ApplyTo(genericConfig); lastErr != nil { return } - if lastErr = s.APIEnablement.ApplyTo(genericConfig, apis.DefaultAPIResourceConfigSource(), legacyscheme.Scheme); lastErr != nil { + if lastErr = s.APIEnablement.ApplyTo(genericConfig, apis.DefaultAPIResourceConfigSource(), genericcontrolplanescheme.Scheme); lastErr != nil { return } if lastErr = s.EgressSelector.ApplyTo(genericConfig); lastErr != nil { @@ -237,7 +237,7 @@ func BuildGenericConfig( } } - genericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(generatedopenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(extensionsapiserver.Scheme)) + genericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(generatedopenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(genericcontrolplanescheme.Scheme, extensionsapiserver.Scheme)) genericConfig.OpenAPIConfig.Info.Title = "Kubernetes" genericConfig.LongRunningFunc = filters.BasicLongRunningRequestCheck( sets.NewString("watch", "proxy"), diff --git a/pkg/registry/core/rest/genericcontrolplane/storage_core.go b/pkg/registry/core/rest/genericcontrolplane/storage_core.go index 6a1cc7af85f59..801ba5da8d589 100644 --- a/pkg/registry/core/rest/genericcontrolplane/storage_core.go +++ b/pkg/registry/core/rest/genericcontrolplane/storage_core.go @@ -17,89 +17,43 @@ limitations under the License. package genericcontrolplane import ( - "crypto/tls" - "fmt" - "net" - "net/http" - "net/url" - "strings" "time" - "k8s.io/klog/v2" - - "k8s.io/apimachinery/pkg/runtime/schema" - utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" genericapiserver "k8s.io/apiserver/pkg/server" serverstorage "k8s.io/apiserver/pkg/server/storage" - "k8s.io/apiserver/pkg/storage/etcd3" - utilfeature "k8s.io/apiserver/pkg/util/feature" - policyclient "k8s.io/client-go/kubernetes/typed/policy/v1" - restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/legacyscheme" api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/cluster/ports" - "k8s.io/kubernetes/pkg/features" - kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" - "k8s.io/kubernetes/pkg/registry/core/componentstatus" configmapstore "k8s.io/kubernetes/pkg/registry/core/configmap/storage" - endpointsstore "k8s.io/kubernetes/pkg/registry/core/endpoint/storage" eventstore "k8s.io/kubernetes/pkg/registry/core/event/storage" limitrangestore "k8s.io/kubernetes/pkg/registry/core/limitrange/storage" namespacestore "k8s.io/kubernetes/pkg/registry/core/namespace/storage" - nodestore "k8s.io/kubernetes/pkg/registry/core/node/storage" - pvstore "k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage" - pvcstore "k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage" - podstore "k8s.io/kubernetes/pkg/registry/core/pod/storage" - podtemplatestore "k8s.io/kubernetes/pkg/registry/core/podtemplate/storage" - "k8s.io/kubernetes/pkg/registry/core/rangeallocation" - controllerstore "k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage" resourcequotastore "k8s.io/kubernetes/pkg/registry/core/resourcequota/storage" secretstore "k8s.io/kubernetes/pkg/registry/core/secret/storage" - "k8s.io/kubernetes/pkg/registry/core/service/allocator" - serviceallocator "k8s.io/kubernetes/pkg/registry/core/service/allocator/storage" - "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" - "k8s.io/kubernetes/pkg/registry/core/service/portallocator" - servicestore "k8s.io/kubernetes/pkg/registry/core/service/storage" serviceaccountstore "k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage" - kubeschedulerconfig "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/serviceaccount" - utilsnet "k8s.io/utils/net" ) // LegacyRESTStorageProvider provides information needed to build RESTStorage for core, but // does NOT implement the "normal" RESTStorageProvider (yet!) type LegacyRESTStorageProvider struct { StorageFactory serverstorage.StorageFactory - // Used for custom proxy dialing, and proxy TLS options - ProxyTransport http.RoundTripper - KubeletClientConfig kubeletclient.KubeletClientConfig - EventTTL time.Duration - // ServiceIPRange is used to build cluster IPs for discovery. - ServiceIPRange net.IPNet - // allocates ips for secondary service cidr in dual stack clusters - SecondaryServiceIPRange net.IPNet - ServiceNodePortRange utilnet.PortRange + EventTTL time.Duration ServiceAccountIssuer serviceaccount.TokenGenerator ServiceAccountMaxExpiration time.Duration ExtendExpiration bool APIAudiences authenticator.Audiences - - LoopbackClientConfig *restclient.Config } // LegacyRESTStorage returns stateful information about particular instances of REST storage to // master.go for wiring controllers. // TODO remove this by running the controller as a poststarthook type LegacyRESTStorage struct { - ServiceClusterIPAllocator rangeallocation.RangeRegistry - SecondaryServiceClusterIPAllocator rangeallocation.RangeRegistry - ServiceNodePortAllocator rangeallocation.RangeRegistry } func (c LegacyRESTStorageProvider) NewLegacyRESTStorage(restOptionsGetter generic.RESTOptionsGetter) (LegacyRESTStorage, genericapiserver.APIGroupInfo, error) { @@ -111,17 +65,8 @@ func (c LegacyRESTStorageProvider) NewLegacyRESTStorage(restOptionsGetter generi NegotiatedSerializer: legacyscheme.Codecs, } - podDisruptionClient, err := policyclient.NewForConfig(c.LoopbackClientConfig) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } restStorage := LegacyRESTStorage{} - podTemplateStorage, err := podtemplatestore.NewREST(restOptionsGetter) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } - eventStorage, err := eventstore.NewREST(restOptionsGetter, uint64(c.EventTTL.Seconds())) if err != nil { return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err @@ -135,18 +80,12 @@ func (c LegacyRESTStorageProvider) NewLegacyRESTStorage(restOptionsGetter generi if err != nil { return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err } + secretStorage, err := secretstore.NewREST(restOptionsGetter) if err != nil { return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err } - persistentVolumeStorage, persistentVolumeStatusStorage, err := pvstore.NewREST(restOptionsGetter) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } - persistentVolumeClaimStorage, persistentVolumeClaimStatusStorage, err := pvcstore.NewREST(restOptionsGetter) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } + configMapStorage, err := configmapstore.NewREST(restOptionsGetter) if err != nil { return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err @@ -157,29 +96,10 @@ func (c LegacyRESTStorageProvider) NewLegacyRESTStorage(restOptionsGetter generi return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err } - endpointsStorage, err := endpointsstore.NewREST(restOptionsGetter) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } - - nodeStorage, err := nodestore.NewStorage(restOptionsGetter, c.KubeletClientConfig, c.ProxyTransport) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } - - podStorage, err := podstore.NewStorage( - restOptionsGetter, - nodeStorage.KubeletConnectionInfo, - c.ProxyTransport, - podDisruptionClient, - ) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } - var serviceAccountStorage *serviceaccountstore.REST if c.ServiceAccountIssuer != nil { - serviceAccountStorage, err = serviceaccountstore.NewREST(restOptionsGetter, c.ServiceAccountIssuer, c.APIAudiences, c.ServiceAccountMaxExpiration, podStorage.Pod.Store, secretStorage.Store, c.ExtendExpiration) + // TODO: replace with something generic for token + serviceAccountStorage, err = serviceaccountstore.NewREST(restOptionsGetter, c.ServiceAccountIssuer, c.APIAudiences, c.ServiceAccountMaxExpiration, nil, secretStorage.Store, c.ExtendExpiration) } else { serviceAccountStorage, err = serviceaccountstore.NewREST(restOptionsGetter, nil, nil, 0, nil, nil, false) } @@ -187,141 +107,17 @@ func (c LegacyRESTStorageProvider) NewLegacyRESTStorage(restOptionsGetter generi return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err } - var serviceClusterIPRegistry rangeallocation.RangeRegistry - serviceClusterIPRange := c.ServiceIPRange - if serviceClusterIPRange.IP == nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, fmt.Errorf("service clusterIPRange is missing") - } - - serviceStorageConfig, err := c.StorageFactory.NewConfig(api.Resource("services")) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } - - serviceClusterIPAllocator, err := ipallocator.NewAllocatorCIDRRange(&serviceClusterIPRange, func(max int, rangeSpec string) (allocator.Interface, error) { - mem := allocator.NewAllocationMap(max, rangeSpec) - // TODO etcdallocator package to return a storage interface via the storageFactory - etcd, err := serviceallocator.NewEtcd(mem, "/ranges/serviceips", api.Resource("serviceipallocations"), serviceStorageConfig) - if err != nil { - return nil, err - } - serviceClusterIPRegistry = etcd - return etcd, nil - }) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, fmt.Errorf("cannot create cluster IP allocator: %v", err) - } - restStorage.ServiceClusterIPAllocator = serviceClusterIPRegistry - - // allocator for secondary service ip range - var secondaryServiceClusterIPAllocator ipallocator.Interface - if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && c.SecondaryServiceIPRange.IP != nil { - var secondaryServiceClusterIPRegistry rangeallocation.RangeRegistry - secondaryServiceClusterIPAllocator, err = ipallocator.NewAllocatorCIDRRange(&c.SecondaryServiceIPRange, func(max int, rangeSpec string) (allocator.Interface, error) { - mem := allocator.NewAllocationMap(max, rangeSpec) - // TODO etcdallocator package to return a storage interface via the storageFactory - etcd, err := serviceallocator.NewEtcd(mem, "/ranges/secondaryserviceips", api.Resource("serviceipallocations"), serviceStorageConfig) - if err != nil { - return nil, err - } - secondaryServiceClusterIPRegistry = etcd - return etcd, nil - }) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, fmt.Errorf("cannot create cluster secondary IP allocator: %v", err) - } - restStorage.SecondaryServiceClusterIPAllocator = secondaryServiceClusterIPRegistry - } - - var serviceNodePortRegistry rangeallocation.RangeRegistry - serviceNodePortAllocator, err := portallocator.NewPortAllocatorCustom(c.ServiceNodePortRange, func(max int, rangeSpec string) (allocator.Interface, error) { - mem := allocator.NewAllocationMap(max, rangeSpec) - // TODO etcdallocator package to return a storage interface via the storageFactory - etcd, err := serviceallocator.NewEtcd(mem, "/ranges/servicenodeports", api.Resource("servicenodeportallocations"), serviceStorageConfig) - if err != nil { - return nil, err - } - serviceNodePortRegistry = etcd - return etcd, nil - }) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, fmt.Errorf("cannot create cluster port allocator: %v", err) - } - restStorage.ServiceNodePortAllocator = serviceNodePortRegistry - - controllerStorage, err := controllerstore.NewStorage(restOptionsGetter) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } - - serviceRESTStorage, serviceStatusStorage, err := servicestore.NewGenericREST(restOptionsGetter, serviceClusterIPRange, secondaryServiceClusterIPAllocator != nil) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } - - serviceRest, serviceRestProxy := servicestore.NewREST(serviceRESTStorage, - endpointsStorage, - podStorage.Pod, - serviceClusterIPAllocator, - secondaryServiceClusterIPAllocator, - serviceNodePortAllocator, - c.ProxyTransport) - restStorageMap := map[string]rest.Storage{ - "pods": podStorage.Pod, - "pods/attach": podStorage.Attach, - "pods/status": podStorage.Status, - "pods/log": podStorage.Log, - "pods/exec": podStorage.Exec, - "pods/portforward": podStorage.PortForward, - "pods/proxy": podStorage.Proxy, - "pods/binding": podStorage.Binding, - "bindings": podStorage.LegacyBinding, - - "podTemplates": podTemplateStorage, - - "replicationControllers": controllerStorage.Controller, - "replicationControllers/status": controllerStorage.Status, - - "services": serviceRest, - "services/proxy": serviceRestProxy, - "services/status": serviceStatusStorage, - - "endpoints": endpointsStorage, - - "nodes": nodeStorage.Node, - "nodes/status": nodeStorage.Status, - "nodes/proxy": nodeStorage.Proxy, - - "events": eventStorage, - - "limitRanges": limitRangeStorage, - "resourceQuotas": resourceQuotaStorage, - "resourceQuotas/status": resourceQuotaStatusStorage, - "namespaces": namespaceStorage, - "namespaces/status": namespaceStatusStorage, - "namespaces/finalize": namespaceFinalizeStorage, - "secrets": secretStorage, - "serviceAccounts": serviceAccountStorage, - "persistentVolumes": persistentVolumeStorage, - "persistentVolumes/status": persistentVolumeStatusStorage, - "persistentVolumeClaims": persistentVolumeClaimStorage, - "persistentVolumeClaims/status": persistentVolumeClaimStatusStorage, - "configMaps": configMapStorage, - - "componentStatuses": componentstatus.NewStorage(componentStatusStorage{c.StorageFactory}.serversToValidate), - } - if legacyscheme.Scheme.IsVersionRegistered(schema.GroupVersion{Group: "autoscaling", Version: "v1"}) { - restStorageMap["replicationControllers/scale"] = controllerStorage.Scale - } - if podStorage.Eviction != nil { - restStorageMap["pods/eviction"] = podStorage.Eviction - } - if serviceAccountStorage.Token != nil { - restStorageMap["serviceaccounts/token"] = serviceAccountStorage.Token - } - if utilfeature.DefaultFeatureGate.Enabled(features.EphemeralContainers) { - restStorageMap["pods/ephemeralcontainers"] = podStorage.EphemeralContainers + "events": eventStorage, + "limitRanges": limitRangeStorage, + "resourceQuotas": resourceQuotaStorage, + "resourceQuotas/status": resourceQuotaStatusStorage, + "namespaces": namespaceStorage, + "namespaces/status": namespaceStatusStorage, + "namespaces/finalize": namespaceFinalizeStorage, + "secrets": secretStorage, + "serviceAccounts": serviceAccountStorage, + "configMaps": configMapStorage, } apiGroupInfo.VersionedResourcesStorageMap["v1"] = restStorageMap @@ -331,48 +127,3 @@ func (c LegacyRESTStorageProvider) NewLegacyRESTStorage(restOptionsGetter generi func (p LegacyRESTStorageProvider) GroupName() string { return api.GroupName } - -type componentStatusStorage struct { - storageFactory serverstorage.StorageFactory -} - -func (s componentStatusStorage) serversToValidate() map[string]*componentstatus.Server { - // this is fragile, which assumes that the default port is being used - // TODO: switch to secure port until these components remove the ability to serve insecurely. - serversToValidate := map[string]*componentstatus.Server{ - "controller-manager": {EnableHTTPS: true, TLSConfig: &tls.Config{InsecureSkipVerify: true}, Addr: "127.0.0.1", Port: ports.KubeControllerManagerPort, Path: "/healthz"}, - "scheduler": {Addr: "127.0.0.1", Port: kubeschedulerconfig.DefaultInsecureSchedulerPort, Path: "/healthz"}, - } - - for ix, machine := range s.storageFactory.Backends() { - etcdUrl, err := url.Parse(machine.Server) - if err != nil { - klog.Errorf("Failed to parse etcd url for validation: %v", err) - continue - } - var port int - var addr string - if strings.Contains(etcdUrl.Host, ":") { - var portString string - addr, portString, err = net.SplitHostPort(etcdUrl.Host) - if err != nil { - klog.Errorf("Failed to split host/port: %s (%v)", etcdUrl.Host, err) - continue - } - port, _ = utilsnet.ParsePort(portString, true) - } else { - addr = etcdUrl.Host - port = 2379 - } - // TODO: etcd health checking should be abstracted in the storage tier - serversToValidate[fmt.Sprintf("etcd-%d", ix)] = &componentstatus.Server{ - Addr: addr, - EnableHTTPS: etcdUrl.Scheme == "https", - TLSConfig: machine.TLSConfig, - Port: port, - Path: "/health", - Validate: etcd3.EtcdHealthCheck, - } - } - return serversToValidate -} diff --git a/pkg/registry/rbac/rest/storage_rbac.go b/pkg/registry/rbac/rest/storage_rbac.go index e73b332ba6af1..3b41332691bcc 100644 --- a/pkg/registry/rbac/rest/storage_rbac.go +++ b/pkg/registry/rbac/rest/storage_rbac.go @@ -159,6 +159,9 @@ func (p *PolicyData) EnsureRBACPolicy() genericapiserver.PostStartHookFunc { // starts, the roles don't initialize, and nothing works. err := wait.Poll(1*time.Second, 30*time.Second, func() (done bool, err error) { client, err := clientset.NewForConfig(hookContext.LoopbackClientConfig) + + klog.Infof("DEBUG: loopback context: %#v", hookContext.LoopbackClientConfig) + if err != nil { utilruntime.HandleError(fmt.Errorf("unable to initialize client set: %v", err)) return false, nil diff --git a/staging/src/k8s.io/api/core/v1/register_generic_control_plane.go b/staging/src/k8s.io/api/core/v1/register_generic_control_plane.go index 1aac0cb41e0de..9ff4f07be7aa4 100644 --- a/staging/src/k8s.io/api/core/v1/register_generic_control_plane.go +++ b/staging/src/k8s.io/api/core/v1/register_generic_control_plane.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2020 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. @@ -22,44 +22,26 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -// GroupName is the group name use in this package -const GroupName = "" +var ( + // GenericControlPlaneGroupName is the name of the group when installed in the generic control plane + GenericControlPlaneGroupName = "core" -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + // GenericControlPlaneSchemeGroupVersion is group version used to register these objects + GenericControlPlaneSchemeGroupVersion = schema.GroupVersion{Group: GenericControlPlaneGroupName, Version: "v1"} -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} + // GenericControlPlaneSchemeBuilder object to register various known types for the control plane + GenericControlPlaneSchemeBuilder = runtime.NewSchemeBuilder(addGenericControlPlaneKnownTypes) -var ( - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme + // AddToGenericControlPlaneScheme represents a func that can be used to apply all the registered + // funcs in a scheme + AddToGenericControlPlaneScheme = GenericControlPlaneSchemeBuilder.AddToScheme ) -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { +func addGenericControlPlaneKnownTypes(scheme *runtime.Scheme) error { + if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil { + return err + } scheme.AddKnownTypes(SchemeGroupVersion, - &Pod{}, - &PodList{}, - &PodStatusResult{}, - &PodTemplate{}, - &PodTemplateList{}, - &ReplicationController{}, - &ReplicationControllerList{}, - &Service{}, - &ServiceProxyOptions{}, - &ServiceList{}, - &Endpoints{}, - &EndpointsList{}, - &Node{}, - &NodeList{}, - &NodeProxyOptions{}, - &Binding{}, &Event{}, &EventList{}, &List{}, @@ -69,31 +51,15 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ResourceQuotaList{}, &Namespace{}, &NamespaceList{}, - &Secret{}, - &SecretList{}, &ServiceAccount{}, &ServiceAccountList{}, - &PersistentVolume{}, - &PersistentVolumeList{}, - &PersistentVolumeClaim{}, - &PersistentVolumeClaimList{}, - &PodAttachOptions{}, - &PodLogOptions{}, - &PodExecOptions{}, - &PodPortForwardOptions{}, - &PodProxyOptions{}, - &ComponentStatus{}, - &ComponentStatusList{}, + &Secret{}, + &SecretList{}, &SerializedReference{}, &RangeAllocation{}, &ConfigMap{}, &ConfigMapList{}, ) - // Add common types - scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{}) - - // Add the watch version that applies - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } From 6acbf4e3560c5db0f685a9dd828afa59820dc257 Mon Sep 17 00:00:00 2001 From: David Festal Date: Thu, 5 Aug 2021 18:56:59 +0200 Subject: [PATCH 08/87] DUPLICATE: Prepare changes on storage factory The following existing k8S file is duplicated to prepare the change: pkg/kubeapiserver/default_storage_factory_builder.go -> pkg/kubeapiserver/legacy_storage_factory_builder.go --- .../legacy_storage_factory_builder.go | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 pkg/kubeapiserver/legacy_storage_factory_builder.go diff --git a/pkg/kubeapiserver/legacy_storage_factory_builder.go b/pkg/kubeapiserver/legacy_storage_factory_builder.go new file mode 100644 index 0000000000000..31479d7764617 --- /dev/null +++ b/pkg/kubeapiserver/legacy_storage_factory_builder.go @@ -0,0 +1,144 @@ +/* +Copyright 2016 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 kubeapiserver + +import ( + "strings" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + serveroptions "k8s.io/apiserver/pkg/server/options" + "k8s.io/apiserver/pkg/server/options/encryptionconfig" + "k8s.io/apiserver/pkg/server/resourceconfig" + serverstorage "k8s.io/apiserver/pkg/server/storage" + "k8s.io/apiserver/pkg/storage/storagebackend" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/apis/apps" + api "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/kubernetes/pkg/apis/events" + "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/apis/networking" + "k8s.io/kubernetes/pkg/apis/policy" + apisstorage "k8s.io/kubernetes/pkg/apis/storage" +) + +// SpecialDefaultResourcePrefixes are prefixes compiled into Kubernetes. +var SpecialDefaultResourcePrefixes = map[schema.GroupResource]string{ + {Group: "", Resource: "replicationcontrollers"}: "controllers", + {Group: "", Resource: "endpoints"}: "services/endpoints", + {Group: "", Resource: "nodes"}: "minions", + {Group: "", Resource: "services"}: "services/specs", + {Group: "extensions", Resource: "ingresses"}: "ingress", + {Group: "networking.k8s.io", Resource: "ingresses"}: "ingress", + {Group: "extensions", Resource: "podsecuritypolicies"}: "podsecuritypolicy", + {Group: "policy", Resource: "podsecuritypolicies"}: "podsecuritypolicy", +} + +// DefaultWatchCacheSizes defines default resources for which watchcache +// should be disabled. +func DefaultWatchCacheSizes() map[schema.GroupResource]int { + return map[schema.GroupResource]int{ + {Resource: "events"}: 0, + {Group: "events.k8s.io", Resource: "events"}: 0, + } +} + +// NewStorageFactoryConfig returns a new StorageFactoryConfig set up with necessary resource overrides. +func NewStorageFactoryConfig() *StorageFactoryConfig { + + resources := []schema.GroupVersionResource{ + apisstorage.Resource("csistoragecapacities").WithVersion("v1beta1"), + } + + return &StorageFactoryConfig{ + Serializer: legacyscheme.Codecs, + DefaultResourceEncoding: serverstorage.NewDefaultResourceEncodingConfig(legacyscheme.Scheme), + ResourceEncodingOverrides: resources, + } +} + +// StorageFactoryConfig is a configuration for creating storage factory. +type StorageFactoryConfig struct { + StorageConfig storagebackend.Config + APIResourceConfig *serverstorage.ResourceConfig + DefaultResourceEncoding *serverstorage.DefaultResourceEncodingConfig + DefaultStorageMediaType string + Serializer runtime.StorageSerializer + ResourceEncodingOverrides []schema.GroupVersionResource + EtcdServersOverrides []string + EncryptionProviderConfigFilepath string +} + +// Complete completes the StorageFactoryConfig with provided etcdOptions returning completedStorageFactoryConfig. +func (c *StorageFactoryConfig) Complete(etcdOptions *serveroptions.EtcdOptions) (*completedStorageFactoryConfig, error) { + c.StorageConfig = etcdOptions.StorageConfig + c.DefaultStorageMediaType = etcdOptions.DefaultStorageMediaType + c.EtcdServersOverrides = etcdOptions.EtcdServersOverrides + c.EncryptionProviderConfigFilepath = etcdOptions.EncryptionProviderConfigFilepath + return &completedStorageFactoryConfig{c}, nil +} + +// completedStorageFactoryConfig is a wrapper around StorageFactoryConfig completed with etcd options. +// +// Note: this struct is intentionally unexported so that it can only be constructed via a StorageFactoryConfig.Complete +// call. The implied consequence is that this does not comply with golint. +type completedStorageFactoryConfig struct { + *StorageFactoryConfig +} + +// New returns a new storage factory created from the completed storage factory configuration. +func (c *completedStorageFactoryConfig) New() (*serverstorage.DefaultStorageFactory, error) { + resourceEncodingConfig := resourceconfig.MergeResourceEncodingConfigs(c.DefaultResourceEncoding, c.ResourceEncodingOverrides) + storageFactory := serverstorage.NewDefaultStorageFactory( + c.StorageConfig, + c.DefaultStorageMediaType, + c.Serializer, + resourceEncodingConfig, + c.APIResourceConfig, + SpecialDefaultResourcePrefixes) + + storageFactory.AddCohabitatingResources(networking.Resource("networkpolicies"), extensions.Resource("networkpolicies")) + storageFactory.AddCohabitatingResources(apps.Resource("deployments"), extensions.Resource("deployments")) + storageFactory.AddCohabitatingResources(apps.Resource("daemonsets"), extensions.Resource("daemonsets")) + storageFactory.AddCohabitatingResources(apps.Resource("replicasets"), extensions.Resource("replicasets")) + storageFactory.AddCohabitatingResources(api.Resource("events"), events.Resource("events")) + storageFactory.AddCohabitatingResources(api.Resource("replicationcontrollers"), extensions.Resource("replicationcontrollers")) // to make scale subresources equivalent + storageFactory.AddCohabitatingResources(policy.Resource("podsecuritypolicies"), extensions.Resource("podsecuritypolicies")) + storageFactory.AddCohabitatingResources(networking.Resource("ingresses"), extensions.Resource("ingresses")) + + for _, override := range c.EtcdServersOverrides { + tokens := strings.Split(override, "#") + apiresource := strings.Split(tokens[0], "/") + + group := apiresource[0] + resource := apiresource[1] + groupResource := schema.GroupResource{Group: group, Resource: resource} + + servers := strings.Split(tokens[1], ";") + storageFactory.SetEtcdLocation(groupResource, servers) + } + if len(c.EncryptionProviderConfigFilepath) != 0 { + transformerOverrides, err := encryptionconfig.GetTransformerOverrides(c.EncryptionProviderConfigFilepath) + if err != nil { + return nil, err + } + for groupResource, transformer := range transformerOverrides { + storageFactory.SetTransformer(groupResource, transformer) + } + } + return storageFactory, nil +} From f46394bd0d94bf656a6b3eb9bf2be1ada9b460e7 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Mon, 23 Nov 2020 14:25:47 -0500 Subject: [PATCH 09/87] NEW: Allow the storage factory to have no opinions about resource storage A number of hardcoded assumptions exist in the standard resource factory that are specific to versions in use. Instead, create a separate factory without these assumptions. In the future this might instead be a way for injecting a different form of placement logic (identify resources with a unique lineage and map them to a single key that can have multiple readers. --- cmd/kube-apiserver/app/server.go | 2 +- pkg/genericcontrolplane/options/options.go | 3 ++ pkg/genericcontrolplane/server.go | 5 +- .../default_storage_factory_builder.go | 53 ++----------------- .../legacy_storage_factory_builder.go | 38 ++----------- pkg/registry/rbac/rest/storage_rbac.go | 3 -- .../apiserver/pkg/server/options/etcd.go | 6 ++- .../pkg/server/storage/storage_factory.go | 16 +++++- 8 files changed, 37 insertions(+), 89 deletions(-) diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index 411567a41759e..161451fef947e 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -409,7 +409,7 @@ func buildGenericConfig( kubeVersion := version.Get() genericConfig.Version = &kubeVersion - storageFactoryConfig := kubeapiserver.NewStorageFactoryConfig() + storageFactoryConfig := kubeapiserver.NewStorageFactoryConfig(legacyscheme.Scheme, legacyscheme.Codecs) storageFactoryConfig.APIResourceConfig = genericConfig.MergedResourceConfig completedStorageFactoryConfig, err := storageFactoryConfig.Complete(s.Etcd) if err != nil { diff --git a/pkg/genericcontrolplane/options/options.go b/pkg/genericcontrolplane/options/options.go index 1e9ffbeee7d18..e4ed8390783fd 100644 --- a/pkg/genericcontrolplane/options/options.go +++ b/pkg/genericcontrolplane/options/options.go @@ -91,6 +91,9 @@ func NewServerRunOptions() *ServerRunOptions { IdentityLeaseRenewIntervalSeconds: 10, } + // disable the watch cache + s.Etcd.EnableWatchCache = false + // TODO: turn off the admission webhooks for now s.Admission.DefaultOffPlugins.Insert(validating.PluginName, mutating.PluginName) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 158e8415a8ee8..07d3d02f81975 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -20,8 +20,11 @@ limitations under the License. package genericcontrolplane import ( + "context" "fmt" + "net/http" "os" + "regexp" "strings" "time" @@ -247,7 +250,7 @@ func BuildGenericConfig( kubeVersion := version.Get() genericConfig.Version = &kubeVersion - storageFactoryConfig := kubeapiserver.NewStorageFactoryConfig() + storageFactoryConfig := kubeapiserver.NewStorageFactoryConfig(controlplanescheme.Scheme, controlplanescheme.Codecs) storageFactoryConfig.APIResourceConfig = genericConfig.MergedResourceConfig completedStorageFactoryConfig, err := storageFactoryConfig.Complete(s.Etcd) if err != nil { diff --git a/pkg/kubeapiserver/default_storage_factory_builder.go b/pkg/kubeapiserver/default_storage_factory_builder.go index 31479d7764617..173d2c1a4cb00 100644 --- a/pkg/kubeapiserver/default_storage_factory_builder.go +++ b/pkg/kubeapiserver/default_storage_factory_builder.go @@ -21,53 +21,19 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" serveroptions "k8s.io/apiserver/pkg/server/options" "k8s.io/apiserver/pkg/server/options/encryptionconfig" "k8s.io/apiserver/pkg/server/resourceconfig" serverstorage "k8s.io/apiserver/pkg/server/storage" "k8s.io/apiserver/pkg/storage/storagebackend" - "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/kubernetes/pkg/apis/apps" - api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/apis/events" - "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/apis/networking" - "k8s.io/kubernetes/pkg/apis/policy" - apisstorage "k8s.io/kubernetes/pkg/apis/storage" ) -// SpecialDefaultResourcePrefixes are prefixes compiled into Kubernetes. -var SpecialDefaultResourcePrefixes = map[schema.GroupResource]string{ - {Group: "", Resource: "replicationcontrollers"}: "controllers", - {Group: "", Resource: "endpoints"}: "services/endpoints", - {Group: "", Resource: "nodes"}: "minions", - {Group: "", Resource: "services"}: "services/specs", - {Group: "extensions", Resource: "ingresses"}: "ingress", - {Group: "networking.k8s.io", Resource: "ingresses"}: "ingress", - {Group: "extensions", Resource: "podsecuritypolicies"}: "podsecuritypolicy", - {Group: "policy", Resource: "podsecuritypolicies"}: "podsecuritypolicy", -} - -// DefaultWatchCacheSizes defines default resources for which watchcache -// should be disabled. -func DefaultWatchCacheSizes() map[schema.GroupResource]int { - return map[schema.GroupResource]int{ - {Resource: "events"}: 0, - {Group: "events.k8s.io", Resource: "events"}: 0, - } -} - // NewStorageFactoryConfig returns a new StorageFactoryConfig set up with necessary resource overrides. -func NewStorageFactoryConfig() *StorageFactoryConfig { - - resources := []schema.GroupVersionResource{ - apisstorage.Resource("csistoragecapacities").WithVersion("v1beta1"), - } - +func NewStorageFactoryConfig(scheme *runtime.Scheme, codecs serializer.CodecFactory) *StorageFactoryConfig { return &StorageFactoryConfig{ - Serializer: legacyscheme.Codecs, - DefaultResourceEncoding: serverstorage.NewDefaultResourceEncodingConfig(legacyscheme.Scheme), - ResourceEncodingOverrides: resources, + Serializer: codecs, + DefaultResourceEncoding: serverstorage.NewDefaultResourceEncodingConfig(scheme), } } @@ -109,16 +75,7 @@ func (c *completedStorageFactoryConfig) New() (*serverstorage.DefaultStorageFact c.Serializer, resourceEncodingConfig, c.APIResourceConfig, - SpecialDefaultResourcePrefixes) - - storageFactory.AddCohabitatingResources(networking.Resource("networkpolicies"), extensions.Resource("networkpolicies")) - storageFactory.AddCohabitatingResources(apps.Resource("deployments"), extensions.Resource("deployments")) - storageFactory.AddCohabitatingResources(apps.Resource("daemonsets"), extensions.Resource("daemonsets")) - storageFactory.AddCohabitatingResources(apps.Resource("replicasets"), extensions.Resource("replicasets")) - storageFactory.AddCohabitatingResources(api.Resource("events"), events.Resource("events")) - storageFactory.AddCohabitatingResources(api.Resource("replicationcontrollers"), extensions.Resource("replicationcontrollers")) // to make scale subresources equivalent - storageFactory.AddCohabitatingResources(policy.Resource("podsecuritypolicies"), extensions.Resource("podsecuritypolicies")) - storageFactory.AddCohabitatingResources(networking.Resource("ingresses"), extensions.Resource("ingresses")) + nil) for _, override := range c.EtcdServersOverrides { tokens := strings.Split(override, "#") diff --git a/pkg/kubeapiserver/legacy_storage_factory_builder.go b/pkg/kubeapiserver/legacy_storage_factory_builder.go index 31479d7764617..d66a778149b76 100644 --- a/pkg/kubeapiserver/legacy_storage_factory_builder.go +++ b/pkg/kubeapiserver/legacy_storage_factory_builder.go @@ -19,13 +19,10 @@ package kubeapiserver import ( "strings" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - serveroptions "k8s.io/apiserver/pkg/server/options" "k8s.io/apiserver/pkg/server/options/encryptionconfig" "k8s.io/apiserver/pkg/server/resourceconfig" serverstorage "k8s.io/apiserver/pkg/server/storage" - "k8s.io/apiserver/pkg/storage/storagebackend" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/apps" api "k8s.io/kubernetes/pkg/apis/core" @@ -58,7 +55,7 @@ func DefaultWatchCacheSizes() map[schema.GroupResource]int { } // NewStorageFactoryConfig returns a new StorageFactoryConfig set up with necessary resource overrides. -func NewStorageFactoryConfig() *StorageFactoryConfig { +func LegacyStorageFactoryConfig() *StorageFactoryConfig { resources := []schema.GroupVersionResource{ apisstorage.Resource("csistoragecapacities").WithVersion("v1beta1"), @@ -71,37 +68,8 @@ func NewStorageFactoryConfig() *StorageFactoryConfig { } } -// StorageFactoryConfig is a configuration for creating storage factory. -type StorageFactoryConfig struct { - StorageConfig storagebackend.Config - APIResourceConfig *serverstorage.ResourceConfig - DefaultResourceEncoding *serverstorage.DefaultResourceEncodingConfig - DefaultStorageMediaType string - Serializer runtime.StorageSerializer - ResourceEncodingOverrides []schema.GroupVersionResource - EtcdServersOverrides []string - EncryptionProviderConfigFilepath string -} - -// Complete completes the StorageFactoryConfig with provided etcdOptions returning completedStorageFactoryConfig. -func (c *StorageFactoryConfig) Complete(etcdOptions *serveroptions.EtcdOptions) (*completedStorageFactoryConfig, error) { - c.StorageConfig = etcdOptions.StorageConfig - c.DefaultStorageMediaType = etcdOptions.DefaultStorageMediaType - c.EtcdServersOverrides = etcdOptions.EtcdServersOverrides - c.EncryptionProviderConfigFilepath = etcdOptions.EncryptionProviderConfigFilepath - return &completedStorageFactoryConfig{c}, nil -} - -// completedStorageFactoryConfig is a wrapper around StorageFactoryConfig completed with etcd options. -// -// Note: this struct is intentionally unexported so that it can only be constructed via a StorageFactoryConfig.Complete -// call. The implied consequence is that this does not comply with golint. -type completedStorageFactoryConfig struct { - *StorageFactoryConfig -} - // New returns a new storage factory created from the completed storage factory configuration. -func (c *completedStorageFactoryConfig) New() (*serverstorage.DefaultStorageFactory, error) { +func (c *completedStorageFactoryConfig) Legacy() (*serverstorage.DefaultStorageFactory, error) { resourceEncodingConfig := resourceconfig.MergeResourceEncodingConfigs(c.DefaultResourceEncoding, c.ResourceEncodingOverrides) storageFactory := serverstorage.NewDefaultStorageFactory( c.StorageConfig, @@ -111,6 +79,8 @@ func (c *completedStorageFactoryConfig) New() (*serverstorage.DefaultStorageFact c.APIResourceConfig, SpecialDefaultResourcePrefixes) + storageFactory.UseResourceAsPrefixDefault = true + storageFactory.AddCohabitatingResources(networking.Resource("networkpolicies"), extensions.Resource("networkpolicies")) storageFactory.AddCohabitatingResources(apps.Resource("deployments"), extensions.Resource("deployments")) storageFactory.AddCohabitatingResources(apps.Resource("daemonsets"), extensions.Resource("daemonsets")) diff --git a/pkg/registry/rbac/rest/storage_rbac.go b/pkg/registry/rbac/rest/storage_rbac.go index 3b41332691bcc..e73b332ba6af1 100644 --- a/pkg/registry/rbac/rest/storage_rbac.go +++ b/pkg/registry/rbac/rest/storage_rbac.go @@ -159,9 +159,6 @@ func (p *PolicyData) EnsureRBACPolicy() genericapiserver.PostStartHookFunc { // starts, the roles don't initialize, and nothing works. err := wait.Poll(1*time.Second, 30*time.Second, func() (done bool, err error) { client, err := clientset.NewForConfig(hookContext.LoopbackClientConfig) - - klog.Infof("DEBUG: loopback context: %#v", hookContext.LoopbackClientConfig) - if err != nil { utilruntime.HandleError(fmt.Errorf("unable to initialize client set: %v", err)) return false, nil diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/etcd.go b/staging/src/k8s.io/apiserver/pkg/server/options/etcd.go index dfadadbcadf08..71c17901d0acf 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/etcd.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/etcd.go @@ -254,12 +254,16 @@ type SimpleRestOptionsFactory struct { } func (f *SimpleRestOptionsFactory) GetRESTOptions(resource schema.GroupResource) (generic.RESTOptions, error) { + groupName := resource.Group + if groupName == "" { + groupName = "core" + } ret := generic.RESTOptions{ StorageConfig: f.Options.StorageConfig.ForResource(resource), Decorator: generic.UndecoratedStorage, EnableGarbageCollection: f.Options.EnableGarbageCollection, DeleteCollectionWorkers: f.Options.DeleteCollectionWorkers, - ResourcePrefix: resource.Group + "/" + resource.Resource, + ResourcePrefix: groupName + "/" + resource.Resource, CountMetricPollPeriod: f.Options.StorageConfig.CountMetricPollPeriod, StorageObjectCountTracker: f.Options.StorageConfig.StorageObjectCountTracker, } diff --git a/staging/src/k8s.io/apiserver/pkg/server/storage/storage_factory.go b/staging/src/k8s.io/apiserver/pkg/server/storage/storage_factory.go index 3b8c71de1fa69..7441d078fcf51 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/storage/storage_factory.go +++ b/staging/src/k8s.io/apiserver/pkg/server/storage/storage_factory.go @@ -71,6 +71,10 @@ type DefaultStorageFactory struct { DefaultResourcePrefixes map[schema.GroupResource]string + // UseResourceAsPrefixDefault applies the legacy behavior of defaulting prefix to the + // resource name if no group prefix is set. + UseResourceAsPrefixDefault bool + // DefaultMediaType is the media type used to store resources. If it is not set, "application/json" is used. DefaultMediaType string @@ -343,8 +347,18 @@ func (s *DefaultStorageFactory) ResourcePrefix(groupResource schema.GroupResourc etcdResourcePrefix = exactResourceOverride.etcdResourcePrefix } if len(etcdResourcePrefix) == 0 { - etcdResourcePrefix = strings.ToLower(chosenStorageResource.Resource) + if s.UseResourceAsPrefixDefault { + etcdResourcePrefix = strings.ToLower(chosenStorageResource.Resource) + } else { + groupName := chosenStorageResource.Group + if len(groupName) == 0 { + groupName = "core" + } + etcdResourcePrefix = groupName + "/" + chosenStorageResource.Resource + } } + klog.Infof("DEBUG: prefix for %s=%s", groupResource, etcdResourcePrefix) + return etcdResourcePrefix } From 970325af47706d6bccc5f35caa784aea156671da Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Mon, 23 Nov 2020 14:28:22 -0500 Subject: [PATCH 10/87] HACK: Inject an arbitrary key segment from "cluster" to etcd Allows multiple keyspaces to overlap. --- pkg/genericcontrolplane/server.go | 26 +++++++++++++++++- .../pkg/registry/generic/registry/store.go | 27 ++++++++++++++++++- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 07d3d02f81975..f61e336b19a6d 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -250,7 +250,7 @@ func BuildGenericConfig( kubeVersion := version.Get() genericConfig.Version = &kubeVersion - storageFactoryConfig := kubeapiserver.NewStorageFactoryConfig(controlplanescheme.Scheme, controlplanescheme.Codecs) + storageFactoryConfig := kubeapiserver.NewStorageFactoryConfig(genericcontrolplanescheme.Scheme, genericcontrolplanescheme.Codecs) storageFactoryConfig.APIResourceConfig = genericConfig.MergedResourceConfig completedStorageFactoryConfig, err := storageFactoryConfig.Complete(s.Etcd) if err != nil { @@ -298,10 +298,34 @@ func BuildGenericConfig( lastErr = fmt.Errorf("invalid authorization config: %v", err) return } + // if !sets.NewString(s.Authorization.Modes...).Has(modes.ModeRBAC) { // genericConfig.DisabledPostStartHooks.Insert(rbacrest.PostStartHookName) // } + var originalHandler = genericConfig.BuildHandlerChainFunc + var reClusterName = regexp.MustCompile(`^[a-z0-9][a-z0-9-]{0,78}[a-z0-9]$`) + genericConfig.BuildHandlerChainFunc = func(handler http.Handler, c *genericapiserver.Config) http.Handler { + return originalHandler(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + cluster := req.Header.Get("X-Kubernetes-Cluster") + if len(cluster) == 0 { + cluster = "default" + } + if !reClusterName.MatchString(cluster) { + http.Error(w, "Unknown cluster", http.StatusNotFound) + return + } + klog.V(5).Infof("DEBUG: running with cluster %s", cluster) + ctx := context.WithValue(req.Context(), "cluster", cluster) + handler.ServeHTTP(w, req.WithContext(ctx)) + }), c) + } + + // admissionConfig := &controlplaneadmission.Config{ + // ExternalInformers: versionedInformers, + // LoopbackClientConfig: genericConfig.LoopbackClientConfig, + // } + // lastErr = s.Audit.ApplyTo(genericConfig) // if lastErr != nil { // return diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go index 4397f631e8833..8e66a39faac95 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go @@ -231,10 +231,26 @@ const ( resourceCountPollPeriodJitter = 1.2 ) +func clusterFrom(ctx context.Context) string { + v := ctx.Value("cluster") + cluster, ok := v.(string) + if !ok { + return "" + } + if len(cluster) == 0 { + return "default" + } + return cluster +} + // NamespaceKeyRootFunc is the default function for constructing storage paths // to resource directories enforcing namespace rules. func NamespaceKeyRootFunc(ctx context.Context, prefix string) string { key := prefix + cluster := clusterFrom(ctx) + if len(cluster) > 0 { + key = key + "/" + cluster + } ns, ok := genericapirequest.NamespaceFrom(ctx) if ok && len(ns) > 0 { key = key + "/" + ns @@ -264,13 +280,18 @@ func NamespaceKeyFunc(ctx context.Context, prefix string, name string) (string, // NoNamespaceKeyFunc is the default function for constructing storage paths // to a resource relative to the given prefix without a namespace. func NoNamespaceKeyFunc(ctx context.Context, prefix string, name string) (string, error) { + key := prefix + cluster := clusterFrom(ctx) + if len(cluster) > 0 { + key = key + "/" + cluster + } if len(name) == 0 { return "", apierrors.NewBadRequest("Name parameter required.") } if msgs := path.IsValidPathSegmentName(name); len(msgs) != 0 { return "", apierrors.NewBadRequest(fmt.Sprintf("Name parameter invalid: %q: %s", name, strings.Join(msgs, ";"))) } - key := prefix + "/" + name + key = key + "/" + name return key, nil } @@ -710,6 +731,7 @@ func (e *Store) Get(ctx context.Context, name string, options *metav1.GetOptions if err != nil { return nil, err } + klog.Infof("DEBUG: GET key func returned: %s", key) if err := e.Storage.Get(ctx, key, storage.GetOptions{ResourceVersion: options.ResourceVersion}, obj); err != nil { return nil, storeerr.InterpretGetError(err, e.qualifiedResourceFromContext(ctx), name) } @@ -1300,6 +1322,9 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error { if (e.KeyRootFunc == nil) != (e.KeyFunc == nil) { return fmt.Errorf("store for %s must set both KeyRootFunc and KeyFunc or neither", e.DefaultQualifiedResource.String()) } + if e.KeyFunc != nil || e.KeyFunc != nil { + return fmt.Errorf("DEBUG: keyfunc must be non-nil for all resources", e.DefaultQualifiedResource.String()) + } if e.TableConvertor == nil { return fmt.Errorf("store for %s must set TableConvertor; rest.NewDefaultTableConvertor(e.DefaultQualifiedResource) can be used to output just name/creation time", e.DefaultQualifiedResource.String()) From b72964ffa0bced1936f538236fba2a47d40d0ded Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Fri, 18 Dec 2020 20:21:18 -0500 Subject: [PATCH 11/87] HACK: Move cluster context into a spot where we can change etcd keys --- pkg/genericcontrolplane/server.go | 38 +++++++++++--- .../pkg/endpoints/request/context_cluster.go | 50 +++++++++++++++++++ .../pkg/registry/generic/registry/store.go | 44 +++++++--------- .../pkg/server/storage/storage_factory.go | 2 +- 4 files changed, 100 insertions(+), 34 deletions(-) create mode 100644 staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index f61e336b19a6d..93db12c5f7b36 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -20,7 +20,6 @@ limitations under the License. package genericcontrolplane import ( - "context" "fmt" "net/http" "os" @@ -35,6 +34,7 @@ import ( "k8s.io/apiserver/pkg/authorization/union" openapinamer "k8s.io/apiserver/pkg/endpoints/openapi" genericfeatures "k8s.io/apiserver/pkg/features" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" genericapiserver "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/filters" serverstorage "k8s.io/apiserver/pkg/server/storage" @@ -306,19 +306,41 @@ func BuildGenericConfig( var originalHandler = genericConfig.BuildHandlerChainFunc var reClusterName = regexp.MustCompile(`^[a-z0-9][a-z0-9-]{0,78}[a-z0-9]$`) genericConfig.BuildHandlerChainFunc = func(handler http.Handler, c *genericapiserver.Config) http.Handler { - return originalHandler(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - cluster := req.Header.Get("X-Kubernetes-Cluster") + h := originalHandler(handler, c) + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + var cluster string + if path := req.URL.Path; strings.HasPrefix(path, "/clusters/") { + path = strings.TrimPrefix(path, "/clusters/") + i := strings.Index(path, "/") + if i == -1 { + http.Error(w, "Unknown cluster", http.StatusNotFound) + return + } + cluster, path = path[:i], path[i:] + req.URL.Path = path + for i := 0; i < 2 && len(req.URL.RawPath) > 1; i++ { + slash := strings.Index(req.URL.RawPath[1:], "/") + if slash == -1 { + http.Error(w, "Unknown cluster", http.StatusNotFound) + return + } + klog.Infof("DEBUG: %s -> %s", req.URL.RawPath, req.URL.RawPath[slash:]) + req.URL.RawPath = req.URL.RawPath[slash:] + } + } else { + cluster = req.Header.Get("X-Kubernetes-Cluster") + } if len(cluster) == 0 { - cluster = "default" + cluster = "admin" } if !reClusterName.MatchString(cluster) { http.Error(w, "Unknown cluster", http.StatusNotFound) return } - klog.V(5).Infof("DEBUG: running with cluster %s", cluster) - ctx := context.WithValue(req.Context(), "cluster", cluster) - handler.ServeHTTP(w, req.WithContext(ctx)) - }), c) + //klog.V(0).Infof("DEBUG: running with cluster %s", cluster) + ctx := genericapirequest.WithCluster(req.Context(), genericapirequest.Cluster{Name: cluster}) + h.ServeHTTP(w, req.WithContext(ctx)) + }) } // admissionConfig := &controlplaneadmission.Config{ diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go b/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go new file mode 100644 index 0000000000000..8dbe4a453c2ff --- /dev/null +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go @@ -0,0 +1,50 @@ +/* +Copyright 2014 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 request + +import ( + "context" +) + +type clusterKey int + +const ( + // clusterKey is the context key for the request namespace. + clusterContextKey clusterKey = iota +) + +type Cluster struct { + // Name is the name of the cluster. + Name string + // Parents defines the parent clusters that apply to this request. + Parents []string +} + +// WithCluster returns a context that describes the nested cluster context +func WithCluster(parent context.Context, cluster Cluster) context.Context { + return context.WithValue(parent, clusterContextKey, cluster) +} + +// ClusterFrom returns the value of the cluster key on the ctx, or nil if there +// is no cluster key. +func ClusterFrom(ctx context.Context) *Cluster { + cluster, ok := ctx.Value(clusterContextKey).(Cluster) + if !ok { + return nil + } + return &cluster +} diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go index 8e66a39faac95..336b272f42045 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go @@ -231,26 +231,20 @@ const ( resourceCountPollPeriodJitter = 1.2 ) -func clusterFrom(ctx context.Context) string { - v := ctx.Value("cluster") - cluster, ok := v.(string) - if !ok { - return "" - } - if len(cluster) == 0 { - return "default" +// NoNamespaceKeyRootFunc is the default function for constructing storage paths +// to resource directories enforcing namespace rules. +func NoNamespaceKeyRootFunc(ctx context.Context, prefix string) string { + key := prefix + if cluster := genericapirequest.ClusterFrom(ctx); cluster != nil { + key = key + "/" + cluster.Name } - return cluster + return key } // NamespaceKeyRootFunc is the default function for constructing storage paths // to resource directories enforcing namespace rules. func NamespaceKeyRootFunc(ctx context.Context, prefix string) string { - key := prefix - cluster := clusterFrom(ctx) - if len(cluster) > 0 { - key = key + "/" + cluster - } + key := NoNamespaceKeyRootFunc(ctx, prefix) ns, ok := genericapirequest.NamespaceFrom(ctx) if ok && len(ns) > 0 { key = key + "/" + ns @@ -262,7 +256,6 @@ func NamespaceKeyRootFunc(ctx context.Context, prefix string) string { // a resource relative to the given prefix enforcing namespace rules. If the // context does not contain a namespace, it errors. func NamespaceKeyFunc(ctx context.Context, prefix string, name string) (string, error) { - key := NamespaceKeyRootFunc(ctx, prefix) ns, ok := genericapirequest.NamespaceFrom(ctx) if !ok || len(ns) == 0 { return "", apierrors.NewBadRequest("Namespace parameter required.") @@ -273,26 +266,19 @@ func NamespaceKeyFunc(ctx context.Context, prefix string, name string) (string, if msgs := path.IsValidPathSegmentName(name); len(msgs) != 0 { return "", apierrors.NewBadRequest(fmt.Sprintf("Name parameter invalid: %q: %s", name, strings.Join(msgs, ";"))) } - key = key + "/" + name - return key, nil + return NoNamespaceKeyRootFunc(ctx, prefix) + "/" + ns + "/" + name, nil } // NoNamespaceKeyFunc is the default function for constructing storage paths // to a resource relative to the given prefix without a namespace. func NoNamespaceKeyFunc(ctx context.Context, prefix string, name string) (string, error) { - key := prefix - cluster := clusterFrom(ctx) - if len(cluster) > 0 { - key = key + "/" + cluster - } if len(name) == 0 { return "", apierrors.NewBadRequest("Name parameter required.") } if msgs := path.IsValidPathSegmentName(name); len(msgs) != 0 { return "", apierrors.NewBadRequest(fmt.Sprintf("Name parameter invalid: %q: %s", name, strings.Join(msgs, ";"))) } - key = key + "/" + name - return key, nil + return NoNamespaceKeyRootFunc(ctx, prefix) + "/" + name, nil } // New implements RESTStorage.New. @@ -1015,6 +1001,7 @@ func (e *Store) Delete(ctx context.Context, name string, deleteValidation rest.V if err != nil { return nil, false, err } + klog.Infof("DEBUG: DELETE key func returned: %s", key) obj := e.NewFunc() qualifiedResource := e.qualifiedResourceFromContext(ctx) if err = e.Storage.Get(ctx, key, storage.GetOptions{}, obj); err != nil { @@ -1385,6 +1372,13 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error { return fmt.Errorf("store for %s has an invalid prefix %q", e.DefaultQualifiedResource.String(), opts.ResourcePrefix) } + if e.KeyFunc != nil { + panic(fmt.Sprintf("KeyFunc is illegal for %v: %T", e.DefaultQualifiedResource, e.KeyFunc)) + } + if e.KeyRootFunc != nil { + panic(fmt.Sprintf("KeyRootFunc is illegal for %v: %T", e.DefaultQualifiedResource, e.KeyRootFunc)) + } + // Set the default behavior for storage key generation if e.KeyRootFunc == nil && e.KeyFunc == nil { if isNamespaced { @@ -1396,7 +1390,7 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error { } } else { e.KeyRootFunc = func(ctx context.Context) string { - return prefix + return NoNamespaceKeyRootFunc(ctx, prefix) } e.KeyFunc = func(ctx context.Context, name string) (string, error) { return NoNamespaceKeyFunc(ctx, prefix, name) diff --git a/staging/src/k8s.io/apiserver/pkg/server/storage/storage_factory.go b/staging/src/k8s.io/apiserver/pkg/server/storage/storage_factory.go index 7441d078fcf51..282adcf8ae345 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/storage/storage_factory.go +++ b/staging/src/k8s.io/apiserver/pkg/server/storage/storage_factory.go @@ -358,7 +358,7 @@ func (s *DefaultStorageFactory) ResourcePrefix(groupResource schema.GroupResourc } } - klog.Infof("DEBUG: prefix for %s=%s", groupResource, etcdResourcePrefix) + klog.V(6).Infof("DEBUG: prefix for %s=%s", groupResource, etcdResourcePrefix) return etcdResourcePrefix } From 89bd94f71de0989c00fb6c5bad96c1e5648ec894 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 12 Jan 2021 15:18:03 -0500 Subject: [PATCH 12/87] HACK: Allow wildcard watch across clusters --- pkg/genericcontrolplane/server.go | 28 +++++++++----- .../pkg/endpoints/request/context_cluster.go | 4 ++ .../pkg/registry/generic/registry/store.go | 2 +- .../apiserver/pkg/storage/etcd3/store.go | 7 +++- .../apiserver/pkg/storage/etcd3/watcher.go | 38 +++++++++++++++++-- 5 files changed, 64 insertions(+), 15 deletions(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 93db12c5f7b36..c2c4dd0e53448 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -308,7 +308,7 @@ func BuildGenericConfig( genericConfig.BuildHandlerChainFunc = func(handler http.Handler, c *genericapiserver.Config) http.Handler { h := originalHandler(handler, c) return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - var cluster string + var clusterName string if path := req.URL.Path; strings.HasPrefix(path, "/clusters/") { path = strings.TrimPrefix(path, "/clusters/") i := strings.Index(path, "/") @@ -316,7 +316,7 @@ func BuildGenericConfig( http.Error(w, "Unknown cluster", http.StatusNotFound) return } - cluster, path = path[:i], path[i:] + clusterName, path = path[:i], path[i:] req.URL.Path = path for i := 0; i < 2 && len(req.URL.RawPath) > 1; i++ { slash := strings.Index(req.URL.RawPath[1:], "/") @@ -328,17 +328,25 @@ func BuildGenericConfig( req.URL.RawPath = req.URL.RawPath[slash:] } } else { - cluster = req.Header.Get("X-Kubernetes-Cluster") + clusterName = req.Header.Get("X-Kubernetes-Cluster") } - if len(cluster) == 0 { - cluster = "admin" - } - if !reClusterName.MatchString(cluster) { - http.Error(w, "Unknown cluster", http.StatusNotFound) - return + var cluster genericapirequest.Cluster + switch clusterName { + case "*": + // HACK: just a workaround for testing + cluster.Wildcard = true + fallthrough + case "": + cluster.Name = "admin" + default: + if !reClusterName.MatchString(clusterName) { + http.Error(w, "Unknown cluster", http.StatusNotFound) + return + } + cluster.Name = clusterName } //klog.V(0).Infof("DEBUG: running with cluster %s", cluster) - ctx := genericapirequest.WithCluster(req.Context(), genericapirequest.Cluster{Name: cluster}) + ctx := genericapirequest.WithCluster(req.Context(), cluster) h.ServeHTTP(w, req.WithContext(ctx)) }) } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go b/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go index 8dbe4a453c2ff..9a063f1e7a9ff 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go @@ -32,6 +32,10 @@ type Cluster struct { Name string // Parents defines the parent clusters that apply to this request. Parents []string + + // HACK: only for testing wildcard semantics + // If true the query applies to all clusters + Wildcard bool } // WithCluster returns a context that describes the nested cluster context diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go index 336b272f42045..cdfb9cdd46be7 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go @@ -235,7 +235,7 @@ const ( // to resource directories enforcing namespace rules. func NoNamespaceKeyRootFunc(ctx context.Context, prefix string) string { key := prefix - if cluster := genericapirequest.ClusterFrom(ctx); cluster != nil { + if cluster := genericapirequest.ClusterFrom(ctx); cluster != nil && !cluster.Wildcard { key = key + "/" + cluster.Name } return key diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go index 37d411c774fe9..c682e19250907 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -39,6 +39,7 @@ import ( "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/etcd3/metrics" @@ -876,7 +877,11 @@ func (s *store) watch(ctx context.Context, key string, opts storage.ListOptions, return nil, err } key = path.Join(s.pathPrefix, key) - return s.watcher.Watch(ctx, key, int64(rev), recursive, opts.ProgressNotify, opts.Predicate) + // HACK: would need to be an argument to storage (or a change to how decoding works for key structure) + cluster := genericapirequest.ClusterFrom(ctx) + extractClusterSegmentFromKey := cluster != nil && cluster.Wildcard + klog.Infof("DEBUG: key=%s willExtractCluster=%t", key, extractClusterSegmentFromKey) + return s.watcher.Watch(ctx, key, int64(rev), recursive, extractClusterSegmentFromKey, opts.ProgressNotify, opts.Predicate) } func (s *store) getState(getResp *clientv3.GetResponse, key string, v reflect.Value, ignoreNotFound bool) (*objState, error) { diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go index d37991a052373..a87397e97a233 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go @@ -36,6 +36,7 @@ import ( clientv3 "go.etcd.io/etcd/client/v3" "k8s.io/klog/v2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) const ( @@ -90,6 +91,9 @@ type watchChan struct { incomingEventChan chan *event resultChan chan watch.Event errChan chan error + + // HACK: testing watch across multiple prefixes + extractCluster bool } func newWatcher(client *clientv3.Client, codec runtime.Codec, newFunc func() runtime.Object, versioner storage.Versioner, transformer value.Transformer) *watcher { @@ -115,11 +119,11 @@ func newWatcher(client *clientv3.Client, codec runtime.Codec, newFunc func() run // If recursive is false, it watches on given key. // If recursive is true, it watches any children and directories under the key, excluding the root key itself. // pred must be non-nil. Only if pred matches the change, it will be returned. -func (w *watcher) Watch(ctx context.Context, key string, rev int64, recursive, progressNotify bool, pred storage.SelectionPredicate) (watch.Interface, error) { +func (w *watcher) Watch(ctx context.Context, key string, rev int64, recursive, clusterAsFirstSegment bool, progressNotify bool, pred storage.SelectionPredicate) (watch.Interface, error) { if recursive && !strings.HasSuffix(key, "/") { key += "/" } - wc := w.createWatchChan(ctx, key, rev, recursive, progressNotify, pred) + wc := w.createWatchChan(ctx, key, rev, recursive, clusterAsFirstSegment, progressNotify, pred) go wc.run() // For etcd watch we don't have an easy way to answer whether the watch @@ -132,7 +136,7 @@ func (w *watcher) Watch(ctx context.Context, key string, rev int64, recursive, p return wc, nil } -func (w *watcher) createWatchChan(ctx context.Context, key string, rev int64, recursive, progressNotify bool, pred storage.SelectionPredicate) *watchChan { +func (w *watcher) createWatchChan(ctx context.Context, key string, rev int64, recursive, clusterAsFirstSegment, progressNotify bool, pred storage.SelectionPredicate) *watchChan { wc := &watchChan{ watcher: w, key: key, @@ -143,6 +147,9 @@ func (w *watcher) createWatchChan(ctx context.Context, key string, rev int64, re incomingEventChan: make(chan *event, incomingBufSize), resultChan: make(chan watch.Event, outgoingBufSize), errChan: make(chan error, 1), + + // HACK: assume structure of key is /... + extractCluster: clusterAsFirstSegment, } if pred.Empty() { // The filter doesn't filter out any object. @@ -434,6 +441,18 @@ func (wc *watchChan) prepareObjs(e *event) (curObj runtime.Object, oldObj runtim if err != nil { return nil, nil, err } + if wc.extractCluster { + sub := strings.TrimPrefix(e.key, wc.key) + if i := strings.Index(sub, "/"); i != -1 { + sub = sub[:i] + } + if s, ok := curObj.(metav1.ObjectMetaAccessor); ok { + klog.Infof("SUB: %s", sub) + s.GetObjectMeta().SetClusterName(sub) + } else { + klog.Infof("NO SUB: %T %s", curObj, sub) + } + } } // We need to decode prevValue, only if this is deletion event or // the underlying filter doesn't accept all objects (otherwise we @@ -451,6 +470,19 @@ func (wc *watchChan) prepareObjs(e *event) (curObj runtime.Object, oldObj runtim if err != nil { return nil, nil, err } + if wc.extractCluster { + sub := strings.TrimPrefix(e.key, wc.key) + if i := strings.Index(sub, "/"); i != -1 { + sub = sub[:i] + } + if s, ok := oldObj.(metav1.ObjectMetaAccessor); ok { + klog.Infof("SUB: %s", sub) + s.GetObjectMeta().SetClusterName(sub) + } else { + klog.Infof("NO SUB: %T %s", oldObj, sub) + } + } + } return curObj, oldObj, nil } From 602cd36904692a5cbbb19fffe664a1d0bf375a8e Mon Sep 17 00:00:00 2001 From: David Festal Date: Wed, 11 Aug 2021 19:05:31 +0200 Subject: [PATCH 13/87] HACK: Add consistent support of clusterName in all etcd store actions This is a generalization of the prototype approach used to retrieve the clusterName during wildcard watch across clusters For etcd3 storage functions, we should detect when an operation involves (or results in) an empty clusterName. However we only emit a warning, in order to avoid breaking normal usage of kubernetes starting kube-apiserver. Of course, in the future, we should add an abstraction layer to allow several implementations of the clusterName setting / retrieval, and not be depending on a single etcd-based implementation. Signed-off-by: David Festal --- .../pkg/api/validation/objectmeta.go | 8 +- .../pkg/endpoints/request/context_cluster.go | 37 +++++ .../pkg/registry/generic/registry/store.go | 13 +- .../apiserver/pkg/storage/etcd3/store.go | 134 +++++++++++++++--- .../apiserver/pkg/storage/etcd3/watcher.go | 62 ++++++-- .../pkg/storage/etcd3/watcher_test.go | 4 +- 6 files changed, 218 insertions(+), 40 deletions(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go index 66e8d677a4e37..6b4293515c1d8 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go @@ -261,7 +261,13 @@ func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *f allErrs = append(allErrs, ValidateImmutableField(newMeta.GetCreationTimestamp(), oldMeta.GetCreationTimestamp(), fldPath.Child("creationTimestamp"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetDeletionTimestamp(), oldMeta.GetDeletionTimestamp(), fldPath.Child("deletionTimestamp"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetDeletionGracePeriodSeconds(), oldMeta.GetDeletionGracePeriodSeconds(), fldPath.Child("deletionGracePeriodSeconds"))...) - allErrs = append(allErrs, ValidateImmutableField(newMeta.GetClusterName(), oldMeta.GetClusterName(), fldPath.Child("clusterName"))...) + + // HACK: Since the ClusterName is not stored in etcd, but is set when reading from etcd based on the etcd object key, + // we have to disable this validation when a newObject has no `ClusterName` defined (which is completely acceptable because + // the logical cluster associated to an etcd object is in fact determined by the current request context) + if newMeta.GetClusterName() != "" { + allErrs = append(allErrs, ValidateImmutableField(newMeta.GetClusterName(), oldMeta.GetClusterName(), fldPath.Child("clusterName"))...) + } allErrs = append(allErrs, v1validation.ValidateLabels(newMeta.GetLabels(), fldPath.Child("labels"))...) allErrs = append(allErrs, ValidateAnnotations(newMeta.GetAnnotations(), fldPath.Child("annotations"))...) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go b/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go index 9a063f1e7a9ff..3807d4f29a8f6 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_cluster.go @@ -18,6 +18,8 @@ package request import ( "context" + "errors" + "fmt" ) type clusterKey int @@ -52,3 +54,38 @@ func ClusterFrom(ctx context.Context) *Cluster { } return &cluster } + +func buildClusterError(message string, ctx context.Context) error { + if ri, ok := RequestInfoFrom(ctx); ok { + message = message + fmt.Sprintf(" - RequestInfo: %#v", ri) + } + return errors.New(message) +} + +// ValidClusterFrom returns the value of the cluster key on the ctx. +// If there's no cluster key, or if the cluster name is empty +// and it's not a wildcard context, then return an error. +func ValidClusterFrom(ctx context.Context) (*Cluster, error) { + cluster := ClusterFrom(ctx) + if cluster == nil { + return nil, buildClusterError("no cluster in the request context", ctx) + } + if cluster.Name == "" && !cluster.Wildcard { + return nil, buildClusterError("cluster name is empty in the request context", ctx) + } + return cluster, nil +} + +// ClusterNameFrom returns the cluster name from the value of the cluster +// key on the ctx. +// If the cluster name is empty, then return an error. +func ClusterNameFrom(ctx context.Context) (string, error) { + cluster, err := ValidClusterFrom(ctx) + if err != nil { + return "", err + } + if cluster.Name == "" { + return "", buildClusterError("cluster name is empty in the request context", ctx) + } + return cluster.Name, nil +} diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go index cdfb9cdd46be7..680d6a27f7dd5 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go @@ -235,10 +235,15 @@ const ( // to resource directories enforcing namespace rules. func NoNamespaceKeyRootFunc(ctx context.Context, prefix string) string { key := prefix - if cluster := genericapirequest.ClusterFrom(ctx); cluster != nil && !cluster.Wildcard { - key = key + "/" + cluster.Name + cluster, err := genericapirequest.ValidClusterFrom(ctx) + if err != nil { + klog.Errorf("invalid context cluster value: %v", err) + return key } - return key + if cluster.Wildcard { + return key + } + return key + "/" + cluster.Name } // NamespaceKeyRootFunc is the default function for constructing storage paths @@ -1464,7 +1469,7 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error { // startObservingCount starts monitoring given prefix and periodically updating metrics. It returns a function to stop collection. func (e *Store) startObservingCount(period time.Duration, objectCountTracker flowcontrolrequest.StorageObjectCountTracker) func() { - prefix := e.KeyRootFunc(genericapirequest.NewContext()) + prefix := e.KeyRootFunc(genericapirequest.WithCluster(genericapirequest.NewContext(), genericapirequest.Cluster{Wildcard: true})) resourceName := e.DefaultQualifiedResource.String() klog.V(2).InfoS("Monitoring resource count at path", "resource", resourceName, "path", "/"+prefix) stopCh := make(chan struct{}) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go index c682e19250907..dd761eed0b922 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -118,6 +118,11 @@ func (s *store) Versioner() storage.Versioner { // Get implements storage.Interface.Get. func (s *store) Get(ctx context.Context, key string, opts storage.GetOptions, out runtime.Object) error { + clusterName, err := genericapirequest.ClusterNameFrom(ctx) + if err != nil { + klog.Errorf("No cluster defined in Get action for key %s : %s", key, err.Error()) + } + key = path.Join(s.pathPrefix, key) startTime := time.Now() getResp, err := s.client.KV.Get(ctx, key) @@ -142,11 +147,16 @@ func (s *store) Get(ctx context.Context, key string, opts storage.GetOptions, ou return storage.NewInternalError(err.Error()) } - return decode(s.codec, s.versioner, data, out, kv.ModRevision) + return decode(s.codec, s.versioner, data, out, kv.ModRevision, clusterName) } // Create implements storage.Interface.Create. func (s *store) Create(ctx context.Context, key string, obj, out runtime.Object, ttl uint64) error { + clusterName, err := genericapirequest.ClusterNameFrom(ctx) + if err != nil { + klog.Errorf("No cluster defined in Create action for key %s : %s", key, err.Error()) + } + if version, err := s.versioner.ObjectResourceVersion(obj); err == nil && version != 0 { return errors.New("resourceVersion should not be set on objects to be created") } @@ -185,7 +195,7 @@ func (s *store) Create(ctx context.Context, key string, obj, out runtime.Object, if out != nil { putResp := txnResp.Responses[0].GetResponsePut() - return decode(s.codec, s.versioner, data, out, putResp.Header.Revision) + return decode(s.codec, s.versioner, data, out, putResp.Header.Revision, clusterName) } return nil } @@ -205,6 +215,13 @@ func (s *store) Delete( func (s *store) conditionalDelete( ctx context.Context, key string, out runtime.Object, v reflect.Value, preconditions *storage.Preconditions, validateDeletion storage.ValidateObjectFunc, cachedExistingObject runtime.Object) error { + var err error + var clusterName string + clusterName, err = genericapirequest.ClusterNameFrom(ctx) + if err != nil { + klog.Errorf("No cluster defined in conditionalDelete action for key %s : %s", key, err.Error()) + } + getCurrentState := func() (*objState, error) { startTime := time.Now() getResp, err := s.client.KV.Get(ctx, key) @@ -212,11 +229,10 @@ func (s *store) conditionalDelete( if err != nil { return nil, err } - return s.getState(getResp, key, v, false) + return s.getState(getResp, key, v, false, clusterName) } var origState *objState - var err error var origStateIsCurrent bool if cachedExistingObject != nil { origState, err = s.getStateFromObject(cachedExistingObject) @@ -297,14 +313,14 @@ func (s *store) conditionalDelete( if !txnResp.Succeeded { getResp := (*clientv3.GetResponse)(txnResp.Responses[0].GetResponseRange()) klog.V(4).Infof("deletion of %s failed because of a conflict, going to retry", key) - origState, err = s.getState(getResp, key, v, false) + origState, err = s.getState(getResp, key, v, false, clusterName) if err != nil { return err } origStateIsCurrent = true continue } - return decode(s.codec, s.versioner, origState.data, out, origState.rev) + return decode(s.codec, s.versioner, origState.data, out, origState.rev, clusterName) } } @@ -315,6 +331,11 @@ func (s *store) GuaranteedUpdate( trace := utiltrace.New("GuaranteedUpdate etcd3", utiltrace.Field{"type", getTypeName(out)}) defer trace.LogIfLong(500 * time.Millisecond) + clusterName, err := genericapirequest.ClusterNameFrom(ctx) + if err != nil { + klog.Errorf("No cluster defined in GuaranteedUpdate action for key %s : %s", key, err.Error()) + } + v, err := conversion.EnforcePtr(out) if err != nil { return fmt.Errorf("unable to convert output object to pointer: %v", err) @@ -328,7 +349,7 @@ func (s *store) GuaranteedUpdate( if err != nil { return nil, err } - return s.getState(getResp, key, v, ignoreNotFound) + return s.getState(getResp, key, v, ignoreNotFound, clusterName) } var origState *objState @@ -412,7 +433,7 @@ func (s *store) GuaranteedUpdate( } // recheck that the data from etcd is not stale before short-circuiting a write if !origState.stale { - return decode(s.codec, s.versioner, origState.data, out, origState.rev) + return decode(s.codec, s.versioner, origState.data, out, origState.rev, clusterName) } } @@ -443,7 +464,7 @@ func (s *store) GuaranteedUpdate( if !txnResp.Succeeded { getResp := (*clientv3.GetResponse)(txnResp.Responses[0].GetResponseRange()) klog.V(4).Infof("GuaranteedUpdate of %s failed because of a conflict, going to retry", key) - origState, err = s.getState(getResp, key, v, ignoreNotFound) + origState, err = s.getState(getResp, key, v, ignoreNotFound, clusterName) if err != nil { return err } @@ -453,7 +474,7 @@ func (s *store) GuaranteedUpdate( } putResp := txnResp.Responses[0].GetResponsePut() - return decode(s.codec, s.versioner, data, out, putResp.Header.Revision) + return decode(s.codec, s.versioner, data, out, putResp.Header.Revision, clusterName) } } @@ -469,6 +490,12 @@ func (s *store) GetToList(ctx context.Context, key string, listOpts storage.List utiltrace.Field{"limit", pred.Limit}, utiltrace.Field{"continue", pred.Continue}) defer trace.LogIfLong(500 * time.Millisecond) + + clusterName, err := genericapirequest.ClusterNameFrom(ctx) + if err != nil { + klog.Errorf("No cluster defined in GetToList action for key %s : %s", key, err.Error()) + } + listPtr, err := meta.GetItemsPtr(listObj) if err != nil { return err @@ -505,7 +532,7 @@ func (s *store) GetToList(ctx context.Context, key string, listOpts storage.List if err != nil { return storage.NewInternalError(err.Error()) } - if err := appendListItem(v, data, uint64(getResp.Kvs[0].ModRevision), pred, s.codec, s.versioner, newItemFunc); err != nil { + if err := appendListItem(v, data, uint64(getResp.Kvs[0].ModRevision), pred, s.codec, s.versioner, newItemFunc, clusterName); err != nil { return err } } @@ -776,7 +803,21 @@ func (s *store) List(ctx context.Context, key string, opts storage.ListOptions, return storage.NewInternalErrorf("unable to transform key %q: %v", kv.Key, err) } - if err := appendListItem(v, data, uint64(kv.ModRevision), pred, s.codec, s.versioner, newItemFunc); err != nil { + cluster, err := genericapirequest.ValidClusterFrom(ctx) + if err != nil { + return storage.NewInternalErrorf("unable to get cluster for key %q: %v", kv.Key, err) + } + clusterName := cluster.Name + if cluster.Wildcard { + sub := strings.TrimPrefix(string(kv.Key), keyPrefix) + if i := strings.Index(sub, "/"); i != -1 { + clusterName = sub[:i] + } + if clusterName == "" { + klog.Errorf("the cluster name of extracted object should not be empty for key %q", kv.Key) + } + } + if err := appendListItem(v, data, uint64(kv.ModRevision), pred, s.codec, s.versioner, newItemFunc, clusterName); err != nil { return err } numEvald++ @@ -877,14 +918,24 @@ func (s *store) watch(ctx context.Context, key string, opts storage.ListOptions, return nil, err } key = path.Join(s.pathPrefix, key) + // HACK: would need to be an argument to storage (or a change to how decoding works for key structure) - cluster := genericapirequest.ClusterFrom(ctx) - extractClusterSegmentFromKey := cluster != nil && cluster.Wildcard + cluster, err := genericapirequest.ValidClusterFrom(ctx) + if err != nil { + return nil, storage.NewInternalError(fmt.Sprintf("Invalid cluster for key %s : %v", key, err)) + } + extractClusterSegmentFromKey := false + clusterName := cluster.Name + if cluster.Wildcard { + clusterName = "*" + extractClusterSegmentFromKey = true + } + klog.Infof("DEBUG: key=%s willExtractCluster=%t", key, extractClusterSegmentFromKey) - return s.watcher.Watch(ctx, key, int64(rev), recursive, extractClusterSegmentFromKey, opts.ProgressNotify, opts.Predicate) + return s.watcher.Watch(ctx, key, int64(rev), recursive, clusterName, opts.ProgressNotify, opts.Predicate) } -func (s *store) getState(getResp *clientv3.GetResponse, key string, v reflect.Value, ignoreNotFound bool) (*objState, error) { +func (s *store) getState(getResp *clientv3.GetResponse, key string, v reflect.Value, ignoreNotFound bool, clusterName string) (*objState, error) { state := &objState{ meta: &storage.ResponseMeta{}, } @@ -911,7 +962,7 @@ func (s *store) getState(getResp *clientv3.GetResponse, key string, v reflect.Va state.meta.ResourceVersion = uint64(state.rev) state.data = data state.stale = stale - if err := decode(s.codec, s.versioner, state.data, state.obj, state.rev); err != nil { + if err := decode(s.codec, s.versioner, state.data, state.obj, state.rev, clusterName); err != nil { return nil, err } } @@ -995,7 +1046,7 @@ func (s *store) validateMinimumResourceVersion(minimumResourceVersion string, ac // decode decodes value of bytes into object. It will also set the object resource version to rev. // On success, objPtr would be set to the object. -func decode(codec runtime.Codec, versioner storage.Versioner, value []byte, objPtr runtime.Object, rev int64) error { +func decode(codec runtime.Codec, versioner storage.Versioner, value []byte, objPtr runtime.Object, rev int64, clusterName string) error { if _, err := conversion.EnforcePtr(objPtr); err != nil { return fmt.Errorf("unable to convert output object to pointer: %v", err) } @@ -1007,11 +1058,33 @@ func decode(codec runtime.Codec, versioner storage.Versioner, value []byte, objP if err := versioner.UpdateObject(objPtr, uint64(rev)); err != nil { klog.Errorf("failed to update object version: %v", err) } + // HACK: in order to support CRD tenancy, the clusterName, which is extracted from the object etcd key, + // should be set on the decoded object. + // This is done here since we want to set the logical cluster the object is part of, + // without storing the clusterName inside the etcd object itself (as it has been until now). + // The etcd key is ultimately the only thing that links us to a cluster + if clusterName != "" { + if s, ok := objPtr.(metav1.ObjectMetaAccessor); ok { + klog.Infof("Setting ClusterName %s in appendListItem", clusterName) + s.GetObjectMeta().SetClusterName(clusterName) + } else if s, ok := objPtr.(metav1.Object); ok { + klog.Infof("Setting ClusterName %s in appendListItem", clusterName) + s.SetClusterName(clusterName) + } else if s, ok := objPtr.(*unstructured.Unstructured); ok { + klog.Infof("SUB: %s", clusterName) + s.SetClusterName(clusterName) + } else { + klog.Infof("Could not set ClusterName %s in appendListItem on object: %T", clusterName, objPtr) + } + } else { + klog.Errorf("Cluster should not be unknown") + } + return nil } // appendListItem decodes and appends the object (if it passes filter) to v, which must be a slice. -func appendListItem(v reflect.Value, data []byte, rev uint64, pred storage.SelectionPredicate, codec runtime.Codec, versioner storage.Versioner, newItemFunc func() runtime.Object) error { +func appendListItem(v reflect.Value, data []byte, rev uint64, pred storage.SelectionPredicate, codec runtime.Codec, versioner storage.Versioner, newItemFunc func() runtime.Object, clusterName string) error { obj, _, err := codec.Decode(data, nil, newItemFunc()) if err != nil { return err @@ -1020,6 +1093,29 @@ func appendListItem(v reflect.Value, data []byte, rev uint64, pred storage.Selec if err := versioner.UpdateObject(obj, rev); err != nil { klog.Errorf("failed to update object version: %v", err) } + + // HACK: in order to support CRD tenancy, the clusterName, which is extracted from the object etcd key, + // should be set on the decoded object. + // This is done here since we want to set the logical cluster the object is part of, + // without storing the clusterName inside the etcd object itself (as it has been until now). + // The etcd key is ultimately the only thing that links us to a cluster + if clusterName != "" { + if s, ok := obj.(metav1.ObjectMetaAccessor); ok { + klog.Infof("Setting ClusterName %s in appendListItem", clusterName) + s.GetObjectMeta().SetClusterName(clusterName) + } else if s, ok := obj.(metav1.Object); ok { + klog.Infof("Setting ClusterName %s in appendListItem", clusterName) + s.SetClusterName(clusterName) + } else if s, ok := obj.(*unstructured.Unstructured); ok { + klog.Infof("SUB: %s", clusterName) + s.SetClusterName(clusterName) + } else { + klog.Infof("Could not set ClusterName %s in appendListItem on object: %T", clusterName, obj) + } + } else { + klog.Errorf("Cluster should not be unknown") + } + if matched, err := pred.Matches(obj); err == nil && matched { v.Set(reflect.Append(v, reflect.ValueOf(obj).Elem())) } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go index a87397e97a233..34eae1e462a88 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go @@ -37,6 +37,7 @@ import ( clientv3 "go.etcd.io/etcd/client/v3" "k8s.io/klog/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) const ( @@ -93,7 +94,7 @@ type watchChan struct { errChan chan error // HACK: testing watch across multiple prefixes - extractCluster bool + clusterName string } func newWatcher(client *clientv3.Client, codec runtime.Codec, newFunc func() runtime.Object, versioner storage.Versioner, transformer value.Transformer) *watcher { @@ -119,11 +120,11 @@ func newWatcher(client *clientv3.Client, codec runtime.Codec, newFunc func() run // If recursive is false, it watches on given key. // If recursive is true, it watches any children and directories under the key, excluding the root key itself. // pred must be non-nil. Only if pred matches the change, it will be returned. -func (w *watcher) Watch(ctx context.Context, key string, rev int64, recursive, clusterAsFirstSegment bool, progressNotify bool, pred storage.SelectionPredicate) (watch.Interface, error) { +func (w *watcher) Watch(ctx context.Context, key string, rev int64, recursive bool, clusterName string, progressNotify bool, pred storage.SelectionPredicate) (watch.Interface, error) { if recursive && !strings.HasSuffix(key, "/") { key += "/" } - wc := w.createWatchChan(ctx, key, rev, recursive, clusterAsFirstSegment, progressNotify, pred) + wc := w.createWatchChan(ctx, key, rev, recursive, clusterName, progressNotify, pred) go wc.run() // For etcd watch we don't have an easy way to answer whether the watch @@ -136,7 +137,7 @@ func (w *watcher) Watch(ctx context.Context, key string, rev int64, recursive, c return wc, nil } -func (w *watcher) createWatchChan(ctx context.Context, key string, rev int64, recursive, clusterAsFirstSegment, progressNotify bool, pred storage.SelectionPredicate) *watchChan { +func (w *watcher) createWatchChan(ctx context.Context, key string, rev int64, recursive bool, clusterName string, progressNotify bool, pred storage.SelectionPredicate) *watchChan { wc := &watchChan{ watcher: w, key: key, @@ -149,7 +150,7 @@ func (w *watcher) createWatchChan(ctx context.Context, key string, rev int64, re errChan: make(chan error, 1), // HACK: assume structure of key is /... - extractCluster: clusterAsFirstSegment, + clusterName: clusterName, } if pred.Empty() { // The filter doesn't filter out any object. @@ -441,17 +442,34 @@ func (wc *watchChan) prepareObjs(e *event) (curObj runtime.Object, oldObj runtim if err != nil { return nil, nil, err } - if wc.extractCluster { + clusterName := wc.clusterName + if clusterName == "*" { sub := strings.TrimPrefix(e.key, wc.key) if i := strings.Index(sub, "/"); i != -1 { sub = sub[:i] } + clusterName = sub + } + // HACK: in order to support CRD tenancy, the clusterName, which is extracted from the object etcd key, + // should be set on the decoded object. + // This is done here since we want to set the logical cluster the object is part of, + // without storing the clusterName inside the etcd object itself (as it has been until now). + // The etcd key is ultimately the only thing that links us to a cluster + if clusterName != "" { if s, ok := curObj.(metav1.ObjectMetaAccessor); ok { - klog.Infof("SUB: %s", sub) - s.GetObjectMeta().SetClusterName(sub) + klog.Infof("SUB: %s", clusterName) + s.GetObjectMeta().SetClusterName(clusterName) + } else if s, ok := curObj.(metav1.Object); ok { + klog.Infof("SUB: %s", clusterName) + s.SetClusterName(clusterName) + } else if s, ok := curObj.(*unstructured.Unstructured); ok { + klog.Infof("SUB: %s", clusterName) + s.SetClusterName(clusterName) } else { - klog.Infof("NO SUB: %T %s", curObj, sub) + klog.Infof("NO SUB: %T %s", curObj, clusterName) } + } else { + klog.Errorf("Cluster should not be unknown") } } // We need to decode prevValue, only if this is deletion event or @@ -470,19 +488,35 @@ func (wc *watchChan) prepareObjs(e *event) (curObj runtime.Object, oldObj runtim if err != nil { return nil, nil, err } - if wc.extractCluster { + clusterName := wc.clusterName + if clusterName == "*" { sub := strings.TrimPrefix(e.key, wc.key) if i := strings.Index(sub, "/"); i != -1 { sub = sub[:i] } + clusterName = sub + } + // HACK: in order to support CRD tenancy, the clusterName, which is extracted from the object etcd key, + // should be set on the decoded object. + // This is done here since we want to set the logical cluster the object is part of, + // without storing the clusterName inside the etcd object itself (as it has been until now). + // The etcd key is ultimately the only thing that links us to a cluster + if clusterName != "" { if s, ok := oldObj.(metav1.ObjectMetaAccessor); ok { - klog.Infof("SUB: %s", sub) - s.GetObjectMeta().SetClusterName(sub) + klog.Infof("SUB: %s", clusterName) + s.GetObjectMeta().SetClusterName(clusterName) + } else if s, ok := oldObj.(metav1.Object); ok { + klog.Infof("SUB: %s", clusterName) + s.SetClusterName(clusterName) + } else if s, ok := oldObj.(*unstructured.Unstructured); ok { + klog.Infof("SUB: %s", clusterName) + s.SetClusterName(clusterName) } else { - klog.Infof("NO SUB: %T %s", oldObj, sub) + klog.Infof("NO SUB: %T %s", oldObj, clusterName) } + } else { + klog.Errorf("Cluster should not be unknown") } - } return curObj, oldObj, nil } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go index 0361548e0a703..279cb73cce003 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go @@ -241,7 +241,7 @@ func TestWatchContextCancel(t *testing.T) { cancel() // When we watch with a canceled context, we should detect that it's context canceled. // We won't take it as error and also close the watcher. - w, err := store.watcher.Watch(canceledCtx, "/abc", 0, false, false, storage.Everything) + w, err := store.watcher.Watch(canceledCtx, "/abc", 0, false, "", false, storage.Everything) if err != nil { t.Fatal(err) } @@ -259,7 +259,7 @@ func TestWatchContextCancel(t *testing.T) { func TestWatchErrResultNotBlockAfterCancel(t *testing.T) { origCtx, store, _ := testSetup(t) ctx, cancel := context.WithCancel(origCtx) - w := store.watcher.createWatchChan(ctx, "/abc", 0, false, false, storage.Everything) + w := store.watcher.createWatchChan(ctx, "/abc", 0, false, "", false, storage.Everything) // make resutlChan and errChan blocking to ensure ordering. w.resultChan = make(chan watch.Event) w.errChan = make(chan error) From 3eeb2da8c2c66ab2fb401d4c5378fdbf60059c82 Mon Sep 17 00:00:00 2001 From: David Festal Date: Wed, 10 Mar 2021 15:54:45 +0100 Subject: [PATCH 14/87] HACK: Enable adding legacy scheme resources as CRDs... This may be useful in case when some legacy scheme resources are not registered, which is the case for example in KCP. There has to be special cases for `core` resources that have an empty group and are at a dedicated api prefix. This doesn't fully work with `kubectl` or kubernetes client, due to the fact that those client tools systematically use strategic merge patch for legacy scheme resources, and CRDs don't support strategic merge patch for now. The fix for this limitation will be in a next commit. Signed-off-by: David Festal --- pkg/genericcontrolplane/server.go | 14 ++++ .../apiextensions/validation/validation.go | 15 +++- .../pkg/apiserver/apiserver.go | 2 + .../customresource_discovery_controller.go | 58 ++++++++++----- .../pkg/apiserver/customresource_handler.go | 16 ++++- .../pkg/controller/openapi/builder/builder.go | 35 +++++++-- .../controller/status/naming_controller.go | 4 ++ .../pkg/registry/customresource/validator.go | 7 +- .../pkg/endpoints/discovery/version.go | 7 +- .../pkg/endpoints/discovery/version_hack.go | 71 +++++++++++++++++++ 10 files changed, 196 insertions(+), 33 deletions(-) create mode 100644 staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index c2c4dd0e53448..7034f724a2c99 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -27,11 +27,13 @@ import ( "strings" "time" + "github.com/emicklei/go-restful" extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/authorization/union" + "k8s.io/apiserver/pkg/endpoints/discovery" openapinamer "k8s.io/apiserver/pkg/endpoints/openapi" genericfeatures "k8s.io/apiserver/pkg/features" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" @@ -114,6 +116,18 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan return nil, err } + // HACK: support the case when we can add core or other legacy scheme resources through CRDs (KCP scenario) + // In such a case, the request should be processed by the CRD handler + // (registered in the apiExtensionsServer NonGoRestfulMux handler) + // and not by the main KubeAPIServer. + kubeAPIServer.GenericAPIServer.Handler.GoRestfulContainer.Filter(func(req *restful.Request, res *restful.Response, chain *restful.FilterChain) { + if discovery.IsAPIContributed(req.Request.URL.Path) { + apiExtensionsServer.GenericAPIServer.Handler.NonGoRestfulMux.ServeHTTP(res.ResponseWriter, req.Request) + } else { + chain.ProcessFilter(req, res) + } + }) + return aggregatorServer, nil } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go index 30732d500c400..adba3b7cdc761 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go @@ -33,6 +33,7 @@ import ( utilvalidation "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apiserver/pkg/util/webhook" + "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -51,7 +52,11 @@ var ( func ValidateCustomResourceDefinition(obj *apiextensions.CustomResourceDefinition) field.ErrorList { nameValidationFn := func(name string, prefix bool) []string { ret := genericvalidation.NameIsDNSSubdomain(name, prefix) - requiredName := obj.Spec.Names.Plural + "." + obj.Spec.Group + group := obj.Spec.Group + if group == "" { + group = "core" + } + requiredName := obj.Spec.Names.Plural + "." + group if name != requiredName { ret = append(ret, fmt.Sprintf(`must be spec.names.plural+"."+spec.group`)) } @@ -209,8 +214,12 @@ func validateDeprecationWarning(deprecated bool, deprecationWarning *string) []s func validateCustomResourceDefinitionSpec(spec *apiextensions.CustomResourceDefinitionSpec, opts validationOptions, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} - if len(spec.Group) == 0 { - allErrs = append(allErrs, field.Required(fldPath.Child("group"), "")) + // HACK: Relax naming constraints when registering legacy schema resources through CRDs + // for the KCP scenario + if legacyscheme.Scheme.IsGroupRegistered(spec.Group) { + // No error: these are legacy schema kubernetes types + // that are not added in the controlplane schema + // and that we want to move up to the KCP as CRDs } else if errs := utilvalidation.IsDNS1123Subdomain(spec.Group); len(errs) > 0 { allErrs = append(allErrs, field.Invalid(fldPath.Child("group"), spec.Group, strings.Join(errs, ","))) } else if len(strings.Split(spec.Group, ".")) < 2 { diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go index f489f074b1a00..6783ced4b0149 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go @@ -210,6 +210,8 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) } s.GenericAPIServer.Handler.NonGoRestfulMux.Handle("/apis", crdHandler) s.GenericAPIServer.Handler.NonGoRestfulMux.HandlePrefix("/apis/", crdHandler) + // HACK: Added to allow serving core resources registered through CRDs (for the KCP scenario) + s.GenericAPIServer.Handler.NonGoRestfulMux.HandlePrefix("/api/v1/", crdHandler) discoveryController := NewDiscoveryController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), versionDiscoveryHandler, groupDiscoveryHandler) namingController := status.NewNamingConditionController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), crdClient.ApiextensionsV1()) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go index aad0482633d20..9ab93fe068caa 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go @@ -22,6 +22,7 @@ import ( "time" "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/api/legacyscheme" autoscaling "k8s.io/api/autoscaling/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -104,11 +105,18 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { // If there is any Served version, that means the group should show up in discovery foundGroup = true + // HACK: support the case when we add core resources through CRDs (KCP scenario) + groupVersion := crd.Spec.Group + "/" + v.Name + if crd.Spec.Group == "" { + groupVersion = v.Name + } + gv := metav1.GroupVersion{Group: crd.Spec.Group, Version: v.Name} + if !versionsForDiscoveryMap[gv] { versionsForDiscoveryMap[gv] = true apiVersionsForDiscovery = append(apiVersionsForDiscovery, metav1.GroupVersionForDiscovery{ - GroupVersion: crd.Spec.Group + "/" + v.Name, + GroupVersion: groupVersion, Version: v.Name, }) } @@ -167,30 +175,46 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { } } + sortGroupDiscoveryByKubeAwareVersion(apiVersionsForDiscovery) + + resourceListerFunc := discovery.APIResourceListerFunc(func() []metav1.APIResource { + return apiResourcesForDiscovery + }) + + // HACK: if we are adding resources in legacy scheme group through CRDs (KCP scenario) + // then do not expose the CRD `APIResource`s in their own CRD-related group`, + // But instead add them in the existing legacy schema group + if legacyscheme.Scheme.IsGroupRegistered(version.Group) { + if !foundGroup || !foundVersion { + delete(discovery.ContributedResources, version) + } + + discovery.ContributedResources[version] = resourceListerFunc + } + if !foundGroup { c.groupHandler.unsetDiscovery(version.Group) c.versionHandler.unsetDiscovery(version) return nil } - sortGroupDiscoveryByKubeAwareVersion(apiVersionsForDiscovery) - - apiGroup := metav1.APIGroup{ - Name: version.Group, - Versions: apiVersionsForDiscovery, - // the preferred versions for a group is the first item in - // apiVersionsForDiscovery after it put in the right ordered - PreferredVersion: apiVersionsForDiscovery[0], - } - c.groupHandler.setDiscovery(version.Group, discovery.NewAPIGroupHandler(Codecs, apiGroup)) + if version.Group != "" { + // If we don't add resources in the core API group + apiGroup := metav1.APIGroup{ + Name: version.Group, + Versions: apiVersionsForDiscovery, + // the preferred versions for a group is the first item in + // apiVersionsForDiscovery after it put in the right ordered + PreferredVersion: apiVersionsForDiscovery[0], + } + c.groupHandler.setDiscovery(version.Group, discovery.NewAPIGroupHandler(Codecs, apiGroup)) - if !foundVersion { - c.versionHandler.unsetDiscovery(version) - return nil + if !foundVersion { + c.versionHandler.unsetDiscovery(version) + return nil + } + c.versionHandler.setDiscovery(version, discovery.NewAPIVersionHandler(Codecs, version, resourceListerFunc)) } - c.versionHandler.setDiscovery(version, discovery.NewAPIVersionHandler(Codecs, version, discovery.APIResourceListerFunc(func() []metav1.APIResource { - return apiResourcesForDiscovery - }))) return nil } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index 02bd49b5f3401..29a8d03ab719a 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -45,6 +45,7 @@ import ( "k8s.io/apiextensions-apiserver/pkg/crdserverscheme" "k8s.io/apiextensions-apiserver/pkg/registry/customresource" "k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor" + "k8s.io/kubernetes/pkg/api/legacyscheme" apiequality "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -258,6 +259,10 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { } crdName := requestInfo.Resource + "." + requestInfo.APIGroup + // HACK: support the case when we add core resources through CRDs (KCP scenario) + if requestInfo.APIGroup == "" { + crdName = crdName + "core" + } crd, err := r.crdLister.Get(crdName) if apierrors.IsNotFound(err) { r.delegate.ServeHTTP(w, req) @@ -332,6 +337,9 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { string(types.JSONPatchType), string(types.MergePatchType), } + if legacyscheme.Scheme.IsGroupRegistered(requestInfo.APIGroup) { + supportedTypes = append(supportedTypes, string(types.StrategicMergePatchType)) + } if utilfeature.DefaultFeatureGate.Enabled(features.ServerSideApply) { supportedTypes = append(supportedTypes, string(types.ApplyPatchType)) } @@ -814,12 +822,16 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd replicasPathInCustomResource, ) + selfLinkPrefixPrefix := path.Join("apis", crd.Spec.Group, v.Name) + if crd.Spec.Group == "" { + selfLinkPrefixPrefix = path.Join("api", v.Name) + } selfLinkPrefix := "" switch crd.Spec.Scope { case apiextensionsv1.ClusterScoped: - selfLinkPrefix = "/" + path.Join("apis", crd.Spec.Group, v.Name) + "/" + crd.Status.AcceptedNames.Plural + "/" + selfLinkPrefix = "/" + selfLinkPrefixPrefix + "/" + crd.Status.AcceptedNames.Plural + "/" case apiextensionsv1.NamespaceScoped: - selfLinkPrefix = "/" + path.Join("apis", crd.Spec.Group, v.Name, "namespaces") + "/" + selfLinkPrefix = "/" + selfLinkPrefixPrefix + "/namespaces/" } clusterScoped := crd.Spec.Scope == apiextensionsv1.ClusterScoped diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go index 3788b7701501b..adbe586c9593b 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go @@ -48,6 +48,7 @@ import ( "k8s.io/kube-openapi/pkg/spec3" "k8s.io/kube-openapi/pkg/util" "k8s.io/kube-openapi/pkg/validation/spec" + "k8s.io/kubernetes/pkg/api/legacyscheme" ) const ( @@ -158,11 +159,17 @@ func generateBuilder(crd *apiextensionsv1.CustomResourceDefinition, version stri scale := &v1.Scale{} routes := make([]*restful.RouteBuilder, 0) - root := fmt.Sprintf("/apis/%s/%s/%s", b.group, b.version, b.plural) + // HACK: support the case when we add core resources through CRDs (KCP scenario) + rootPrefix := fmt.Sprintf("/apis/%s/%s", b.group, b.version) + if b.group == "" { + rootPrefix = fmt.Sprintf("/api/%s", b.version) + } + + root := fmt.Sprintf("%s/%s", rootPrefix, b.plural) if b.namespaced { routes = append(routes, b.buildRoute(root, "", "GET", "list", "list", sampleList).Operation("list"+b.kind+"ForAllNamespaces")) - root = fmt.Sprintf("/apis/%s/%s/namespaces/{namespace}/%s", b.group, b.version, b.plural) + root = fmt.Sprintf("%s/namespaces/{namespace}/%s", rootPrefix, b.plural) } routes = append(routes, b.buildRoute(root, "", "GET", "list", "list", sampleList)) routes = append(routes, b.buildRoute(root, "", "POST", "post", "create", sample).Reads(sample)) @@ -224,9 +231,21 @@ type CRDCanonicalTypeNamer struct { kind string } +// HACK: support the case when we add core or other legacy scheme resources through CRDs (KCP scenario) +func packagePrefix(group string) string { + if !strings.Contains(group, ".") && + legacyscheme.Scheme.IsGroupRegistered(group) { + if group == "" { + group = "core" + } + return "k8s.io/api/" + group + } + return group +} + // OpenAPICanonicalTypeName returns canonical type name for given CRD func (c *CRDCanonicalTypeNamer) OpenAPICanonicalTypeName() string { - return fmt.Sprintf("%s/%s.%s", c.group, c.version, c.kind) + return fmt.Sprintf("%s/%s.%s", packagePrefix(c.group), c.version, c.kind) } // builder contains validation schema and basic naming information for a CRD in @@ -491,7 +510,7 @@ func addTypeMetaProperties(s *spec.Schema, v2 bool) { // buildListSchema builds the list kind schema for the CRD func (b *builder) buildListSchema(v2 bool) *spec.Schema { - name := definitionPrefix + util.ToRESTFriendlyName(fmt.Sprintf("%s/%s/%s", b.group, b.version, b.kind)) + name := definitionPrefix + util.ToRESTFriendlyName(fmt.Sprintf("%s/%s/%s", packagePrefix(b.group), b.version, b.kind)) doc := fmt.Sprintf("List of %s. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md", b.plural) s := new(spec.Schema).WithDescription(fmt.Sprintf("%s is a list of %s", b.listKind, b.kind)). WithRequired("items"). @@ -533,11 +552,11 @@ func (b *builder) getOpenAPIConfig(v2 bool) *common.Config { }, GetDefinitions: func(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { def := utilopenapi.GetOpenAPIDefinitionsWithoutDisabledFeatures(generatedopenapi.GetOpenAPIDefinitions)(ref) - def[fmt.Sprintf("%s/%s.%s", b.group, b.version, b.kind)] = common.OpenAPIDefinition{ + def[fmt.Sprintf("%s/%s.%s", packagePrefix(b.group), b.version, b.kind)] = common.OpenAPIDefinition{ Schema: *b.schema, Dependencies: []string{objectMetaType}, } - def[fmt.Sprintf("%s/%s.%s", b.group, b.version, b.listKind)] = common.OpenAPIDefinition{ + def[fmt.Sprintf("%s/%s.%s", packagePrefix(b.group), b.version, b.listKind)] = common.OpenAPIDefinition{ Schema: *b.listSchema, } return def @@ -546,6 +565,8 @@ func (b *builder) getOpenAPIConfig(v2 bool) *common.Config { } func newBuilder(crd *apiextensionsv1.CustomResourceDefinition, version string, schema *structuralschema.Structural, opts Options) *builder { + group := crd.Spec.Group + // HACK: support the case when we add core resources through CRDs (KCP scenario) b := &builder{ schema: &spec.Schema{ SchemaProps: spec.SchemaProps{Type: []string{"object"}}, @@ -553,7 +574,7 @@ func newBuilder(crd *apiextensionsv1.CustomResourceDefinition, version string, s listSchema: &spec.Schema{}, ws: &restful.WebService{}, - group: crd.Spec.Group, + group: group, version: version, kind: crd.Spec.Names.Kind, listKind: crd.Spec.Names.ListKind, diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go index d4165a0945774..d437b7551615a 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go @@ -368,6 +368,10 @@ func (c *NamingConditionController) deleteCustomResourceDefinition(obj interface func (c *NamingConditionController) requeueAllOtherGroupCRDs(name string) error { pluralGroup := strings.SplitN(name, ".", 2) + // In case the group is empty because we're adding core resources as CRDs in KCP + if len(pluralGroup) == 1 { + pluralGroup = append(pluralGroup, "") + } list, err := c.crdLister.List(labels.Everything()) if err != nil { return err diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/validator.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/validator.go index ae339013afe3f..7686b8c80dc64 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/validator.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/validator.go @@ -135,7 +135,12 @@ func (a customResourceValidator) ValidateTypeMeta(ctx context.Context, obj *unst if typeAccessor.GetKind() != a.kind.Kind { allErrs = append(allErrs, field.Invalid(field.NewPath("kind"), typeAccessor.GetKind(), fmt.Sprintf("must be %v", a.kind.Kind))) } - if typeAccessor.GetAPIVersion() != a.kind.Group+"/"+a.kind.Version { + // HACK: support the case when we add core resources through CRDs (KCP scenario) + expectedAPIVersion := a.kind.Group + "/" + a.kind.Version + if a.kind.Group == "" { + expectedAPIVersion = a.kind.Version + } + if typeAccessor.GetAPIVersion() != expectedAPIVersion { allErrs = append(allErrs, field.Invalid(field.NewPath("apiVersion"), typeAccessor.GetAPIVersion(), fmt.Sprintf("must be %v", a.kind.Group+"/"+a.kind.Version))) } return allErrs diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go index 0976041bff0e0..1989355e201b0 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go @@ -56,9 +56,10 @@ func NewAPIVersionHandler(serializer runtime.NegotiatedSerializer, groupVersion } return &APIVersionHandler{ - serializer: serializer, - groupVersion: groupVersion, - apiResourceLister: apiResourceLister, + serializer: serializer, + groupVersion: groupVersion, + // HACK: support the case when we can add core or other legacy scheme resources through CRDs (KCP scenario) + apiResourceLister: withContributedResources(groupVersion, apiResourceLister), } } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go new file mode 100644 index 0000000000000..8a57f88adbf20 --- /dev/null +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go @@ -0,0 +1,71 @@ +/* +Copyright 2017 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 discovery + +import ( + "regexp" + "sort" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// HACK: support the case when we can add core or other legacy scheme resources through CRDs (KCP scenario) +var ContributedResources map[schema.GroupVersion]APIResourceLister = map[schema.GroupVersion]APIResourceLister{} + +func withContributedResources(groupVersion schema.GroupVersion, apiResourceLister APIResourceLister) APIResourceLister { + return APIResourceListerFunc(func() []metav1.APIResource { + result := apiResourceLister.ListAPIResources() + if additionalResources := ContributedResources[groupVersion]; additionalResources != nil { + result = append(result, additionalResources.ListAPIResources()...) + } + sort.Slice(result, func(i, j int) bool { + return result[i].Name < result[j].Name + }) + + return result + }) +} + +// IsAPIContributed returns `true` is the path corresponds to a resource that +// has been contribued to a legacy scheme group from a CRD. +func IsAPIContributed(path string) bool { + for gv, resourceLister := range ContributedResources { + prefix := gv.Group + if prefix != "" { + prefix = "/apis/" + prefix + "/" + gv.Version + "/" + } else { + prefix = "/api/" + gv.Version + "/" + } + if !strings.HasPrefix(path, prefix) { + continue + } + + for _, resource := range resourceLister.ListAPIResources() { + if strings.HasPrefix(path, prefix+resource.Name) { + return true + } + if resource.Namespaced { + if matched, _ := regexp.MatchString(prefix+"namespaces/[^/][^/]*/"+resource.Name+"(/[^/].*)?", path); matched { + return true + } + } + } + } + return false +} From b6630c13706854516193d7e25a95a1e67496911c Mon Sep 17 00:00:00 2001 From: David Festal Date: Wed, 19 May 2021 16:29:00 +0200 Subject: [PATCH 15/87] HACK: Use the dedicated table converter for legacy scheme CRDs (#6) Currently CRDs only allow defining custom table column based on a single basic JsonPath expression. This is obviously not sufficient to reproduce the various column definitions of legacy scheme objects like deployments, etc ..., since those definitions are implemented in Go code. So for example in KCP, when the `deployments` API resource is brought back from physical clusters under the form of a CRD, the table columns shown from a kubectl get deployments command are not the ones typically expected. This PR adds a temporary hack to replace the table converter of CRDs that bring back legacy-schema resources, with the default table converter of the related legacy scheme resource. In the future this should probably be replaced by some new mechanism that would allow customizing some behaviors of resources defined by CRDs. Signed-off-by: David Festal --- .../pkg/apiserver/customresource_handler.go | 17 ++++ ...tomresource_handler_tableconverter_hack.go | 79 +++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_tableconverter_hack.go diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index 29a8d03ab719a..35edcb4a64dcb 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -794,6 +794,23 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd klog.V(2).Infof("The CRD for %v has an invalid printer specification, falling back to default printing: %v", kind, err) } + // HACK: Currently CRDs only allow defining custom table column based on a single basic JsonPath expression. + // This is not sufficient to reproduce the various colum definitions of legacy scheme objects like + // deployments, etc ..., since those definitions are implemented in Go code. + // So for example in KCP, when deployments are brought back under the form of a CRD, the table columns + // shown from a `kubectl get deployments` command are not the ones typically expected. + // + // The call to `replaceTableConverterForLegacySchemaResources` is a temporary hack to replace the table converter of CRDs that are + // related to legacy-schema resources, with the default table converter of the related legacy scheme resource. + // + // In the future this should probably be replaced by some new mechanism that would allow customizing some + // behaviors of resources defined by CRDs. + if legacyscheme.Scheme.IsVersionRegistered(kind.GroupVersion()) { + if lecacySchemeTableConvertor := replaceTableConverterForLegacySchemaResources(kind, crd); lecacySchemeTableConvertor != nil { + table = lecacySchemeTableConvertor + } + } + storages[v.Name] = customresource.NewStorage( resource.GroupResource(), kind, diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_tableconverter_hack.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_tableconverter_hack.go new file mode 100644 index 0000000000000..2d14307ef3496 --- /dev/null +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_tableconverter_hack.go @@ -0,0 +1,79 @@ +/* +Copyright 2017 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 apiserver + +import ( + "context" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/printers" + "reflect" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/registry/rest" + printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" + printerstorage "k8s.io/kubernetes/pkg/printers/storage" +) + +type TableConverterFunc func(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) + +func (tcf TableConverterFunc) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) { + return tcf(ctx, object, tableOptions) +} + +// HACK: Currently CRDs only allow defining custom table column based on a single basic JsonPath expression. +// This is not sufficient to reproduce the various colum definitions of legacy scheme objects like +// deployments, etc ..., since those definitions are implemented in Go code. +// So for example in KCP, when deployments are brought back under the form of a CRD, the table columns +// shown from a `kubectl get deployments` command are not the ones typically expected. +// +// The `replaceTableConverterForLegacySchemaResources` function is a temporary hack to replace the table converter of +// CRDs that are related to legacy-schema resources, with the default table converter of the related legacy scheme resource. +// +// In the future this should probably be replaced by some new mechanism that would allow customizing some +// behaviors of resources defined by CRDs. +func replaceTableConverterForLegacySchemaResources(kind schema.GroupVersionKind, crd *apiextensionsv1.CustomResourceDefinition) rest.TableConvertor { + legacySchemeTableConvertor := printerstorage.TableConvertor{TableGenerator: printers.NewTableGenerator().With(printersinternal.AddHandlers)} + objectType, objectTypeExists := legacyscheme.Scheme.AllKnownTypes()[schema.GroupVersionKind{ + Group: kind.Group, + Kind: crd.Spec.Names.Kind, + Version: runtime.APIVersionInternal, + }] + listType, listTypeExists := legacyscheme.Scheme.AllKnownTypes()[schema.GroupVersionKind{ + Group: kind.Group, + Kind: crd.Spec.Names.ListKind, + Version: runtime.APIVersionInternal, + }] + if objectTypeExists && listTypeExists { + return TableConverterFunc(func(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) { + k := object.GetObjectKind().GroupVersionKind() + var theType reflect.Type + switch k.Kind { + case crd.Spec.Names.Kind: + theType = objectType + default: + theType = listType + } + out := reflect.New(theType).Interface().(runtime.Object) + legacyscheme.Scheme.Convert(object, out, nil) + return legacySchemeTableConvertor.ConvertToTable(ctx, out, tableOptions) + }) + } + return nil +} From 07f788aac42f5273b32188f820c52cbcb6d3da29 Mon Sep 17 00:00:00 2001 From: David Festal Date: Tue, 30 Mar 2021 14:31:17 +0200 Subject: [PATCH 16/87] KUBEFIX: Add strategic merge patch support to CRDs ... ... based on CRD published openapi v2 definitions --- .../pkg/apiserver/customresource_handler.go | 11 +++ .../pkg/apiserver/schema/kubeopenapi.go | 10 +++ .../apiserver/pkg/endpoints/handlers/patch.go | 18 ++++- .../apiserver/pkg/endpoints/handlers/rest.go | 3 + .../pkg/endpoints/openapi/openapi.go | 75 +++++++++++++++++++ 5 files changed, 115 insertions(+), 2 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index 35edcb4a64dcb..cd84adda6d897 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -70,6 +70,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" "k8s.io/apiserver/pkg/endpoints/metrics" + "k8s.io/apiserver/pkg/endpoints/openapi" apirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/generic" @@ -676,9 +677,17 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd } openAPIModels, err := buildOpenAPIModelsForApply(r.staticOpenAPISpec, crd) + var modelsByGKV openapi.ModelsByGKV + if err != nil { utilruntime.HandleError(fmt.Errorf("error building openapi models for %s: %v", crd.Name, err)) openAPIModels = nil + } else { + modelsByGKV, err = openapi.GetModelsByGKV(openAPIModels) + if err != nil { + utilruntime.HandleError(fmt.Errorf("error gathering openapi models by GKV for %s: %v", crd.Name, err)) + modelsByGKV = nil + } } var typeConverter fieldmanager.TypeConverter = fieldmanager.DeducedTypeConverter{} @@ -901,6 +910,8 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd Authorizer: r.authorizer, MaxRequestBodyBytes: r.maxRequestBodyBytes, + + OpenapiModels: modelsByGKV, } if utilfeature.DefaultFeatureGate.Enabled(features.ServerSideApply) { resetFields := storages[v.Name].CustomResource.GetResetFields() diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/kubeopenapi.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/kubeopenapi.go index 23bffbfb190fc..4a5700c2a2943 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/kubeopenapi.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/kubeopenapi.go @@ -80,12 +80,22 @@ func (x *Extensions) toKubeOpenAPI(ret *spec.Schema) { } if len(x.XListMapKeys) > 0 { ret.VendorExtensible.AddExtension("x-kubernetes-list-map-keys", x.XListMapKeys) + ret.VendorExtensible.AddExtension("x-kubernetes-patch-merge-key", x.XListMapKeys[0]) } if x.XListType != nil { ret.VendorExtensible.AddExtension("x-kubernetes-list-type", *x.XListType) + if *x.XListType == "map" || *x.XListType == "set" { + ret.VendorExtensible.AddExtension("x-kubernetes-patch-strategy", "merge") + } + if *x.XListType == "atomic" { + ret.VendorExtensible.AddExtension("x-kubernetes-patch-strategy", "replace") + } } if x.XMapType != nil { ret.VendorExtensible.AddExtension("x-kubernetes-map-type", *x.XMapType) + if *x.XMapType == "atomic" { + ret.VendorExtensible.AddExtension("x-kubernetes-patch-strategy", "replace") + } } if len(x.XValidations) > 0 { ret.VendorExtensible.AddExtension("x-kubernetes-validations", x.XValidations) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go index 6803baaa6088a..07dbf573b4dc7 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go @@ -51,6 +51,7 @@ import ( "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/util/dryrun" utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/kube-openapi/pkg/util/proto" utiltrace "k8s.io/utils/trace" ) @@ -428,6 +429,7 @@ type smpPatcher struct { // Schema schemaReferenceObj runtime.Object fieldManager *fieldmanager.FieldManager + openapiModel proto.Schema } func (p *smpPatcher) applyPatchToCurrentObject(requestContext context.Context, currentObject runtime.Object) (runtime.Object, error) { @@ -441,7 +443,7 @@ func (p *smpPatcher) applyPatchToCurrentObject(requestContext context.Context, c if err != nil { return nil, err } - if err := strategicPatchObject(requestContext, p.defaulter, currentVersionedObject, p.patchBytes, versionedObjToUpdate, p.schemaReferenceObj, p.validationDirective); err != nil { + if err := strategicPatchObject(requestContext, p.defaulter, currentVersionedObject, p.patchBytes, versionedObjToUpdate, p.schemaReferenceObj, p.validationDirective, p.openapiModel); err != nil { return nil, err } // Convert the object back to the hub version @@ -523,6 +525,7 @@ func strategicPatchObject( objToUpdate runtime.Object, schemaReferenceObj runtime.Object, validationDirective string, + openapiModel proto.Schema, ) error { originalObjMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(originalObject) if err != nil { @@ -542,7 +545,7 @@ func strategicPatchObject( } } - if err := applyPatchToObject(requestContext, defaulter, originalObjMap, patchMap, objToUpdate, schemaReferenceObj, strictErrs, validationDirective); err != nil { + if err := applyPatchToObject(requestContext, defaulter, originalObjMap, patchMap, objToUpdate, schemaReferenceObj, strictErrs, validationDirective, openapiModel); err != nil { return err } return nil @@ -628,10 +631,17 @@ func (p *patcher) patchResource(ctx context.Context, scope *RequestScope) (runti if err != nil { return nil, false, err } + + var schema proto.Schema + modelsByGKV := scope.OpenapiModels + if modelsByGKV != nil { + schema = modelsByGKV[p.kind] + } p.mechanism = &smpPatcher{ patcher: p, schemaReferenceObj: schemaReferenceObj, fieldManager: scope.FieldManager, + openapiModel: schema, } // this case is unreachable if ServerSideApply is not enabled because we will have already rejected the content type case types.ApplyPatchType: @@ -699,8 +709,12 @@ func applyPatchToObject( schemaReferenceObj runtime.Object, strictErrs []error, validationDirective string, + openapiModel proto.Schema, ) error { patchedObjMap, err := strategicpatch.StrategicMergeMapPatch(originalMap, patchMap, schemaReferenceObj) + if err == mergepatch.ErrUnsupportedStrategicMergePatchFormat && openapiModel != nil { + patchedObjMap, err = strategicpatch.StrategicMergeMapPatchUsingLookupPatchMeta(originalMap, patchMap, strategicpatch.NewPatchMetaFromOpenAPI(openapiModel)) + } if err != nil { return interpretStrategicMergePatchError(err) } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go index c5fd95e894918..e238c2254af7d 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go @@ -44,6 +44,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" "k8s.io/apiserver/pkg/endpoints/metrics" + "k8s.io/apiserver/pkg/endpoints/openapi" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/rest" @@ -110,6 +111,8 @@ type RequestScope struct { HubGroupVersion schema.GroupVersion MaxRequestBodyBytes int64 + + OpenapiModels openapi.ModelsByGKV } func (scope *RequestScope) err(err error, w http.ResponseWriter, req *http.Request) { diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go b/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go index b1f53df0d3832..2a9ec854b450d 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go @@ -18,6 +18,7 @@ package openapi import ( "bytes" + "errors" "fmt" "reflect" "sort" @@ -31,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kube-openapi/pkg/util" "k8s.io/kube-openapi/pkg/validation/spec" + "k8s.io/kube-openapi/pkg/util/proto" ) var verbs = util.NewTrie([]string{"get", "log", "read", "replace", "patch", "delete", "deletecollection", "watch", "connect", "proxy", "list", "create", "patch"}) @@ -189,3 +191,76 @@ func (d *DefinitionNamer) GetDefinitionName(name string) (string, spec.Extension } return friendlyName(name), nil } + +type ModelsByGKV map[schema.GroupVersionKind]proto.Schema + +// NewOpenAPIData creates a new `Resources` out of the openapi models +func GetModelsByGKV(models proto.Models) (ModelsByGKV, error) { + result := map[schema.GroupVersionKind]proto.Schema{} + for _, modelName := range models.ListModels() { + model := models.LookupModel(modelName) + if model == nil { + return map[schema.GroupVersionKind]proto.Schema{}, errors.New("ListModels returns a model that can't be looked-up.") + } + gvkList := parseGroupVersionKind(model) + for _, gvk := range gvkList { + if len(gvk.Kind) > 0 { + key := schema.GroupVersionKind{Group: gvk.Group, Version: gvk.Version, Kind: gvk.Kind} + if key.Group == "core" { + key.Group = "" + } + result[key] = model + } + } + } + + return result, nil +} + +// Get and parse GroupVersionKind from the extension. Returns empty if it doesn't have one. +func parseGroupVersionKind(s proto.Schema) []schema.GroupVersionKind { + extensions := s.GetExtensions() + + gvkListResult := []schema.GroupVersionKind{} + + // Get the extensions + gvkExtension, ok := extensions[extensionGVK] + if !ok { + return []schema.GroupVersionKind{} + } + + // gvk extension must be a list of at least 1 element. + gvkList, ok := gvkExtension.([]interface{}) + if !ok { + return []schema.GroupVersionKind{} + } + + for _, gvk := range gvkList { + // gvk extension list must be a map with group, version, and + // kind fields + gvkMap, ok := gvk.(map[interface{}]interface{}) + if !ok { + continue + } + group, ok := gvkMap["group"].(string) + if !ok { + continue + } + version, ok := gvkMap["version"].(string) + if !ok { + continue + } + kind, ok := gvkMap["kind"].(string) + if !ok { + continue + } + + gvkListResult = append(gvkListResult, schema.GroupVersionKind{ + Group: group, + Version: version, + Kind: kind, + }) + } + + return gvkListResult +} From 867958228f5eb3f21cf1d8b3286c8f360b487d27 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Thu, 1 Apr 2021 12:51:46 -0400 Subject: [PATCH 17/87] WORKAROUND: Allow core Kube generated openapi to be available In order to compile from a go module, the APIServer requires access to GetOpenAPIDefinitions() for at least a subset of the core code. The minimal control plane would need openapi docs for all inline objects - one way to solve that would be to split the set up based on what objects are registered and to accept definitions at init time. In either case, a downstream vendor would have to reference some of these objects, so exclude them from being ignored temporarily until a longer term solution can be provided. --- .gitignore | 4 +- pkg/generated/openapi/zz_generated.openapi.go | 45572 ++++++++++++++++ 2 files changed, 45575 insertions(+), 1 deletion(-) create mode 100644 pkg/generated/openapi/zz_generated.openapi.go diff --git a/.gitignore b/.gitignore index 9f723191cc303..1333510718523 100644 --- a/.gitignore +++ b/.gitignore @@ -106,7 +106,9 @@ kubernetes.tar.gz # generated files in any directory # TODO(thockin): uncomment this when we stop committing the generated files. #zz_generated.* -zz_generated.openapi.go +# HACK: Needed for short term dependencies on core openapi docs, will need to be refactored +# out of api dependencies in order to vendor a "pure" Kube API +# zz_generated.openapi.go zz_generated_*_test.go # TODO(roycaihw): remove this when we stop committing the generated definition diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go new file mode 100644 index 0000000000000..ac93ea80530ec --- /dev/null +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -0,0 +1,45572 @@ +// +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 openapi-gen. DO NOT EDIT. + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +package openapi + +import ( + spec "github.com/go-openapi/spec" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + resource "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + intstr "k8s.io/apimachinery/pkg/util/intstr" + common "k8s.io/kube-openapi/pkg/common" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{ + "k8s.io/api/admissionregistration/v1.MutatingWebhook": schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref), + "k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref), + "k8s.io/api/admissionregistration/v1.MutatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList(ref), + "k8s.io/api/admissionregistration/v1.Rule": schema_k8sio_api_admissionregistration_v1_Rule(ref), + "k8s.io/api/admissionregistration/v1.RuleWithOperations": schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref), + "k8s.io/api/admissionregistration/v1.ServiceReference": schema_k8sio_api_admissionregistration_v1_ServiceReference(ref), + "k8s.io/api/admissionregistration/v1.ValidatingWebhook": schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref), + "k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(ref), + "k8s.io/api/admissionregistration/v1.ValidatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationList(ref), + "k8s.io/api/admissionregistration/v1.WebhookClientConfig": schema_k8sio_api_admissionregistration_v1_WebhookClientConfig(ref), + "k8s.io/api/admissionregistration/v1beta1.MutatingWebhook": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref), + "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration(ref), + "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfigurationList(ref), + "k8s.io/api/admissionregistration/v1beta1.Rule": schema_k8sio_api_admissionregistration_v1beta1_Rule(ref), + "k8s.io/api/admissionregistration/v1beta1.RuleWithOperations": schema_k8sio_api_admissionregistration_v1beta1_RuleWithOperations(ref), + "k8s.io/api/admissionregistration/v1beta1.ServiceReference": schema_k8sio_api_admissionregistration_v1beta1_ServiceReference(ref), + "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref), + "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/apps/v1.ControllerRevision": schema_k8sio_api_apps_v1_ControllerRevision(ref), + "k8s.io/api/apps/v1.ControllerRevisionList": schema_k8sio_api_apps_v1_ControllerRevisionList(ref), + "k8s.io/api/apps/v1.DaemonSet": schema_k8sio_api_apps_v1_DaemonSet(ref), + "k8s.io/api/apps/v1.DaemonSetCondition": schema_k8sio_api_apps_v1_DaemonSetCondition(ref), + "k8s.io/api/apps/v1.DaemonSetList": schema_k8sio_api_apps_v1_DaemonSetList(ref), + "k8s.io/api/apps/v1.DaemonSetSpec": schema_k8sio_api_apps_v1_DaemonSetSpec(ref), + "k8s.io/api/apps/v1.DaemonSetStatus": schema_k8sio_api_apps_v1_DaemonSetStatus(ref), + "k8s.io/api/apps/v1.DaemonSetUpdateStrategy": schema_k8sio_api_apps_v1_DaemonSetUpdateStrategy(ref), + "k8s.io/api/apps/v1.Deployment": schema_k8sio_api_apps_v1_Deployment(ref), + "k8s.io/api/apps/v1.DeploymentCondition": schema_k8sio_api_apps_v1_DeploymentCondition(ref), + "k8s.io/api/apps/v1.DeploymentList": schema_k8sio_api_apps_v1_DeploymentList(ref), + "k8s.io/api/apps/v1.DeploymentSpec": schema_k8sio_api_apps_v1_DeploymentSpec(ref), + "k8s.io/api/apps/v1.DeploymentStatus": schema_k8sio_api_apps_v1_DeploymentStatus(ref), + "k8s.io/api/apps/v1.DeploymentStrategy": schema_k8sio_api_apps_v1_DeploymentStrategy(ref), + "k8s.io/api/apps/v1.ReplicaSet": schema_k8sio_api_apps_v1_ReplicaSet(ref), + "k8s.io/api/apps/v1.ReplicaSetCondition": schema_k8sio_api_apps_v1_ReplicaSetCondition(ref), + "k8s.io/api/apps/v1.ReplicaSetList": schema_k8sio_api_apps_v1_ReplicaSetList(ref), + "k8s.io/api/apps/v1.ReplicaSetSpec": schema_k8sio_api_apps_v1_ReplicaSetSpec(ref), + "k8s.io/api/apps/v1.ReplicaSetStatus": schema_k8sio_api_apps_v1_ReplicaSetStatus(ref), + "k8s.io/api/apps/v1.RollingUpdateDaemonSet": schema_k8sio_api_apps_v1_RollingUpdateDaemonSet(ref), + "k8s.io/api/apps/v1.RollingUpdateDeployment": schema_k8sio_api_apps_v1_RollingUpdateDeployment(ref), + "k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1_RollingUpdateStatefulSetStrategy(ref), + "k8s.io/api/apps/v1.StatefulSet": schema_k8sio_api_apps_v1_StatefulSet(ref), + "k8s.io/api/apps/v1.StatefulSetCondition": schema_k8sio_api_apps_v1_StatefulSetCondition(ref), + "k8s.io/api/apps/v1.StatefulSetList": schema_k8sio_api_apps_v1_StatefulSetList(ref), + "k8s.io/api/apps/v1.StatefulSetSpec": schema_k8sio_api_apps_v1_StatefulSetSpec(ref), + "k8s.io/api/apps/v1.StatefulSetStatus": schema_k8sio_api_apps_v1_StatefulSetStatus(ref), + "k8s.io/api/apps/v1.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref), + "k8s.io/api/apps/v1beta1.ControllerRevision": schema_k8sio_api_apps_v1beta1_ControllerRevision(ref), + "k8s.io/api/apps/v1beta1.ControllerRevisionList": schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref), + "k8s.io/api/apps/v1beta1.Deployment": schema_k8sio_api_apps_v1beta1_Deployment(ref), + "k8s.io/api/apps/v1beta1.DeploymentCondition": schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref), + "k8s.io/api/apps/v1beta1.DeploymentList": schema_k8sio_api_apps_v1beta1_DeploymentList(ref), + "k8s.io/api/apps/v1beta1.DeploymentRollback": schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref), + "k8s.io/api/apps/v1beta1.DeploymentSpec": schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref), + "k8s.io/api/apps/v1beta1.DeploymentStatus": schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref), + "k8s.io/api/apps/v1beta1.DeploymentStrategy": schema_k8sio_api_apps_v1beta1_DeploymentStrategy(ref), + "k8s.io/api/apps/v1beta1.RollbackConfig": schema_k8sio_api_apps_v1beta1_RollbackConfig(ref), + "k8s.io/api/apps/v1beta1.RollingUpdateDeployment": schema_k8sio_api_apps_v1beta1_RollingUpdateDeployment(ref), + "k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1beta1_RollingUpdateStatefulSetStrategy(ref), + "k8s.io/api/apps/v1beta1.Scale": schema_k8sio_api_apps_v1beta1_Scale(ref), + "k8s.io/api/apps/v1beta1.ScaleSpec": schema_k8sio_api_apps_v1beta1_ScaleSpec(ref), + "k8s.io/api/apps/v1beta1.ScaleStatus": schema_k8sio_api_apps_v1beta1_ScaleStatus(ref), + "k8s.io/api/apps/v1beta1.StatefulSet": schema_k8sio_api_apps_v1beta1_StatefulSet(ref), + "k8s.io/api/apps/v1beta1.StatefulSetCondition": schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref), + "k8s.io/api/apps/v1beta1.StatefulSetList": schema_k8sio_api_apps_v1beta1_StatefulSetList(ref), + "k8s.io/api/apps/v1beta1.StatefulSetSpec": schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref), + "k8s.io/api/apps/v1beta1.StatefulSetStatus": schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref), + "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1beta1_StatefulSetUpdateStrategy(ref), + "k8s.io/api/apps/v1beta2.ControllerRevision": schema_k8sio_api_apps_v1beta2_ControllerRevision(ref), + "k8s.io/api/apps/v1beta2.ControllerRevisionList": schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref), + "k8s.io/api/apps/v1beta2.DaemonSet": schema_k8sio_api_apps_v1beta2_DaemonSet(ref), + "k8s.io/api/apps/v1beta2.DaemonSetCondition": schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref), + "k8s.io/api/apps/v1beta2.DaemonSetList": schema_k8sio_api_apps_v1beta2_DaemonSetList(ref), + "k8s.io/api/apps/v1beta2.DaemonSetSpec": schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref), + "k8s.io/api/apps/v1beta2.DaemonSetStatus": schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref), + "k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy": schema_k8sio_api_apps_v1beta2_DaemonSetUpdateStrategy(ref), + "k8s.io/api/apps/v1beta2.Deployment": schema_k8sio_api_apps_v1beta2_Deployment(ref), + "k8s.io/api/apps/v1beta2.DeploymentCondition": schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref), + "k8s.io/api/apps/v1beta2.DeploymentList": schema_k8sio_api_apps_v1beta2_DeploymentList(ref), + "k8s.io/api/apps/v1beta2.DeploymentSpec": schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref), + "k8s.io/api/apps/v1beta2.DeploymentStatus": schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref), + "k8s.io/api/apps/v1beta2.DeploymentStrategy": schema_k8sio_api_apps_v1beta2_DeploymentStrategy(ref), + "k8s.io/api/apps/v1beta2.ReplicaSet": schema_k8sio_api_apps_v1beta2_ReplicaSet(ref), + "k8s.io/api/apps/v1beta2.ReplicaSetCondition": schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref), + "k8s.io/api/apps/v1beta2.ReplicaSetList": schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref), + "k8s.io/api/apps/v1beta2.ReplicaSetSpec": schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref), + "k8s.io/api/apps/v1beta2.ReplicaSetStatus": schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref), + "k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet": schema_k8sio_api_apps_v1beta2_RollingUpdateDaemonSet(ref), + "k8s.io/api/apps/v1beta2.RollingUpdateDeployment": schema_k8sio_api_apps_v1beta2_RollingUpdateDeployment(ref), + "k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1beta2_RollingUpdateStatefulSetStrategy(ref), + "k8s.io/api/apps/v1beta2.Scale": schema_k8sio_api_apps_v1beta2_Scale(ref), + "k8s.io/api/apps/v1beta2.ScaleSpec": schema_k8sio_api_apps_v1beta2_ScaleSpec(ref), + "k8s.io/api/apps/v1beta2.ScaleStatus": schema_k8sio_api_apps_v1beta2_ScaleStatus(ref), + "k8s.io/api/apps/v1beta2.StatefulSet": schema_k8sio_api_apps_v1beta2_StatefulSet(ref), + "k8s.io/api/apps/v1beta2.StatefulSetCondition": schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref), + "k8s.io/api/apps/v1beta2.StatefulSetList": schema_k8sio_api_apps_v1beta2_StatefulSetList(ref), + "k8s.io/api/apps/v1beta2.StatefulSetSpec": schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref), + "k8s.io/api/apps/v1beta2.StatefulSetStatus": schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref), + "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref), + "k8s.io/api/auditregistration/v1alpha1.AuditSink": schema_k8sio_api_auditregistration_v1alpha1_AuditSink(ref), + "k8s.io/api/auditregistration/v1alpha1.AuditSinkList": schema_k8sio_api_auditregistration_v1alpha1_AuditSinkList(ref), + "k8s.io/api/auditregistration/v1alpha1.AuditSinkSpec": schema_k8sio_api_auditregistration_v1alpha1_AuditSinkSpec(ref), + "k8s.io/api/auditregistration/v1alpha1.Policy": schema_k8sio_api_auditregistration_v1alpha1_Policy(ref), + "k8s.io/api/auditregistration/v1alpha1.ServiceReference": schema_k8sio_api_auditregistration_v1alpha1_ServiceReference(ref), + "k8s.io/api/auditregistration/v1alpha1.Webhook": schema_k8sio_api_auditregistration_v1alpha1_Webhook(ref), + "k8s.io/api/auditregistration/v1alpha1.WebhookClientConfig": schema_k8sio_api_auditregistration_v1alpha1_WebhookClientConfig(ref), + "k8s.io/api/auditregistration/v1alpha1.WebhookThrottleConfig": schema_k8sio_api_auditregistration_v1alpha1_WebhookThrottleConfig(ref), + "k8s.io/api/authentication/v1.BoundObjectReference": schema_k8sio_api_authentication_v1_BoundObjectReference(ref), + "k8s.io/api/authentication/v1.TokenRequest": schema_k8sio_api_authentication_v1_TokenRequest(ref), + "k8s.io/api/authentication/v1.TokenRequestSpec": schema_k8sio_api_authentication_v1_TokenRequestSpec(ref), + "k8s.io/api/authentication/v1.TokenRequestStatus": schema_k8sio_api_authentication_v1_TokenRequestStatus(ref), + "k8s.io/api/authentication/v1.TokenReview": schema_k8sio_api_authentication_v1_TokenReview(ref), + "k8s.io/api/authentication/v1.TokenReviewSpec": schema_k8sio_api_authentication_v1_TokenReviewSpec(ref), + "k8s.io/api/authentication/v1.TokenReviewStatus": schema_k8sio_api_authentication_v1_TokenReviewStatus(ref), + "k8s.io/api/authentication/v1.UserInfo": schema_k8sio_api_authentication_v1_UserInfo(ref), + "k8s.io/api/authentication/v1beta1.TokenReview": schema_k8sio_api_authentication_v1beta1_TokenReview(ref), + "k8s.io/api/authentication/v1beta1.TokenReviewSpec": schema_k8sio_api_authentication_v1beta1_TokenReviewSpec(ref), + "k8s.io/api/authentication/v1beta1.TokenReviewStatus": schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref), + "k8s.io/api/authentication/v1beta1.UserInfo": schema_k8sio_api_authentication_v1beta1_UserInfo(ref), + "k8s.io/api/authorization/v1.LocalSubjectAccessReview": schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref), + "k8s.io/api/authorization/v1.NonResourceAttributes": schema_k8sio_api_authorization_v1_NonResourceAttributes(ref), + "k8s.io/api/authorization/v1.NonResourceRule": schema_k8sio_api_authorization_v1_NonResourceRule(ref), + "k8s.io/api/authorization/v1.ResourceAttributes": schema_k8sio_api_authorization_v1_ResourceAttributes(ref), + "k8s.io/api/authorization/v1.ResourceRule": schema_k8sio_api_authorization_v1_ResourceRule(ref), + "k8s.io/api/authorization/v1.SelfSubjectAccessReview": schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref), + "k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec": schema_k8sio_api_authorization_v1_SelfSubjectAccessReviewSpec(ref), + "k8s.io/api/authorization/v1.SelfSubjectRulesReview": schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref), + "k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec": schema_k8sio_api_authorization_v1_SelfSubjectRulesReviewSpec(ref), + "k8s.io/api/authorization/v1.SubjectAccessReview": schema_k8sio_api_authorization_v1_SubjectAccessReview(ref), + "k8s.io/api/authorization/v1.SubjectAccessReviewSpec": schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref), + "k8s.io/api/authorization/v1.SubjectAccessReviewStatus": schema_k8sio_api_authorization_v1_SubjectAccessReviewStatus(ref), + "k8s.io/api/authorization/v1.SubjectRulesReviewStatus": schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref), + "k8s.io/api/authorization/v1beta1.LocalSubjectAccessReview": schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref), + "k8s.io/api/authorization/v1beta1.NonResourceAttributes": schema_k8sio_api_authorization_v1beta1_NonResourceAttributes(ref), + "k8s.io/api/authorization/v1beta1.NonResourceRule": schema_k8sio_api_authorization_v1beta1_NonResourceRule(ref), + "k8s.io/api/authorization/v1beta1.ResourceAttributes": schema_k8sio_api_authorization_v1beta1_ResourceAttributes(ref), + "k8s.io/api/authorization/v1beta1.ResourceRule": schema_k8sio_api_authorization_v1beta1_ResourceRule(ref), + "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReview": schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref), + "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec": schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReviewSpec(ref), + "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReview": schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref), + "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec": schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReviewSpec(ref), + "k8s.io/api/authorization/v1beta1.SubjectAccessReview": schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref), + "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec": schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref), + "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus": schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewStatus(ref), + "k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus": schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref), + "k8s.io/api/autoscaling/v1.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref), + "k8s.io/api/autoscaling/v1.ExternalMetricSource": schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref), + "k8s.io/api/autoscaling/v1.ExternalMetricStatus": schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref), + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref), + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref), + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref), + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref), + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref), + "k8s.io/api/autoscaling/v1.MetricSpec": schema_k8sio_api_autoscaling_v1_MetricSpec(ref), + "k8s.io/api/autoscaling/v1.MetricStatus": schema_k8sio_api_autoscaling_v1_MetricStatus(ref), + "k8s.io/api/autoscaling/v1.ObjectMetricSource": schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref), + "k8s.io/api/autoscaling/v1.ObjectMetricStatus": schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref), + "k8s.io/api/autoscaling/v1.PodsMetricSource": schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref), + "k8s.io/api/autoscaling/v1.PodsMetricStatus": schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref), + "k8s.io/api/autoscaling/v1.ResourceMetricSource": schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref), + "k8s.io/api/autoscaling/v1.ResourceMetricStatus": schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref), + "k8s.io/api/autoscaling/v1.Scale": schema_k8sio_api_autoscaling_v1_Scale(ref), + "k8s.io/api/autoscaling/v1.ScaleSpec": schema_k8sio_api_autoscaling_v1_ScaleSpec(ref), + "k8s.io/api/autoscaling/v1.ScaleStatus": schema_k8sio_api_autoscaling_v1_ScaleStatus(ref), + "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref), + "k8s.io/api/autoscaling/v2beta1.ExternalMetricSource": schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref), + "k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref), + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref), + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref), + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref), + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref), + "k8s.io/api/autoscaling/v2beta1.MetricSpec": schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref), + "k8s.io/api/autoscaling/v2beta1.MetricStatus": schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref), + "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource": schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref), + "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta1.PodsMetricSource": schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref), + "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus": schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource": schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref), + "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref), + "k8s.io/api/autoscaling/v2beta2.ExternalMetricSource": schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref), + "k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy": schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref), + "k8s.io/api/autoscaling/v2beta2.HPAScalingRules": schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref), + "k8s.io/api/autoscaling/v2beta2.MetricIdentifier": schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref), + "k8s.io/api/autoscaling/v2beta2.MetricSpec": schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref), + "k8s.io/api/autoscaling/v2beta2.MetricStatus": schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.MetricTarget": schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref), + "k8s.io/api/autoscaling/v2beta2.MetricValueStatus": schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref), + "k8s.io/api/autoscaling/v2beta2.ObjectMetricSource": schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref), + "k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.PodsMetricSource": schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref), + "k8s.io/api/autoscaling/v2beta2.PodsMetricStatus": schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.ResourceMetricSource": schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref), + "k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref), + "k8s.io/api/batch/v1.Job": schema_k8sio_api_batch_v1_Job(ref), + "k8s.io/api/batch/v1.JobCondition": schema_k8sio_api_batch_v1_JobCondition(ref), + "k8s.io/api/batch/v1.JobList": schema_k8sio_api_batch_v1_JobList(ref), + "k8s.io/api/batch/v1.JobSpec": schema_k8sio_api_batch_v1_JobSpec(ref), + "k8s.io/api/batch/v1.JobStatus": schema_k8sio_api_batch_v1_JobStatus(ref), + "k8s.io/api/batch/v1beta1.CronJob": schema_k8sio_api_batch_v1beta1_CronJob(ref), + "k8s.io/api/batch/v1beta1.CronJobList": schema_k8sio_api_batch_v1beta1_CronJobList(ref), + "k8s.io/api/batch/v1beta1.CronJobSpec": schema_k8sio_api_batch_v1beta1_CronJobSpec(ref), + "k8s.io/api/batch/v1beta1.CronJobStatus": schema_k8sio_api_batch_v1beta1_CronJobStatus(ref), + "k8s.io/api/batch/v1beta1.JobTemplate": schema_k8sio_api_batch_v1beta1_JobTemplate(ref), + "k8s.io/api/batch/v1beta1.JobTemplateSpec": schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref), + "k8s.io/api/batch/v2alpha1.CronJob": schema_k8sio_api_batch_v2alpha1_CronJob(ref), + "k8s.io/api/batch/v2alpha1.CronJobList": schema_k8sio_api_batch_v2alpha1_CronJobList(ref), + "k8s.io/api/batch/v2alpha1.CronJobSpec": schema_k8sio_api_batch_v2alpha1_CronJobSpec(ref), + "k8s.io/api/batch/v2alpha1.CronJobStatus": schema_k8sio_api_batch_v2alpha1_CronJobStatus(ref), + "k8s.io/api/batch/v2alpha1.JobTemplate": schema_k8sio_api_batch_v2alpha1_JobTemplate(ref), + "k8s.io/api/batch/v2alpha1.JobTemplateSpec": schema_k8sio_api_batch_v2alpha1_JobTemplateSpec(ref), + "k8s.io/api/certificates/v1beta1.CertificateSigningRequest": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref), + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(ref), + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestList": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref), + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref), + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref), + "k8s.io/api/coordination/v1.Lease": schema_k8sio_api_coordination_v1_Lease(ref), + "k8s.io/api/coordination/v1.LeaseList": schema_k8sio_api_coordination_v1_LeaseList(ref), + "k8s.io/api/coordination/v1.LeaseSpec": schema_k8sio_api_coordination_v1_LeaseSpec(ref), + "k8s.io/api/coordination/v1beta1.Lease": schema_k8sio_api_coordination_v1beta1_Lease(ref), + "k8s.io/api/coordination/v1beta1.LeaseList": schema_k8sio_api_coordination_v1beta1_LeaseList(ref), + "k8s.io/api/coordination/v1beta1.LeaseSpec": schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref), + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), + "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), + "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), + "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), + "k8s.io/api/core/v1.AzureDiskVolumeSource": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), + "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), + "k8s.io/api/core/v1.AzureFileVolumeSource": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), + "k8s.io/api/core/v1.Binding": schema_k8sio_api_core_v1_Binding(ref), + "k8s.io/api/core/v1.CSIPersistentVolumeSource": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CSIVolumeSource": schema_k8sio_api_core_v1_CSIVolumeSource(ref), + "k8s.io/api/core/v1.Capabilities": schema_k8sio_api_core_v1_Capabilities(ref), + "k8s.io/api/core/v1.CephFSPersistentVolumeSource": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CephFSVolumeSource": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), + "k8s.io/api/core/v1.CinderPersistentVolumeSource": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CinderVolumeSource": schema_k8sio_api_core_v1_CinderVolumeSource(ref), + "k8s.io/api/core/v1.ClientIPConfig": schema_k8sio_api_core_v1_ClientIPConfig(ref), + "k8s.io/api/core/v1.ComponentCondition": schema_k8sio_api_core_v1_ComponentCondition(ref), + "k8s.io/api/core/v1.ComponentStatus": schema_k8sio_api_core_v1_ComponentStatus(ref), + "k8s.io/api/core/v1.ComponentStatusList": schema_k8sio_api_core_v1_ComponentStatusList(ref), + "k8s.io/api/core/v1.ConfigMap": schema_k8sio_api_core_v1_ConfigMap(ref), + "k8s.io/api/core/v1.ConfigMapEnvSource": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), + "k8s.io/api/core/v1.ConfigMapKeySelector": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), + "k8s.io/api/core/v1.ConfigMapList": schema_k8sio_api_core_v1_ConfigMapList(ref), + "k8s.io/api/core/v1.ConfigMapNodeConfigSource": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), + "k8s.io/api/core/v1.ConfigMapProjection": schema_k8sio_api_core_v1_ConfigMapProjection(ref), + "k8s.io/api/core/v1.ConfigMapVolumeSource": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), + "k8s.io/api/core/v1.Container": schema_k8sio_api_core_v1_Container(ref), + "k8s.io/api/core/v1.ContainerImage": schema_k8sio_api_core_v1_ContainerImage(ref), + "k8s.io/api/core/v1.ContainerPort": schema_k8sio_api_core_v1_ContainerPort(ref), + "k8s.io/api/core/v1.ContainerState": schema_k8sio_api_core_v1_ContainerState(ref), + "k8s.io/api/core/v1.ContainerStateRunning": schema_k8sio_api_core_v1_ContainerStateRunning(ref), + "k8s.io/api/core/v1.ContainerStateTerminated": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), + "k8s.io/api/core/v1.ContainerStateWaiting": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), + "k8s.io/api/core/v1.ContainerStatus": schema_k8sio_api_core_v1_ContainerStatus(ref), + "k8s.io/api/core/v1.DaemonEndpoint": schema_k8sio_api_core_v1_DaemonEndpoint(ref), + "k8s.io/api/core/v1.DownwardAPIProjection": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), + "k8s.io/api/core/v1.DownwardAPIVolumeFile": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), + "k8s.io/api/core/v1.DownwardAPIVolumeSource": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), + "k8s.io/api/core/v1.EmptyDirVolumeSource": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), + "k8s.io/api/core/v1.EndpointAddress": schema_k8sio_api_core_v1_EndpointAddress(ref), + "k8s.io/api/core/v1.EndpointPort": schema_k8sio_api_core_v1_EndpointPort(ref), + "k8s.io/api/core/v1.EndpointSubset": schema_k8sio_api_core_v1_EndpointSubset(ref), + "k8s.io/api/core/v1.Endpoints": schema_k8sio_api_core_v1_Endpoints(ref), + "k8s.io/api/core/v1.EndpointsList": schema_k8sio_api_core_v1_EndpointsList(ref), + "k8s.io/api/core/v1.EnvFromSource": schema_k8sio_api_core_v1_EnvFromSource(ref), + "k8s.io/api/core/v1.EnvVar": schema_k8sio_api_core_v1_EnvVar(ref), + "k8s.io/api/core/v1.EnvVarSource": schema_k8sio_api_core_v1_EnvVarSource(ref), + "k8s.io/api/core/v1.EphemeralContainer": schema_k8sio_api_core_v1_EphemeralContainer(ref), + "k8s.io/api/core/v1.EphemeralContainerCommon": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), + "k8s.io/api/core/v1.EphemeralContainers": schema_k8sio_api_core_v1_EphemeralContainers(ref), + "k8s.io/api/core/v1.Event": schema_k8sio_api_core_v1_Event(ref), + "k8s.io/api/core/v1.EventList": schema_k8sio_api_core_v1_EventList(ref), + "k8s.io/api/core/v1.EventSeries": schema_k8sio_api_core_v1_EventSeries(ref), + "k8s.io/api/core/v1.EventSource": schema_k8sio_api_core_v1_EventSource(ref), + "k8s.io/api/core/v1.ExecAction": schema_k8sio_api_core_v1_ExecAction(ref), + "k8s.io/api/core/v1.FCVolumeSource": schema_k8sio_api_core_v1_FCVolumeSource(ref), + "k8s.io/api/core/v1.FlexPersistentVolumeSource": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), + "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), + "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), + "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), + "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), + "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), + "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), + "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), + "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), + "k8s.io/api/core/v1.Handler": schema_k8sio_api_core_v1_Handler(ref), + "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), + "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), + "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), + "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), + "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), + "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), + "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), + "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), + "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), + "k8s.io/api/core/v1.LimitRangeSpec": schema_k8sio_api_core_v1_LimitRangeSpec(ref), + "k8s.io/api/core/v1.List": schema_k8sio_api_core_v1_List(ref), + "k8s.io/api/core/v1.LoadBalancerIngress": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), + "k8s.io/api/core/v1.LoadBalancerStatus": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), + "k8s.io/api/core/v1.LocalObjectReference": schema_k8sio_api_core_v1_LocalObjectReference(ref), + "k8s.io/api/core/v1.LocalVolumeSource": schema_k8sio_api_core_v1_LocalVolumeSource(ref), + "k8s.io/api/core/v1.NFSVolumeSource": schema_k8sio_api_core_v1_NFSVolumeSource(ref), + "k8s.io/api/core/v1.Namespace": schema_k8sio_api_core_v1_Namespace(ref), + "k8s.io/api/core/v1.NamespaceCondition": schema_k8sio_api_core_v1_NamespaceCondition(ref), + "k8s.io/api/core/v1.NamespaceList": schema_k8sio_api_core_v1_NamespaceList(ref), + "k8s.io/api/core/v1.NamespaceSpec": schema_k8sio_api_core_v1_NamespaceSpec(ref), + "k8s.io/api/core/v1.NamespaceStatus": schema_k8sio_api_core_v1_NamespaceStatus(ref), + "k8s.io/api/core/v1.Node": schema_k8sio_api_core_v1_Node(ref), + "k8s.io/api/core/v1.NodeAddress": schema_k8sio_api_core_v1_NodeAddress(ref), + "k8s.io/api/core/v1.NodeAffinity": schema_k8sio_api_core_v1_NodeAffinity(ref), + "k8s.io/api/core/v1.NodeCondition": schema_k8sio_api_core_v1_NodeCondition(ref), + "k8s.io/api/core/v1.NodeConfigSource": schema_k8sio_api_core_v1_NodeConfigSource(ref), + "k8s.io/api/core/v1.NodeConfigStatus": schema_k8sio_api_core_v1_NodeConfigStatus(ref), + "k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), + "k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref), + "k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref), + "k8s.io/api/core/v1.NodeResources": schema_k8sio_api_core_v1_NodeResources(ref), + "k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref), + "k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), + "k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), + "k8s.io/api/core/v1.NodeSpec": schema_k8sio_api_core_v1_NodeSpec(ref), + "k8s.io/api/core/v1.NodeStatus": schema_k8sio_api_core_v1_NodeStatus(ref), + "k8s.io/api/core/v1.NodeSystemInfo": schema_k8sio_api_core_v1_NodeSystemInfo(ref), + "k8s.io/api/core/v1.ObjectFieldSelector": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), + "k8s.io/api/core/v1.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref), + "k8s.io/api/core/v1.PersistentVolume": schema_k8sio_api_core_v1_PersistentVolume(ref), + "k8s.io/api/core/v1.PersistentVolumeClaim": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimCondition": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimList": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimSpec": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimStatus": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), + "k8s.io/api/core/v1.PersistentVolumeList": schema_k8sio_api_core_v1_PersistentVolumeList(ref), + "k8s.io/api/core/v1.PersistentVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), + "k8s.io/api/core/v1.PersistentVolumeSpec": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), + "k8s.io/api/core/v1.PersistentVolumeStatus": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), + "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), + "k8s.io/api/core/v1.Pod": schema_k8sio_api_core_v1_Pod(ref), + "k8s.io/api/core/v1.PodAffinity": schema_k8sio_api_core_v1_PodAffinity(ref), + "k8s.io/api/core/v1.PodAffinityTerm": schema_k8sio_api_core_v1_PodAffinityTerm(ref), + "k8s.io/api/core/v1.PodAntiAffinity": schema_k8sio_api_core_v1_PodAntiAffinity(ref), + "k8s.io/api/core/v1.PodAttachOptions": schema_k8sio_api_core_v1_PodAttachOptions(ref), + "k8s.io/api/core/v1.PodCondition": schema_k8sio_api_core_v1_PodCondition(ref), + "k8s.io/api/core/v1.PodDNSConfig": schema_k8sio_api_core_v1_PodDNSConfig(ref), + "k8s.io/api/core/v1.PodDNSConfigOption": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), + "k8s.io/api/core/v1.PodExecOptions": schema_k8sio_api_core_v1_PodExecOptions(ref), + "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), + "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), + "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), + "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), + "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), + "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), + "k8s.io/api/core/v1.PodSecurityContext": schema_k8sio_api_core_v1_PodSecurityContext(ref), + "k8s.io/api/core/v1.PodSignature": schema_k8sio_api_core_v1_PodSignature(ref), + "k8s.io/api/core/v1.PodSpec": schema_k8sio_api_core_v1_PodSpec(ref), + "k8s.io/api/core/v1.PodStatus": schema_k8sio_api_core_v1_PodStatus(ref), + "k8s.io/api/core/v1.PodStatusResult": schema_k8sio_api_core_v1_PodStatusResult(ref), + "k8s.io/api/core/v1.PodTemplate": schema_k8sio_api_core_v1_PodTemplate(ref), + "k8s.io/api/core/v1.PodTemplateList": schema_k8sio_api_core_v1_PodTemplateList(ref), + "k8s.io/api/core/v1.PodTemplateSpec": schema_k8sio_api_core_v1_PodTemplateSpec(ref), + "k8s.io/api/core/v1.PortworxVolumeSource": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), + "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), + "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), + "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), + "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), + "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), + "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), + "k8s.io/api/core/v1.RBDVolumeSource": schema_k8sio_api_core_v1_RBDVolumeSource(ref), + "k8s.io/api/core/v1.RangeAllocation": schema_k8sio_api_core_v1_RangeAllocation(ref), + "k8s.io/api/core/v1.ReplicationController": schema_k8sio_api_core_v1_ReplicationController(ref), + "k8s.io/api/core/v1.ReplicationControllerCondition": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), + "k8s.io/api/core/v1.ReplicationControllerList": schema_k8sio_api_core_v1_ReplicationControllerList(ref), + "k8s.io/api/core/v1.ReplicationControllerSpec": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), + "k8s.io/api/core/v1.ReplicationControllerStatus": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), + "k8s.io/api/core/v1.ResourceFieldSelector": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), + "k8s.io/api/core/v1.ResourceQuota": schema_k8sio_api_core_v1_ResourceQuota(ref), + "k8s.io/api/core/v1.ResourceQuotaList": schema_k8sio_api_core_v1_ResourceQuotaList(ref), + "k8s.io/api/core/v1.ResourceQuotaSpec": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), + "k8s.io/api/core/v1.ResourceQuotaStatus": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), + "k8s.io/api/core/v1.ResourceRequirements": schema_k8sio_api_core_v1_ResourceRequirements(ref), + "k8s.io/api/core/v1.SELinuxOptions": schema_k8sio_api_core_v1_SELinuxOptions(ref), + "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), + "k8s.io/api/core/v1.ScaleIOVolumeSource": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), + "k8s.io/api/core/v1.ScopeSelector": schema_k8sio_api_core_v1_ScopeSelector(ref), + "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), + "k8s.io/api/core/v1.Secret": schema_k8sio_api_core_v1_Secret(ref), + "k8s.io/api/core/v1.SecretEnvSource": schema_k8sio_api_core_v1_SecretEnvSource(ref), + "k8s.io/api/core/v1.SecretKeySelector": schema_k8sio_api_core_v1_SecretKeySelector(ref), + "k8s.io/api/core/v1.SecretList": schema_k8sio_api_core_v1_SecretList(ref), + "k8s.io/api/core/v1.SecretProjection": schema_k8sio_api_core_v1_SecretProjection(ref), + "k8s.io/api/core/v1.SecretReference": schema_k8sio_api_core_v1_SecretReference(ref), + "k8s.io/api/core/v1.SecretVolumeSource": schema_k8sio_api_core_v1_SecretVolumeSource(ref), + "k8s.io/api/core/v1.SecurityContext": schema_k8sio_api_core_v1_SecurityContext(ref), + "k8s.io/api/core/v1.SerializedReference": schema_k8sio_api_core_v1_SerializedReference(ref), + "k8s.io/api/core/v1.Service": schema_k8sio_api_core_v1_Service(ref), + "k8s.io/api/core/v1.ServiceAccount": schema_k8sio_api_core_v1_ServiceAccount(ref), + "k8s.io/api/core/v1.ServiceAccountList": schema_k8sio_api_core_v1_ServiceAccountList(ref), + "k8s.io/api/core/v1.ServiceAccountTokenProjection": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), + "k8s.io/api/core/v1.ServiceList": schema_k8sio_api_core_v1_ServiceList(ref), + "k8s.io/api/core/v1.ServicePort": schema_k8sio_api_core_v1_ServicePort(ref), + "k8s.io/api/core/v1.ServiceProxyOptions": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), + "k8s.io/api/core/v1.ServiceSpec": schema_k8sio_api_core_v1_ServiceSpec(ref), + "k8s.io/api/core/v1.ServiceStatus": schema_k8sio_api_core_v1_ServiceStatus(ref), + "k8s.io/api/core/v1.SessionAffinityConfig": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), + "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), + "k8s.io/api/core/v1.StorageOSVolumeSource": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), + "k8s.io/api/core/v1.Sysctl": schema_k8sio_api_core_v1_Sysctl(ref), + "k8s.io/api/core/v1.TCPSocketAction": schema_k8sio_api_core_v1_TCPSocketAction(ref), + "k8s.io/api/core/v1.Taint": schema_k8sio_api_core_v1_Taint(ref), + "k8s.io/api/core/v1.Toleration": schema_k8sio_api_core_v1_Toleration(ref), + "k8s.io/api/core/v1.TopologySelectorLabelRequirement": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), + "k8s.io/api/core/v1.TopologySelectorTerm": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), + "k8s.io/api/core/v1.TopologySpreadConstraint": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), + "k8s.io/api/core/v1.TypedLocalObjectReference": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), + "k8s.io/api/core/v1.Volume": schema_k8sio_api_core_v1_Volume(ref), + "k8s.io/api/core/v1.VolumeDevice": schema_k8sio_api_core_v1_VolumeDevice(ref), + "k8s.io/api/core/v1.VolumeMount": schema_k8sio_api_core_v1_VolumeMount(ref), + "k8s.io/api/core/v1.VolumeNodeAffinity": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), + "k8s.io/api/core/v1.VolumeProjection": schema_k8sio_api_core_v1_VolumeProjection(ref), + "k8s.io/api/core/v1.VolumeSource": schema_k8sio_api_core_v1_VolumeSource(ref), + "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), + "k8s.io/api/core/v1.WeightedPodAffinityTerm": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), + "k8s.io/api/core/v1.WindowsSecurityContextOptions": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), + "k8s.io/api/discovery/v1alpha1.Endpoint": schema_k8sio_api_discovery_v1alpha1_Endpoint(ref), + "k8s.io/api/discovery/v1alpha1.EndpointConditions": schema_k8sio_api_discovery_v1alpha1_EndpointConditions(ref), + "k8s.io/api/discovery/v1alpha1.EndpointPort": schema_k8sio_api_discovery_v1alpha1_EndpointPort(ref), + "k8s.io/api/discovery/v1alpha1.EndpointSlice": schema_k8sio_api_discovery_v1alpha1_EndpointSlice(ref), + "k8s.io/api/discovery/v1alpha1.EndpointSliceList": schema_k8sio_api_discovery_v1alpha1_EndpointSliceList(ref), + "k8s.io/api/discovery/v1beta1.Endpoint": schema_k8sio_api_discovery_v1beta1_Endpoint(ref), + "k8s.io/api/discovery/v1beta1.EndpointConditions": schema_k8sio_api_discovery_v1beta1_EndpointConditions(ref), + "k8s.io/api/discovery/v1beta1.EndpointPort": schema_k8sio_api_discovery_v1beta1_EndpointPort(ref), + "k8s.io/api/discovery/v1beta1.EndpointSlice": schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref), + "k8s.io/api/discovery/v1beta1.EndpointSliceList": schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref), + "k8s.io/api/events/v1beta1.Event": schema_k8sio_api_events_v1beta1_Event(ref), + "k8s.io/api/events/v1beta1.EventList": schema_k8sio_api_events_v1beta1_EventList(ref), + "k8s.io/api/events/v1beta1.EventSeries": schema_k8sio_api_events_v1beta1_EventSeries(ref), + "k8s.io/api/extensions/v1beta1.AllowedCSIDriver": schema_k8sio_api_extensions_v1beta1_AllowedCSIDriver(ref), + "k8s.io/api/extensions/v1beta1.AllowedFlexVolume": schema_k8sio_api_extensions_v1beta1_AllowedFlexVolume(ref), + "k8s.io/api/extensions/v1beta1.AllowedHostPath": schema_k8sio_api_extensions_v1beta1_AllowedHostPath(ref), + "k8s.io/api/extensions/v1beta1.DaemonSet": schema_k8sio_api_extensions_v1beta1_DaemonSet(ref), + "k8s.io/api/extensions/v1beta1.DaemonSetCondition": schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref), + "k8s.io/api/extensions/v1beta1.DaemonSetList": schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref), + "k8s.io/api/extensions/v1beta1.DaemonSetSpec": schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref), + "k8s.io/api/extensions/v1beta1.DaemonSetStatus": schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref), + "k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy": schema_k8sio_api_extensions_v1beta1_DaemonSetUpdateStrategy(ref), + "k8s.io/api/extensions/v1beta1.Deployment": schema_k8sio_api_extensions_v1beta1_Deployment(ref), + "k8s.io/api/extensions/v1beta1.DeploymentCondition": schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref), + "k8s.io/api/extensions/v1beta1.DeploymentList": schema_k8sio_api_extensions_v1beta1_DeploymentList(ref), + "k8s.io/api/extensions/v1beta1.DeploymentRollback": schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref), + "k8s.io/api/extensions/v1beta1.DeploymentSpec": schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref), + "k8s.io/api/extensions/v1beta1.DeploymentStatus": schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref), + "k8s.io/api/extensions/v1beta1.DeploymentStrategy": schema_k8sio_api_extensions_v1beta1_DeploymentStrategy(ref), + "k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions": schema_k8sio_api_extensions_v1beta1_FSGroupStrategyOptions(ref), + "k8s.io/api/extensions/v1beta1.HTTPIngressPath": schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref), + "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue": schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref), + "k8s.io/api/extensions/v1beta1.HostPortRange": schema_k8sio_api_extensions_v1beta1_HostPortRange(ref), + "k8s.io/api/extensions/v1beta1.IDRange": schema_k8sio_api_extensions_v1beta1_IDRange(ref), + "k8s.io/api/extensions/v1beta1.IPBlock": schema_k8sio_api_extensions_v1beta1_IPBlock(ref), + "k8s.io/api/extensions/v1beta1.Ingress": schema_k8sio_api_extensions_v1beta1_Ingress(ref), + "k8s.io/api/extensions/v1beta1.IngressBackend": schema_k8sio_api_extensions_v1beta1_IngressBackend(ref), + "k8s.io/api/extensions/v1beta1.IngressList": schema_k8sio_api_extensions_v1beta1_IngressList(ref), + "k8s.io/api/extensions/v1beta1.IngressRule": schema_k8sio_api_extensions_v1beta1_IngressRule(ref), + "k8s.io/api/extensions/v1beta1.IngressRuleValue": schema_k8sio_api_extensions_v1beta1_IngressRuleValue(ref), + "k8s.io/api/extensions/v1beta1.IngressSpec": schema_k8sio_api_extensions_v1beta1_IngressSpec(ref), + "k8s.io/api/extensions/v1beta1.IngressStatus": schema_k8sio_api_extensions_v1beta1_IngressStatus(ref), + "k8s.io/api/extensions/v1beta1.IngressTLS": schema_k8sio_api_extensions_v1beta1_IngressTLS(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicy": schema_k8sio_api_extensions_v1beta1_NetworkPolicy(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule": schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule": schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicyList": schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer": schema_k8sio_api_extensions_v1beta1_NetworkPolicyPeer(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicyPort": schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicySpec": schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref), + "k8s.io/api/extensions/v1beta1.PodSecurityPolicy": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicy(ref), + "k8s.io/api/extensions/v1beta1.PodSecurityPolicyList": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicyList(ref), + "k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref), + "k8s.io/api/extensions/v1beta1.ReplicaSet": schema_k8sio_api_extensions_v1beta1_ReplicaSet(ref), + "k8s.io/api/extensions/v1beta1.ReplicaSetCondition": schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref), + "k8s.io/api/extensions/v1beta1.ReplicaSetList": schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref), + "k8s.io/api/extensions/v1beta1.ReplicaSetSpec": schema_k8sio_api_extensions_v1beta1_ReplicaSetSpec(ref), + "k8s.io/api/extensions/v1beta1.ReplicaSetStatus": schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref), + "k8s.io/api/extensions/v1beta1.RollbackConfig": schema_k8sio_api_extensions_v1beta1_RollbackConfig(ref), + "k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet": schema_k8sio_api_extensions_v1beta1_RollingUpdateDaemonSet(ref), + "k8s.io/api/extensions/v1beta1.RollingUpdateDeployment": schema_k8sio_api_extensions_v1beta1_RollingUpdateDeployment(ref), + "k8s.io/api/extensions/v1beta1.RunAsGroupStrategyOptions": schema_k8sio_api_extensions_v1beta1_RunAsGroupStrategyOptions(ref), + "k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions": schema_k8sio_api_extensions_v1beta1_RunAsUserStrategyOptions(ref), + "k8s.io/api/extensions/v1beta1.RuntimeClassStrategyOptions": schema_k8sio_api_extensions_v1beta1_RuntimeClassStrategyOptions(ref), + "k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions": schema_k8sio_api_extensions_v1beta1_SELinuxStrategyOptions(ref), + "k8s.io/api/extensions/v1beta1.Scale": schema_k8sio_api_extensions_v1beta1_Scale(ref), + "k8s.io/api/extensions/v1beta1.ScaleSpec": schema_k8sio_api_extensions_v1beta1_ScaleSpec(ref), + "k8s.io/api/extensions/v1beta1.ScaleStatus": schema_k8sio_api_extensions_v1beta1_ScaleStatus(ref), + "k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions": schema_k8sio_api_extensions_v1beta1_SupplementalGroupsStrategyOptions(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowDistinguisherMethod": schema_k8sio_api_flowcontrol_v1alpha1_FlowDistinguisherMethod(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowSchema": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchema(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaCondition": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaCondition(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaList": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaList(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaSpec": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaSpec(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaStatus": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaStatus(ref), + "k8s.io/api/flowcontrol/v1alpha1.GroupSubject": schema_k8sio_api_flowcontrol_v1alpha1_GroupSubject(ref), + "k8s.io/api/flowcontrol/v1alpha1.LimitResponse": schema_k8sio_api_flowcontrol_v1alpha1_LimitResponse(ref), + "k8s.io/api/flowcontrol/v1alpha1.LimitedPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1alpha1_LimitedPriorityLevelConfiguration(ref), + "k8s.io/api/flowcontrol/v1alpha1.NonResourcePolicyRule": schema_k8sio_api_flowcontrol_v1alpha1_NonResourcePolicyRule(ref), + "k8s.io/api/flowcontrol/v1alpha1.PolicyRulesWithSubjects": schema_k8sio_api_flowcontrol_v1alpha1_PolicyRulesWithSubjects(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfiguration(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationCondition": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationCondition(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationList": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationList(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationReference": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationReference(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationSpec": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationSpec(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationStatus": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationStatus(ref), + "k8s.io/api/flowcontrol/v1alpha1.QueuingConfiguration": schema_k8sio_api_flowcontrol_v1alpha1_QueuingConfiguration(ref), + "k8s.io/api/flowcontrol/v1alpha1.ResourcePolicyRule": schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref), + "k8s.io/api/flowcontrol/v1alpha1.ServiceAccountSubject": schema_k8sio_api_flowcontrol_v1alpha1_ServiceAccountSubject(ref), + "k8s.io/api/flowcontrol/v1alpha1.Subject": schema_k8sio_api_flowcontrol_v1alpha1_Subject(ref), + "k8s.io/api/flowcontrol/v1alpha1.UserSubject": schema_k8sio_api_flowcontrol_v1alpha1_UserSubject(ref), + "k8s.io/api/imagepolicy/v1alpha1.ImageReview": schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref), + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref), + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref), + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref), + "k8s.io/api/networking/v1.IPBlock": schema_k8sio_api_networking_v1_IPBlock(ref), + "k8s.io/api/networking/v1.NetworkPolicy": schema_k8sio_api_networking_v1_NetworkPolicy(ref), + "k8s.io/api/networking/v1.NetworkPolicyEgressRule": schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref), + "k8s.io/api/networking/v1.NetworkPolicyIngressRule": schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref), + "k8s.io/api/networking/v1.NetworkPolicyList": schema_k8sio_api_networking_v1_NetworkPolicyList(ref), + "k8s.io/api/networking/v1.NetworkPolicyPeer": schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref), + "k8s.io/api/networking/v1.NetworkPolicyPort": schema_k8sio_api_networking_v1_NetworkPolicyPort(ref), + "k8s.io/api/networking/v1.NetworkPolicySpec": schema_k8sio_api_networking_v1_NetworkPolicySpec(ref), + "k8s.io/api/networking/v1beta1.HTTPIngressPath": schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref), + "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue": schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref), + "k8s.io/api/networking/v1beta1.Ingress": schema_k8sio_api_networking_v1beta1_Ingress(ref), + "k8s.io/api/networking/v1beta1.IngressBackend": schema_k8sio_api_networking_v1beta1_IngressBackend(ref), + "k8s.io/api/networking/v1beta1.IngressClass": schema_k8sio_api_networking_v1beta1_IngressClass(ref), + "k8s.io/api/networking/v1beta1.IngressClassList": schema_k8sio_api_networking_v1beta1_IngressClassList(ref), + "k8s.io/api/networking/v1beta1.IngressClassSpec": schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref), + "k8s.io/api/networking/v1beta1.IngressList": schema_k8sio_api_networking_v1beta1_IngressList(ref), + "k8s.io/api/networking/v1beta1.IngressRule": schema_k8sio_api_networking_v1beta1_IngressRule(ref), + "k8s.io/api/networking/v1beta1.IngressRuleValue": schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref), + "k8s.io/api/networking/v1beta1.IngressSpec": schema_k8sio_api_networking_v1beta1_IngressSpec(ref), + "k8s.io/api/networking/v1beta1.IngressStatus": schema_k8sio_api_networking_v1beta1_IngressStatus(ref), + "k8s.io/api/networking/v1beta1.IngressTLS": schema_k8sio_api_networking_v1beta1_IngressTLS(ref), + "k8s.io/api/node/v1alpha1.Overhead": schema_k8sio_api_node_v1alpha1_Overhead(ref), + "k8s.io/api/node/v1alpha1.RuntimeClass": schema_k8sio_api_node_v1alpha1_RuntimeClass(ref), + "k8s.io/api/node/v1alpha1.RuntimeClassList": schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref), + "k8s.io/api/node/v1alpha1.RuntimeClassSpec": schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref), + "k8s.io/api/node/v1alpha1.Scheduling": schema_k8sio_api_node_v1alpha1_Scheduling(ref), + "k8s.io/api/node/v1beta1.Overhead": schema_k8sio_api_node_v1beta1_Overhead(ref), + "k8s.io/api/node/v1beta1.RuntimeClass": schema_k8sio_api_node_v1beta1_RuntimeClass(ref), + "k8s.io/api/node/v1beta1.RuntimeClassList": schema_k8sio_api_node_v1beta1_RuntimeClassList(ref), + "k8s.io/api/node/v1beta1.Scheduling": schema_k8sio_api_node_v1beta1_Scheduling(ref), + "k8s.io/api/policy/v1beta1.AllowedCSIDriver": schema_k8sio_api_policy_v1beta1_AllowedCSIDriver(ref), + "k8s.io/api/policy/v1beta1.AllowedFlexVolume": schema_k8sio_api_policy_v1beta1_AllowedFlexVolume(ref), + "k8s.io/api/policy/v1beta1.AllowedHostPath": schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref), + "k8s.io/api/policy/v1beta1.Eviction": schema_k8sio_api_policy_v1beta1_Eviction(ref), + "k8s.io/api/policy/v1beta1.FSGroupStrategyOptions": schema_k8sio_api_policy_v1beta1_FSGroupStrategyOptions(ref), + "k8s.io/api/policy/v1beta1.HostPortRange": schema_k8sio_api_policy_v1beta1_HostPortRange(ref), + "k8s.io/api/policy/v1beta1.IDRange": schema_k8sio_api_policy_v1beta1_IDRange(ref), + "k8s.io/api/policy/v1beta1.PodDisruptionBudget": schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref), + "k8s.io/api/policy/v1beta1.PodDisruptionBudgetList": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref), + "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref), + "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref), + "k8s.io/api/policy/v1beta1.PodSecurityPolicy": schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref), + "k8s.io/api/policy/v1beta1.PodSecurityPolicyList": schema_k8sio_api_policy_v1beta1_PodSecurityPolicyList(ref), + "k8s.io/api/policy/v1beta1.PodSecurityPolicySpec": schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref), + "k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions": schema_k8sio_api_policy_v1beta1_RunAsGroupStrategyOptions(ref), + "k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions": schema_k8sio_api_policy_v1beta1_RunAsUserStrategyOptions(ref), + "k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions": schema_k8sio_api_policy_v1beta1_RuntimeClassStrategyOptions(ref), + "k8s.io/api/policy/v1beta1.SELinuxStrategyOptions": schema_k8sio_api_policy_v1beta1_SELinuxStrategyOptions(ref), + "k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions": schema_k8sio_api_policy_v1beta1_SupplementalGroupsStrategyOptions(ref), + "k8s.io/api/rbac/v1.AggregationRule": schema_k8sio_api_rbac_v1_AggregationRule(ref), + "k8s.io/api/rbac/v1.ClusterRole": schema_k8sio_api_rbac_v1_ClusterRole(ref), + "k8s.io/api/rbac/v1.ClusterRoleBinding": schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref), + "k8s.io/api/rbac/v1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref), + "k8s.io/api/rbac/v1.ClusterRoleList": schema_k8sio_api_rbac_v1_ClusterRoleList(ref), + "k8s.io/api/rbac/v1.PolicyRule": schema_k8sio_api_rbac_v1_PolicyRule(ref), + "k8s.io/api/rbac/v1.Role": schema_k8sio_api_rbac_v1_Role(ref), + "k8s.io/api/rbac/v1.RoleBinding": schema_k8sio_api_rbac_v1_RoleBinding(ref), + "k8s.io/api/rbac/v1.RoleBindingList": schema_k8sio_api_rbac_v1_RoleBindingList(ref), + "k8s.io/api/rbac/v1.RoleList": schema_k8sio_api_rbac_v1_RoleList(ref), + "k8s.io/api/rbac/v1.RoleRef": schema_k8sio_api_rbac_v1_RoleRef(ref), + "k8s.io/api/rbac/v1.Subject": schema_k8sio_api_rbac_v1_Subject(ref), + "k8s.io/api/rbac/v1alpha1.AggregationRule": schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref), + "k8s.io/api/rbac/v1alpha1.ClusterRole": schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref), + "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding": schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref), + "k8s.io/api/rbac/v1alpha1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref), + "k8s.io/api/rbac/v1alpha1.ClusterRoleList": schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref), + "k8s.io/api/rbac/v1alpha1.PolicyRule": schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref), + "k8s.io/api/rbac/v1alpha1.Role": schema_k8sio_api_rbac_v1alpha1_Role(ref), + "k8s.io/api/rbac/v1alpha1.RoleBinding": schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref), + "k8s.io/api/rbac/v1alpha1.RoleBindingList": schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref), + "k8s.io/api/rbac/v1alpha1.RoleList": schema_k8sio_api_rbac_v1alpha1_RoleList(ref), + "k8s.io/api/rbac/v1alpha1.RoleRef": schema_k8sio_api_rbac_v1alpha1_RoleRef(ref), + "k8s.io/api/rbac/v1alpha1.Subject": schema_k8sio_api_rbac_v1alpha1_Subject(ref), + "k8s.io/api/rbac/v1beta1.AggregationRule": schema_k8sio_api_rbac_v1beta1_AggregationRule(ref), + "k8s.io/api/rbac/v1beta1.ClusterRole": schema_k8sio_api_rbac_v1beta1_ClusterRole(ref), + "k8s.io/api/rbac/v1beta1.ClusterRoleBinding": schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref), + "k8s.io/api/rbac/v1beta1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref), + "k8s.io/api/rbac/v1beta1.ClusterRoleList": schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref), + "k8s.io/api/rbac/v1beta1.PolicyRule": schema_k8sio_api_rbac_v1beta1_PolicyRule(ref), + "k8s.io/api/rbac/v1beta1.Role": schema_k8sio_api_rbac_v1beta1_Role(ref), + "k8s.io/api/rbac/v1beta1.RoleBinding": schema_k8sio_api_rbac_v1beta1_RoleBinding(ref), + "k8s.io/api/rbac/v1beta1.RoleBindingList": schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref), + "k8s.io/api/rbac/v1beta1.RoleList": schema_k8sio_api_rbac_v1beta1_RoleList(ref), + "k8s.io/api/rbac/v1beta1.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(ref), + "k8s.io/api/rbac/v1beta1.Subject": schema_k8sio_api_rbac_v1beta1_Subject(ref), + "k8s.io/api/scheduling/v1.PriorityClass": schema_k8sio_api_scheduling_v1_PriorityClass(ref), + "k8s.io/api/scheduling/v1.PriorityClassList": schema_k8sio_api_scheduling_v1_PriorityClassList(ref), + "k8s.io/api/scheduling/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), + "k8s.io/api/scheduling/v1alpha1.PriorityClassList": schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref), + "k8s.io/api/scheduling/v1beta1.PriorityClass": schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref), + "k8s.io/api/scheduling/v1beta1.PriorityClassList": schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref), + "k8s.io/api/settings/v1alpha1.PodPreset": schema_k8sio_api_settings_v1alpha1_PodPreset(ref), + "k8s.io/api/settings/v1alpha1.PodPresetList": schema_k8sio_api_settings_v1alpha1_PodPresetList(ref), + "k8s.io/api/settings/v1alpha1.PodPresetSpec": schema_k8sio_api_settings_v1alpha1_PodPresetSpec(ref), + "k8s.io/api/storage/v1.CSIDriver": schema_k8sio_api_storage_v1_CSIDriver(ref), + "k8s.io/api/storage/v1.CSIDriverList": schema_k8sio_api_storage_v1_CSIDriverList(ref), + "k8s.io/api/storage/v1.CSIDriverSpec": schema_k8sio_api_storage_v1_CSIDriverSpec(ref), + "k8s.io/api/storage/v1.CSINode": schema_k8sio_api_storage_v1_CSINode(ref), + "k8s.io/api/storage/v1.CSINodeDriver": schema_k8sio_api_storage_v1_CSINodeDriver(ref), + "k8s.io/api/storage/v1.CSINodeList": schema_k8sio_api_storage_v1_CSINodeList(ref), + "k8s.io/api/storage/v1.CSINodeSpec": schema_k8sio_api_storage_v1_CSINodeSpec(ref), + "k8s.io/api/storage/v1.StorageClass": schema_k8sio_api_storage_v1_StorageClass(ref), + "k8s.io/api/storage/v1.StorageClassList": schema_k8sio_api_storage_v1_StorageClassList(ref), + "k8s.io/api/storage/v1.VolumeAttachment": schema_k8sio_api_storage_v1_VolumeAttachment(ref), + "k8s.io/api/storage/v1.VolumeAttachmentList": schema_k8sio_api_storage_v1_VolumeAttachmentList(ref), + "k8s.io/api/storage/v1.VolumeAttachmentSource": schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref), + "k8s.io/api/storage/v1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref), + "k8s.io/api/storage/v1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref), + "k8s.io/api/storage/v1.VolumeError": schema_k8sio_api_storage_v1_VolumeError(ref), + "k8s.io/api/storage/v1.VolumeNodeResources": schema_k8sio_api_storage_v1_VolumeNodeResources(ref), + "k8s.io/api/storage/v1alpha1.VolumeAttachment": schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref), + "k8s.io/api/storage/v1alpha1.VolumeAttachmentList": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref), + "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref), + "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref), + "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref), + "k8s.io/api/storage/v1alpha1.VolumeError": schema_k8sio_api_storage_v1alpha1_VolumeError(ref), + "k8s.io/api/storage/v1beta1.CSIDriver": schema_k8sio_api_storage_v1beta1_CSIDriver(ref), + "k8s.io/api/storage/v1beta1.CSIDriverList": schema_k8sio_api_storage_v1beta1_CSIDriverList(ref), + "k8s.io/api/storage/v1beta1.CSIDriverSpec": schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref), + "k8s.io/api/storage/v1beta1.CSINode": schema_k8sio_api_storage_v1beta1_CSINode(ref), + "k8s.io/api/storage/v1beta1.CSINodeDriver": schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref), + "k8s.io/api/storage/v1beta1.CSINodeList": schema_k8sio_api_storage_v1beta1_CSINodeList(ref), + "k8s.io/api/storage/v1beta1.CSINodeSpec": schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref), + "k8s.io/api/storage/v1beta1.StorageClass": schema_k8sio_api_storage_v1beta1_StorageClass(ref), + "k8s.io/api/storage/v1beta1.StorageClassList": schema_k8sio_api_storage_v1beta1_StorageClassList(ref), + "k8s.io/api/storage/v1beta1.VolumeAttachment": schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref), + "k8s.io/api/storage/v1beta1.VolumeAttachmentList": schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref), + "k8s.io/api/storage/v1beta1.VolumeAttachmentSource": schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref), + "k8s.io/api/storage/v1beta1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref), + "k8s.io/api/storage/v1beta1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref), + "k8s.io/api/storage/v1beta1.VolumeError": schema_k8sio_api_storage_v1beta1_VolumeError(ref), + "k8s.io/api/storage/v1beta1.VolumeNodeResources": schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest": schema_pkg_apis_apiextensions_v1_ConversionRequest(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse": schema_pkg_apis_apiextensions_v1_ConversionResponse(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionReview": schema_pkg_apis_apiextensions_v1_ConversionReview(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition": schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion": schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition": schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionList": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources": schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation": schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation": schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON": schema_pkg_apis_apiextensions_v1_JSON(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps": schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference": schema_pkg_apis_apiextensions_v1_ServiceReference(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion": schema_pkg_apis_apiextensions_v1_WebhookConversion(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest": schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse": schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionReview": schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion": schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionList": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation": schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation": schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON": schema_pkg_apis_apiextensions_v1beta1_JSON(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference": schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref), + "k8s.io/apimachinery/pkg/api/resource.Quantity": schema_apimachinery_pkg_api_resource_Quantity(ref), + "k8s.io/apimachinery/pkg/api/resource.int64Amount": schema_apimachinery_pkg_api_resource_int64Amount(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ExportOptions": schema_pkg_apis_meta_v1_ExportOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1beta1.PartialObjectMetadataList": schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref), + "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), + "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), + "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), + "k8s.io/apimachinery/pkg/util/intstr.IntOrString": schema_apimachinery_pkg_util_intstr_IntOrString(ref), + "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.Event": schema_pkg_apis_audit_v1_Event(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.EventList": schema_pkg_apis_audit_v1_EventList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.GroupResources": schema_pkg_apis_audit_v1_GroupResources(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference": schema_pkg_apis_audit_v1_ObjectReference(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.Policy": schema_pkg_apis_audit_v1_Policy(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.PolicyList": schema_pkg_apis_audit_v1_PolicyList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule": schema_pkg_apis_audit_v1_PolicyRule(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event": schema_pkg_apis_audit_v1alpha1_Event(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.EventList": schema_pkg_apis_audit_v1alpha1_EventList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources": schema_pkg_apis_audit_v1alpha1_GroupResources(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference": schema_pkg_apis_audit_v1alpha1_ObjectReference(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy": schema_pkg_apis_audit_v1alpha1_Policy(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyList": schema_pkg_apis_audit_v1alpha1_PolicyList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule": schema_pkg_apis_audit_v1alpha1_PolicyRule(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.Event": schema_pkg_apis_audit_v1beta1_Event(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.EventList": schema_pkg_apis_audit_v1beta1_EventList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources": schema_pkg_apis_audit_v1beta1_GroupResources(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference": schema_pkg_apis_audit_v1beta1_ObjectReference(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy": schema_pkg_apis_audit_v1beta1_Policy(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyList": schema_pkg_apis_audit_v1beta1_PolicyList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule": schema_pkg_apis_audit_v1beta1_PolicyRule(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredential": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredential(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialSpec(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialStatus(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response": schema_pkg_apis_clientauthentication_v1alpha1_Response(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredential": schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec": schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus": schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService": schema_pkg_apis_apiregistration_v1_APIService(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition": schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceList": schema_pkg_apis_apiregistration_v1_APIServiceList(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec": schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus": schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference": schema_pkg_apis_apiregistration_v1_ServiceReference(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService": schema_pkg_apis_apiregistration_v1beta1_APIService(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition": schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceList": schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec": schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus": schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference": schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.CloudProviderConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_CloudProviderConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.GenericControllerManagerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource": schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.KubeCloudSharedConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_KubeCloudSharedConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.KubeControllerManagerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.ServiceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ServiceControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref), + "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref), + "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref), + "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref), + "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref), + "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref), + "k8s.io/kube-scheduler/config/v1.Extender": schema_k8sio_kube_scheduler_config_v1_Extender(ref), + "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource": schema_k8sio_kube_scheduler_config_v1_ExtenderManagedResource(ref), + "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig": schema_k8sio_kube_scheduler_config_v1_ExtenderTLSConfig(ref), + "k8s.io/kube-scheduler/config/v1.LabelPreference": schema_k8sio_kube_scheduler_config_v1_LabelPreference(ref), + "k8s.io/kube-scheduler/config/v1.LabelsPresence": schema_k8sio_kube_scheduler_config_v1_LabelsPresence(ref), + "k8s.io/kube-scheduler/config/v1.Policy": schema_k8sio_kube_scheduler_config_v1_Policy(ref), + "k8s.io/kube-scheduler/config/v1.PredicateArgument": schema_k8sio_kube_scheduler_config_v1_PredicateArgument(ref), + "k8s.io/kube-scheduler/config/v1.PredicatePolicy": schema_k8sio_kube_scheduler_config_v1_PredicatePolicy(ref), + "k8s.io/kube-scheduler/config/v1.PriorityArgument": schema_k8sio_kube_scheduler_config_v1_PriorityArgument(ref), + "k8s.io/kube-scheduler/config/v1.PriorityPolicy": schema_k8sio_kube_scheduler_config_v1_PriorityPolicy(ref), + "k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments": schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioArguments(ref), + "k8s.io/kube-scheduler/config/v1.ResourceSpec": schema_k8sio_kube_scheduler_config_v1_ResourceSpec(ref), + "k8s.io/kube-scheduler/config/v1.ServiceAffinity": schema_k8sio_kube_scheduler_config_v1_ServiceAffinity(ref), + "k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity": schema_k8sio_kube_scheduler_config_v1_ServiceAntiAffinity(ref), + "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint": schema_k8sio_kube_scheduler_config_v1_UtilizationShapePoint(ref), + "k8s.io/kube-scheduler/config/v1alpha1.KubeSchedulerConfiguration": schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerConfiguration(ref), + "k8s.io/kube-scheduler/config/v1alpha1.KubeSchedulerLeaderElectionConfiguration": schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerLeaderElectionConfiguration(ref), + "k8s.io/kube-scheduler/config/v1alpha1.Plugin": schema_k8sio_kube_scheduler_config_v1alpha1_Plugin(ref), + "k8s.io/kube-scheduler/config/v1alpha1.PluginConfig": schema_k8sio_kube_scheduler_config_v1alpha1_PluginConfig(ref), + "k8s.io/kube-scheduler/config/v1alpha1.PluginSet": schema_k8sio_kube_scheduler_config_v1alpha1_PluginSet(ref), + "k8s.io/kube-scheduler/config/v1alpha1.Plugins": schema_k8sio_kube_scheduler_config_v1alpha1_Plugins(ref), + "k8s.io/kube-scheduler/config/v1alpha1.SchedulerAlgorithmSource": schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerAlgorithmSource(ref), + "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyConfigMapSource": schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicyConfigMapSource(ref), + "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyFileSource": schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicyFileSource(ref), + "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicySource": schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicySource(ref), + "k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerConfiguration": schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerConfiguration(ref), + "k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerLeaderElectionConfiguration": schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerLeaderElectionConfiguration(ref), + "k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerProfile": schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerProfile(ref), + "k8s.io/kube-scheduler/config/v1alpha2.Plugin": schema_k8sio_kube_scheduler_config_v1alpha2_Plugin(ref), + "k8s.io/kube-scheduler/config/v1alpha2.PluginConfig": schema_k8sio_kube_scheduler_config_v1alpha2_PluginConfig(ref), + "k8s.io/kube-scheduler/config/v1alpha2.PluginSet": schema_k8sio_kube_scheduler_config_v1alpha2_PluginSet(ref), + "k8s.io/kube-scheduler/config/v1alpha2.Plugins": schema_k8sio_kube_scheduler_config_v1alpha2_Plugins(ref), + "k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletAnonymousAuthentication(ref), + "k8s.io/kubelet/config/v1beta1.KubeletAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletAuthentication(ref), + "k8s.io/kubelet/config/v1beta1.KubeletAuthorization": schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref), + "k8s.io/kubelet/config/v1beta1.KubeletConfiguration": schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref), + "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref), + "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization": schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref), + "k8s.io/kubelet/config/v1beta1.KubeletX509Authentication": schema_k8sio_kubelet_config_v1beta1_KubeletX509Authentication(ref), + "k8s.io/kubelet/config/v1beta1.SerializedNodeConfigSource": schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref), + "k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config/v1alpha1.CloudControllerManagerConfiguration": schema_app_apis_config_v1alpha1_CloudControllerManagerConfiguration(ref), + "k8s.io/kubernetes/pkg/apis/abac/v1beta1.Policy": schema_pkg_apis_abac_v1beta1_Policy(ref), + "k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec": schema_pkg_apis_abac_v1beta1_PolicySpec(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricListOptions": schema_pkg_apis_custom_metrics_v1beta1_MetricListOptions(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue": schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValueList": schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier": schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricListOptions": schema_pkg_apis_custom_metrics_v1beta2_MetricListOptions(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue": schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValueList": schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref), + "k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue": schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref), + "k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValueList": schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref), + "k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics": schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics": schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetricsList": schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref), + "k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics": schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetricsList": schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref), + "k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics": schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics": schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetricsList": schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref), + "k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics": schema_pkg_apis_metrics_v1beta1_PodMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetricsList": schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref), + } +} + +func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MutatingWebhook describes an admission webhook and the resources and operations it applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "clientConfig": { + SchemaProps: spec.SchemaProps{ + Description: "ClientConfig defines how to communicate with the hook. Required", + Ref: ref("k8s.io/api/admissionregistration/v1.WebhookClientConfig"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), + }, + }, + }, + }, + }, + "failurePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.", + Type: []string{"string"}, + Format: "", + }, + }, + "matchPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Equivalent\"", + Type: []string{"string"}, + Format: "", + }, + }, + "namespaceSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "objectSelector": { + SchemaProps: spec.SchemaProps{ + Description: "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "sideEffects": { + SchemaProps: spec.SchemaProps{ + Description: "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "admissionReviewVersions": { + SchemaProps: spec.SchemaProps{ + Description: "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "reinvocationPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "clientConfig", "sideEffects", "admissionReviewVersions"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1.RuleWithOperations", "k8s.io/api/admissionregistration/v1.WebhookClientConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.", + 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "webhooks": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Webhooks is a list of webhooks and the affected resources and operations.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1.MutatingWebhook"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1.MutatingWebhook", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of MutatingWebhookConfiguration.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_admissionregistration_v1_Rule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiGroups": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiVersions": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "operations": { + SchemaProps: spec.SchemaProps{ + Description: "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiGroups": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiVersions": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_admissionregistration_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "`namespace` is the namespace of the service. Required", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "`name` is the name of the service. Required", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "`path` is an optional URL path which will be sent in any request to this service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ValidatingWebhook describes an admission webhook and the resources and operations it applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "clientConfig": { + SchemaProps: spec.SchemaProps{ + Description: "ClientConfig defines how to communicate with the hook. Required", + Ref: ref("k8s.io/api/admissionregistration/v1.WebhookClientConfig"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), + }, + }, + }, + }, + }, + "failurePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.", + Type: []string{"string"}, + Format: "", + }, + }, + "matchPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Equivalent\"", + Type: []string{"string"}, + Format: "", + }, + }, + "namespaceSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "objectSelector": { + SchemaProps: spec.SchemaProps{ + Description: "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "sideEffects": { + SchemaProps: spec.SchemaProps{ + Description: "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "admissionReviewVersions": { + SchemaProps: spec.SchemaProps{ + Description: "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"name", "clientConfig", "sideEffects", "admissionReviewVersions"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1.RuleWithOperations", "k8s.io/api/admissionregistration/v1.WebhookClientConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.", + 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "webhooks": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Webhooks is a list of webhooks and the affected resources and operations.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingWebhook"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1.ValidatingWebhook", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of ValidatingWebhookConfiguration.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_admissionregistration_v1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + Type: []string{"string"}, + Format: "", + }, + }, + "service": { + SchemaProps: spec.SchemaProps{ + Description: "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + Ref: ref("k8s.io/api/admissionregistration/v1.ServiceReference"), + }, + }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Description: "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1.ServiceReference"}, + } +} + +func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MutatingWebhook describes an admission webhook and the resources and operations it applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "clientConfig": { + SchemaProps: spec.SchemaProps{ + Description: "ClientConfig defines how to communicate with the hook. Required", + Ref: ref("k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1beta1.RuleWithOperations"), + }, + }, + }, + }, + }, + "failurePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", + Type: []string{"string"}, + Format: "", + }, + }, + "matchPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Exact\"", + Type: []string{"string"}, + Format: "", + }, + }, + "namespaceSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "objectSelector": { + SchemaProps: spec.SchemaProps{ + Description: "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "sideEffects": { + SchemaProps: spec.SchemaProps{ + Description: "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "admissionReviewVersions": { + SchemaProps: spec.SchemaProps{ + Description: "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "reinvocationPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "clientConfig"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1beta1.RuleWithOperations", "k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead.", + 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "webhooks": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Webhooks is a list of webhooks and the affected resources and operations.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingWebhook"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1beta1.MutatingWebhook", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of MutatingWebhookConfiguration.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_admissionregistration_v1beta1_Rule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiGroups": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiVersions": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_admissionregistration_v1beta1_RuleWithOperations(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "operations": { + SchemaProps: spec.SchemaProps{ + Description: "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiGroups": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiVersions": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_admissionregistration_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "`namespace` is the namespace of the service. Required", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "`name` is the name of the service. Required", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "`path` is an optional URL path which will be sent in any request to this service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ValidatingWebhook describes an admission webhook and the resources and operations it applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "clientConfig": { + SchemaProps: spec.SchemaProps{ + Description: "ClientConfig defines how to communicate with the hook. Required", + Ref: ref("k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1beta1.RuleWithOperations"), + }, + }, + }, + }, + }, + "failurePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", + Type: []string{"string"}, + Format: "", + }, + }, + "matchPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Exact\"", + Type: []string{"string"}, + Format: "", + }, + }, + "namespaceSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "objectSelector": { + SchemaProps: spec.SchemaProps{ + Description: "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "sideEffects": { + SchemaProps: spec.SchemaProps{ + Description: "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "admissionReviewVersions": { + SchemaProps: spec.SchemaProps{ + Description: "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"name", "clientConfig"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1beta1.RuleWithOperations", "k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead.", + 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "webhooks": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Webhooks is a list of webhooks and the affected resources and operations.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of ValidatingWebhookConfiguration.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_admissionregistration_v1beta1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + Type: []string{"string"}, + Format: "", + }, + }, + "service": { + SchemaProps: spec.SchemaProps{ + Description: "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + Ref: ref("k8s.io/api/admissionregistration/v1beta1.ServiceReference"), + }, + }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Description: "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/admissionregistration/v1beta1.ServiceReference"}, + } +} + +func schema_k8sio_api_apps_v1_ControllerRevision(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data is the serialized representation of the state.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + "revision": { + SchemaProps: spec.SchemaProps{ + Description: "Revision indicates the revision of the state represented by Data.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"revision"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_api_apps_v1_ControllerRevisionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", + 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: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of ControllerRevisions", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1.ControllerRevision"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.ControllerRevision", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1_DaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSet represents the configuration of a daemon set.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/apps/v1.DaemonSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/apps/v1.DaemonSetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.DaemonSetSpec", "k8s.io/api/apps/v1.DaemonSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1_DaemonSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetCondition describes the state of a DaemonSet at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of DaemonSet condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apps_v1_DaemonSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetList is a collection of daemon sets.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "A list of daemon sets.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1.DaemonSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.DaemonSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1_DaemonSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetSpec is the specification of a daemon set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "updateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "An update strategy to replace existing DaemonSet pods with new pods.", + Ref: ref("k8s.io/api/apps/v1.DaemonSetUpdateStrategy"), + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "revisionHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"selector", "template"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.DaemonSetUpdateStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_apps_v1_DaemonSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetStatus represents the current status of a daemon set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "currentNumberScheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberMisscheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "desiredNumberScheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberReady": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "The most recent generation observed by the daemon set controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "updatedNumberScheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The total number of nodes that are running updated daemon pod", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberAvailable": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a DaemonSet's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1.DaemonSetCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"currentNumberScheduled", "numberMisscheduled", "desiredNumberScheduled", "numberReady"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.DaemonSetCondition"}, + } +} + +func schema_k8sio_api_apps_v1_DaemonSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "Rolling update config params. Present only if type = \"RollingUpdate\".", + Ref: ref("k8s.io/api/apps/v1.RollingUpdateDaemonSet"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.RollingUpdateDaemonSet"}, + } +} + +func schema_k8sio_api_apps_v1_Deployment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Deployment enables declarative updates for Pods and ReplicaSets.", + 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 metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the Deployment.", + Ref: ref("k8s.io/api/apps/v1.DeploymentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the Deployment.", + Ref: ref("k8s.io/api/apps/v1.DeploymentStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.DeploymentSpec", "k8s.io/api/apps/v1.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1_DeploymentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentCondition describes the state of a deployment at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of deployment condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apps_v1_DeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentList is a list of Deployments.", + 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 list metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of Deployments.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1.Deployment"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1_DeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentSpec is the specification of the desired behavior of the Deployment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template describes the pods that will be created.", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "strategy": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "retainKeys", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The deployment strategy to use to replace existing pods with new ones.", + Ref: ref("k8s.io/api/apps/v1.DeploymentStrategy"), + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "revisionHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "paused": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the deployment is paused.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "progressDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"selector", "template"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.DeploymentStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_apps_v1_DeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentStatus is the most recently observed status of the Deployment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "The generation observed by the deployment controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "updatedReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of ready pods targeted by this deployment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "unavailableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a deployment's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1.DeploymentCondition"), + }, + }, + }, + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.DeploymentCondition"}, + } +} + +func schema_k8sio_api_apps_v1_DeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentStrategy describes how to replace existing pods with new ones.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", + Ref: ref("k8s.io/api/apps/v1.RollingUpdateDeployment"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.RollingUpdateDeployment"}, + } +} + +func schema_k8sio_api_apps_v1_ReplicaSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSet ensures that a specified number of pod replicas are running at any given time.", + 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: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/apps/v1.ReplicaSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/apps/v1.ReplicaSetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.ReplicaSetSpec", "k8s.io/api/apps/v1.ReplicaSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1_ReplicaSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetCondition describes the state of a replica set at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of replica set condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apps_v1_ReplicaSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetList is a collection of ReplicaSets.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1.ReplicaSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.ReplicaSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1_ReplicaSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetSpec is the specification of a ReplicaSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + }, + Required: []string{"selector"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_apps_v1_ReplicaSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetStatus represents the current status of a ReplicaSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "fullyLabeledReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods that have labels matching the labels of the pod template of the replicaset.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of ready replicas for this replica set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of available replicas (ready for at least minReadySeconds) for this replica set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a replica set's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1.ReplicaSetCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.ReplicaSetCondition"}, + } +} + +func schema_k8sio_api_apps_v1_RollingUpdateDaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Spec to control the desired behavior of daemon set rolling update.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_apps_v1_RollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Spec to control the desired behavior of rolling update.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "maxSurge": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_apps_v1_RollingUpdateStatefulSetStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "partition": { + SchemaProps: spec.SchemaProps{ + Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_apps_v1_StatefulSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the desired identities of pods in this set.", + Ref: ref("k8s.io/api/apps/v1.StatefulSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + Ref: ref("k8s.io/api/apps/v1.StatefulSetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.StatefulSetSpec", "k8s.io/api/apps/v1.StatefulSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1_StatefulSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetCondition describes the state of a statefulset at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of statefulset condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apps_v1_StatefulSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetList is a collection of StatefulSets.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1.StatefulSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.StatefulSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A StatefulSetSpec is the specification of a StatefulSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "volumeClaimTemplates": { + SchemaProps: spec.SchemaProps{ + Description: "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + }, + }, + }, + }, + }, + "serviceName": { + SchemaProps: spec.SchemaProps{ + Description: "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + Type: []string{"string"}, + Format: "", + }, + }, + "podManagementPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", + Type: []string{"string"}, + Format: "", + }, + }, + "updateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + Ref: ref("k8s.io/api/apps/v1.StatefulSetUpdateStrategy"), + }, + }, + "revisionHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"selector", "template", "serviceName"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_apps_v1_StatefulSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetStatus represents the current state of a StatefulSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas is the number of Pods created by the StatefulSet controller.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "updatedReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentRevision": { + SchemaProps: spec.SchemaProps{ + Description: "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", + Type: []string{"string"}, + Format: "", + }, + }, + "updateRevision": { + SchemaProps: spec.SchemaProps{ + Description: "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", + Type: []string{"string"}, + Format: "", + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a statefulset's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1.StatefulSetCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.StatefulSetCondition"}, + } +} + +func schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", + Ref: ref("k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy"}, + } +} + +func schema_k8sio_api_apps_v1beta1_ControllerRevision(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data is the serialized representation of the state.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + "revision": { + SchemaProps: spec.SchemaProps{ + Description: "Revision indicates the revision of the state represented by Data.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"revision"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", + 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: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of ControllerRevisions", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta1.ControllerRevision"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.ControllerRevision", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta1_Deployment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.", + 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 metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the Deployment.", + Ref: ref("k8s.io/api/apps/v1beta1.DeploymentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the Deployment.", + Ref: ref("k8s.io/api/apps/v1beta1.DeploymentStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.DeploymentSpec", "k8s.io/api/apps/v1beta1.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentCondition describes the state of a deployment at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of deployment condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apps_v1beta1_DeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentList is a list of Deployments.", + 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 list metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of Deployments.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta1.Deployment"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.", + 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: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Required: This must match the Name of a deployment.", + Type: []string{"string"}, + Format: "", + }, + }, + "updatedAnnotations": { + SchemaProps: spec.SchemaProps{ + Description: "The annotations to be updated to a deployment", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "rollbackTo": { + SchemaProps: spec.SchemaProps{ + Description: "The config of this deployment rollback.", + Ref: ref("k8s.io/api/apps/v1beta1.RollbackConfig"), + }, + }, + }, + Required: []string{"name", "rollbackTo"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.RollbackConfig"}, + } +} + +func schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentSpec is the specification of the desired behavior of the Deployment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template describes the pods that will be created.", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "strategy": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "retainKeys", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The deployment strategy to use to replace existing pods with new ones.", + Ref: ref("k8s.io/api/apps/v1beta1.DeploymentStrategy"), + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "revisionHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "paused": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the deployment is paused.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "rollbackTo": { + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.", + Ref: ref("k8s.io/api/apps/v1beta1.RollbackConfig"), + }, + }, + "progressDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"template"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.DeploymentStrategy", "k8s.io/api/apps/v1beta1.RollbackConfig", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentStatus is the most recently observed status of the Deployment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "The generation observed by the deployment controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "updatedReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of ready pods targeted by this deployment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "unavailableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a deployment's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta1.DeploymentCondition"), + }, + }, + }, + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.DeploymentCondition"}, + } +} + +func schema_k8sio_api_apps_v1beta1_DeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentStrategy describes how to replace existing pods with new ones.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", + Ref: ref("k8s.io/api/apps/v1beta1.RollingUpdateDeployment"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.RollingUpdateDeployment"}, + } +} + +func schema_k8sio_api_apps_v1beta1_RollbackConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "revision": { + SchemaProps: spec.SchemaProps{ + Description: "The revision to rollback to. If set to 0, rollback to the last revision.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_apps_v1beta1_RollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Spec to control the desired behavior of rolling update.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "maxSurge": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_apps_v1beta1_RollingUpdateStatefulSetStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "partition": { + SchemaProps: spec.SchemaProps{ + Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_apps_v1beta1_Scale(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Scale represents a scaling request for a resource.", + 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Ref: ref("k8s.io/api/apps/v1beta1.ScaleSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", + Ref: ref("k8s.io/api/apps/v1beta1.ScaleStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.ScaleSpec", "k8s.io/api/apps/v1beta1.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta1_ScaleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ScaleSpec describes the attributes of a scale subresource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "desired number of instances for the scaled object.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_apps_v1beta1_ScaleStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ScaleStatus represents the current status of a scale subresource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "actual number of observed instances of the scaled object.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "targetSelector": { + SchemaProps: spec.SchemaProps{ + Description: "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + } +} + +func schema_k8sio_api_apps_v1beta1_StatefulSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the desired identities of pods in this set.", + Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.StatefulSetSpec", "k8s.io/api/apps/v1beta1.StatefulSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetCondition describes the state of a statefulset at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of statefulset condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apps_v1beta1_StatefulSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetList is a collection of StatefulSets.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta1.StatefulSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.StatefulSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A StatefulSetSpec is the specification of a StatefulSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "volumeClaimTemplates": { + SchemaProps: spec.SchemaProps{ + Description: "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + }, + }, + }, + }, + }, + "serviceName": { + SchemaProps: spec.SchemaProps{ + Description: "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + Type: []string{"string"}, + Format: "", + }, + }, + "podManagementPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", + Type: []string{"string"}, + Format: "", + }, + }, + "updateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy"), + }, + }, + "revisionHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"template", "serviceName"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetStatus represents the current state of a StatefulSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas is the number of Pods created by the StatefulSet controller.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "updatedReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentRevision": { + SchemaProps: spec.SchemaProps{ + Description: "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", + Type: []string{"string"}, + Format: "", + }, + }, + "updateRevision": { + SchemaProps: spec.SchemaProps{ + Description: "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", + Type: []string{"string"}, + Format: "", + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a statefulset's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.StatefulSetCondition"}, + } +} + +func schema_k8sio_api_apps_v1beta1_StatefulSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type indicates the type of the StatefulSetUpdateStrategy.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", + Ref: ref("k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy"}, + } +} + +func schema_k8sio_api_apps_v1beta2_ControllerRevision(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data is the serialized representation of the state.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + "revision": { + SchemaProps: spec.SchemaProps{ + Description: "Revision indicates the revision of the state represented by Data.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"revision"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", + 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: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of ControllerRevisions", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta2.ControllerRevision"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.ControllerRevision", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.DaemonSetSpec", "k8s.io/api/apps/v1beta2.DaemonSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetCondition describes the state of a DaemonSet at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of DaemonSet condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DaemonSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetList is a collection of daemon sets.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "A list of daemon sets.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta2.DaemonSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.DaemonSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetSpec is the specification of a daemon set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "updateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "An update strategy to replace existing DaemonSet pods with new pods.", + Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy"), + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "revisionHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"selector", "template"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetStatus represents the current status of a daemon set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "currentNumberScheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberMisscheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "desiredNumberScheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberReady": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "The most recent generation observed by the daemon set controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "updatedNumberScheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The total number of nodes that are running updated daemon pod", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberAvailable": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a DaemonSet's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"currentNumberScheduled", "numberMisscheduled", "desiredNumberScheduled", "numberReady"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.DaemonSetCondition"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DaemonSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "Rolling update config params. Present only if type = \"RollingUpdate\".", + Ref: ref("k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet"}, + } +} + +func schema_k8sio_api_apps_v1beta2_Deployment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.", + 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 metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the Deployment.", + Ref: ref("k8s.io/api/apps/v1beta2.DeploymentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the Deployment.", + Ref: ref("k8s.io/api/apps/v1beta2.DeploymentStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.DeploymentSpec", "k8s.io/api/apps/v1beta2.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentCondition describes the state of a deployment at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of deployment condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentList is a list of Deployments.", + 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 list metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of Deployments.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta2.Deployment"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentSpec is the specification of the desired behavior of the Deployment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template describes the pods that will be created.", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "strategy": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "retainKeys", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The deployment strategy to use to replace existing pods with new ones.", + Ref: ref("k8s.io/api/apps/v1beta2.DeploymentStrategy"), + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "revisionHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "paused": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the deployment is paused.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "progressDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"selector", "template"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.DeploymentStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentStatus is the most recently observed status of the Deployment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "The generation observed by the deployment controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "updatedReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of ready pods targeted by this deployment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "unavailableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a deployment's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta2.DeploymentCondition"), + }, + }, + }, + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.DeploymentCondition"}, + } +} + +func schema_k8sio_api_apps_v1beta2_DeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentStrategy describes how to replace existing pods with new ones.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", + Ref: ref("k8s.io/api/apps/v1beta2.RollingUpdateDeployment"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.RollingUpdateDeployment"}, + } +} + +func schema_k8sio_api_apps_v1beta2_ReplicaSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.", + 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: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.ReplicaSetSpec", "k8s.io/api/apps/v1beta2.ReplicaSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetCondition describes the state of a replica set at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of replica set condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetList is a collection of ReplicaSets.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.ReplicaSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetSpec is the specification of a ReplicaSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + }, + Required: []string{"selector"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetStatus represents the current status of a ReplicaSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "fullyLabeledReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods that have labels matching the labels of the pod template of the replicaset.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of ready replicas for this replica set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of available replicas (ready for at least minReadySeconds) for this replica set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a replica set's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.ReplicaSetCondition"}, + } +} + +func schema_k8sio_api_apps_v1beta2_RollingUpdateDaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Spec to control the desired behavior of daemon set rolling update.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_apps_v1beta2_RollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Spec to control the desired behavior of rolling update.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "maxSurge": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_apps_v1beta2_RollingUpdateStatefulSetStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "partition": { + SchemaProps: spec.SchemaProps{ + Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_apps_v1beta2_Scale(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Scale represents a scaling request for a resource.", + 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Ref: ref("k8s.io/api/apps/v1beta2.ScaleSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", + Ref: ref("k8s.io/api/apps/v1beta2.ScaleStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.ScaleSpec", "k8s.io/api/apps/v1beta2.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta2_ScaleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ScaleSpec describes the attributes of a scale subresource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "desired number of instances for the scaled object.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_apps_v1beta2_ScaleStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ScaleStatus represents the current status of a scale subresource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "actual number of observed instances of the scaled object.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "targetSelector": { + SchemaProps: spec.SchemaProps{ + Description: "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + } +} + +func schema_k8sio_api_apps_v1beta2_StatefulSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the desired identities of pods in this set.", + Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.StatefulSetSpec", "k8s.io/api/apps/v1beta2.StatefulSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetCondition describes the state of a statefulset at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of statefulset condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apps_v1beta2_StatefulSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetList is a collection of StatefulSets.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta2.StatefulSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.StatefulSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A StatefulSetSpec is the specification of a StatefulSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "volumeClaimTemplates": { + SchemaProps: spec.SchemaProps{ + Description: "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + }, + }, + }, + }, + }, + "serviceName": { + SchemaProps: spec.SchemaProps{ + Description: "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + Type: []string{"string"}, + Format: "", + }, + }, + "podManagementPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", + Type: []string{"string"}, + Format: "", + }, + }, + "updateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy"), + }, + }, + "revisionHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"selector", "template", "serviceName"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetStatus represents the current state of a StatefulSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas is the number of Pods created by the StatefulSet controller.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "updatedReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentRevision": { + SchemaProps: spec.SchemaProps{ + Description: "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", + Type: []string{"string"}, + Format: "", + }, + }, + "updateRevision": { + SchemaProps: spec.SchemaProps{ + Description: "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", + Type: []string{"string"}, + Format: "", + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a statefulset's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.StatefulSetCondition"}, + } +} + +func schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", + Ref: ref("k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy"}, + } +} + +func schema_k8sio_api_auditregistration_v1alpha1_AuditSink(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AuditSink represents a cluster level audit sink", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the audit configuration spec", + Ref: ref("k8s.io/api/auditregistration/v1alpha1.AuditSinkSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/auditregistration/v1alpha1.AuditSinkSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_auditregistration_v1alpha1_AuditSinkList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AuditSinkList is a list of AuditSink items.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of audit configurations.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/auditregistration/v1alpha1.AuditSink"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/auditregistration/v1alpha1.AuditSink", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_auditregistration_v1alpha1_AuditSinkSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AuditSinkSpec holds the spec for the audit sink", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "policy": { + SchemaProps: spec.SchemaProps{ + Description: "Policy defines the policy for selecting which events should be sent to the webhook required", + Ref: ref("k8s.io/api/auditregistration/v1alpha1.Policy"), + }, + }, + "webhook": { + SchemaProps: spec.SchemaProps{ + Description: "Webhook to send events required", + Ref: ref("k8s.io/api/auditregistration/v1alpha1.Webhook"), + }, + }, + }, + Required: []string{"policy", "webhook"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/auditregistration/v1alpha1.Policy", "k8s.io/api/auditregistration/v1alpha1.Webhook"}, + } +} + +func schema_k8sio_api_auditregistration_v1alpha1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Policy defines the configuration of how audit events are logged", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "level": { + SchemaProps: spec.SchemaProps{ + Description: "The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required", + Type: []string{"string"}, + Format: "", + }, + }, + "stages": { + SchemaProps: spec.SchemaProps{ + Description: "Stages is a list of stages for which events are created.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"level"}, + }, + }, + } +} + +func schema_k8sio_api_auditregistration_v1alpha1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "`namespace` is the namespace of the service. Required", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "`name` is the name of the service. Required", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "`path` is an optional URL path which will be sent in any request to this service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_k8sio_api_auditregistration_v1alpha1_Webhook(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Webhook holds the configuration of the webhook", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "throttle": { + SchemaProps: spec.SchemaProps{ + Description: "Throttle holds the options for throttling the webhook", + Ref: ref("k8s.io/api/auditregistration/v1alpha1.WebhookThrottleConfig"), + }, + }, + "clientConfig": { + SchemaProps: spec.SchemaProps{ + Description: "ClientConfig holds the connection parameters for the webhook required", + Ref: ref("k8s.io/api/auditregistration/v1alpha1.WebhookClientConfig"), + }, + }, + }, + Required: []string{"clientConfig"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/auditregistration/v1alpha1.WebhookClientConfig", "k8s.io/api/auditregistration/v1alpha1.WebhookThrottleConfig"}, + } +} + +func schema_k8sio_api_auditregistration_v1alpha1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookClientConfig contains the information to make a connection with the webhook", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + Type: []string{"string"}, + Format: "", + }, + }, + "service": { + SchemaProps: spec.SchemaProps{ + Description: "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + Ref: ref("k8s.io/api/auditregistration/v1alpha1.ServiceReference"), + }, + }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Description: "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/auditregistration/v1alpha1.ServiceReference"}, + } +} + +func schema_k8sio_api_auditregistration_v1alpha1_WebhookThrottleConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookThrottleConfig holds the configuration for throttling events", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "qps": { + SchemaProps: spec.SchemaProps{ + Description: "ThrottleQPS maximum number of batches per second default 10 QPS", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "burst": { + SchemaProps: spec.SchemaProps{ + Description: "ThrottleBurst is the maximum number of events sent at the same moment default 15 QPS", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authentication_v1_BoundObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BoundObjectReference is a reference to an object that a token is bound to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the referent. Valid kinds are 'Pod' and 'Secret'.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API version of the referent.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent.", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID of the referent.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authentication_v1_TokenRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TokenRequest requests a token for a given service account.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/authentication/v1.TokenRequestSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/authentication/v1.TokenRequestStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authentication/v1.TokenRequestSpec", "k8s.io/api/authentication/v1.TokenRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authentication_v1_TokenRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TokenRequestSpec contains client provided parameters of a token request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "audiences": { + SchemaProps: spec.SchemaProps{ + Description: "Audiences are the intendend audiences of the token. A recipient of a token must identitfy themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "expirationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "boundObjectRef": { + SchemaProps: spec.SchemaProps{ + Description: "BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.", + Ref: ref("k8s.io/api/authentication/v1.BoundObjectReference"), + }, + }, + }, + Required: []string{"audiences"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authentication/v1.BoundObjectReference"}, + } +} + +func schema_k8sio_api_authentication_v1_TokenRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TokenRequestStatus is the result of a token request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "token": { + SchemaProps: spec.SchemaProps{ + Description: "Token is the opaque bearer token.", + Type: []string{"string"}, + Format: "", + }, + }, + "expirationTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "ExpirationTimestamp is the time of expiration of the returned token.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + Required: []string{"token", "expirationTimestamp"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_authentication_v1_TokenReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the request being evaluated", + Ref: ref("k8s.io/api/authentication/v1.TokenReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the server and indicates whether the request can be authenticated.", + Ref: ref("k8s.io/api/authentication/v1.TokenReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authentication/v1.TokenReviewSpec", "k8s.io/api/authentication/v1.TokenReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authentication_v1_TokenReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TokenReviewSpec is a description of the token authentication request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "token": { + SchemaProps: spec.SchemaProps{ + Description: "Token is the opaque bearer token.", + Type: []string{"string"}, + Format: "", + }, + }, + "audiences": { + SchemaProps: spec.SchemaProps{ + Description: "Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authentication_v1_TokenReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TokenReviewStatus is the result of the token authentication request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "authenticated": { + SchemaProps: spec.SchemaProps{ + Description: "Authenticated indicates that the token was associated with a known user.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "User is the UserInfo associated with the provided token.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "audiences": { + SchemaProps: spec.SchemaProps{ + Description: "Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Description: "Error indicates that the token couldn't be checked", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/authentication/v1.UserInfo"}, + } +} + +func schema_k8sio_api_authentication_v1_UserInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UserInfo holds the information about the user needed to implement the user.Info interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "username": { + SchemaProps: spec.SchemaProps{ + Description: "The name that uniquely identifies this user among all active users.", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", + Type: []string{"string"}, + Format: "", + }, + }, + "groups": { + SchemaProps: spec.SchemaProps{ + Description: "The names of groups this user is a part of.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "extra": { + SchemaProps: spec.SchemaProps{ + Description: "Any additional information provided by the authenticator.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authentication_v1beta1_TokenReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the request being evaluated", + Ref: ref("k8s.io/api/authentication/v1beta1.TokenReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the server and indicates whether the request can be authenticated.", + Ref: ref("k8s.io/api/authentication/v1beta1.TokenReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authentication/v1beta1.TokenReviewSpec", "k8s.io/api/authentication/v1beta1.TokenReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authentication_v1beta1_TokenReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TokenReviewSpec is a description of the token authentication request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "token": { + SchemaProps: spec.SchemaProps{ + Description: "Token is the opaque bearer token.", + Type: []string{"string"}, + Format: "", + }, + }, + "audiences": { + SchemaProps: spec.SchemaProps{ + Description: "Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TokenReviewStatus is the result of the token authentication request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "authenticated": { + SchemaProps: spec.SchemaProps{ + Description: "Authenticated indicates that the token was associated with a known user.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "User is the UserInfo associated with the provided token.", + Ref: ref("k8s.io/api/authentication/v1beta1.UserInfo"), + }, + }, + "audiences": { + SchemaProps: spec.SchemaProps{ + Description: "Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Description: "Error indicates that the token couldn't be checked", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/authentication/v1beta1.UserInfo"}, + } +} + +func schema_k8sio_api_authentication_v1beta1_UserInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UserInfo holds the information about the user needed to implement the user.Info interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "username": { + SchemaProps: spec.SchemaProps{ + Description: "The name that uniquely identifies this user among all active users.", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", + Type: []string{"string"}, + Format: "", + }, + }, + "groups": { + SchemaProps: spec.SchemaProps{ + Description: "The names of groups this user is a part of.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "extra": { + SchemaProps: spec.SchemaProps{ + Description: "Any additional information provided by the authenticator.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authorization_v1_NonResourceAttributes(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the URL path of the request", + Type: []string{"string"}, + Format: "", + }, + }, + "verb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is the standard HTTP verb", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1_NonResourceRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NonResourceRule holds information that describes a rule for the non-resource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. \"*\" means all.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"verbs"}, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1_ResourceAttributes(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", + Type: []string{"string"}, + Format: "", + }, + }, + "verb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + Type: []string{"string"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group is the API Group of the Resource. \"*\" means all.", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version is the API Version of the Resource. \"*\" means all.", + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Resource is one of the existing resource types. \"*\" means all.", + Type: []string{"string"}, + Format: "", + }, + }, + "subresource": { + SchemaProps: spec.SchemaProps{ + Description: "Subresource is one of the existing resource types. \"\" means none.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1_ResourceRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiGroups": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"*\" means all.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.\n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"verbs"}, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the request being evaluated. user and groups must be empty", + Ref: ref("k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec", "k8s.io/api/authorization/v1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authorization_v1_SelfSubjectAccessReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resourceAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceAuthorizationAttributes describes information for a resource access request", + Ref: ref("k8s.io/api/authorization/v1.ResourceAttributes"), + }, + }, + "nonResourceAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceAttributes describes information for a non-resource access request", + Ref: ref("k8s.io/api/authorization/v1.NonResourceAttributes"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1.NonResourceAttributes", "k8s.io/api/authorization/v1.ResourceAttributes"}, + } +} + +func schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the request being evaluated.", + Ref: ref("k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the server and indicates the set of actions a user can perform.", + Ref: ref("k8s.io/api/authorization/v1.SubjectRulesReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec", "k8s.io/api/authorization/v1.SubjectRulesReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authorization_v1_SelfSubjectRulesReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace to evaluate rules for. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1_SubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SubjectAccessReview checks whether or not a user or group can perform an action.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the request being evaluated", + Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resourceAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceAuthorizationAttributes describes information for a resource access request", + Ref: ref("k8s.io/api/authorization/v1.ResourceAttributes"), + }, + }, + "nonResourceAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceAttributes describes information for a non-resource access request", + Ref: ref("k8s.io/api/authorization/v1.NonResourceAttributes"), + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "User is the user you're testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups", + Type: []string{"string"}, + Format: "", + }, + }, + "groups": { + SchemaProps: spec.SchemaProps{ + Description: "Groups is the groups you're testing for.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "extra": { + SchemaProps: spec.SchemaProps{ + Description: "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID information about the requesting user.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1.NonResourceAttributes", "k8s.io/api/authorization/v1.ResourceAttributes"}, + } +} + +func schema_k8sio_api_authorization_v1_SubjectAccessReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SubjectAccessReviewStatus", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "allowed": { + SchemaProps: spec.SchemaProps{ + Description: "Allowed is required. True if the action would be allowed, false otherwise.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "denied": { + SchemaProps: spec.SchemaProps{ + Description: "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Reason is optional. It indicates why a request was allowed or denied.", + Type: []string{"string"}, + Format: "", + }, + }, + "evaluationError": { + SchemaProps: spec.SchemaProps{ + Description: "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"allowed"}, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resourceRules": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/authorization/v1.ResourceRule"), + }, + }, + }, + }, + }, + "nonResourceRules": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/authorization/v1.NonResourceRule"), + }, + }, + }, + }, + }, + "incomplete": { + SchemaProps: spec.SchemaProps{ + Description: "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "evaluationError": { + SchemaProps: spec.SchemaProps{ + Description: "EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"resourceRules", "nonResourceRules", "incomplete"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1.NonResourceRule", "k8s.io/api/authorization/v1.ResourceRule"}, + } +} + +func schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authorization_v1beta1_NonResourceAttributes(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the URL path of the request", + Type: []string{"string"}, + Format: "", + }, + }, + "verb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is the standard HTTP verb", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1beta1_NonResourceRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NonResourceRule holds information that describes a rule for the non-resource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. \"*\" means all.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"verbs"}, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1beta1_ResourceAttributes(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", + Type: []string{"string"}, + Format: "", + }, + }, + "verb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + Type: []string{"string"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group is the API Group of the Resource. \"*\" means all.", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version is the API Version of the Resource. \"*\" means all.", + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Resource is one of the existing resource types. \"*\" means all.", + Type: []string{"string"}, + Format: "", + }, + }, + "subresource": { + SchemaProps: spec.SchemaProps{ + Description: "Subresource is one of the existing resource types. \"\" means none.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1beta1_ResourceRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiGroups": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"*\" means all.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.\n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"verbs"}, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the request being evaluated. user and groups must be empty", + Ref: ref("k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resourceAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceAuthorizationAttributes describes information for a resource access request", + Ref: ref("k8s.io/api/authorization/v1beta1.ResourceAttributes"), + }, + }, + "nonResourceAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceAttributes describes information for a non-resource access request", + Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceAttributes"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1beta1.NonResourceAttributes", "k8s.io/api/authorization/v1beta1.ResourceAttributes"}, + } +} + +func schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the request being evaluated.", + Ref: ref("k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the server and indicates the set of actions a user can perform.", + Ref: ref("k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace to evaluate rules for. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SubjectAccessReview checks whether or not a user or group can perform an action.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the request being evaluated", + Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resourceAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceAuthorizationAttributes describes information for a resource access request", + Ref: ref("k8s.io/api/authorization/v1beta1.ResourceAttributes"), + }, + }, + "nonResourceAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceAttributes describes information for a non-resource access request", + Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceAttributes"), + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups", + Type: []string{"string"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Groups is the groups you're testing for.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "extra": { + SchemaProps: spec.SchemaProps{ + Description: "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID information about the requesting user.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1beta1.NonResourceAttributes", "k8s.io/api/authorization/v1beta1.ResourceAttributes"}, + } +} + +func schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SubjectAccessReviewStatus", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "allowed": { + SchemaProps: spec.SchemaProps{ + Description: "Allowed is required. True if the action would be allowed, false otherwise.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "denied": { + SchemaProps: spec.SchemaProps{ + Description: "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Reason is optional. It indicates why a request was allowed or denied.", + Type: []string{"string"}, + Format: "", + }, + }, + "evaluationError": { + SchemaProps: spec.SchemaProps{ + Description: "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"allowed"}, + }, + }, + } +} + +func schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resourceRules": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/authorization/v1beta1.ResourceRule"), + }, + }, + }, + }, + }, + "nonResourceRules": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceRule"), + }, + }, + }, + }, + }, + "incomplete": { + SchemaProps: spec.SchemaProps{ + Description: "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "evaluationError": { + SchemaProps: spec.SchemaProps{ + Description: "EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"resourceRules", "nonResourceRules", "incomplete"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authorization/v1beta1.NonResourceRule", "k8s.io/api/authorization/v1beta1.ResourceRule"}, + } +} + +func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API version of the referent", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "metricSelector": { + SchemaProps: spec.SchemaProps{ + Description: "metricSelector is used to identify a specific time series within a given metric.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "targetValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "targetAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"metricName"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of a metric used for autoscaling in metric system.", + Type: []string{"string"}, + Format: "", + }, + }, + "metricSelector": { + SchemaProps: spec.SchemaProps{ + Description: "metricSelector is used to identify a specific time series within a given metric.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "currentValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentValue is the current value of the metric (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "currentAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageValue is the current value of metric averaged over autoscaled pods.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"metricName", "currentValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "configuration of a horizontal pod autoscaler.", + 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 metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "current information about the autoscaler.", + Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type describes the current condition", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the status of the condition (True, False, Unknown)", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime is the last time the condition transitioned from one status to another", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason is the reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message is a human-readable explanation containing details about the transition", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "list of horizontal pod autoscaler objects.", + 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 list metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "list of horizontal pod autoscaler objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "specification of a horizontal pod autoscaler.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "scaleTargetRef": { + SchemaProps: spec.SchemaProps{ + Description: "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", + Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), + }, + }, + "minReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "maxReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "targetCPUUtilizationPercentage": { + SchemaProps: spec.SchemaProps{ + Description: "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"scaleTargetRef", "maxReplicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v1.CrossVersionObjectReference"}, + } +} + +func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "current status of a horizontal pod autoscaler", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "most recent generation observed by this autoscaler.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "lastScaleTime": { + SchemaProps: spec.SchemaProps{ + Description: "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "currentReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "current number of replicas of pods managed by this autoscaler.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "desiredReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "desired number of replicas of pods managed by this autoscaler.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentCPUUtilizationPercentage": { + SchemaProps: spec.SchemaProps{ + Description: "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"currentReplicas", "desiredReplicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", + Type: []string{"string"}, + Format: "", + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + Ref: ref("k8s.io/api/autoscaling/v1.ObjectMetricSource"), + }, + }, + "pods": { + SchemaProps: spec.SchemaProps{ + Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Ref: ref("k8s.io/api/autoscaling/v1.PodsMetricSource"), + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v1.ResourceMetricSource"), + }, + }, + "external": { + SchemaProps: spec.SchemaProps{ + Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Ref: ref("k8s.io/api/autoscaling/v1.ExternalMetricSource"), + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v1.ExternalMetricSource", "k8s.io/api/autoscaling/v1.ObjectMetricSource", "k8s.io/api/autoscaling/v1.PodsMetricSource", "k8s.io/api/autoscaling/v1.ResourceMetricSource"}, + } +} + +func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricStatus describes the last-read state of a single metric.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", + Type: []string{"string"}, + Format: "", + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + Ref: ref("k8s.io/api/autoscaling/v1.ObjectMetricStatus"), + }, + }, + "pods": { + SchemaProps: spec.SchemaProps{ + Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Ref: ref("k8s.io/api/autoscaling/v1.PodsMetricStatus"), + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v1.ResourceMetricStatus"), + }, + }, + "external": { + SchemaProps: spec.SchemaProps{ + Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Ref: ref("k8s.io/api/autoscaling/v1.ExternalMetricStatus"), + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v1.ExternalMetricStatus", "k8s.io/api/autoscaling/v1.ObjectMetricStatus", "k8s.io/api/autoscaling/v1.PodsMetricStatus", "k8s.io/api/autoscaling/v1.ResourceMetricStatus"}, + } +} + +func schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "target": { + SchemaProps: spec.SchemaProps{ + Description: "target is the described Kubernetes object.", + Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), + }, + }, + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "targetValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetValue is the target value of the metric (as a quantity).", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric. When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "averageValue": { + SchemaProps: spec.SchemaProps{ + Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"target", "metricName", "targetValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "target": { + SchemaProps: spec.SchemaProps{ + Description: "target is the described Kubernetes object.", + Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), + }, + }, + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "currentValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentValue is the current value of the metric (as a quantity).", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "averageValue": { + SchemaProps: spec.SchemaProps{ + Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"target", "metricName", "currentValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question", + Type: []string{"string"}, + Format: "", + }, + }, + "targetAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"metricName", "targetAverageValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question", + Type: []string{"string"}, + Format: "", + }, + }, + "currentAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"metricName", "currentAverageValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the resource in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "targetAverageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "targetAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the resource in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "currentAverageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"name", "currentAverageValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_autoscaling_v1_Scale(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Scale represents a scaling request for a resource.", + 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Ref: ref("k8s.io/api/autoscaling/v1.ScaleSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", + Ref: ref("k8s.io/api/autoscaling/v1.ScaleStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v1.ScaleSpec", "k8s.io/api/autoscaling/v1.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_autoscaling_v1_ScaleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ScaleSpec describes the attributes of a scale subresource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "desired number of instances for the scaled object.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_autoscaling_v1_ScaleStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ScaleStatus represents the current status of a scale subresource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "actual number of observed instances of the scaled object.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API version of the referent", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "metricSelector": { + SchemaProps: spec.SchemaProps{ + Description: "metricSelector is used to identify a specific time series within a given metric.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "targetValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "targetAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"metricName"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of a metric used for autoscaling in metric system.", + Type: []string{"string"}, + Format: "", + }, + }, + "metricSelector": { + SchemaProps: spec.SchemaProps{ + Description: "metricSelector is used to identify a specific time series within a given metric.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "currentValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentValue is the current value of the metric (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "currentAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageValue is the current value of metric averaged over autoscaled pods.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"metricName", "currentValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", + 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: "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the current information about the autoscaler.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type describes the current condition", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the status of the condition (True, False, Unknown)", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime is the last time the condition transitioned from one status to another", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason is the reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message is a human-readable explanation containing details about the transition", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.", + 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: "metadata is the standard list metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of horizontal pod autoscaler objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "scaleTargetRef": { + SchemaProps: spec.SchemaProps{ + Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), + }, + }, + "minReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "maxReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "metrics": { + SchemaProps: spec.SchemaProps{ + Description: "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricSpec"), + }, + }, + }, + }, + }, + }, + Required: []string{"scaleTargetRef", "maxReplicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta1.MetricSpec"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the most recent generation observed by this autoscaler.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "lastScaleTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "currentReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "desiredReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentMetrics": { + SchemaProps: spec.SchemaProps{ + Description: "currentMetrics is the last read state of the metrics used by this autoscaler.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricStatus"), + }, + }, + }, + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"currentReplicas", "desiredReplicas", "conditions"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2beta1.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", + Type: []string{"string"}, + Format: "", + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + Ref: ref("k8s.io/api/autoscaling/v2beta1.ObjectMetricSource"), + }, + }, + "pods": { + SchemaProps: spec.SchemaProps{ + Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.PodsMetricSource"), + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"), + }, + }, + "external": { + SchemaProps: spec.SchemaProps{ + Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Ref: ref("k8s.io/api/autoscaling/v2beta1.ExternalMetricSource"), + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta1.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta1.PodsMetricSource", "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricStatus describes the last-read state of a single metric.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", + Type: []string{"string"}, + Format: "", + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + Ref: ref("k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus"), + }, + }, + "pods": { + SchemaProps: spec.SchemaProps{ + Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.PodsMetricStatus"), + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"), + }, + }, + "external": { + SchemaProps: spec.SchemaProps{ + Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Ref: ref("k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus"), + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "target": { + SchemaProps: spec.SchemaProps{ + Description: "target is the described Kubernetes object.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), + }, + }, + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "targetValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetValue is the target value of the metric (as a quantity).", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "averageValue": { + SchemaProps: spec.SchemaProps{ + Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"target", "metricName", "targetValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "target": { + SchemaProps: spec.SchemaProps{ + Description: "target is the described Kubernetes object.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), + }, + }, + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "currentValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentValue is the current value of the metric (as a quantity).", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "averageValue": { + SchemaProps: spec.SchemaProps{ + Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"target", "metricName", "currentValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question", + Type: []string{"string"}, + Format: "", + }, + }, + "targetAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"metricName", "targetAverageValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question", + Type: []string{"string"}, + Format: "", + }, + }, + "currentAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"metricName", "currentAverageValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the resource in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "targetAverageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "targetAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the resource in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "currentAverageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"name", "currentAverageValue"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API version of the referent", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metric": { + SchemaProps: spec.SchemaProps{ + Description: "metric identifies the target metric by name and selector", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Description: "target specifies the target value for the given metric", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + }, + }, + }, + Required: []string{"metric", "target"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metric": { + SchemaProps: spec.SchemaProps{ + Description: "metric identifies the target metric by name and selector", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + }, + }, + "current": { + SchemaProps: spec.SchemaProps{ + Description: "current contains the current value for the given metric", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + }, + }, + }, + Required: []string{"metric", "current"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HPAScalingPolicy is a single policy which must hold true for a specified past interval.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is used to specify the scaling policy.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value contains the amount of change which is permitted by the policy. It must be greater than zero", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "periodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"type", "value", "periodSeconds"}, + }, + }, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "stabilizationWindowSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selectPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "policies": { + SchemaProps: spec.SchemaProps{ + Description: "policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", + 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: "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the current information about the autoscaler.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "scaleUp": { + SchemaProps: spec.SchemaProps{ + Description: "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingRules"), + }, + }, + "scaleDown": { + SchemaProps: spec.SchemaProps{ + Description: "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).", + Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingRules"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.HPAScalingRules"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type describes the current condition", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the status of the condition (True, False, Unknown)", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime is the last time the condition transitioned from one status to another", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason is the reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message is a human-readable explanation containing details about the transition", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.", + 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: "metadata is the standard list metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of horizontal pod autoscaler objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "scaleTargetRef": { + SchemaProps: spec.SchemaProps{ + Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + }, + }, + "minReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "maxReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "metrics": { + SchemaProps: spec.SchemaProps{ + Description: "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricSpec"), + }, + }, + }, + }, + }, + "behavior": { + SchemaProps: spec.SchemaProps{ + Description: "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior"), + }, + }, + }, + Required: []string{"scaleTargetRef", "maxReplicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior", "k8s.io/api/autoscaling/v2beta2.MetricSpec"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the most recent generation observed by this autoscaler.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "lastScaleTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "currentReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "desiredReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentMetrics": { + SchemaProps: spec.SchemaProps{ + Description: "currentMetrics is the last read state of the metrics used by this autoscaler.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricStatus"), + }, + }, + }, + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"currentReplicas", "desiredReplicas", "conditions"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2beta2.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricIdentifier defines the name and optionally selector for a metric", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the given metric", + Type: []string{"string"}, + Format: "", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", + Type: []string{"string"}, + Format: "", + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ObjectMetricSource"), + }, + }, + "pods": { + SchemaProps: spec.SchemaProps{ + Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.PodsMetricSource"), + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"), + }, + }, + "external": { + SchemaProps: spec.SchemaProps{ + Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ExternalMetricSource"), + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta2.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta2.PodsMetricSource", "k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricStatus describes the last-read state of a single metric.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", + Type: []string{"string"}, + Format: "", + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus"), + }, + }, + "pods": { + SchemaProps: spec.SchemaProps{ + Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.PodsMetricStatus"), + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"), + }, + }, + "external": { + SchemaProps: spec.SchemaProps{ + Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus"), + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta2.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricTarget defines the target value, average value, or average utilization of a specific metric", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type represents whether the metric type is Utilization, Value, or AverageValue", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "value is the target value of the metric (as a quantity).", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "averageValue": { + SchemaProps: spec.SchemaProps{ + Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "averageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricValueStatus holds the current value for a metric", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "value": { + SchemaProps: spec.SchemaProps{ + Description: "value is the current value of the metric (as a quantity).", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "averageValue": { + SchemaProps: spec.SchemaProps{ + Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "averageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "describedObject": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Description: "target specifies the target value for the given metric", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + }, + }, + "metric": { + SchemaProps: spec.SchemaProps{ + Description: "metric identifies the target metric by name and selector", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + }, + }, + }, + Required: []string{"describedObject", "target", "metric"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metric": { + SchemaProps: spec.SchemaProps{ + Description: "metric identifies the target metric by name and selector", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + }, + }, + "current": { + SchemaProps: spec.SchemaProps{ + Description: "current contains the current value for the given metric", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + }, + }, + "describedObject": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + }, + }, + }, + Required: []string{"metric", "current", "describedObject"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metric": { + SchemaProps: spec.SchemaProps{ + Description: "metric identifies the target metric by name and selector", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Description: "target specifies the target value for the given metric", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + }, + }, + }, + Required: []string{"metric", "target"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metric": { + SchemaProps: spec.SchemaProps{ + Description: "metric identifies the target metric by name and selector", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + }, + }, + "current": { + SchemaProps: spec.SchemaProps{ + Description: "current contains the current value for the given metric", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + }, + }, + }, + Required: []string{"metric", "current"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the resource in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Description: "target specifies the target value for the given metric", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + }, + }, + }, + Required: []string{"name", "target"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the resource in question.", + Type: []string{"string"}, + Format: "", + }, + }, + "current": { + SchemaProps: spec.SchemaProps{ + Description: "current contains the current value for the given metric", + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + }, + }, + }, + Required: []string{"name", "current"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + } +} + +func schema_k8sio_api_batch_v1_Job(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Job represents the configuration of a single job.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/batch/v1.JobSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/batch/v1.JobStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1.JobSpec", "k8s.io/api/batch/v1.JobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_batch_v1_JobCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobCondition describes current state of a job.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of job condition, Complete or Failed.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition was checked.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transit from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobList is a collection of jobs.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of Jobs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/batch/v1.Job"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1.Job", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobSpec describes how the job execution will look like.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "parallelism": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "completions": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "activeDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "backoffLimit": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the number of retries before marking this job failed. Defaults to 6", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "manualSelector": { + SchemaProps: spec.SchemaProps{ + Description: "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector", + Type: []string{"boolean"}, + Format: "", + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "ttlSecondsAfterFinished": { + SchemaProps: spec.SchemaProps{ + Description: "ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"template"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobStatus represents the current state of a Job.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/batch/v1.JobCondition"), + }, + }, + }, + }, + }, + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "completionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "active": { + SchemaProps: spec.SchemaProps{ + Description: "The number of actively running pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "succeeded": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods which reached phase Succeeded.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failed": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods which reached phase Failed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1.JobCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_batch_v1beta1_CronJob(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJob represents the configuration of a single cron job.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/batch/v1beta1.CronJobSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/batch/v1beta1.CronJobStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1beta1.CronJobSpec", "k8s.io/api/batch/v1beta1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_batch_v1beta1_CronJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJobList is a collection of cron jobs.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of CronJobs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/batch/v1beta1.CronJob"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1beta1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_batch_v1beta1_CronJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJobSpec describes how the job execution will look like and when it will actually run.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "schedule": { + SchemaProps: spec.SchemaProps{ + Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + Type: []string{"string"}, + Format: "", + }, + }, + "startingDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "concurrencyPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", + Type: []string{"string"}, + Format: "", + }, + }, + "suspend": { + SchemaProps: spec.SchemaProps{ + Description: "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "jobTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the job that will be created when executing a CronJob.", + Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), + }, + }, + "successfulJobsHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failedJobsHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"schedule", "jobTemplate"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1beta1.JobTemplateSpec"}, + } +} + +func schema_k8sio_api_batch_v1beta1_CronJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJobStatus represents the current state of a cron job.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "active": { + SchemaProps: spec.SchemaProps{ + Description: "A list of pointers to currently running jobs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + "lastScheduleTime": { + SchemaProps: spec.SchemaProps{ + Description: "Information when was the last time the job was successfully scheduled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_batch_v1beta1_JobTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobTemplate describes a template for creating copies of a predefined pod.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1beta1.JobTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobTemplateSpec describes the data a Job should have when created from a template", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/batch/v1.JobSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_batch_v2alpha1_CronJob(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJob represents the configuration of a single cron job.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/batch/v2alpha1.CronJobSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/batch/v2alpha1.CronJobStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v2alpha1.CronJobSpec", "k8s.io/api/batch/v2alpha1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_batch_v2alpha1_CronJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJobList is a collection of cron jobs.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of CronJobs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/batch/v2alpha1.CronJob"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v2alpha1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_batch_v2alpha1_CronJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJobSpec describes how the job execution will look like and when it will actually run.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "schedule": { + SchemaProps: spec.SchemaProps{ + Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + Type: []string{"string"}, + Format: "", + }, + }, + "startingDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "concurrencyPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", + Type: []string{"string"}, + Format: "", + }, + }, + "suspend": { + SchemaProps: spec.SchemaProps{ + Description: "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "jobTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the job that will be created when executing a CronJob.", + Ref: ref("k8s.io/api/batch/v2alpha1.JobTemplateSpec"), + }, + }, + "successfulJobsHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failedJobsHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"schedule", "jobTemplate"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v2alpha1.JobTemplateSpec"}, + } +} + +func schema_k8sio_api_batch_v2alpha1_CronJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJobStatus represents the current state of a cron job.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "active": { + SchemaProps: spec.SchemaProps{ + Description: "A list of pointers to currently running jobs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + "lastScheduleTime": { + SchemaProps: spec.SchemaProps{ + Description: "Information when was the last time the job was successfully scheduled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_batch_v2alpha1_JobTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobTemplate describes a template for creating copies of a predefined pod.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/batch/v2alpha1.JobTemplateSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v2alpha1.JobTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_batch_v2alpha1_JobTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobTemplateSpec describes the data a Job should have when created from a template", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/batch/v1.JobSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Describes a certificate signing request", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "The certificate request itself and any additional information.", + Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Derived information about the request.", + Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec", "k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "request approval state, currently Approved or Denied.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "brief reason for the request state", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "human readable message with details about the request state", + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "timestamp for the last update to this condition", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequest"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/certificates/v1beta1.CertificateSigningRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "request": { + SchemaProps: spec.SchemaProps{ + Description: "Base64-encoded PKCS#10 CSR data", + Type: []string{"string"}, + Format: "byte", + }, + }, + "signerName": { + SchemaProps: spec.SchemaProps{ + Description: "Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`. If empty, it will be defaulted:\n 1. If it's a kubelet client certificate, it is assigned\n \"kubernetes.io/kube-apiserver-client-kubelet\".\n 2. If it's a kubelet serving certificate, it is assigned\n \"kubernetes.io/kubelet-serving\".\n 3. Otherwise, it is assigned \"kubernetes.io/legacy-unknown\".\nDistribution of trust for signers happens out of band. You can select on this field using `spec.signerName`.", + Type: []string{"string"}, + Format: "", + }, + }, + "usages": { + SchemaProps: spec.SchemaProps{ + Description: "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "username": { + SchemaProps: spec.SchemaProps{ + Description: "Information about the requesting user. See user.Info interface for details.", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID information about the requesting user. See user.Info interface for details.", + Type: []string{"string"}, + Format: "", + }, + }, + "groups": { + SchemaProps: spec.SchemaProps{ + Description: "Group information about the requesting user. See user.Info interface for details.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "extra": { + SchemaProps: spec.SchemaProps{ + Description: "Extra information about the requesting user. See user.Info interface for details.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + }, + Required: []string{"request"}, + }, + }, + } +} + +func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions applied to the request, such as approval or denial.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"), + }, + }, + }, + }, + }, + "certificate": { + SchemaProps: spec.SchemaProps{ + Description: "If request was approved, the controller will place the issued certificate here.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"}, + } +} + +func schema_k8sio_api_coordination_v1_Lease(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Lease defines a lease concept.", + 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: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/coordination/v1.LeaseSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/coordination/v1.LeaseSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LeaseList is a list of Lease objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/coordination/v1.Lease"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/coordination/v1.Lease", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_coordination_v1_LeaseSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LeaseSpec is a specification of a Lease.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "holderIdentity": { + SchemaProps: spec.SchemaProps{ + Description: "holderIdentity contains the identity of the holder of a current lease.", + Type: []string{"string"}, + Format: "", + }, + }, + "leaseDurationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "acquireTime": { + SchemaProps: spec.SchemaProps{ + Description: "acquireTime is a time when the current lease was acquired.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "renewTime": { + SchemaProps: spec.SchemaProps{ + Description: "renewTime is a time when the current holder of a lease has last updated the lease.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "leaseTransitions": { + SchemaProps: spec.SchemaProps{ + Description: "leaseTransitions is the number of transitions of a lease between holders.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + } +} + +func schema_k8sio_api_coordination_v1beta1_Lease(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Lease defines a lease concept.", + 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: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/coordination/v1beta1.LeaseSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/coordination/v1beta1.LeaseSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_coordination_v1beta1_LeaseList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LeaseList is a list of Lease objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/coordination/v1beta1.Lease"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/coordination/v1beta1.Lease", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LeaseSpec is a specification of a Lease.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "holderIdentity": { + SchemaProps: spec.SchemaProps{ + Description: "holderIdentity contains the identity of the holder of a current lease.", + Type: []string{"string"}, + Format: "", + }, + }, + "leaseDurationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "acquireTime": { + SchemaProps: spec.SchemaProps{ + Description: "acquireTime is a time when the current lease was acquired.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "renewTime": { + SchemaProps: spec.SchemaProps{ + Description: "renewTime is a time when the current holder of a lease has last updated the lease.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "leaseTransitions": { + SchemaProps: spec.SchemaProps{ + Description: "leaseTransitions is the number of transitions of a lease between holders.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + } +} + +func schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeID": { + SchemaProps: spec.SchemaProps{ + Description: "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Type: []string{"string"}, + Format: "", + }, + }, + "partition": { + SchemaProps: spec.SchemaProps{ + Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"volumeID"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Affinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Affinity is a group of affinity scheduling rules.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "Describes node affinity scheduling rules for the pod.", + Ref: ref("k8s.io/api/core/v1.NodeAffinity"), + }, + }, + "podAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", + Ref: ref("k8s.io/api/core/v1.PodAffinity"), + }, + }, + "podAntiAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", + Ref: ref("k8s.io/api/core/v1.PodAntiAffinity"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeAffinity", "k8s.io/api/core/v1.PodAffinity", "k8s.io/api/core/v1.PodAntiAffinity"}, + } +} + +func schema_k8sio_api_core_v1_AttachedVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AttachedVolume describes a volume attached to a node", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the attached volume", + Type: []string{"string"}, + Format: "", + }, + }, + "devicePath": { + SchemaProps: spec.SchemaProps{ + Description: "DevicePath represents the device path where the volume should be available", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "devicePath"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "preferAvoidPods": { + SchemaProps: spec.SchemaProps{ + Description: "Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PreferAvoidPodsEntry"}, + } +} + +func schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "diskName": { + SchemaProps: spec.SchemaProps{ + Description: "The Name of the data disk in the blob storage", + Type: []string{"string"}, + Format: "", + }, + }, + "diskURI": { + SchemaProps: spec.SchemaProps{ + Description: "The URI the data disk in the blob storage", + Type: []string{"string"}, + Format: "", + }, + }, + "cachingMode": { + SchemaProps: spec.SchemaProps{ + Description: "Host Caching mode: None, Read Only, Read Write.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"diskName", "diskURI"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "the name of secret that contains Azure Storage Account Name and Key", + Type: []string{"string"}, + Format: "", + }, + }, + "shareName": { + SchemaProps: spec.SchemaProps{ + Description: "Share Name", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"secretName", "shareName"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_AzureFileVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "the name of secret that contains Azure Storage Account Name and Key", + Type: []string{"string"}, + Format: "", + }, + }, + "shareName": { + SchemaProps: spec.SchemaProps{ + Description: "Share Name", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"secretName", "shareName"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Description: "The target object that you want to bind to the standard object.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + Required: []string{"target"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents storage that is managed by an external CSI volume driver (Beta feature)", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the driver to use for this volume. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeHandle": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "Attributes of the volume to publish.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "controllerPublishSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "nodeStageSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "nodePublishSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "controllerExpandSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "ControllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This is an alpha field and requires enabling ExpandCSIVolumes feature gate. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + }, + Required: []string{"driver", "volumeHandle"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a source location of a volume to mount, managed by an external CSI driver", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies a read-only configuration for the volume. Defaults to false (read/write).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nodePublishSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + Required: []string{"driver"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_Capabilities(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adds and removes POSIX capabilities from running containers.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "add": { + SchemaProps: spec.SchemaProps{ + Description: "Added capabilities", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "drop": { + SchemaProps: spec.SchemaProps{ + Description: "Removed capabilities", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "monitors": { + SchemaProps: spec.SchemaProps{ + Description: "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretFile": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"monitors"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "monitors": { + SchemaProps: spec.SchemaProps{ + Description: "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretFile": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"monitors"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeID": { + SchemaProps: spec.SchemaProps{ + Description: "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: points to a secret object containing parameters used to connect to OpenStack.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + }, + Required: []string{"volumeID"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeID": { + SchemaProps: spec.SchemaProps{ + Description: "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: points to a secret object containing parameters used to connect to OpenStack.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + Required: []string{"volumeID"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_ClientIPConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClientIPConfig represents the configurations of Client IP based session affinity.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ComponentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Information about the condition of a component.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of condition for a component. Valid value: \"Healthy\"", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Message about the condition for a component. For example, information about a health check.", + Type: []string{"string"}, + Format: "", + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Description: "Condition error code for a component. For example, a health check error code.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of component conditions observed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ComponentCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ComponentCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Status of all the conditions for the component as a list of ComponentStatus objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of ComponentStatus objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ComponentStatus"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap holds configuration data for pods to consume.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "immutable": { + SchemaProps: spec.SchemaProps{ + Description: "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is an alpha field enabled by ImmutableEphemeralVolumes feature gate.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "binaryData": { + SchemaProps: spec.SchemaProps{ + Description: "BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ConfigMapEnvSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ConfigMapKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Selects a key from a ConfigMap.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The key to select.", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap or its key must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"key"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapList is a resource containing a list of ConfigMap objects.", + 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: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of ConfigMaps.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ConfigMap"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ConfigMap", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + Type: []string{"string"}, + Format: "", + }, + }, + "kubeletConfigKey": { + SchemaProps: spec.SchemaProps{ + Description: "KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"namespace", "name", "kubeletConfigKey"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.KeyToPath"), + }, + }, + }, + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap or its keys must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.KeyToPath"}, + } +} + +func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.KeyToPath"), + }, + }, + }, + }, + }, + "defaultMode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap or its keys must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.KeyToPath"}, + } +} + +func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A single application container that you want to run within a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.", + Type: []string{"string"}, + Format: "", + }, + }, + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "args": { + SchemaProps: spec.SchemaProps{ + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "workingDir": { + SchemaProps: spec.SchemaProps{ + Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "containerPort", + "protocol", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "containerPort", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerPort"), + }, + }, + }, + }, + }, + "envFrom": { + SchemaProps: spec.SchemaProps{ + Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + }, + }, + }, + }, + }, + "env": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of environment variables to set in the container. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeMounts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Pod volumes to mount into the container's filesystem. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "volumeDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "devicePath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "volumeDevices is the list of block devices to be used by the container.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + }, + }, + }, + }, + }, + "livenessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "readinessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "startupProbe": { + SchemaProps: spec.SchemaProps{ + Description: "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is a beta feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "lifecycle": { + SchemaProps: spec.SchemaProps{ + Description: "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", + Ref: ref("k8s.io/api/core/v1.Lifecycle"), + }, + }, + "terminationMessagePath": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationMessagePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Type: []string{"string"}, + Format: "", + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", + Ref: ref("k8s.io/api/core/v1.SecurityContext"), + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdinOnce": { + SchemaProps: spec.SchemaProps{ + Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + } +} + +func schema_k8sio_api_core_v1_ContainerImage(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Describe a container image", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "names": { + SchemaProps: spec.SchemaProps{ + Description: "Names by which this image is known. e.g. [\"k8s.gcr.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "sizeBytes": { + SchemaProps: spec.SchemaProps{ + Description: "The size of the image in bytes.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"names"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ContainerPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerPort represents a network port in a single container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostPort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "containerPort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".", + Type: []string{"string"}, + Format: "", + }, + }, + "hostIP": { + SchemaProps: spec.SchemaProps{ + Description: "What host IP to bind the external port to.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"containerPort"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "waiting": { + SchemaProps: spec.SchemaProps{ + Description: "Details about a waiting container", + Ref: ref("k8s.io/api/core/v1.ContainerStateWaiting"), + }, + }, + "running": { + SchemaProps: spec.SchemaProps{ + Description: "Details about a running container", + Ref: ref("k8s.io/api/core/v1.ContainerStateRunning"), + }, + }, + "terminated": { + SchemaProps: spec.SchemaProps{ + Description: "Details about a terminated container", + Ref: ref("k8s.io/api/core/v1.ContainerStateTerminated"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerStateRunning", "k8s.io/api/core/v1.ContainerStateTerminated", "k8s.io/api/core/v1.ContainerStateWaiting"}, + } +} + +func schema_k8sio_api_core_v1_ContainerStateRunning(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerStateRunning is a running state of a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "startedAt": { + SchemaProps: spec.SchemaProps{ + Description: "Time at which the container was last (re-)started", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerStateTerminated is a terminated state of a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exitCode": { + SchemaProps: spec.SchemaProps{ + Description: "Exit status from the last termination of the container", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "signal": { + SchemaProps: spec.SchemaProps{ + Description: "Signal from the last termination of the container", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) reason from the last termination of the container", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Message regarding the last termination of the container", + Type: []string{"string"}, + Format: "", + }, + }, + "startedAt": { + SchemaProps: spec.SchemaProps{ + Description: "Time at which previous execution of the container started", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "finishedAt": { + SchemaProps: spec.SchemaProps{ + Description: "Time at which the container last terminated", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "containerID": { + SchemaProps: spec.SchemaProps{ + Description: "Container's ID in the format 'docker://'", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"exitCode"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_ContainerStateWaiting(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerStateWaiting is a waiting state of a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) reason the container is not yet running.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Message regarding why the container is not yet running.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerStatus contains details for the current status of this container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "state": { + SchemaProps: spec.SchemaProps{ + Description: "Details about the container's current condition.", + Ref: ref("k8s.io/api/core/v1.ContainerState"), + }, + }, + "lastState": { + SchemaProps: spec.SchemaProps{ + Description: "Details about the container's last termination condition.", + Ref: ref("k8s.io/api/core/v1.ContainerState"), + }, + }, + "ready": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies whether the container has passed its readiness probe.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "restartCount": { + SchemaProps: spec.SchemaProps{ + Description: "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images", + Type: []string{"string"}, + Format: "", + }, + }, + "imageID": { + SchemaProps: spec.SchemaProps{ + Description: "ImageID of the container's image.", + Type: []string{"string"}, + Format: "", + }, + }, + "containerID": { + SchemaProps: spec.SchemaProps{ + Description: "Container's ID in the format 'docker://'.", + Type: []string{"string"}, + Format: "", + }, + }, + "started": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies whether the container has passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. Is always true when no startupProbe is defined.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name", "ready", "restartCount", "image", "imageID"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerState"}, + } +} + +func schema_k8sio_api_core_v1_DaemonEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonEndpoint contains information about a single Daemon endpoint.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Port": { + SchemaProps: spec.SchemaProps{ + Description: "Port number of the given endpoint.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"Port"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of DownwardAPIVolume file", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + } +} + +func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPIVolumeFile represents information to create the file containing the pod field", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldRef": { + SchemaProps: spec.SchemaProps{ + Description: "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", + Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + }, + }, + "resourceFieldRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", + Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + }, + }, + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"path"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector"}, + } +} + +func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of downward API volume file", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + }, + }, + }, + }, + }, + "defaultMode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + } +} + +func schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "medium": { + SchemaProps: spec.SchemaProps{ + Description: "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + Type: []string{"string"}, + Format: "", + }, + }, + "sizeLimit": { + SchemaProps: spec.SchemaProps{ + Description: "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointAddress is a tuple that describes single IP address.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ip": { + SchemaProps: spec.SchemaProps{ + Description: "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "The Hostname of this endpoint", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", + Type: []string{"string"}, + Format: "", + }, + }, + "targetRef": { + SchemaProps: spec.SchemaProps{ + Description: "Reference to object providing the endpoint.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + Required: []string{"ip"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointPort is a tuple that describes a single port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port number of the endpoint.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + Type: []string{"string"}, + Format: "", + }, + }, + "appProtocol": { + SchemaProps: spec.SchemaProps{ + Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. Field can be enabled with ServiceAppProtocol feature gate.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "addresses": { + SchemaProps: spec.SchemaProps{ + Description: "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + }, + }, + }, + }, + }, + "notReadyAddresses": { + SchemaProps: spec.SchemaProps{ + Description: "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + }, + }, + }, + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Port numbers available on the related IP addresses.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EndpointPort"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EndpointAddress", "k8s.io/api/core/v1.EndpointPort"}, + } +} + +func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "subsets": { + SchemaProps: spec.SchemaProps{ + Description: "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EndpointSubset"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EndpointSubset", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointsList is a list of endpoints.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of endpoints.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Endpoints"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Endpoints", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EnvFromSource represents the source of a set of ConfigMaps", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "prefix": { + SchemaProps: spec.SchemaProps{ + Description: "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", + Type: []string{"string"}, + Format: "", + }, + }, + "configMapRef": { + SchemaProps: spec.SchemaProps{ + Description: "The ConfigMap to select from", + Ref: ref("k8s.io/api/core/v1.ConfigMapEnvSource"), + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "The Secret to select from", + Ref: ref("k8s.io/api/core/v1.SecretEnvSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ConfigMapEnvSource", "k8s.io/api/core/v1.SecretEnvSource"}, + } +} + +func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EnvVar represents an environment variable present in a Container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the environment variable. Must be a C_IDENTIFIER.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", + Type: []string{"string"}, + Format: "", + }, + }, + "valueFrom": { + SchemaProps: spec.SchemaProps{ + Description: "Source for the environment variable's value. Cannot be used if value is not empty.", + Ref: ref("k8s.io/api/core/v1.EnvVarSource"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EnvVarSource"}, + } +} + +func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EnvVarSource represents a source for the value of an EnvVar.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "fieldRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", + Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + }, + }, + "resourceFieldRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", + Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + }, + }, + "configMapKeyRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a key of a ConfigMap.", + Ref: ref("k8s.io/api/core/v1.ConfigMapKeySelector"), + }, + }, + "secretKeyRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a key of a secret in the pod's namespace", + Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ConfigMapKeySelector", "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector", "k8s.io/api/core/v1.SecretKeySelector"}, + } +} + +func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "An EphemeralContainer is a container that may be added temporarily to an existing pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers may not be added by directly updating the pod spec. They must be added via the pod's ephemeralcontainers subresource, and they will appear in the pod spec once added. This is an alpha feature enabled by the EphemeralContainers feature flag.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", + Type: []string{"string"}, + Format: "", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", + Type: []string{"string"}, + Format: "", + }, + }, + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "args": { + SchemaProps: spec.SchemaProps{ + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "workingDir": { + SchemaProps: spec.SchemaProps{ + Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Ports are not allowed for ephemeral containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerPort"), + }, + }, + }, + }, + }, + "envFrom": { + SchemaProps: spec.SchemaProps{ + Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + }, + }, + }, + }, + }, + "env": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of environment variables to set in the container. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeMounts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Pod volumes to mount into the container's filesystem. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "volumeDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "devicePath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "volumeDevices is the list of block devices to be used by the container.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + }, + }, + }, + }, + }, + "livenessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "readinessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "startupProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "lifecycle": { + SchemaProps: spec.SchemaProps{ + Description: "Lifecycle is not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Lifecycle"), + }, + }, + "terminationMessagePath": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationMessagePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Type: []string{"string"}, + Format: "", + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext is not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.SecurityContext"), + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdinOnce": { + SchemaProps: spec.SchemaProps{ + Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "targetContainerName": { + SchemaProps: spec.SchemaProps{ + Description: "If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container is run in whatever namespaces are shared for the pod. Note that the container runtime must support this feature.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + } +} + +func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EphemeralContainerCommon is a copy of all fields in Container to be inlined in EphemeralContainer. This separate type allows easy conversion from EphemeralContainer to Container and allows separate documentation for the fields of EphemeralContainer. When a new field is added to Container it must be added here as well.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", + Type: []string{"string"}, + Format: "", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", + Type: []string{"string"}, + Format: "", + }, + }, + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "args": { + SchemaProps: spec.SchemaProps{ + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "workingDir": { + SchemaProps: spec.SchemaProps{ + Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Ports are not allowed for ephemeral containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerPort"), + }, + }, + }, + }, + }, + "envFrom": { + SchemaProps: spec.SchemaProps{ + Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + }, + }, + }, + }, + }, + "env": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of environment variables to set in the container. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeMounts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Pod volumes to mount into the container's filesystem. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "volumeDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "devicePath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "volumeDevices is the list of block devices to be used by the container.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + }, + }, + }, + }, + }, + "livenessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "readinessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "startupProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "lifecycle": { + SchemaProps: spec.SchemaProps{ + Description: "Lifecycle is not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Lifecycle"), + }, + }, + "terminationMessagePath": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationMessagePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Type: []string{"string"}, + Format: "", + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext is not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.SecurityContext"), + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdinOnce": { + SchemaProps: spec.SchemaProps{ + Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + } +} + +func schema_k8sio_api_core_v1_EphemeralContainers(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A list of ephemeral containers used with the Pod ephemeralcontainers subresource.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "ephemeralContainers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EphemeralContainer"), + }, + }, + }, + }, + }, + }, + Required: []string{"ephemeralContainers"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EphemeralContainer", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event is a report of an event somewhere in the cluster.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "involvedObject": { + SchemaProps: spec.SchemaProps{ + Description: "The object that this event is about.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable description of the status of this operation.", + Type: []string{"string"}, + Format: "", + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "The component reporting this event. Should be a short machine understandable string.", + Ref: ref("k8s.io/api/core/v1.EventSource"), + }, + }, + "firstTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The time at which the most recent occurrence of this event was recorded.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "count": { + SchemaProps: spec.SchemaProps{ + Description: "The number of times this event has occurred.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of this event (Normal, Warning), new types could be added in the future", + Type: []string{"string"}, + Format: "", + }, + }, + "eventTime": { + SchemaProps: spec.SchemaProps{ + Description: "Time when this Event was first observed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "series": { + SchemaProps: spec.SchemaProps{ + Description: "Data about the Event series this event represents or nil if it's a singleton Event.", + Ref: ref("k8s.io/api/core/v1.EventSeries"), + }, + }, + "action": { + SchemaProps: spec.SchemaProps{ + Description: "What action was taken/failed regarding to the Regarding object.", + Type: []string{"string"}, + Format: "", + }, + }, + "related": { + SchemaProps: spec.SchemaProps{ + Description: "Optional secondary object for more complex actions.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "reportingComponent": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", + Type: []string{"string"}, + Format: "", + }, + }, + "reportingInstance": { + SchemaProps: spec.SchemaProps{ + Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"metadata", "involvedObject"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EventSeries", "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventList is a list of events.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of events", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Event"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_EventSeries(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { + SchemaProps: spec.SchemaProps{ + Description: "Number of occurrences in this series up to the last heartbeat time", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "lastObservedTime": { + SchemaProps: spec.SchemaProps{ + Description: "Time of the last occurrence observed", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "state": { + SchemaProps: spec.SchemaProps{ + Description: "State of this Series: Ongoing or Finished Deprecated. Planned removal for 1.18", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + } +} + +func schema_k8sio_api_core_v1_EventSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventSource contains information for an event.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "component": { + SchemaProps: spec.SchemaProps{ + Description: "Component from which the event is generated.", + Type: []string{"string"}, + Format: "", + }, + }, + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Node name on which the event is generated.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ExecAction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecAction describes a \"run in container\" action.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_FCVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "targetWWNs": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: FC target worldwide names (WWNs)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "lun": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: FC target lun number", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "wwids": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the driver to use for this volume.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "options": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Extra command options if any.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"driver"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the driver to use for this volume.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "options": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Extra command options if any.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"driver"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_FlockerVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "datasetName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", + Type: []string{"string"}, + Format: "", + }, + }, + "datasetUUID": { + SchemaProps: spec.SchemaProps{ + Description: "UUID of the dataset. This is unique identifier of a Flocker dataset", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pdName": { + SchemaProps: spec.SchemaProps{ + Description: "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"string"}, + Format: "", + }, + }, + "partition": { + SchemaProps: spec.SchemaProps{ + Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"pdName"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GitRepoVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "repository": { + SchemaProps: spec.SchemaProps{ + Description: "Repository URL", + Type: []string{"string"}, + Format: "", + }, + }, + "revision": { + SchemaProps: spec.SchemaProps{ + Description: "Commit hash for the specified revision.", + Type: []string{"string"}, + Format: "", + }, + }, + "directory": { + SchemaProps: spec.SchemaProps{ + Description: "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"repository"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "endpoints": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"boolean"}, + Format: "", + }, + }, + "endpointsNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"endpoints", "path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "endpoints": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"endpoints", "path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPGetAction describes an action based on HTTP Get requests.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path to access on the HTTP server.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + Type: []string{"string"}, + Format: "", + }, + }, + "scheme": { + SchemaProps: spec.SchemaProps{ + Description: "Scheme to use for connecting to the host. Defaults to HTTP.", + Type: []string{"string"}, + Format: "", + }, + }, + "httpHeaders": { + SchemaProps: spec.SchemaProps{ + Description: "Custom headers to set in the request. HTTP allows repeated headers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.HTTPHeader"), + }, + }, + }, + }, + }, + }, + Required: []string{"port"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.HTTPHeader", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_core_v1_HTTPHeader(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPHeader describes a custom header to be used in HTTP probes", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The header field name", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "The header field value", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "value"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Handler(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Handler defines a specific action that should be taken", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exec": { + SchemaProps: spec.SchemaProps{ + Description: "One and only one of the following should be specified. Exec specifies the action to take.", + Ref: ref("k8s.io/api/core/v1.ExecAction"), + }, + }, + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPGet specifies the http request to perform.", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "tcpSocket": { + SchemaProps: spec.SchemaProps{ + Description: "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + } +} + +func schema_k8sio_api_core_v1_HostAlias(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ip": { + SchemaProps: spec.SchemaProps{ + Description: "IP address of the host file entry.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostnames": { + SchemaProps: spec.SchemaProps{ + Description: "Hostnames for the above IP address.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_HostPathVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "targetPortal": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + Type: []string{"string"}, + Format: "", + }, + }, + "iqn": { + SchemaProps: spec.SchemaProps{ + Description: "Target iSCSI Qualified Name.", + Type: []string{"string"}, + Format: "", + }, + }, + "lun": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Lun number.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "iscsiInterface": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "portals": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "chapAuthDiscovery": { + SchemaProps: spec.SchemaProps{ + Description: "whether support iSCSI Discovery CHAP authentication", + Type: []string{"boolean"}, + Format: "", + }, + }, + "chapAuthSession": { + SchemaProps: spec.SchemaProps{ + Description: "whether support iSCSI Session CHAP authentication", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "CHAP Secret for iSCSI target and initiator authentication", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "initiatorName": { + SchemaProps: spec.SchemaProps{ + Description: "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"targetPortal", "iqn", "lun"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "targetPortal": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + Type: []string{"string"}, + Format: "", + }, + }, + "iqn": { + SchemaProps: spec.SchemaProps{ + Description: "Target iSCSI Qualified Name.", + Type: []string{"string"}, + Format: "", + }, + }, + "lun": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Lun number.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "iscsiInterface": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "portals": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "chapAuthDiscovery": { + SchemaProps: spec.SchemaProps{ + Description: "whether support iSCSI Discovery CHAP authentication", + Type: []string{"boolean"}, + Format: "", + }, + }, + "chapAuthSession": { + SchemaProps: spec.SchemaProps{ + Description: "whether support iSCSI Session CHAP authentication", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "CHAP Secret for iSCSI target and initiator authentication", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "initiatorName": { + SchemaProps: spec.SchemaProps{ + Description: "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"targetPortal", "iqn", "lun"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_KeyToPath(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Maps a string key to a path within a volume.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The key to project.", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", + Type: []string{"string"}, + Format: "", + }, + }, + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"key", "path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "postStart": { + SchemaProps: spec.SchemaProps{ + Description: "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + Ref: ref("k8s.io/api/core/v1.Handler"), + }, + }, + "preStop": { + SchemaProps: spec.SchemaProps{ + Description: "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + Ref: ref("k8s.io/api/core/v1.Handler"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Handler"}, + } +} + +func schema_k8sio_api_core_v1_LimitRange(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LimitRange sets resource usage limits for each kind of resource in a Namespace.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.LimitRangeSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LimitRangeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of resource that this limit applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "max": { + SchemaProps: spec.SchemaProps{ + Description: "Max usage constraints on this kind by resource name.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "min": { + SchemaProps: spec.SchemaProps{ + Description: "Min usage constraints on this kind by resource name.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "default": { + SchemaProps: spec.SchemaProps{ + Description: "Default resource requirement limit value by resource name if resource limit is omitted.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "defaultRequest": { + SchemaProps: spec.SchemaProps{ + Description: "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "maxLimitRequestRatio": { + SchemaProps: spec.SchemaProps{ + Description: "MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LimitRangeList is a list of LimitRange items.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LimitRange"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LimitRange", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LimitRangeSpec defines a min/max usage limit for resources that match on kind.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "limits": { + SchemaProps: spec.SchemaProps{ + Description: "Limits is the list of LimitRangeItem objects that are enforced.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LimitRangeItem"), + }, + }, + }, + }, + }, + }, + Required: []string{"limits"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LimitRangeItem"}, + } +} + +func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "List holds a list of objects, which may not be known by the server.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ip": { + SchemaProps: spec.SchemaProps{ + Description: "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", + Type: []string{"string"}, + Format: "", + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancerStatus represents the status of a load-balancer.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ingress": { + SchemaProps: spec.SchemaProps{ + Description: "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LoadBalancerIngress"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LoadBalancerIngress"}, + } +} + +func schema_k8sio_api_core_v1_LocalObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_LocalVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Local represents directly-attached storage with node affinity (Beta feature)", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a fileystem if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_NFSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "server": { + SchemaProps: spec.SchemaProps{ + Description: "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"server", "path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Namespace(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Namespace provides a scope for Names. Use of multiple namespaces is optional.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.NamespaceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.NamespaceStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NamespaceSpec", "k8s.io/api/core/v1.NamespaceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NamespaceCondition contains details about state of namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of namespace controller condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NamespaceList is a list of Namespaces.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Namespace"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Namespace", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_NamespaceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NamespaceSpec describes the attributes on a Namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "finalizers": { + SchemaProps: spec.SchemaProps{ + Description: "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NamespaceStatus is information about the current status of a Namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a namespace's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NamespaceCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NamespaceCondition"}, + } +} + +func schema_k8sio_api_core_v1_Node(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.NodeSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.NodeStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSpec", "k8s.io/api/core/v1.NodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_NodeAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeAddress contains information for the node's address.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Node address type, one of Hostname, ExternalIP or InternalIP.", + Type: []string{"string"}, + Format: "", + }, + }, + "address": { + SchemaProps: spec.SchemaProps{ + Description: "The node address.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "address"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Node affinity is a group of node affinity scheduling rules.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "requiredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.", + Ref: ref("k8s.io/api/core/v1.NodeSelector"), + }, + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PreferredSchedulingTerm"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/core/v1.PreferredSchedulingTerm"}, + } +} + +func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeCondition contains condition information for a node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of node condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastHeartbeatTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time we got an update on a given condition.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transit from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_NodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap is a reference to a Node's ConfigMap", + Ref: ref("k8s.io/api/core/v1.ConfigMapNodeConfigSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ConfigMapNodeConfigSource"}, + } +} + +func schema_k8sio_api_core_v1_NodeConfigStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "assigned": { + SchemaProps: spec.SchemaProps{ + Description: "Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned.", + Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + }, + }, + "active": { + SchemaProps: spec.SchemaProps{ + Description: "Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error.", + Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + }, + }, + "lastKnownGood": { + SchemaProps: spec.SchemaProps{ + Description: "LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future.", + Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Description: "Error describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors may occur at different points while syncing config. Earlier errors (e.g. download or checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error by fixing the config assigned in Spec.ConfigSource. You can find additional information for debugging by searching the error message in the Kubelet log. Error is a human-readable description of the error state; machines can check whether or not Error is empty, but should not rely on the stability of the Error text across Kubelet versions.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeConfigSource"}, + } +} + +func schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kubeletEndpoint": { + SchemaProps: spec.SchemaProps{ + Description: "Endpoint on which Kubelet is listening.", + Ref: ref("k8s.io/api/core/v1.DaemonEndpoint"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.DaemonEndpoint"}, + } +} + +func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeList is the whole list of all Nodes which have been registered with master.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of nodes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Node"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Node", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_NodeProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeProxyOptions is the query options to a Node's proxy call.", + 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: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the URL path to use for the current proxy request to node.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_NodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeResources is an object for conveying resource information about a node. see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity represents the available resources of a node", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + Required: []string{"Capacity"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelectorTerms": { + SchemaProps: spec.SchemaProps{ + Description: "Required. A list of node selector terms. The terms are ORed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + }, + }, + }, + }, + }, + }, + Required: []string{"nodeSelectorTerms"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelectorTerm"}, + } +} + +func schema_k8sio_api_core_v1_NodeSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The label key that the selector applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Description: "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"key", "operator"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "matchExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "A list of node selector requirements by node's labels.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + }, + }, + }, + }, + }, + "matchFields": { + SchemaProps: spec.SchemaProps{ + Description: "A list of node selector requirements by node's fields.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelectorRequirement"}, + } +} + +func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeSpec describes the attributes that a node is created with.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "PodCIDR represents the pod IP range assigned to the node.", + Type: []string{"string"}, + Format: "", + }, + }, + "podCIDRs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "providerID": { + SchemaProps: spec.SchemaProps{ + Description: "ID of the node assigned by the cloud provider in the format: ://", + Type: []string{"string"}, + Format: "", + }, + }, + "unschedulable": { + SchemaProps: spec.SchemaProps{ + Description: "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration", + Type: []string{"boolean"}, + Format: "", + }, + }, + "taints": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the node's taints.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Taint"), + }, + }, + }, + }, + }, + "configSource": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field", + Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + }, + }, + "externalID": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeConfigSource", "k8s.io/api/core/v1.Taint"}, + } +} + +func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeStatus is information about the current status of a node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "allocatable": { + SchemaProps: spec.SchemaProps{ + Description: "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NodeCondition"), + }, + }, + }, + }, + }, + "addresses": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See http://pr.k8s.io/79391 for an example.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NodeAddress"), + }, + }, + }, + }, + }, + "daemonEndpoints": { + SchemaProps: spec.SchemaProps{ + Description: "Endpoints of daemons running on the Node.", + Ref: ref("k8s.io/api/core/v1.NodeDaemonEndpoints"), + }, + }, + "nodeInfo": { + SchemaProps: spec.SchemaProps{ + Description: "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", + Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), + }, + }, + "images": { + SchemaProps: spec.SchemaProps{ + Description: "List of container images on this node", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerImage"), + }, + }, + }, + }, + }, + "volumesInUse": { + SchemaProps: spec.SchemaProps{ + Description: "List of attachable volumes in use (mounted) by the node.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumesAttached": { + SchemaProps: spec.SchemaProps{ + Description: "List of volumes that are attached to the node.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.AttachedVolume"), + }, + }, + }, + }, + }, + "config": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the config assigned to the node via the dynamic Kubelet config feature.", + Ref: ref("k8s.io/api/core/v1.NodeConfigStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.AttachedVolume", "k8s.io/api/core/v1.ContainerImage", "k8s.io/api/core/v1.NodeAddress", "k8s.io/api/core/v1.NodeCondition", "k8s.io/api/core/v1.NodeConfigStatus", "k8s.io/api/core/v1.NodeDaemonEndpoints", "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "machineID": { + SchemaProps: spec.SchemaProps{ + Description: "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", + Type: []string{"string"}, + Format: "", + }, + }, + "systemUUID": { + SchemaProps: spec.SchemaProps{ + Description: "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", + Type: []string{"string"}, + Format: "", + }, + }, + "bootID": { + SchemaProps: spec.SchemaProps{ + Description: "Boot ID reported by the node.", + Type: []string{"string"}, + Format: "", + }, + }, + "kernelVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", + Type: []string{"string"}, + Format: "", + }, + }, + "osImage": { + SchemaProps: spec.SchemaProps{ + Description: "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", + Type: []string{"string"}, + Format: "", + }, + }, + "containerRuntimeVersion": { + SchemaProps: spec.SchemaProps{ + Description: "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", + Type: []string{"string"}, + Format: "", + }, + }, + "kubeletVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Kubelet Version reported by the node.", + Type: []string{"string"}, + Format: "", + }, + }, + "kubeProxyVersion": { + SchemaProps: spec.SchemaProps{ + Description: "KubeProxy Version reported by the node.", + Type: []string{"string"}, + Format: "", + }, + }, + "operatingSystem": { + SchemaProps: spec.SchemaProps{ + Description: "The Operating System reported by the node", + Type: []string{"string"}, + Format: "", + }, + }, + "architecture": { + SchemaProps: spec.SchemaProps{ + Description: "The Architecture reported by the node", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"machineID", "systemUUID", "bootID", "kernelVersion", "osImage", "containerRuntimeVersion", "kubeletVersion", "kubeProxyVersion", "operatingSystem", "architecture"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ObjectFieldSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectFieldSelector selects an APIVersioned field of an object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldPath": { + SchemaProps: spec.SchemaProps{ + Description: "Path of the field to select in the specified API version.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"fieldPath"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API version of the referent.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldPath": { + SchemaProps: spec.SchemaProps{ + Description: "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PersistentVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeSpec", "k8s.io/api/core/v1.PersistentVolumeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaim is a user's request for and claim to a persistent volume", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/api/core/v1.PersistentVolumeClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimCondition contails details about state of pvc", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time we probed the condition.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "accessModes": { + SchemaProps: spec.SchemaProps{ + Description: "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over volumes to consider for binding.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeName is the binding reference to the PersistentVolume backing this claim.", + Type: []string{"string"}, + Format: "", + }, + }, + "storageClassName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeMode": { + SchemaProps: spec.SchemaProps{ + Description: "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + Type: []string{"string"}, + Format: "", + }, + }, + "dataSource": { + SchemaProps: spec.SchemaProps{ + Description: "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) * An existing PVC (PersistentVolumeClaim) * An existing custom resource/object that implements data population (Alpha) In order to use VolumeSnapshot object types, the appropriate feature gate must be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the specified data source is not supported, the volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase represents the current phase of PersistentVolumeClaim.", + Type: []string{"string"}, + Format: "", + }, + }, + "accessModes": { + SchemaProps: spec.SchemaProps{ + Description: "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Represents the actual resources of the underlying volume.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimCondition", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "claimName": { + SchemaProps: spec.SchemaProps{ + Description: "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Will force the ReadOnly setting in VolumeMounts. Default false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"claimName"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeList is a list of PersistentVolume items.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PersistentVolume"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolume", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeSource is similar to VolumeSource but meant for the administrator who creates PVs. Exactly one of its members must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "gcePersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + }, + }, + "awsElasticBlockStore": { + SchemaProps: spec.SchemaProps{ + Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + }, + }, + "hostPath": { + SchemaProps: spec.SchemaProps{ + Description: "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + }, + }, + "glusterfs": { + SchemaProps: spec.SchemaProps{ + Description: "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + Ref: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), + }, + }, + "nfs": { + SchemaProps: spec.SchemaProps{ + Description: "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + }, + }, + "rbd": { + SchemaProps: spec.SchemaProps{ + Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), + }, + }, + "iscsi": { + SchemaProps: spec.SchemaProps{ + Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", + Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), + }, + }, + "cinder": { + SchemaProps: spec.SchemaProps{ + Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), + }, + }, + "cephfs": { + SchemaProps: spec.SchemaProps{ + Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), + }, + }, + "fc": { + SchemaProps: spec.SchemaProps{ + Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + }, + }, + "flocker": { + SchemaProps: spec.SchemaProps{ + Description: "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", + Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + }, + }, + "flexVolume": { + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), + }, + }, + "azureFile": { + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), + }, + }, + "vsphereVolume": { + SchemaProps: spec.SchemaProps{ + Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + }, + }, + "quobyte": { + SchemaProps: spec.SchemaProps{ + Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + }, + }, + "azureDisk": { + SchemaProps: spec.SchemaProps{ + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + }, + }, + "photonPersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + }, + }, + "portworxVolume": { + SchemaProps: spec.SchemaProps{ + Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + }, + }, + "scaleIO": { + SchemaProps: spec.SchemaProps{ + Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), + }, + }, + "local": { + SchemaProps: spec.SchemaProps{ + Description: "Local represents directly-attached storage with node affinity", + Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), + }, + }, + "storageos": { + SchemaProps: spec.SchemaProps{ + Description: "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md", + Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), + }, + }, + "csi": { + SchemaProps: spec.SchemaProps{ + Description: "CSI represents storage that is handled by an external CSI driver (Beta feature).", + Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeSpec is the specification of a persistent volume.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "gcePersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + }, + }, + "awsElasticBlockStore": { + SchemaProps: spec.SchemaProps{ + Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + }, + }, + "hostPath": { + SchemaProps: spec.SchemaProps{ + Description: "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + }, + }, + "glusterfs": { + SchemaProps: spec.SchemaProps{ + Description: "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + Ref: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), + }, + }, + "nfs": { + SchemaProps: spec.SchemaProps{ + Description: "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + }, + }, + "rbd": { + SchemaProps: spec.SchemaProps{ + Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), + }, + }, + "iscsi": { + SchemaProps: spec.SchemaProps{ + Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", + Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), + }, + }, + "cinder": { + SchemaProps: spec.SchemaProps{ + Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), + }, + }, + "cephfs": { + SchemaProps: spec.SchemaProps{ + Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), + }, + }, + "fc": { + SchemaProps: spec.SchemaProps{ + Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + }, + }, + "flocker": { + SchemaProps: spec.SchemaProps{ + Description: "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", + Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + }, + }, + "flexVolume": { + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), + }, + }, + "azureFile": { + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), + }, + }, + "vsphereVolume": { + SchemaProps: spec.SchemaProps{ + Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + }, + }, + "quobyte": { + SchemaProps: spec.SchemaProps{ + Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + }, + }, + "azureDisk": { + SchemaProps: spec.SchemaProps{ + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + }, + }, + "photonPersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + }, + }, + "portworxVolume": { + SchemaProps: spec.SchemaProps{ + Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + }, + }, + "scaleIO": { + SchemaProps: spec.SchemaProps{ + Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), + }, + }, + "local": { + SchemaProps: spec.SchemaProps{ + Description: "Local represents directly-attached storage with node affinity", + Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), + }, + }, + "storageos": { + SchemaProps: spec.SchemaProps{ + Description: "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md", + Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), + }, + }, + "csi": { + SchemaProps: spec.SchemaProps{ + Description: "CSI represents storage that is handled by an external CSI driver (Beta feature).", + Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), + }, + }, + "accessModes": { + SchemaProps: spec.SchemaProps{ + Description: "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "claimRef": { + SchemaProps: spec.SchemaProps{ + Description: "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "persistentVolumeReclaimPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "What happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", + Type: []string{"string"}, + Format: "", + }, + }, + "storageClassName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", + Type: []string{"string"}, + Format: "", + }, + }, + "mountOptions": { + SchemaProps: spec.SchemaProps{ + Description: "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumeMode": { + SchemaProps: spec.SchemaProps{ + Description: "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", + Ref: ref("k8s.io/api/core/v1.VolumeNodeAffinity"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VolumeNodeAffinity", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeStatus is the current status of a persistent volume.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable message indicating details about why the volume is in this state.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Photon Controller persistent disk resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pdID": { + SchemaProps: spec.SchemaProps{ + Description: "ID that identifies Photon Controller persistent disk", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"pdID"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Pod(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.PodSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.PodStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodSpec", "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Pod affinity is a group of inter pod affinity scheduling rules.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "requiredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + }, + }, + }, + }, + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, + } +} + +func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over a set of resources, in this case pods.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "namespaces": { + SchemaProps: spec.SchemaProps{ + Description: "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "topologyKey": { + SchemaProps: spec.SchemaProps{ + Description: "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"topologyKey"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "requiredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + }, + }, + }, + }, + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, + } +} + +func schema_k8sio_api_core_v1_PodAttachOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodAttachOptions is the query options to a Pod's remote attach call.", + 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: "", + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdout": { + SchemaProps: spec.SchemaProps{ + Description: "Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stderr": { + SchemaProps: spec.SchemaProps{ + Description: "Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "The container in which to execute the command. Defaults to only container if there is only one container in the pod.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodCondition contains details for the current condition of this pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time we probed the condition.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nameservers": { + SchemaProps: spec.SchemaProps{ + Description: "A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "searches": { + SchemaProps: spec.SchemaProps{ + Description: "A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "options": { + SchemaProps: spec.SchemaProps{ + Description: "A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodDNSConfigOption"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodDNSConfigOption"}, + } +} + +func schema_k8sio_api_core_v1_PodDNSConfigOption(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodDNSConfigOption defines DNS resolver options of a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodExecOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodExecOptions is the query options to a Pod's remote exec call.", + 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: "", + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Redirect the standard input stream of the pod for this call. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdout": { + SchemaProps: spec.SchemaProps{ + Description: "Redirect the standard output stream of the pod for this call. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stderr": { + SchemaProps: spec.SchemaProps{ + Description: "Redirect the standard error stream of the pod for this call. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "Container in which to execute the command. Defaults to only container if there is only one container in the pod.", + Type: []string{"string"}, + Format: "", + }, + }, + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Command is the remote command to execute. argv array. Not executed within a shell.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"command"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodIP(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IP address information for entries in the (plural) PodIPs field. Each entry includes:\n IP: An IP address allocated to the pod. Routable at least within the cluster.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ip": { + SchemaProps: spec.SchemaProps{ + Description: "ip is an IP address (IPv4 or IPv6) assigned to the pod", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodList is a list of Pods.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of pods. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Pod"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Pod", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodLogOptions is the query options for a Pod's logs REST call.", + 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: "", + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "The container for which to stream logs. Defaults to only container if there is one container in the pod.", + Type: []string{"string"}, + Format: "", + }, + }, + "follow": { + SchemaProps: spec.SchemaProps{ + Description: "Follow the log stream of the pod. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "previous": { + SchemaProps: spec.SchemaProps{ + Description: "Return previous terminated container logs. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "sinceSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "sinceTime": { + SchemaProps: spec.SchemaProps{ + Description: "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "timestamps": { + SchemaProps: spec.SchemaProps{ + Description: "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tailLines": { + SchemaProps: spec.SchemaProps{ + Description: "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "limitBytes": { + SchemaProps: spec.SchemaProps{ + Description: "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "insecureSkipTLSVerifyBackend": { + SchemaProps: spec.SchemaProps{ + Description: "insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_PodPortForwardOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.", + 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: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "List of ports to forward Required when using WebSockets", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodProxyOptions is the query options to a Pod's proxy call.", + 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: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the URL path to use for the current proxy request to pod.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodReadinessGate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodReadinessGate contains the reference to a pod condition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditionType": { + SchemaProps: spec.SchemaProps{ + Description: "ConditionType refers to a condition in the pod's condition list with matching type.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"conditionType"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "seLinuxOptions": { + SchemaProps: spec.SchemaProps{ + Description: "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + }, + }, + "windowsOptions": { + SchemaProps: spec.SchemaProps{ + Description: "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), + }, + }, + "runAsUser": { + SchemaProps: spec.SchemaProps{ + Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "runAsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "runAsNonRoot": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "supplementalGroups": { + SchemaProps: spec.SchemaProps{ + Description: "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + "fsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "sysctls": { + SchemaProps: spec.SchemaProps{ + Description: "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Sysctl"), + }, + }, + }, + }, + }, + "fsGroupChangePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified defaults to \"Always\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.Sysctl", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + } +} + +func schema_k8sio_api_core_v1_PodSignature(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Describes the class of pods that should avoid this node. Exactly one field should be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podController": { + SchemaProps: spec.SchemaProps{ + Description: "Reference to controller whose pods should avoid this node.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"}, + } +} + +func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodSpec is a description of a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge,retainKeys", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Volume"), + }, + }, + }, + }, + }, + "initContainers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, + }, + }, + "containers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, + }, + }, + "ephemeralContainers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EphemeralContainer"), + }, + }, + }, + }, + }, + "restartPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "activeDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "dnsPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "serviceAccountName": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + Type: []string{"string"}, + Format: "", + }, + }, + "serviceAccount": { + SchemaProps: spec.SchemaProps{ + Description: "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", + Type: []string{"string"}, + Format: "", + }, + }, + "automountServiceAccountToken": { + SchemaProps: spec.SchemaProps{ + Description: "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostNetwork": { + SchemaProps: spec.SchemaProps{ + Description: "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "hostPID": { + SchemaProps: spec.SchemaProps{ + Description: "Use the host's pid namespace. Optional: Default to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "hostIPC": { + SchemaProps: spec.SchemaProps{ + Description: "Use the host's ipc namespace. Optional: Default to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "shareProcessNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", + Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), + }, + }, + "imagePullSecrets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", + Type: []string{"string"}, + Format: "", + }, + }, + "subdomain": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", + Type: []string{"string"}, + Format: "", + }, + }, + "affinity": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the pod's scheduling constraints", + Ref: ref("k8s.io/api/core/v1.Affinity"), + }, + }, + "schedulerName": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", + Type: []string{"string"}, + Format: "", + }, + }, + "tolerations": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the pod's tolerations.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, + }, + }, + "hostAliases": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "ip", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.HostAlias"), + }, + }, + }, + }, + }, + "priorityClassName": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.", + Type: []string{"string"}, + Format: "", + }, + }, + "priority": { + SchemaProps: spec.SchemaProps{ + Description: "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "dnsConfig": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", + Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), + }, + }, + "readinessGates": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodReadinessGate"), + }, + }, + }, + }, + }, + "runtimeClassName": { + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is a beta feature as of Kubernetes v1.14.", + Type: []string{"string"}, + Format: "", + }, + }, + "enableServiceLinks": { + SchemaProps: spec.SchemaProps{ + Description: "EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "preemptionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", + Type: []string{"string"}, + Format: "", + }, + }, + "overhead": { + SchemaProps: spec.SchemaProps{ + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "topologySpreadConstraints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "topologyKey", + "whenUnsatisfiable", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "topologyKey", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. This field is only honored by clusters that enable the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), + }, + }, + }, + }, + }, + }, + Required: []string{"containers"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EphemeralContainer", "k8s.io/api/core/v1.HostAlias", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodReadinessGate", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.TopologySpreadConstraint", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodCondition"), + }, + }, + }, + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about why the pod is in this condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'", + Type: []string{"string"}, + Format: "", + }, + }, + "nominatedNodeName": { + SchemaProps: spec.SchemaProps{ + Description: "nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostIP": { + SchemaProps: spec.SchemaProps{ + Description: "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", + Type: []string{"string"}, + Format: "", + }, + }, + "podIP": { + SchemaProps: spec.SchemaProps{ + Description: "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", + Type: []string{"string"}, + Format: "", + }, + }, + "podIPs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "ip", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodIP"), + }, + }, + }, + }, + }, + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "initContainerStatuses": { + SchemaProps: spec.SchemaProps{ + Description: "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + }, + }, + }, + }, + }, + "containerStatuses": { + SchemaProps: spec.SchemaProps{ + Description: "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + }, + }, + }, + }, + }, + "qosClass": { + SchemaProps: spec.SchemaProps{ + Description: "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md", + Type: []string{"string"}, + Format: "", + }, + }, + "ephemeralContainerStatuses": { + SchemaProps: spec.SchemaProps{ + Description: "Status for any ephemeral containers that have run in this pod. This field is alpha-level and is only populated by servers that enable the EphemeralContainers feature.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerStatus", "k8s.io/api/core/v1.PodCondition", "k8s.io/api/core/v1.PodIP", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_PodStatusResult(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.PodStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PodTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodTemplate describes a template for creating copies of a predefined pod.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodTemplateList is a list of PodTemplates.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of pod templates", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodTemplate"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_PodTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodTemplateSpec describes the data a pod should have when created from a template", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.PodSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PortworxVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PortworxVolumeSource represents a Portworx volume resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeID": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeID uniquely identifies a Portworx volume", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"volumeID"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Describes a class of pods that should avoid this node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podSignature": { + SchemaProps: spec.SchemaProps{ + Description: "The class of pods.", + Ref: ref("k8s.io/api/core/v1.PodSignature"), + }, + }, + "evictionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Time at which this entry was added to the list.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) reason why this entry was added to the list.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human readable message indicating why this entry was added to the list.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"podSignature"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodSignature", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "preference": { + SchemaProps: spec.SchemaProps{ + Description: "A node selector term, associated with the corresponding weight.", + Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + }, + }, + }, + Required: []string{"weight", "preference"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelectorTerm"}, + } +} + +func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exec": { + SchemaProps: spec.SchemaProps{ + Description: "One and only one of the following should be specified. Exec specifies the action to take.", + Ref: ref("k8s.io/api/core/v1.ExecAction"), + }, + }, + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPGet specifies the http request to perform.", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "tcpSocket": { + SchemaProps: spec.SchemaProps{ + Description: "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + }, + }, + "initialDelaySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "periodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "successThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failureThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + } +} + +func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a projected volume source", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "sources": { + SchemaProps: spec.SchemaProps{ + Description: "list of volume projections", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeProjection"), + }, + }, + }, + }, + }, + "defaultMode": { + SchemaProps: spec.SchemaProps{ + Description: "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"sources"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.VolumeProjection"}, + } +} + +func schema_k8sio_api_core_v1_QuobyteVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "registry": { + SchemaProps: spec.SchemaProps{ + Description: "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", + Type: []string{"string"}, + Format: "", + }, + }, + "volume": { + SchemaProps: spec.SchemaProps{ + Description: "Volume is a string that references an already created Quobyte volume by name.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "User to map volume access to Defaults to serivceaccount user", + Type: []string{"string"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group to map volume access to Default is no group", + Type: []string{"string"}, + Format: "", + }, + }, + "tenant": { + SchemaProps: spec.SchemaProps{ + Description: "Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"registry", "volume"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "monitors": { + SchemaProps: spec.SchemaProps{ + Description: "A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", + Type: []string{"string"}, + Format: "", + }, + }, + "pool": { + SchemaProps: spec.SchemaProps{ + Description: "The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "keyring": { + SchemaProps: spec.SchemaProps{ + Description: "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"monitors", "image"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "monitors": { + SchemaProps: spec.SchemaProps{ + Description: "A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", + Type: []string{"string"}, + Format: "", + }, + }, + "pool": { + SchemaProps: spec.SchemaProps{ + Description: "The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "keyring": { + SchemaProps: spec.SchemaProps{ + Description: "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"monitors", "image"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RangeAllocation is not a public type.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "range": { + SchemaProps: spec.SchemaProps{ + Description: "Range is string that identifies the range represented by 'data'.", + Type: []string{"string"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data is a bit array containing all allocated addresses in the previous segment.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + Required: []string{"range", "data"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ReplicationController(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationController represents the configuration of a replication controller.", + 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: "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ReplicationControllerSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ReplicationControllerStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ReplicationControllerSpec", "k8s.io/api/core/v1.ReplicationControllerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerCondition describes the state of a replication controller at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of replication controller condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerList is a collection of replication controllers.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ReplicationController"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ReplicationController", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ReplicationControllerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerSpec is the specification of a replication controller.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec"}, + } +} + +func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerStatus represents the current status of a replication controller.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "fullyLabeledReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods that have labels matching the labels of the pod template of the replication controller.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of ready replicas for this replication controller.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "ObservedGeneration reflects the generation of the most recently observed replication controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a replication controller's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ReplicationControllerCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ReplicationControllerCondition"}, + } +} + +func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceFieldSelector represents container resources (cpu, memory) and their output format", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "containerName": { + SchemaProps: spec.SchemaProps{ + Description: "Container name: required for volumes, optional for env vars", + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Required: resource to select", + Type: []string{"string"}, + Format: "", + }, + }, + "divisor": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the output format of the exposed resources, defaults to \"1\"", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"resource"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_ResourceQuota(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuota sets aggregate quota restrictions enforced per namespace", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ResourceQuotaSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ResourceQuotaStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ResourceQuotaSpec", "k8s.io/api/core/v1.ResourceQuotaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuotaList is a list of ResourceQuota items.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ResourceQuota"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ResourceQuota", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hard": { + SchemaProps: spec.SchemaProps{ + Description: "hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "scopes": { + SchemaProps: spec.SchemaProps{ + Description: "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "scopeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.", + Ref: ref("k8s.io/api/core/v1.ScopeSelector"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ScopeSelector", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuotaStatus defines the enforced hard limits and observed use.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hard": { + SchemaProps: spec.SchemaProps{ + Description: "Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "used": { + SchemaProps: spec.SchemaProps{ + Description: "Used is the current observed total usage of the resource in the namespace.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceRequirements describes the compute resource requirements.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "limits": { + SchemaProps: spec.SchemaProps{ + Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "requests": { + SchemaProps: spec.SchemaProps{ + Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_SELinuxOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SELinuxOptions are the labels to be applied to the container", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "user": { + SchemaProps: spec.SchemaProps{ + Description: "User is a SELinux user label that applies to the container.", + Type: []string{"string"}, + Format: "", + }, + }, + "role": { + SchemaProps: spec.SchemaProps{ + Description: "Role is a SELinux role label that applies to the container.", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is a SELinux type label that applies to the container.", + Type: []string{"string"}, + Format: "", + }, + }, + "level": { + SchemaProps: spec.SchemaProps{ + Description: "Level is SELinux level label that applies to the container.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "gateway": { + SchemaProps: spec.SchemaProps{ + Description: "The host address of the ScaleIO API Gateway.", + Type: []string{"string"}, + Format: "", + }, + }, + "system": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the storage system as configured in ScaleIO.", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "sslEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "Flag to enable/disable SSL communication with Gateway, default false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "protectionDomain": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the ScaleIO Protection Domain for the configured storage.", + Type: []string{"string"}, + Format: "", + }, + }, + "storagePool": { + SchemaProps: spec.SchemaProps{ + Description: "The ScaleIO Storage Pool associated with the protection domain.", + Type: []string{"string"}, + Format: "", + }, + }, + "storageMode": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"gateway", "system", "secretRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ScaleIOVolumeSource represents a persistent ScaleIO volume", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "gateway": { + SchemaProps: spec.SchemaProps{ + Description: "The host address of the ScaleIO API Gateway.", + Type: []string{"string"}, + Format: "", + }, + }, + "system": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the storage system as configured in ScaleIO.", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "sslEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "Flag to enable/disable SSL communication with Gateway, default false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "protectionDomain": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the ScaleIO Protection Domain for the configured storage.", + Type: []string{"string"}, + Format: "", + }, + }, + "storagePool": { + SchemaProps: spec.SchemaProps{ + Description: "The ScaleIO Storage Pool associated with the protection domain.", + Type: []string{"string"}, + Format: "", + }, + }, + "storageMode": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"gateway", "system", "secretRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "matchExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "A list of scope selector requirements by scope of the resources.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ScopedResourceSelectorRequirement"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ScopedResourceSelectorRequirement"}, + } +} + +func schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "scopeName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the scope that the selector applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Description: "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"scopeName", "operator"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "immutable": { + SchemaProps: spec.SchemaProps{ + Description: "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is an alpha field enabled by ImmutableEphemeralVolumes feature gate.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + "stringData": { + SchemaProps: spec.SchemaProps{ + Description: "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Used to facilitate programmatic handling of secret data.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_SecretEnvSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_SecretKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecretKeySelector selects a key of a Secret.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The key of the secret to select from. Must be a valid secret key.", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret or its key must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"key"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecretList is a list of Secret.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Secret"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Secret", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.KeyToPath"), + }, + }, + }, + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret or its key must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.KeyToPath"}, + } +} + +func schema_k8sio_api_core_v1_SecretReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is unique within a namespace to reference a secret resource.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace defines the space within which the secret name must be unique.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + Type: []string{"string"}, + Format: "", + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.KeyToPath"), + }, + }, + }, + }, + }, + "defaultMode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret or its keys must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.KeyToPath"}, + } +} + +func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "capabilities": { + SchemaProps: spec.SchemaProps{ + Description: "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.", + Ref: ref("k8s.io/api/core/v1.Capabilities"), + }, + }, + "privileged": { + SchemaProps: spec.SchemaProps{ + Description: "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "seLinuxOptions": { + SchemaProps: spec.SchemaProps{ + Description: "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + }, + }, + "windowsOptions": { + SchemaProps: spec.SchemaProps{ + Description: "The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), + }, + }, + "runAsUser": { + SchemaProps: spec.SchemaProps{ + Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "runAsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "runAsNonRoot": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "readOnlyRootFilesystem": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container has a read-only root filesystem. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowPrivilegeEscalation": { + SchemaProps: spec.SchemaProps{ + Description: "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN", + Type: []string{"boolean"}, + Format: "", + }, + }, + "procMount": { + SchemaProps: spec.SchemaProps{ + Description: "procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Capabilities", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + } +} + +func schema_k8sio_api_core_v1_SerializedReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SerializedReference is a reference to serialized object.", + 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: "", + }, + }, + "reference": { + SchemaProps: spec.SchemaProps{ + Description: "The reference to an object in the system.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_Service(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ServiceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ServiceStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ServiceSpec", "k8s.io/api/core/v1.ServiceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "secrets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + "imagePullSecrets": { + SchemaProps: spec.SchemaProps{ + Description: "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + }, + }, + "automountServiceAccountToken": { + SchemaProps: spec.SchemaProps{ + Description: "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountList is a list of ServiceAccount objects", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ServiceAccount"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ServiceAccount", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "audience": { + SchemaProps: spec.SchemaProps{ + Description: "Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.", + Type: []string{"string"}, + Format: "", + }, + }, + "expirationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the path relative to the mount point of the file to project the token into.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceList holds a list of services.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of services", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Service"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Service", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ServicePort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServicePort contains information on service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.", + Type: []string{"string"}, + Format: "", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.", + Type: []string{"string"}, + Format: "", + }, + }, + "appProtocol": { + SchemaProps: spec.SchemaProps{ + Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. Field can be enabled with ServiceAppProtocol feature gate.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by this service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "targetPort": { + SchemaProps: spec.SchemaProps{ + Description: "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_core_v1_ServiceProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceProxyOptions is the query options to a Service's proxy call.", + 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: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceSpec describes the attributes that a user creates on a service.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "port", + "protocol", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "port", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ServicePort"), + }, + }, + }, + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "clusterIP": { + SchemaProps: spec.SchemaProps{ + Description: "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", + Type: []string{"string"}, + Format: "", + }, + }, + "externalIPs": { + SchemaProps: spec.SchemaProps{ + Description: "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "sessionAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Type: []string{"string"}, + Format: "", + }, + }, + "loadBalancerIP": { + SchemaProps: spec.SchemaProps{ + Description: "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.", + Type: []string{"string"}, + Format: "", + }, + }, + "loadBalancerSourceRanges": { + SchemaProps: spec.SchemaProps{ + Description: "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "externalName": { + SchemaProps: spec.SchemaProps{ + Description: "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.", + Type: []string{"string"}, + Format: "", + }, + }, + "externalTrafficPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", + Type: []string{"string"}, + Format: "", + }, + }, + "healthCheckNodePort": { + SchemaProps: spec.SchemaProps{ + Description: "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "publishNotReadyAddresses": { + SchemaProps: spec.SchemaProps{ + Description: "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "sessionAffinityConfig": { + SchemaProps: spec.SchemaProps{ + Description: "sessionAffinityConfig contains the configurations of session affinity.", + Ref: ref("k8s.io/api/core/v1.SessionAffinityConfig"), + }, + }, + "ipFamily": { + SchemaProps: spec.SchemaProps{ + Description: "ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which allocate external load-balancers should use the same IP family. Endpoints for this Service will be of this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment.", + Type: []string{"string"}, + Format: "", + }, + }, + "topologyKeys": { + SchemaProps: spec.SchemaProps{ + Description: "topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value \"*\" may be used to mean \"any topology\". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ServicePort", "k8s.io/api/core/v1.SessionAffinityConfig"}, + } +} + +func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceStatus represents the current status of a service.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "loadBalancer": { + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancer contains the current status of the load-balancer, if one is present.", + Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LoadBalancerStatus"}, + } +} + +func schema_k8sio_api_core_v1_SessionAffinityConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SessionAffinityConfig represents the configurations of session affinity.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clientIP": { + SchemaProps: spec.SchemaProps{ + Description: "clientIP contains the configurations of Client IP based session affinity.", + Ref: ref("k8s.io/api/core/v1.ClientIPConfig"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ClientIPConfig"}, + } +} + +func schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a StorageOS persistent volume resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_StorageOSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a StorageOS persistent volume resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_Sysctl(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Sysctl defines a kernel parameter to be set", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of a property to set", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value of a property to set", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "value"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_TCPSocketAction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TCPSocketAction describes an action based on opening a socket", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Host name to connect to, defaults to the pod IP.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"port"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "Required. The taint key to be applied to a node.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "The taint value corresponding to the taint key.", + Type: []string{"string"}, + Format: "", + }, + }, + "effect": { + SchemaProps: spec.SchemaProps{ + Description: "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeAdded": { + SchemaProps: spec.SchemaProps{ + Description: "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + Required: []string{"key", "effect"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_Toleration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", + Type: []string{"string"}, + Format: "", + }, + }, + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", + Type: []string{"string"}, + Format: "", + }, + }, + "effect": { + SchemaProps: spec.SchemaProps{ + Description: "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + Type: []string{"string"}, + Format: "", + }, + }, + "tolerationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The label key that the selector applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Description: "An array of string values. One value must match the label to be selected. Each entry in Values is ORed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"key", "values"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "matchLabelExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "A list of topology selector requirements by labels.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.TopologySelectorLabelRequirement"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TopologySelectorLabelRequirement"}, + } +} + +func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TopologySpreadConstraint specifies how to spread matching pods among the given topology.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxSkew": { + SchemaProps: spec.SchemaProps{ + Description: "MaxSkew describes the degree to which pods may be unevenly distributed. It's the maximum permitted difference between the number of matching pods in any two topology domains of a given topology type. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. It's a required field. Default value is 1 and 0 is not allowed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "topologyKey": { + SchemaProps: spec.SchemaProps{ + Description: "TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.", + Type: []string{"string"}, + Format: "", + }, + }, + "whenUnsatisfiable": { + SchemaProps: spec.SchemaProps{ + Description: "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it - ScheduleAnyway tells the scheduler to still schedule it It's considered as \"Unsatisfiable\" if and only if placing incoming pod on any topology violates \"MaxSkew\". For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.", + Type: []string{"string"}, + Format: "", + }, + }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"maxSkew", "topologyKey", "whenUnsatisfiable"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_core_v1_TypedLocalObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is the type of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Volume represents a named volume in a pod that may be accessed by any container in the pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "hostPath": { + SchemaProps: spec.SchemaProps{ + Description: "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + }, + }, + "emptyDir": { + SchemaProps: spec.SchemaProps{ + Description: "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + }, + }, + "gcePersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + }, + }, + "awsElasticBlockStore": { + SchemaProps: spec.SchemaProps{ + Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + }, + }, + "gitRepo": { + SchemaProps: spec.SchemaProps{ + Description: "GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), + }, + }, + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), + }, + }, + "nfs": { + SchemaProps: spec.SchemaProps{ + Description: "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + }, + }, + "iscsi": { + SchemaProps: spec.SchemaProps{ + Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", + Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), + }, + }, + "glusterfs": { + SchemaProps: spec.SchemaProps{ + Description: "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), + }, + }, + "persistentVolumeClaim": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + }, + }, + "rbd": { + SchemaProps: spec.SchemaProps{ + Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), + }, + }, + "flexVolume": { + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), + }, + }, + "cinder": { + SchemaProps: spec.SchemaProps{ + Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), + }, + }, + "cephfs": { + SchemaProps: spec.SchemaProps{ + Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), + }, + }, + "flocker": { + SchemaProps: spec.SchemaProps{ + Description: "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + }, + }, + "downwardAPI": { + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPI represents downward API about the pod that should populate this volume", + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), + }, + }, + "fc": { + SchemaProps: spec.SchemaProps{ + Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + }, + }, + "azureFile": { + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap represents a configMap that should populate this volume", + Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), + }, + }, + "vsphereVolume": { + SchemaProps: spec.SchemaProps{ + Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + }, + }, + "quobyte": { + SchemaProps: spec.SchemaProps{ + Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + }, + }, + "azureDisk": { + SchemaProps: spec.SchemaProps{ + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + }, + }, + "photonPersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + }, + }, + "projected": { + SchemaProps: spec.SchemaProps{ + Description: "Items for all in one resources secrets, configmaps, and downward API", + Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), + }, + }, + "portworxVolume": { + SchemaProps: spec.SchemaProps{ + Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + }, + }, + "scaleIO": { + SchemaProps: spec.SchemaProps{ + Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), + }, + }, + "storageos": { + SchemaProps: spec.SchemaProps{ + Description: "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), + }, + }, + "csi": { + SchemaProps: spec.SchemaProps{ + Description: "CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).", + Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + } +} + +func schema_k8sio_api_core_v1_VolumeDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "volumeDevice describes a mapping of a raw block device within a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name must match the name of a persistentVolumeClaim in the pod", + Type: []string{"string"}, + Format: "", + }, + }, + "devicePath": { + SchemaProps: spec.SchemaProps{ + Description: "devicePath is the path inside of the container that the device will be mapped to.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "devicePath"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_VolumeMount(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeMount describes a mounting of a Volume within a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "This must match the Name of a Volume.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "mountPath": { + SchemaProps: spec.SchemaProps{ + Description: "Path within the container at which the volume should be mounted. Must not contain ':'.", + Type: []string{"string"}, + Format: "", + }, + }, + "subPath": { + SchemaProps: spec.SchemaProps{ + Description: "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", + Type: []string{"string"}, + Format: "", + }, + }, + "mountPropagation": { + SchemaProps: spec.SchemaProps{ + Description: "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.", + Type: []string{"string"}, + Format: "", + }, + }, + "subPathExpr": { + SchemaProps: spec.SchemaProps{ + Description: "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "mountPath"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_VolumeNodeAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "required": { + SchemaProps: spec.SchemaProps{ + Description: "Required specifies hard node constraints that must be met.", + Ref: ref("k8s.io/api/core/v1.NodeSelector"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelector"}, + } +} + +func schema_k8sio_api_core_v1_VolumeProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Projection that may be projected along with other supported volume types", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "information about the secret data to project", + Ref: ref("k8s.io/api/core/v1.SecretProjection"), + }, + }, + "downwardAPI": { + SchemaProps: spec.SchemaProps{ + Description: "information about the downwardAPI data to project", + Ref: ref("k8s.io/api/core/v1.DownwardAPIProjection"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "information about the configMap data to project", + Ref: ref("k8s.io/api/core/v1.ConfigMapProjection"), + }, + }, + "serviceAccountToken": { + SchemaProps: spec.SchemaProps{ + Description: "information about the serviceAccountToken data to project", + Ref: ref("k8s.io/api/core/v1.ServiceAccountTokenProjection"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ConfigMapProjection", "k8s.io/api/core/v1.DownwardAPIProjection", "k8s.io/api/core/v1.SecretProjection", "k8s.io/api/core/v1.ServiceAccountTokenProjection"}, + } +} + +func schema_k8sio_api_core_v1_VolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the source of a volume to mount. Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hostPath": { + SchemaProps: spec.SchemaProps{ + Description: "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + }, + }, + "emptyDir": { + SchemaProps: spec.SchemaProps{ + Description: "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + }, + }, + "gcePersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + }, + }, + "awsElasticBlockStore": { + SchemaProps: spec.SchemaProps{ + Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + }, + }, + "gitRepo": { + SchemaProps: spec.SchemaProps{ + Description: "GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), + }, + }, + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), + }, + }, + "nfs": { + SchemaProps: spec.SchemaProps{ + Description: "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + }, + }, + "iscsi": { + SchemaProps: spec.SchemaProps{ + Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", + Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), + }, + }, + "glusterfs": { + SchemaProps: spec.SchemaProps{ + Description: "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), + }, + }, + "persistentVolumeClaim": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + }, + }, + "rbd": { + SchemaProps: spec.SchemaProps{ + Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), + }, + }, + "flexVolume": { + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), + }, + }, + "cinder": { + SchemaProps: spec.SchemaProps{ + Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), + }, + }, + "cephfs": { + SchemaProps: spec.SchemaProps{ + Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), + }, + }, + "flocker": { + SchemaProps: spec.SchemaProps{ + Description: "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + }, + }, + "downwardAPI": { + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPI represents downward API about the pod that should populate this volume", + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), + }, + }, + "fc": { + SchemaProps: spec.SchemaProps{ + Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + }, + }, + "azureFile": { + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap represents a configMap that should populate this volume", + Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), + }, + }, + "vsphereVolume": { + SchemaProps: spec.SchemaProps{ + Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + }, + }, + "quobyte": { + SchemaProps: spec.SchemaProps{ + Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + }, + }, + "azureDisk": { + SchemaProps: spec.SchemaProps{ + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + }, + }, + "photonPersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + }, + }, + "projected": { + SchemaProps: spec.SchemaProps{ + Description: "Items for all in one resources secrets, configmaps, and downward API", + Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), + }, + }, + "portworxVolume": { + SchemaProps: spec.SchemaProps{ + Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + }, + }, + "scaleIO": { + SchemaProps: spec.SchemaProps{ + Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), + }, + }, + "storageos": { + SchemaProps: spec.SchemaProps{ + Description: "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), + }, + }, + "csi": { + SchemaProps: spec.SchemaProps{ + Description: "CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).", + Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + } +} + +func schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a vSphere volume resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumePath": { + SchemaProps: spec.SchemaProps{ + Description: "Path that identifies vSphere volume vmdk", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "storagePolicyName": { + SchemaProps: spec.SchemaProps{ + Description: "Storage Policy Based Management (SPBM) profile name.", + Type: []string{"string"}, + Format: "", + }, + }, + "storagePolicyID": { + SchemaProps: spec.SchemaProps{ + Description: "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"volumePath"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "podAffinityTerm": { + SchemaProps: spec.SchemaProps{ + Description: "Required. A pod affinity term, associated with the corresponding weight.", + Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + }, + }, + }, + Required: []string{"weight", "podAffinityTerm"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodAffinityTerm"}, + } +} + +func schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WindowsSecurityContextOptions contain Windows-specific options and credentials.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "gmsaCredentialSpecName": { + SchemaProps: spec.SchemaProps{ + Description: "GMSACredentialSpecName is the name of the GMSA credential spec to use.", + Type: []string{"string"}, + Format: "", + }, + }, + "gmsaCredentialSpec": { + SchemaProps: spec.SchemaProps{ + Description: "GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.", + Type: []string{"string"}, + Format: "", + }, + }, + "runAsUserName": { + SchemaProps: spec.SchemaProps{ + Description: "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_discovery_v1alpha1_Endpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Endpoint represents a single logical \"backend\" implementing a service.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "addresses": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "conditions contains information about the current status of the endpoint.", + Ref: ref("k8s.io/api/discovery/v1alpha1.EndpointConditions"), + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.", + Type: []string{"string"}, + Format: "", + }, + }, + "targetRef": { + SchemaProps: spec.SchemaProps{ + Description: "targetRef is a reference to a Kubernetes object that represents this endpoint.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "topology": { + SchemaProps: spec.SchemaProps{ + Description: "topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node\n where the endpoint is located. This should match the corresponding\n node label.\n* topology.kubernetes.io/zone: the value indicates the zone where the\n endpoint is located. This should match the corresponding node label.\n* topology.kubernetes.io/region: the value indicates the region where the\n endpoint is located. This should match the corresponding node label.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"addresses"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/discovery/v1alpha1.EndpointConditions"}, + } +} + +func schema_k8sio_api_discovery_v1alpha1_EndpointConditions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointConditions represents the current condition of an endpoint.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ready": { + SchemaProps: spec.SchemaProps{ + Description: "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_discovery_v1alpha1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointPort represents a Port used by an EndpointSlice", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.", + Type: []string{"string"}, + Format: "", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "appProtocol": { + SchemaProps: spec.SchemaProps{ + Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names. Default is empty string.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_discovery_v1alpha1_EndpointSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "addressType": { + SchemaProps: spec.SchemaProps{ + Description: "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.", + Type: []string{"string"}, + Format: "", + }, + }, + "endpoints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/discovery/v1alpha1.Endpoint"), + }, + }, + }, + }, + }, + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/discovery/v1alpha1.EndpointPort"), + }, + }, + }, + }, + }, + }, + Required: []string{"addressType", "endpoints"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/discovery/v1alpha1.Endpoint", "k8s.io/api/discovery/v1alpha1.EndpointPort", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_discovery_v1alpha1_EndpointSliceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointSliceList represents a list of endpoint slices", + 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 list metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of endpoint slices", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/discovery/v1alpha1.EndpointSlice"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/discovery/v1alpha1.EndpointSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_discovery_v1beta1_Endpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Endpoint represents a single logical \"backend\" implementing a service.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "addresses": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "conditions contains information about the current status of the endpoint.", + Ref: ref("k8s.io/api/discovery/v1beta1.EndpointConditions"), + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.", + Type: []string{"string"}, + Format: "", + }, + }, + "targetRef": { + SchemaProps: spec.SchemaProps{ + Description: "targetRef is a reference to a Kubernetes object that represents this endpoint.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "topology": { + SchemaProps: spec.SchemaProps{ + Description: "topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node\n where the endpoint is located. This should match the corresponding\n node label.\n* topology.kubernetes.io/zone: the value indicates the zone where the\n endpoint is located. This should match the corresponding node label.\n* topology.kubernetes.io/region: the value indicates the region where the\n endpoint is located. This should match the corresponding node label.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"addresses"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/discovery/v1beta1.EndpointConditions"}, + } +} + +func schema_k8sio_api_discovery_v1beta1_EndpointConditions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointConditions represents the current condition of an endpoint.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ready": { + SchemaProps: spec.SchemaProps{ + Description: "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_discovery_v1beta1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointPort represents a Port used by an EndpointSlice", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.", + Type: []string{"string"}, + Format: "", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "appProtocol": { + SchemaProps: spec.SchemaProps{ + Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "addressType": { + SchemaProps: spec.SchemaProps{ + Description: "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.", + Type: []string{"string"}, + Format: "", + }, + }, + "endpoints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/discovery/v1beta1.Endpoint"), + }, + }, + }, + }, + }, + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/discovery/v1beta1.EndpointPort"), + }, + }, + }, + }, + }, + }, + Required: []string{"addressType", "endpoints"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/discovery/v1beta1.Endpoint", "k8s.io/api/discovery/v1beta1.EndpointPort", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointSliceList represents a list of endpoint slices", + 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 list metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of endpoint slices", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/discovery/v1beta1.EndpointSlice"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/discovery/v1beta1.EndpointSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_events_v1beta1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "eventTime": { + SchemaProps: spec.SchemaProps{ + Description: "Required. Time when this Event was first observed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "series": { + SchemaProps: spec.SchemaProps{ + Description: "Data about the Event series this event represents or nil if it's a singleton Event.", + Ref: ref("k8s.io/api/events/v1beta1.EventSeries"), + }, + }, + "reportingController": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", + Type: []string{"string"}, + Format: "", + }, + }, + "reportingInstance": { + SchemaProps: spec.SchemaProps{ + Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", + Type: []string{"string"}, + Format: "", + }, + }, + "action": { + SchemaProps: spec.SchemaProps{ + Description: "What action was taken/failed regarding to the regarding object.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Why the action was taken.", + Type: []string{"string"}, + Format: "", + }, + }, + "regarding": { + SchemaProps: spec.SchemaProps{ + Description: "The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "related": { + SchemaProps: spec.SchemaProps{ + Description: "Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "note": { + SchemaProps: spec.SchemaProps{ + Description: "Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of this event (Normal, Warning), new types could be added in the future.", + Type: []string{"string"}, + Format: "", + }, + }, + "deprecatedSource": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated field assuring backward compatibility with core.v1 Event type", + Ref: ref("k8s.io/api/core/v1.EventSource"), + }, + }, + "deprecatedFirstTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated field assuring backward compatibility with core.v1 Event type", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deprecatedLastTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated field assuring backward compatibility with core.v1 Event type", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deprecatedCount": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated field assuring backward compatibility with core.v1 Event type", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"eventTime"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/events/v1beta1.EventSeries", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_events_v1beta1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventList is a list of Event objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/events/v1beta1.Event"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/events/v1beta1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_events_v1beta1_EventSeries(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { + SchemaProps: spec.SchemaProps{ + Description: "Number of occurrences in this series up to the last heartbeat time", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "lastObservedTime": { + SchemaProps: spec.SchemaProps{ + Description: "Time when last Event from the series was seen before last heartbeat.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "state": { + SchemaProps: spec.SchemaProps{ + Description: "Information whether this series is ongoing or finished. Deprecated. Planned removal for 1.18", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"count", "lastObservedTime", "state"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_AllowedCSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the registered name of the CSI driver", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_AllowedFlexVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AllowedFlexVolume represents a single Flexvolume that is allowed to be used. Deprecated: use AllowedFlexVolume from policy API Group instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "driver is the name of the Flexvolume driver.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"driver"}, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_AllowedHostPath(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined. Deprecated: use AllowedHostPath from policy API Group instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pathPrefix": { + SchemaProps: spec.SchemaProps{ + Description: "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_DaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.DaemonSetSpec", "k8s.io/api/extensions/v1beta1.DaemonSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetCondition describes the state of a DaemonSet at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of DaemonSet condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetList is a collection of daemon sets.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "A list of daemon sets.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.DaemonSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetSpec is the specification of a daemon set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "updateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "An update strategy to replace existing DaemonSet pods with new pods.", + Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy"), + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "templateGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "revisionHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"template"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetStatus represents the current status of a daemon set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "currentNumberScheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberMisscheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "desiredNumberScheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberReady": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "The most recent generation observed by the daemon set controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "updatedNumberScheduled": { + SchemaProps: spec.SchemaProps{ + Description: "The total number of nodes that are running updated daemon pod", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberAvailable": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "numberUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a DaemonSet's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"currentNumberScheduled", "numberMisscheduled", "desiredNumberScheduled", "numberReady"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.DaemonSetCondition"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DaemonSetUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "Rolling update config params. Present only if type = \"RollingUpdate\".", + Ref: ref("k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_Deployment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.", + 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 metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the Deployment.", + Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the Deployment.", + Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.DeploymentSpec", "k8s.io/api/extensions/v1beta1.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentCondition describes the state of a deployment at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of deployment condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentList is a list of Deployments.", + 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 list metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of Deployments.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.Deployment"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.", + 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: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Required: This must match the Name of a deployment.", + Type: []string{"string"}, + Format: "", + }, + }, + "updatedAnnotations": { + SchemaProps: spec.SchemaProps{ + Description: "The annotations to be updated to a deployment", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "rollbackTo": { + SchemaProps: spec.SchemaProps{ + Description: "The config of this deployment rollback.", + Ref: ref("k8s.io/api/extensions/v1beta1.RollbackConfig"), + }, + }, + }, + Required: []string{"name", "rollbackTo"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.RollbackConfig"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentSpec is the specification of the desired behavior of the Deployment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template describes the pods that will be created.", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + "strategy": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "retainKeys", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The deployment strategy to use to replace existing pods with new ones.", + Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentStrategy"), + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "revisionHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. This is set to the max value of int32 (i.e. 2147483647) by default, which means \"retaining all old RelicaSets\".", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "paused": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the deployment is paused and will not be processed by the deployment controller.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "rollbackTo": { + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.", + Ref: ref("k8s.io/api/extensions/v1beta1.RollbackConfig"), + }, + }, + "progressDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. This is set to the max value of int32 (i.e. 2147483647) by default, which means \"no deadline\".", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"template"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/api/extensions/v1beta1.DeploymentStrategy", "k8s.io/api/extensions/v1beta1.RollbackConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentStatus is the most recently observed status of the Deployment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "The generation observed by the deployment controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "updatedReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of ready pods targeted by this deployment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "unavailableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a deployment's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentCondition"), + }, + }, + }, + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.DeploymentCondition"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_DeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentStrategy describes how to replace existing pods with new ones.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", + Ref: ref("k8s.io/api/extensions/v1beta1.RollingUpdateDeployment"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.RollingUpdateDeployment"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_FSGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FSGroupStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use FSGroupStrategyOptions from policy API Group instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", + Type: []string{"string"}, + Format: "", + }, + }, + "ranges": { + SchemaProps: spec.SchemaProps{ + Description: "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.IDRange"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. When unspecified, all paths from incoming requests are matched.", + Type: []string{"string"}, + Format: "", + }, + }, + "pathType": { + SchemaProps: spec.SchemaProps{ + Description: "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types. Defaults to ImplementationSpecific.", + Type: []string{"string"}, + Format: "", + }, + }, + "backend": { + SchemaProps: spec.SchemaProps{ + Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + Ref: ref("k8s.io/api/extensions/v1beta1.IngressBackend"), + }, + }, + }, + Required: []string{"backend"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.IngressBackend"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "paths": { + SchemaProps: spec.SchemaProps{ + Description: "A collection of paths that map requests to backends.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressPath"), + }, + }, + }, + }, + }, + }, + Required: []string{"paths"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.HTTPIngressPath"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_HostPortRange(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined. Deprecated: use HostPortRange from policy API Group instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "min": { + SchemaProps: spec.SchemaProps{ + Description: "min is the start of the range, inclusive.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "max": { + SchemaProps: spec.SchemaProps{ + Description: "max is the end of the range, inclusive.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"min", "max"}, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_IDRange(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IDRange provides a min/max of an allowed range of IDs. Deprecated: use IDRange from policy API Group instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "min": { + SchemaProps: spec.SchemaProps{ + Description: "min is the start of the range, inclusive.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "max": { + SchemaProps: spec.SchemaProps{ + Description: "max is the end of the range, inclusive.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"min", "max"}, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_IPBlock(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cidr": { + SchemaProps: spec.SchemaProps{ + Description: "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", + Type: []string{"string"}, + Format: "", + }, + }, + "except": { + SchemaProps: spec.SchemaProps{ + Description: "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"cidr"}, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. DEPRECATED - This group version of Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release notes for more information.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/extensions/v1beta1.IngressSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/extensions/v1beta1.IngressStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.IngressSpec", "k8s.io/api/extensions/v1beta1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressBackend describes all endpoints for a given service and port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "serviceName": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the name of the referenced service.", + Type: []string{"string"}, + Format: "", + }, + }, + "servicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the port of the referenced service.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressList is a collection of Ingress.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of Ingress.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.Ingress"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + Type: []string{"string"}, + Format: "", + }, + }, + "http": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "http": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressSpec describes the Ingress the user wishes to exist.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ingressClassName": { + SchemaProps: spec.SchemaProps{ + Description: "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", + Type: []string{"string"}, + Format: "", + }, + }, + "backend": { + SchemaProps: spec.SchemaProps{ + Description: "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", + Ref: ref("k8s.io/api/extensions/v1beta1.IngressBackend"), + }, + }, + "tls": { + SchemaProps: spec.SchemaProps{ + Description: "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.IngressTLS"), + }, + }, + }, + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.IngressRule"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.IngressBackend", "k8s.io/api/extensions/v1beta1.IngressRule", "k8s.io/api/extensions/v1beta1.IngressTLS"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressStatus describe the current state of the Ingress.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "loadBalancer": { + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancer contains the current status of the load-balancer.", + Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LoadBalancerStatus"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressTLS describes the transport layer security associated with an Ingress.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hosts": { + SchemaProps: spec.SchemaProps{ + Description: "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_NetworkPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior for this NetworkPolicy.", + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicySpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.NetworkPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPort"), + }, + }, + }, + }, + }, + "to": { + SchemaProps: spec.SchemaProps{ + Description: "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPeer"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer", "k8s.io/api/extensions/v1beta1.NetworkPolicyPort"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPort"), + }, + }, + }, + }, + }, + "from": { + SchemaProps: spec.SchemaProps{ + Description: "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPeer"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer", "k8s.io/api/extensions/v1beta1.NetworkPolicyPort"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicy"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.NetworkPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_NetworkPolicyPeer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podSelector": { + SchemaProps: spec.SchemaProps{ + Description: "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "namespaceSelector": { + SchemaProps: spec.SchemaProps{ + Description: "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "ipBlock": { + SchemaProps: spec.SchemaProps{ + Description: "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", + Ref: ref("k8s.io/api/extensions/v1beta1.IPBlock"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.IPBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "Optional. The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podSelector": { + SchemaProps: spec.SchemaProps{ + Description: "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "ingress": { + SchemaProps: spec.SchemaProps{ + Description: "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule"), + }, + }, + }, + }, + }, + "egress": { + SchemaProps: spec.SchemaProps{ + Description: "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule"), + }, + }, + }, + }, + }, + "policyTypes": { + SchemaProps: spec.SchemaProps{ + Description: "List of rule types that the NetworkPolicy relates to. Valid options are \"Ingress\", \"Egress\", or \"Ingress,Egress\". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"podSelector"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule", "k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated: use PodSecurityPolicy from policy API Group instead.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec defines the policy enforced.", + Ref: ref("k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodSecurityPolicyList is a list of PodSecurityPolicy objects. Deprecated: use PodSecurityPolicyList from policy API Group instead.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.PodSecurityPolicy"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.PodSecurityPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "privileged": { + SchemaProps: spec.SchemaProps{ + Description: "privileged determines if a pod can request to be run as privileged.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "defaultAddCapabilities": { + SchemaProps: spec.SchemaProps{ + Description: "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "requiredDropCapabilities": { + SchemaProps: spec.SchemaProps{ + Description: "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allowedCapabilities": { + SchemaProps: spec.SchemaProps{ + Description: "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumes": { + SchemaProps: spec.SchemaProps{ + Description: "volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "hostNetwork": { + SchemaProps: spec.SchemaProps{ + Description: "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "hostPorts": { + SchemaProps: spec.SchemaProps{ + Description: "hostPorts determines which host port ranges are allowed to be exposed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.HostPortRange"), + }, + }, + }, + }, + }, + "hostPID": { + SchemaProps: spec.SchemaProps{ + Description: "hostPID determines if the policy allows the use of HostPID in the pod spec.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "hostIPC": { + SchemaProps: spec.SchemaProps{ + Description: "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "seLinux": { + SchemaProps: spec.SchemaProps{ + Description: "seLinux is the strategy that will dictate the allowable labels that may be set.", + Ref: ref("k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions"), + }, + }, + "runAsUser": { + SchemaProps: spec.SchemaProps{ + Description: "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", + Ref: ref("k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions"), + }, + }, + "runAsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled.", + Ref: ref("k8s.io/api/extensions/v1beta1.RunAsGroupStrategyOptions"), + }, + }, + "supplementalGroups": { + SchemaProps: spec.SchemaProps{ + Description: "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", + Ref: ref("k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions"), + }, + }, + "fsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", + Ref: ref("k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions"), + }, + }, + "readOnlyRootFilesystem": { + SchemaProps: spec.SchemaProps{ + Description: "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "defaultAllowPrivilegeEscalation": { + SchemaProps: spec.SchemaProps{ + Description: "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowPrivilegeEscalation": { + SchemaProps: spec.SchemaProps{ + Description: "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowedHostPaths": { + SchemaProps: spec.SchemaProps{ + Description: "allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.AllowedHostPath"), + }, + }, + }, + }, + }, + "allowedFlexVolumes": { + SchemaProps: spec.SchemaProps{ + Description: "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.AllowedFlexVolume"), + }, + }, + }, + }, + }, + "allowedCSIDrivers": { + SchemaProps: spec.SchemaProps{ + Description: "AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.AllowedCSIDriver"), + }, + }, + }, + }, + }, + "allowedUnsafeSysctls": { + SchemaProps: spec.SchemaProps{ + Description: "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "forbiddenSysctls": { + SchemaProps: spec.SchemaProps{ + Description: "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allowedProcMountTypes": { + SchemaProps: spec.SchemaProps{ + Description: "AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "runtimeClass": { + SchemaProps: spec.SchemaProps{ + Description: "runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.", + Ref: ref("k8s.io/api/extensions/v1beta1.RuntimeClassStrategyOptions"), + }, + }, + }, + Required: []string{"seLinux", "runAsUser", "supplementalGroups", "fsGroup"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.AllowedCSIDriver", "k8s.io/api/extensions/v1beta1.AllowedFlexVolume", "k8s.io/api/extensions/v1beta1.AllowedHostPath", "k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions", "k8s.io/api/extensions/v1beta1.HostPortRange", "k8s.io/api/extensions/v1beta1.RunAsGroupStrategyOptions", "k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions", "k8s.io/api/extensions/v1beta1.RuntimeClassStrategyOptions", "k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions", "k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_ReplicaSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.", + 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: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.ReplicaSetSpec", "k8s.io/api/extensions/v1beta1.ReplicaSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetCondition describes the state of a replica set at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of replica set condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetList is a collection of ReplicaSets.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.ReplicaSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_ReplicaSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetSpec is the specification of a ReplicaSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetStatus represents the current status of a ReplicaSet.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "fullyLabeledReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods that have labels matching the labels of the pod template of the replicaset.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of ready replicas for this replica set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of available replicas (ready for at least minReadySeconds) for this replica set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a replica set's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.ReplicaSetCondition"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_RollbackConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "revision": { + SchemaProps: spec.SchemaProps{ + Description: "The revision to rollback to. If set to 0, rollback to the last revision.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_RollingUpdateDaemonSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Spec to control the desired behavior of daemon set rolling update.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_RollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Spec to control the desired behavior of rolling update.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "maxSurge": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_RunAsGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsGroupStrategyOptions from policy API Group instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "rule is the strategy that will dictate the allowable RunAsGroup values that may be set.", + Type: []string{"string"}, + Format: "", + }, + }, + "ranges": { + SchemaProps: spec.SchemaProps{ + Description: "ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), + }, + }, + }, + }, + }, + }, + Required: []string{"rule"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.IDRange"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_RunAsUserStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsUserStrategyOptions from policy API Group instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "rule is the strategy that will dictate the allowable RunAsUser values that may be set.", + Type: []string{"string"}, + Format: "", + }, + }, + "ranges": { + SchemaProps: spec.SchemaProps{ + Description: "ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), + }, + }, + }, + }, + }, + }, + Required: []string{"rule"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.IDRange"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_RuntimeClassStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "allowedRuntimeClassNames": { + SchemaProps: spec.SchemaProps{ + Description: "allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "defaultRuntimeClassName": { + SchemaProps: spec.SchemaProps{ + Description: "defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"allowedRuntimeClassNames"}, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_SELinuxStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use SELinuxStrategyOptions from policy API Group instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "rule is the strategy that will dictate the allowable labels that may be set.", + Type: []string{"string"}, + Format: "", + }, + }, + "seLinuxOptions": { + SchemaProps: spec.SchemaProps{ + Description: "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", + Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + }, + }, + }, + Required: []string{"rule"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SELinuxOptions"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_Scale(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "represents a scaling request for a resource.", + 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Ref: ref("k8s.io/api/extensions/v1beta1.ScaleSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", + Ref: ref("k8s.io/api/extensions/v1beta1.ScaleStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.ScaleSpec", "k8s.io/api/extensions/v1beta1.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_extensions_v1beta1_ScaleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "describes the attributes of a scale subresource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "desired number of instances for the scaled object.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_ScaleStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "represents the current status of a scale subresource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "actual number of observed instances of the scaled object.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "targetSelector": { + SchemaProps: spec.SchemaProps{ + Description: "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + } +} + +func schema_k8sio_api_extensions_v1beta1_SupplementalGroupsStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use SupplementalGroupsStrategyOptions from policy API Group instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", + Type: []string{"string"}, + Format: "", + }, + }, + "ranges": { + SchemaProps: spec.SchemaProps{ + Description: "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/extensions/v1beta1.IDRange"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_FlowDistinguisherMethod(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlowDistinguisherMethod specifies the method of a flow distinguisher.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "`type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type"}, + }, + }, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchema(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".", + 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: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowSchemaSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowSchemaStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaSpec", "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlowSchemaCondition describes conditions for a FlowSchema.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "`type` is the type of the condition. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "`status` is the status of the condition. Can be True, False, Unknown. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "`message` is a human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlowSchemaList is a list of FlowSchema objects.", + 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: "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`items` is a list of FlowSchemas.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowSchema"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.FlowSchema", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlowSchemaSpec describes how the FlowSchema's specification looks like.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "priorityLevelConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationReference"), + }, + }, + "matchingPrecedence": { + SchemaProps: spec.SchemaProps{ + Description: "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "distinguisherMethod": { + SchemaProps: spec.SchemaProps{ + Description: "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowDistinguisherMethod"), + }, + }, + "rules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PolicyRulesWithSubjects"), + }, + }, + }, + }, + }, + }, + Required: []string{"priorityLevelConfiguration"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.FlowDistinguisherMethod", "k8s.io/api/flowcontrol/v1alpha1.PolicyRulesWithSubjects", "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationReference"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlowSchemaStatus represents the current state of a FlowSchema.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`conditions` is a list of the current states of FlowSchema.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowSchemaCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaCondition"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_GroupSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupSubject holds detailed information for group-kind subject.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_LimitResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LimitResponse defines how to handle requests that can not be executed right now.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "`type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "queuing": { + SchemaProps: spec.SchemaProps{ + Description: "`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.QueuingConfiguration"), + }, + }, + }, + Required: []string{"type"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "type", + "fields-to-discriminateBy": map[string]interface{}{ + "queuing": "Queuing", + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.QueuingConfiguration"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_LimitedPriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:\n * How are requests for this priority level limited?\n * What should be done with requests that exceed the limit?", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "assuredConcurrencyShares": { + SchemaProps: spec.SchemaProps{ + Description: "`assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level:\n\n ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )\n\nbigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "limitResponse": { + SchemaProps: spec.SchemaProps{ + Description: "`limitResponse` indicates what to do with requests that can not be executed right now", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.LimitResponse"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.LimitResponse"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_NonResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs. If it is present, it must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:\n - \"/healthz\" is legal\n - \"/hea*\" is illegal\n - \"/hea\" is legal but matches nothing\n - \"/hea/*\" also matches nothing\n - \"/healthz/*\" matches all per-component health checks.\n\"*\" matches all non-resource urls. if it is present, it must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"verbs", "nonResourceURLs"}, + }, + }, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_PolicyRulesWithSubjects(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "subjects": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.Subject"), + }, + }, + }, + }, + }, + "resourceRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.ResourcePolicyRule"), + }, + }, + }, + }, + }, + "nonResourceRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.NonResourcePolicyRule"), + }, + }, + }, + }, + }, + }, + Required: []string{"subjects"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.NonResourcePolicyRule", "k8s.io/api/flowcontrol/v1alpha1.ResourcePolicyRule", "k8s.io/api/flowcontrol/v1alpha1.Subject"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityLevelConfiguration represents the configuration of a priority level.", + 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: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationSpec", "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityLevelConfigurationCondition defines the condition of priority level.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "`type` is the type of the condition. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "`status` is the status of the condition. Can be True, False, Unknown. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "`message` is a human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.", + 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: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`items` is a list of request-priorities.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfiguration"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "`name` is the name of the priority level configuration being referenced Required.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityLevelConfigurationSpec specifies the configuration of a priority level.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "`type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "limited": { + SchemaProps: spec.SchemaProps{ + Description: "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.LimitedPriorityLevelConfiguration"), + }, + }, + }, + Required: []string{"type"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "type", + "fields-to-discriminateBy": map[string]interface{}{ + "limited": "Limited", + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.LimitedPriorityLevelConfiguration"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`conditions` is the current state of \"request-priority\".", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationCondition"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_QueuingConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "QueuingConfiguration holds the configuration parameters for queuing", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "queues": { + SchemaProps: spec.SchemaProps{ + Description: "`queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "handSize": { + SchemaProps: spec.SchemaProps{ + Description: "`handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "queueLengthLimit": { + SchemaProps: spec.SchemaProps{ + Description: "`queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) least one member of namespaces matches the request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs and, if present, must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiGroups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`apiGroups` is a list of matching API groups and may not be empty. \"*\" matches all API groups and, if present, must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "clusterScope": { + SchemaProps: spec.SchemaProps{ + Description: "`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "namespaces": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"verbs", "apiGroups", "resources"}, + }, + }, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_ServiceAccountSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountSubject holds detailed information for service-account-kind subject.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "`namespace` is the namespace of matching ServiceAccount objects. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Required", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.UserSubject"), + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.GroupSubject"), + }, + }, + "serviceAccount": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.ServiceAccountSubject"), + }, + }, + }, + Required: []string{"kind"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "kind", + "fields-to-discriminateBy": map[string]interface{}{ + "group": "Group", + "serviceAccount": "ServiceAccount", + "user": "User", + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1alpha1.GroupSubject", "k8s.io/api/flowcontrol/v1alpha1.ServiceAccountSubject", "k8s.io/api/flowcontrol/v1alpha1.UserSubject"}, + } +} + +func schema_k8sio_api_flowcontrol_v1alpha1_UserSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UserSubject holds detailed information for user-kind subject.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "`name` is the username that matches, or \"*\" to match all usernames. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ImageReview checks if the set of images in a pod are allowed.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information about the pod being evaluated", + Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the backend and indicates whether the pod should be allowed.", + Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec", "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ImageReviewContainerSpec is a description of a container within the pod creation request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Description: "This can be in the form image:tag or image@SHA:012345679abcdef.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ImageReviewSpec is a description of the pod creation request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "containers": { + SchemaProps: spec.SchemaProps{ + Description: "Containers is a list of a subset of the information in each container of the Pod being created.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"), + }, + }, + }, + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is a list of key-value pairs extracted from the Pod's annotations. It only includes keys which match the pattern `*.image-policy.k8s.io/*`. It is up to each webhook backend to determine how to interpret these annotations, if at all.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace the pod is being created in.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"}, + } +} + +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ImageReviewStatus is the result of the review for the pod creation request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "allowed": { + SchemaProps: spec.SchemaProps{ + Description: "Allowed indicates that all images were allowed to be run.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Reason should be empty unless Allowed is false in which case it may contain a short description of what is wrong. Kubernetes may truncate excessively long errors when displaying to the user.", + Type: []string{"string"}, + Format: "", + }, + }, + "auditAnnotations": { + SchemaProps: spec.SchemaProps{ + Description: "AuditAnnotations will be added to the attributes object of the admission controller request using 'AddAnnotation'. The keys should be prefix-less (i.e., the admission controller will add an appropriate prefix).", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"allowed"}, + }, + }, + } +} + +func schema_k8sio_api_networking_v1_IPBlock(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cidr": { + SchemaProps: spec.SchemaProps{ + Description: "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", + Type: []string{"string"}, + Format: "", + }, + }, + "except": { + SchemaProps: spec.SchemaProps{ + Description: "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"cidr"}, + }, + }, + } +} + +func schema_k8sio_api_networking_v1_NetworkPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkPolicy describes what network traffic is allowed for a set of Pods", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior for this NetworkPolicy.", + Ref: ref("k8s.io/api/networking/v1.NetworkPolicySpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.NetworkPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), + }, + }, + }, + }, + }, + "to": { + SchemaProps: spec.SchemaProps{ + Description: "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, + } +} + +func schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), + }, + }, + }, + }, + }, + "from": { + SchemaProps: spec.SchemaProps{ + Description: "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, + } +} + +func schema_k8sio_api_networking_v1_NetworkPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkPolicyList is a list of NetworkPolicy objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1.NetworkPolicy"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.NetworkPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podSelector": { + SchemaProps: spec.SchemaProps{ + Description: "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "namespaceSelector": { + SchemaProps: spec.SchemaProps{ + Description: "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "ipBlock": { + SchemaProps: spec.SchemaProps{ + Description: "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", + Ref: ref("k8s.io/api/networking/v1.IPBlock"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.IPBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_networking_v1_NetworkPolicyPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkPolicyPort describes a port to allow traffic on", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_networking_v1_NetworkPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkPolicySpec provides the specification of a NetworkPolicy", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podSelector": { + SchemaProps: spec.SchemaProps{ + Description: "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "ingress": { + SchemaProps: spec.SchemaProps{ + Description: "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyIngressRule"), + }, + }, + }, + }, + }, + "egress": { + SchemaProps: spec.SchemaProps{ + Description: "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyEgressRule"), + }, + }, + }, + }, + }, + "policyTypes": { + SchemaProps: spec.SchemaProps{ + Description: "List of rule types that the NetworkPolicy relates to. Valid options are \"Ingress\", \"Egress\", or \"Ingress,Egress\". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"podSelector"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.NetworkPolicyEgressRule", "k8s.io/api/networking/v1.NetworkPolicyIngressRule", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. When unspecified, all paths from incoming requests are matched.", + Type: []string{"string"}, + Format: "", + }, + }, + "pathType": { + SchemaProps: spec.SchemaProps{ + Description: "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types. Defaults to ImplementationSpecific.", + Type: []string{"string"}, + Format: "", + }, + }, + "backend": { + SchemaProps: spec.SchemaProps{ + Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), + }, + }, + }, + Required: []string{"backend"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.IngressBackend"}, + } +} + +func schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "paths": { + SchemaProps: spec.SchemaProps{ + Description: "A collection of paths that map requests to backends.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressPath"), + }, + }, + }, + }, + }, + }, + Required: []string{"paths"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.HTTPIngressPath"}, + } +} + +func schema_k8sio_api_networking_v1beta1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/networking/v1beta1.IngressSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/networking/v1beta1.IngressStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.IngressSpec", "k8s.io/api/networking/v1beta1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressBackend describes all endpoints for a given service and port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "serviceName": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the name of the referenced service.", + Type: []string{"string"}, + Format: "", + }, + }, + "servicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the port of the referenced service.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/networking/v1beta1.IngressClassSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.IngressClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressClassList is a collection of IngressClasses.", + 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 list metadata.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of IngressClasses.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1beta1.IngressClass"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.IngressClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressClassSpec provides information about the class of an Ingress.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "controller": { + SchemaProps: spec.SchemaProps{ + Description: "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + Type: []string{"string"}, + Format: "", + }, + }, + "parameters": { + SchemaProps: spec.SchemaProps{ + Description: "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TypedLocalObjectReference"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressList is a collection of Ingress.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of Ingress.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1beta1.Ingress"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + Type: []string{"string"}, + Format: "", + }, + }, + "http": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "http": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressSpec describes the Ingress the user wishes to exist.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ingressClassName": { + SchemaProps: spec.SchemaProps{ + Description: "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", + Type: []string{"string"}, + Format: "", + }, + }, + "backend": { + SchemaProps: spec.SchemaProps{ + Description: "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", + Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), + }, + }, + "tls": { + SchemaProps: spec.SchemaProps{ + Description: "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1beta1.IngressTLS"), + }, + }, + }, + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1beta1.IngressRule"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.IngressBackend", "k8s.io/api/networking/v1beta1.IngressRule", "k8s.io/api/networking/v1beta1.IngressTLS"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressStatus describe the current state of the Ingress.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "loadBalancer": { + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancer contains the current status of the load-balancer.", + Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LoadBalancerStatus"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressTLS describes the transport layer security associated with an Ingress.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hosts": { + SchemaProps: spec.SchemaProps{ + Description: "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_node_v1alpha1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Overhead structure represents the resource overhead associated with running a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podFixed": { + SchemaProps: spec.SchemaProps{ + Description: "PodFixed represents the fixed resource overhead associated with running a pod.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_node_v1alpha1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md", + 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: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClassSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/node/v1alpha1.RuntimeClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClassList is a list of RuntimeClass objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClass"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/node/v1alpha1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "runtimeHandler": { + SchemaProps: spec.SchemaProps{ + Description: "RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable.", + Type: []string{"string"}, + Format: "", + }, + }, + "overhead": { + SchemaProps: spec.SchemaProps{ + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.", + Ref: ref("k8s.io/api/node/v1alpha1.Overhead"), + }, + }, + "scheduling": { + SchemaProps: spec.SchemaProps{ + Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", + Ref: ref("k8s.io/api/node/v1alpha1.Scheduling"), + }, + }, + }, + Required: []string{"runtimeHandler"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/node/v1alpha1.Overhead", "k8s.io/api/node/v1alpha1.Scheduling"}, + } +} + +func schema_k8sio_api_node_v1alpha1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tolerations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Toleration"}, + } +} + +func schema_k8sio_api_node_v1beta1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Overhead structure represents the resource overhead associated with running a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podFixed": { + SchemaProps: spec.SchemaProps{ + Description: "PodFixed represents the fixed resource overhead associated with running a pod.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_node_v1beta1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md", + 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: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "handler": { + SchemaProps: spec.SchemaProps{ + Description: "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must conform to the DNS Label (RFC 1123) requirements, and is immutable.", + Type: []string{"string"}, + Format: "", + }, + }, + "overhead": { + SchemaProps: spec.SchemaProps{ + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.", + Ref: ref("k8s.io/api/node/v1beta1.Overhead"), + }, + }, + "scheduling": { + SchemaProps: spec.SchemaProps{ + Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", + Ref: ref("k8s.io/api/node/v1beta1.Scheduling"), + }, + }, + }, + Required: []string{"handler"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/node/v1beta1.Overhead", "k8s.io/api/node/v1beta1.Scheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClassList is a list of RuntimeClass objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/node/v1beta1.RuntimeClass"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/node/v1beta1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_node_v1beta1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tolerations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Toleration"}, + } +} + +func schema_k8sio_api_policy_v1beta1_AllowedCSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the registered name of the CSI driver", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_api_policy_v1beta1_AllowedFlexVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "driver is the name of the Flexvolume driver.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"driver"}, + }, + }, + } +} + +func schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pathPrefix": { + SchemaProps: spec.SchemaProps{ + Description: "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_policy_v1beta1_Eviction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", + 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: "ObjectMeta describes the pod that is being evicted.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "deleteOptions": { + SchemaProps: spec.SchemaProps{ + Description: "DeleteOptions may be provided", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_policy_v1beta1_FSGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", + Type: []string{"string"}, + Format: "", + }, + }, + "ranges": { + SchemaProps: spec.SchemaProps{ + Description: "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.IDRange"}, + } +} + +func schema_k8sio_api_policy_v1beta1_HostPortRange(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "min": { + SchemaProps: spec.SchemaProps{ + Description: "min is the start of the range, inclusive.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "max": { + SchemaProps: spec.SchemaProps{ + Description: "max is the end of the range, inclusive.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"min", "max"}, + }, + }, + } +} + +func schema_k8sio_api_policy_v1beta1_IDRange(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IDRange provides a min/max of an allowed range of IDs.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "min": { + SchemaProps: spec.SchemaProps{ + Description: "min is the start of the range, inclusive.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "max": { + SchemaProps: spec.SchemaProps{ + Description: "max is the end of the range, inclusive.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"min", "max"}, + }, + }, + } +} + +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the PodDisruptionBudget.", + Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the PodDisruptionBudget.", + Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudget"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "minAvailable": { + SchemaProps: spec.SchemaProps{ + Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Label query over pods whose evictions are managed by the disruption budget.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "maxUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "disruptedPods": { + SchemaProps: spec.SchemaProps{ + Description: "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + }, + }, + "disruptionsAllowed": { + SchemaProps: spec.SchemaProps{ + Description: "Number of pod disruptions that are currently allowed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentHealthy": { + SchemaProps: spec.SchemaProps{ + Description: "current number of healthy pods", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "desiredHealthy": { + SchemaProps: spec.SchemaProps{ + Description: "minimum desired number of healthy pods", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "expectedPods": { + SchemaProps: spec.SchemaProps{ + Description: "total number of pods counted by this disruption budget", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"disruptionsAllowed", "currentHealthy", "desiredHealthy", "expectedPods"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec defines the policy enforced.", + Ref: ref("k8s.io/api/policy/v1beta1.PodSecurityPolicySpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.PodSecurityPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_policy_v1beta1_PodSecurityPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodSecurityPolicyList is a list of PodSecurityPolicy objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/policy/v1beta1.PodSecurityPolicy"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.PodSecurityPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodSecurityPolicySpec defines the policy enforced.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "privileged": { + SchemaProps: spec.SchemaProps{ + Description: "privileged determines if a pod can request to be run as privileged.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "defaultAddCapabilities": { + SchemaProps: spec.SchemaProps{ + Description: "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "requiredDropCapabilities": { + SchemaProps: spec.SchemaProps{ + Description: "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allowedCapabilities": { + SchemaProps: spec.SchemaProps{ + Description: "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumes": { + SchemaProps: spec.SchemaProps{ + Description: "volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "hostNetwork": { + SchemaProps: spec.SchemaProps{ + Description: "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "hostPorts": { + SchemaProps: spec.SchemaProps{ + Description: "hostPorts determines which host port ranges are allowed to be exposed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/policy/v1beta1.HostPortRange"), + }, + }, + }, + }, + }, + "hostPID": { + SchemaProps: spec.SchemaProps{ + Description: "hostPID determines if the policy allows the use of HostPID in the pod spec.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "hostIPC": { + SchemaProps: spec.SchemaProps{ + Description: "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "seLinux": { + SchemaProps: spec.SchemaProps{ + Description: "seLinux is the strategy that will dictate the allowable labels that may be set.", + Ref: ref("k8s.io/api/policy/v1beta1.SELinuxStrategyOptions"), + }, + }, + "runAsUser": { + SchemaProps: spec.SchemaProps{ + Description: "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", + Ref: ref("k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions"), + }, + }, + "runAsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled.", + Ref: ref("k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions"), + }, + }, + "supplementalGroups": { + SchemaProps: spec.SchemaProps{ + Description: "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", + Ref: ref("k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions"), + }, + }, + "fsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", + Ref: ref("k8s.io/api/policy/v1beta1.FSGroupStrategyOptions"), + }, + }, + "readOnlyRootFilesystem": { + SchemaProps: spec.SchemaProps{ + Description: "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "defaultAllowPrivilegeEscalation": { + SchemaProps: spec.SchemaProps{ + Description: "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowPrivilegeEscalation": { + SchemaProps: spec.SchemaProps{ + Description: "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowedHostPaths": { + SchemaProps: spec.SchemaProps{ + Description: "allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/policy/v1beta1.AllowedHostPath"), + }, + }, + }, + }, + }, + "allowedFlexVolumes": { + SchemaProps: spec.SchemaProps{ + Description: "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/policy/v1beta1.AllowedFlexVolume"), + }, + }, + }, + }, + }, + "allowedCSIDrivers": { + SchemaProps: spec.SchemaProps{ + Description: "AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is an alpha field, and is only honored if the API server enables the CSIInlineVolume feature gate.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/policy/v1beta1.AllowedCSIDriver"), + }, + }, + }, + }, + }, + "allowedUnsafeSysctls": { + SchemaProps: spec.SchemaProps{ + Description: "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "forbiddenSysctls": { + SchemaProps: spec.SchemaProps{ + Description: "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allowedProcMountTypes": { + SchemaProps: spec.SchemaProps{ + Description: "AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "runtimeClass": { + SchemaProps: spec.SchemaProps{ + Description: "runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.", + Ref: ref("k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions"), + }, + }, + }, + Required: []string{"seLinux", "runAsUser", "supplementalGroups", "fsGroup"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.AllowedCSIDriver", "k8s.io/api/policy/v1beta1.AllowedFlexVolume", "k8s.io/api/policy/v1beta1.AllowedHostPath", "k8s.io/api/policy/v1beta1.FSGroupStrategyOptions", "k8s.io/api/policy/v1beta1.HostPortRange", "k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions", "k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions", "k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions", "k8s.io/api/policy/v1beta1.SELinuxStrategyOptions", "k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions"}, + } +} + +func schema_k8sio_api_policy_v1beta1_RunAsGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "rule is the strategy that will dictate the allowable RunAsGroup values that may be set.", + Type: []string{"string"}, + Format: "", + }, + }, + "ranges": { + SchemaProps: spec.SchemaProps{ + Description: "ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + }, + }, + }, + }, + }, + }, + Required: []string{"rule"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.IDRange"}, + } +} + +func schema_k8sio_api_policy_v1beta1_RunAsUserStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "rule is the strategy that will dictate the allowable RunAsUser values that may be set.", + Type: []string{"string"}, + Format: "", + }, + }, + "ranges": { + SchemaProps: spec.SchemaProps{ + Description: "ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + }, + }, + }, + }, + }, + }, + Required: []string{"rule"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.IDRange"}, + } +} + +func schema_k8sio_api_policy_v1beta1_RuntimeClassStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "allowedRuntimeClassNames": { + SchemaProps: spec.SchemaProps{ + Description: "allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "defaultRuntimeClassName": { + SchemaProps: spec.SchemaProps{ + Description: "defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"allowedRuntimeClassNames"}, + }, + }, + } +} + +func schema_k8sio_api_policy_v1beta1_SELinuxStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "rule is the strategy that will dictate the allowable labels that may be set.", + Type: []string{"string"}, + Format: "", + }, + }, + "seLinuxOptions": { + SchemaProps: spec.SchemaProps{ + Description: "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", + Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + }, + }, + }, + Required: []string{"rule"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SELinuxOptions"}, + } +} + +func schema_k8sio_api_policy_v1beta1_SupplementalGroupsStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", + Type: []string{"string"}, + Format: "", + }, + }, + "ranges": { + SchemaProps: spec.SchemaProps{ + Description: "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.IDRange"}, + } +} + +func schema_k8sio_api_rbac_v1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusterRoleSelectors": { + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this ClusterRole", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), + }, + }, + }, + }, + }, + "aggregationRule": { + SchemaProps: spec.SchemaProps{ + Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + Ref: ref("k8s.io/api/rbac/v1.AggregationRule"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1.AggregationRule", "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "subjects": { + SchemaProps: spec.SchemaProps{ + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Ref: ref("k8s.io/api/rbac/v1.RoleRef"), + }, + }, + }, + Required: []string{"roleRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoleBindings", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1.ClusterRoleBinding"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleList is a collection of ClusterRoles", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1.ClusterRole"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiGroups": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"verbs"}, + }, + }, + } +} + +func schema_k8sio_api_rbac_v1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this Role", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "subjects": { + SchemaProps: spec.SchemaProps{ + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Ref: ref("k8s.io/api/rbac/v1.RoleRef"), + }, + }, + }, + Required: []string{"roleRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleBindingList is a collection of RoleBindings", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of RoleBindings", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1.RoleBinding"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleList is a collection of Roles", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of Roles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1.Role"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleRef contains information that points to the role being used", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the group for the resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is the type of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"apiGroup", "kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_rbac_v1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the object being referenced.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusterRoleSelectors": { + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this ClusterRole", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), + }, + }, + }, + }, + }, + "aggregationRule": { + SchemaProps: spec.SchemaProps{ + Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + Ref: ref("k8s.io/api/rbac/v1alpha1.AggregationRule"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.AggregationRule", "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "subjects": { + SchemaProps: spec.SchemaProps{ + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), + }, + }, + }, + Required: []string{"roleRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoleBindings", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRoleBinding"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRole"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiGroups": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"verbs"}, + }, + }, + } +} + +func schema_k8sio_api_rbac_v1alpha1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this Role", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "subjects": { + SchemaProps: spec.SchemaProps{ + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), + }, + }, + }, + Required: []string{"roleRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of RoleBindings", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1alpha1.RoleBinding"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of Roles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1alpha1.Role"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleRef contains information that points to the role being used", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the group for the resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is the type of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"apiGroup", "kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_rbac_v1alpha1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the object being referenced.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_rbac_v1beta1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusterRoleSelectors": { + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this ClusterRole", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), + }, + }, + }, + }, + }, + "aggregationRule": { + SchemaProps: spec.SchemaProps{ + Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + Ref: ref("k8s.io/api/rbac/v1beta1.AggregationRule"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1beta1.AggregationRule", "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "subjects": { + SchemaProps: spec.SchemaProps{ + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), + }, + }, + }, + Required: []string{"roleRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoleBindings", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRoleBinding"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1beta1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRole"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1beta1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiGroups": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"verbs"}, + }, + }, + } +} + +func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this Role", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "subjects": { + SchemaProps: spec.SchemaProps{ + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), + }, + }, + }, + Required: []string{"roleRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of RoleBindings", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1beta1.RoleBinding"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1beta1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleList is a collection of Roles Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20.", + 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.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of Roles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/rbac/v1beta1.Role"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1beta1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleRef contains information that points to the role being used", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the group for the resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is the type of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"apiGroup", "kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_rbac_v1beta1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the object being referenced.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "globalDefault": { + SchemaProps: spec.SchemaProps{ + Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + Type: []string{"string"}, + Format: "", + }, + }, + "preemptionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"value"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityClassList is a collection of priority classes.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of PriorityClasses", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/scheduling/v1.PriorityClass"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/scheduling/v1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "globalDefault": { + SchemaProps: spec.SchemaProps{ + Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + Type: []string{"string"}, + Format: "", + }, + }, + "preemptionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"value"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityClassList is a collection of priority classes.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of PriorityClasses", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/scheduling/v1alpha1.PriorityClass"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/scheduling/v1alpha1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "globalDefault": { + SchemaProps: spec.SchemaProps{ + Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + Type: []string{"string"}, + Format: "", + }, + }, + "preemptionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"value"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityClassList is a collection of priority classes.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of PriorityClasses", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/scheduling/v1beta1.PriorityClass"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/scheduling/v1beta1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_settings_v1alpha1_PodPreset(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodPreset is a policy resource that defines additional runtime requirements for a Pod.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/settings/v1alpha1.PodPresetSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/settings/v1alpha1.PodPresetSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_settings_v1alpha1_PodPresetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodPresetList is a list of PodPreset objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/settings/v1alpha1.PodPreset"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/settings/v1alpha1.PodPreset", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_settings_v1alpha1_PodPresetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodPresetSpec is a description of a pod preset.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Selector is a label query over a set of resources, in this case pods. Required.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "env": { + SchemaProps: spec.SchemaProps{ + Description: "Env defines the collection of EnvVar to inject into containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "envFrom": { + SchemaProps: spec.SchemaProps{ + Description: "EnvFrom defines the collection of EnvFromSource to inject into containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + }, + }, + }, + }, + }, + "volumes": { + SchemaProps: spec.SchemaProps{ + Description: "Volumes defines the collection of Volume to inject into the pod.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Volume"), + }, + }, + }, + }, + }, + "volumeMounts": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeMounts defines the collection of VolumeMount to inject into containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_storage_v1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", + 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 metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the CSI Driver.", + Ref: ref("k8s.io/api/storage/v1.CSIDriverSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSIDriverList is a collection of CSIDriver objects.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of CSIDriver", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1.CSIDriver"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSIDriverSpec is the specification of a CSIDriver.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attachRequired": { + SchemaProps: spec.SchemaProps{ + Description: "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "podInfoOnMount": { + SchemaProps: spec.SchemaProps{ + Description: "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" iff the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "volumeLifecycleModes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_storage_v1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", + 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: "metadata.name must be the Kubernetes node name.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec is the specification of CSINode", + Ref: ref("k8s.io/api/storage/v1.CSINodeSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSINodeDriver holds information about the specification of one CSI driver installed on a node", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeID": { + SchemaProps: spec.SchemaProps{ + Description: "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.", + Type: []string{"string"}, + Format: "", + }, + }, + "topologyKeys": { + SchemaProps: spec.SchemaProps{ + Description: "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allocatable": { + SchemaProps: spec.SchemaProps{ + Description: "allocatable represents the volume resources of a node that are available for scheduling. This field is beta.", + Ref: ref("k8s.io/api/storage/v1.VolumeNodeResources"), + }, + }, + }, + Required: []string{"name", "nodeID"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.VolumeNodeResources"}, + } +} + +func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSINodeList is a collection of CSINode objects.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of CSINode", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1.CSINode"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "drivers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1.CSINodeDriver"), + }, + }, + }, + }, + }, + }, + Required: []string{"drivers"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.CSINodeDriver"}, + } +} + +func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "provisioner": { + SchemaProps: spec.SchemaProps{ + Description: "Provisioner indicates the type of the provisioner.", + Type: []string{"string"}, + Format: "", + }, + }, + "parameters": { + SchemaProps: spec.SchemaProps{ + Description: "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "reclaimPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", + Type: []string{"string"}, + Format: "", + }, + }, + "mountOptions": { + SchemaProps: spec.SchemaProps{ + Description: "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allowVolumeExpansion": { + SchemaProps: spec.SchemaProps{ + Description: "AllowVolumeExpansion shows whether the storage class allow volume expand", + Type: []string{"boolean"}, + Format: "", + }, + }, + "volumeBindingMode": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.", + Type: []string{"string"}, + Format: "", + }, + }, + "allowedTopologies": { + SchemaProps: spec.SchemaProps{ + Description: "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.TopologySelectorTerm"), + }, + }, + }, + }, + }, + }, + Required: []string{"provisioner"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TopologySelectorTerm", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageClassList is a collection of storage classes.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of StorageClasses", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1.StorageClass"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + 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 metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.VolumeAttachmentSpec", "k8s.io/api/storage/v1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of VolumeAttachments", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1.VolumeAttachment"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "persistentVolumeName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the persistent volume to attach.", + Type: []string{"string"}, + Format: "", + }, + }, + "inlineVolumeSpec": { + SchemaProps: spec.SchemaProps{ + Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeSpec"}, + } +} + +func schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attacher": { + SchemaProps: spec.SchemaProps{ + Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + Type: []string{"string"}, + Format: "", + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source represents the volume that should be attached.", + Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSource"), + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "The node that the volume should be attached to.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"attacher", "source", "nodeName"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.VolumeAttachmentSource"}, + } +} + +func schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attached": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "attachmentMetadata": { + SchemaProps: spec.SchemaProps{ + Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "attachError": { + SchemaProps: spec.SchemaProps{ + Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1.VolumeError"), + }, + }, + "detachError": { + SchemaProps: spec.SchemaProps{ + Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1.VolumeError"), + }, + }, + }, + Required: []string{"attached"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.VolumeError"}, + } +} + +func schema_k8sio_api_storage_v1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeError captures an error encountered during a volume operation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "time": { + SchemaProps: spec.SchemaProps{ + Description: "Time the error was encountered.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_storage_v1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeNodeResources is a set of resource limits for scheduling of volumes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { + SchemaProps: spec.SchemaProps{ + Description: "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is not specified, then the supported number of volumes on this node is unbounded.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + 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 metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec", "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of VolumeAttachments", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachment"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1alpha1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "persistentVolumeName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the persistent volume to attach.", + Type: []string{"string"}, + Format: "", + }, + }, + "inlineVolumeSpec": { + SchemaProps: spec.SchemaProps{ + Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeSpec"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attacher": { + SchemaProps: spec.SchemaProps{ + Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + Type: []string{"string"}, + Format: "", + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source represents the volume that should be attached.", + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"), + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "The node that the volume should be attached to.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"attacher", "source", "nodeName"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attached": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "attachmentMetadata": { + SchemaProps: spec.SchemaProps{ + Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "attachError": { + SchemaProps: spec.SchemaProps{ + Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), + }, + }, + "detachError": { + SchemaProps: spec.SchemaProps{ + Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), + }, + }, + }, + Required: []string{"attached"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1alpha1.VolumeError"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeError captures an error encountered during a volume operation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "time": { + SchemaProps: spec.SchemaProps{ + Description: "Time the error was encountered.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", + 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 metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the CSI Driver.", + Ref: ref("k8s.io/api/storage/v1beta1.CSIDriverSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSIDriverList is a collection of CSIDriver objects.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of CSIDriver", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1beta1.CSIDriver"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSIDriverSpec is the specification of a CSIDriver.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attachRequired": { + SchemaProps: spec.SchemaProps{ + Description: "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "podInfoOnMount": { + SchemaProps: spec.SchemaProps{ + Description: "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" iff the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "volumeLifecycleModes": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_storage_v1beta1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. See the release notes for more information. CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", + 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: "metadata.name must be the Kubernetes node name.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec is the specification of CSINode", + Ref: ref("k8s.io/api/storage/v1beta1.CSINodeSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSINodeDriver holds information about the specification of one CSI driver installed on a node", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeID": { + SchemaProps: spec.SchemaProps{ + Description: "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.", + Type: []string{"string"}, + Format: "", + }, + }, + "topologyKeys": { + SchemaProps: spec.SchemaProps{ + Description: "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allocatable": { + SchemaProps: spec.SchemaProps{ + Description: "allocatable represents the volume resources of a node that are available for scheduling.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeNodeResources"), + }, + }, + }, + Required: []string{"name", "nodeID"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.VolumeNodeResources"}, + } +} + +func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSINodeList is a collection of CSINode objects.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of CSINode", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1beta1.CSINode"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "drivers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1beta1.CSINodeDriver"), + }, + }, + }, + }, + }, + }, + Required: []string{"drivers"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.CSINodeDriver"}, + } +} + +func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "provisioner": { + SchemaProps: spec.SchemaProps{ + Description: "Provisioner indicates the type of the provisioner.", + Type: []string{"string"}, + Format: "", + }, + }, + "parameters": { + SchemaProps: spec.SchemaProps{ + Description: "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "reclaimPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", + Type: []string{"string"}, + Format: "", + }, + }, + "mountOptions": { + SchemaProps: spec.SchemaProps{ + Description: "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allowVolumeExpansion": { + SchemaProps: spec.SchemaProps{ + Description: "AllowVolumeExpansion shows whether the storage class allow volume expand", + Type: []string{"boolean"}, + Format: "", + }, + }, + "volumeBindingMode": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.", + Type: []string{"string"}, + Format: "", + }, + }, + "allowedTopologies": { + SchemaProps: spec.SchemaProps{ + Description: "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.TopologySelectorTerm"), + }, + }, + }, + }, + }, + }, + Required: []string{"provisioner"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TopologySelectorTerm", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageClassList is a collection of storage classes.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of StorageClasses", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1beta1.StorageClass"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + 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 metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.VolumeAttachmentSpec", "k8s.io/api/storage/v1beta1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", + 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of VolumeAttachments", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachment"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "persistentVolumeName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the persistent volume to attach.", + Type: []string{"string"}, + Format: "", + }, + }, + "inlineVolumeSpec": { + SchemaProps: spec.SchemaProps{ + Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeSpec"}, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attacher": { + SchemaProps: spec.SchemaProps{ + Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + Type: []string{"string"}, + Format: "", + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source represents the volume that should be attached.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSource"), + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "The node that the volume should be attached to.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"attacher", "source", "nodeName"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.VolumeAttachmentSource"}, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attached": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "attachmentMetadata": { + SchemaProps: spec.SchemaProps{ + Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "attachError": { + SchemaProps: spec.SchemaProps{ + Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + }, + }, + "detachError": { + SchemaProps: spec.SchemaProps{ + Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + }, + }, + }, + Required: []string{"attached"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.VolumeError"}, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeError captures an error encountered during a volume operation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "time": { + SchemaProps: spec.SchemaProps{ + Description: "Time the error was encountered.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeNodeResources is a set of resource limits for scheduling of volumes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { + SchemaProps: spec.SchemaProps{ + Description: "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is nil, then the supported number of volumes on this node is unbounded.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionRequest describes the conversion request parameters.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are otherwise identical (parallel requests, etc). The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", + Type: []string{"string"}, + Format: "", + }, + }, + "desiredAPIVersion": { + SchemaProps: spec.SchemaProps{ + Description: "desiredAPIVersion is the version to convert given objects to. e.g. \"myapi.example.com/v1\"", + Type: []string{"string"}, + Format: "", + }, + }, + "objects": { + SchemaProps: spec.SchemaProps{ + Description: "objects is the list of custom resource objects to be converted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + }, + Required: []string{"uid", "desiredAPIVersion", "objects"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionResponse describes a conversion response.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "uid is an identifier for the individual request/response. This should be copied over from the corresponding `request.uid`.", + Type: []string{"string"}, + Format: "", + }, + }, + "convertedObjects": { + SchemaProps: spec.SchemaProps{ + Description: "convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + "result": { + SchemaProps: spec.SchemaProps{ + Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + }, + Required: []string{"uid", "convertedObjects", "result"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_apiextensions_v1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionReview describes a conversion request/response.", + 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: "", + }, + }, + "request": { + SchemaProps: spec.SchemaProps{ + Description: "request describes the attributes for the conversion request.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest"), + }, + }, + "response": { + SchemaProps: spec.SchemaProps{ + Description: "response describes the attributes for the conversion response.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceColumnDefinition specifies a column for server side printing.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is a human readable name for the column.", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is a human readable description of this column.", + Type: []string{"string"}, + Format: "", + }, + }, + "priority": { + SchemaProps: spec.SchemaProps{ + Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "jsonPath": { + SchemaProps: spec.SchemaProps{ + Description: "jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "type", "jsonPath"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceConversion describes how to convert different versions of a CR.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "strategy": { + SchemaProps: spec.SchemaProps{ + Description: "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.", + Type: []string{"string"}, + Format: "", + }, + }, + "webhook": { + SchemaProps: spec.SchemaProps{ + Description: "webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"), + }, + }, + }, + Required: []string{"strategy"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec describes how the user wants the resources to appear", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status indicates the actual state of the CustomResourceDefinition", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionCondition contains details for the current condition of this pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of the condition. Types include Established, NamesAccepted and Terminating.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the status of the condition. Can be True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason is a unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message is a human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items list individual CustomResourceDefinition objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "plural": { + SchemaProps: spec.SchemaProps{ + Description: "plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.", + Type: []string{"string"}, + Format: "", + }, + }, + "singular": { + SchemaProps: spec.SchemaProps{ + Description: "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.", + Type: []string{"string"}, + Format: "", + }, + }, + "shortNames": { + SchemaProps: spec.SchemaProps{ + Description: "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.", + Type: []string{"string"}, + Format: "", + }, + }, + "listKind": { + SchemaProps: spec.SchemaProps{ + Description: "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".", + Type: []string{"string"}, + Format: "", + }, + }, + "categories": { + SchemaProps: spec.SchemaProps{ + Description: "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"plural", "kind"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionSpec describes how a user wants their resource to appear", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).", + Type: []string{"string"}, + Format: "", + }, + }, + "names": { + SchemaProps: spec.SchemaProps{ + Description: "names specify the resource and kind names for the custom resource.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`.", + Type: []string{"string"}, + Format: "", + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"), + }, + }, + }, + }, + }, + "conversion": { + SchemaProps: spec.SchemaProps{ + Description: "conversion defines conversion settings for the CRD.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion"), + }, + }, + "preserveUnknownFields": { + SchemaProps: spec.SchemaProps{ + Description: "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"group", "names", "scope", "versions"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "conditions indicate state for particular aspects of a CustomResourceDefinition", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition"), + }, + }, + }, + }, + }, + "acceptedNames": { + SchemaProps: spec.SchemaProps{ + Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), + }, + }, + "storedVersions": { + SchemaProps: spec.SchemaProps{ + Description: "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionVersion describes a version for CRD.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.", + Type: []string{"string"}, + Format: "", + }, + }, + "served": { + SchemaProps: spec.SchemaProps{ + Description: "served is a flag enabling/disabling this version from being served via REST APIs", + Type: []string{"boolean"}, + Format: "", + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "schema": { + SchemaProps: spec.SchemaProps{ + Description: "schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"), + }, + }, + "subresources": { + SchemaProps: spec.SchemaProps{ + Description: "subresources specify what subresources this version of the defined custom resource have.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources"), + }, + }, + "additionalPrinterColumns": { + SchemaProps: spec.SchemaProps{ + Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "served", "storage"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "specReplicasPath": { + SchemaProps: spec.SchemaProps{ + Description: "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.", + Type: []string{"string"}, + Format: "", + }, + }, + "statusReplicasPath": { + SchemaProps: spec.SchemaProps{ + Description: "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.", + Type: []string{"string"}, + Format: "", + }, + }, + "labelSelectorPath": { + SchemaProps: spec.SchemaProps{ + Description: "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"specReplicasPath", "statusReplicasPath"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"), + }, + }, + "scale": { + SchemaProps: spec.SchemaProps{ + Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceValidation is a list of validation methods for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "openAPIV3Schema": { + SchemaProps: spec.SchemaProps{ + Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"}, + } +} + +func schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalDocumentation allows referencing an external resource for extended documentation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "url": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", + Type: v1.JSON{}.OpenAPISchemaType(), + Format: v1.JSON{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "$schema": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "$ref": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + Type: []string{"string"}, + Format: "", + }, + }, + "title": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "default": { + SchemaProps: spec.SchemaProps{ + Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + }, + }, + "maximum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "exclusiveMaximum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "minimum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "exclusiveMinimum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "maxLength": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minLength": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "pattern": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "maxItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "uniqueItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "multipleOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "enum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + }, + }, + }, + }, + }, + "maxProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "required": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray"), + }, + }, + "allOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "oneOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "anyOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "not": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + "properties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "additionalProperties": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + }, + }, + "patternProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "dependencies": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"), + }, + }, + }, + }, + }, + "additionalItems": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + }, + }, + "definitions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "externalDocs": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation"), + }, + }, + "example": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + }, + }, + "nullable": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-preserve-unknown-fields": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-embedded-resource": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-int-or-string": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-list-map-keys": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "x-kubernetes-list-type": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", + Type: []string{"string"}, + Format: "", + }, + }, + "x-kubernetes-map-type": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"}, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", + Type: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), + Format: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", + Type: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), + Format: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", + Type: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), + Format: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "namespace is the namespace of the service. Required", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the service. Required", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "path is an optional URL path at which the webhook will be contacted.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + Type: []string{"string"}, + Format: "", + }, + }, + "service": { + SchemaProps: spec.SchemaProps{ + Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"), + }, + }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Description: "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"}, + } +} + +func schema_pkg_apis_apiextensions_v1_WebhookConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookConversion describes how to call a conversion webhook", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clientConfig": { + SchemaProps: spec.SchemaProps{ + Description: "clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"), + }, + }, + "conversionReviewVersions": { + SchemaProps: spec.SchemaProps{ + Description: "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"conversionReviewVersions"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionRequest describes the conversion request parameters.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are otherwise identical (parallel requests, etc). The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", + Type: []string{"string"}, + Format: "", + }, + }, + "desiredAPIVersion": { + SchemaProps: spec.SchemaProps{ + Description: "desiredAPIVersion is the version to convert given objects to. e.g. \"myapi.example.com/v1\"", + Type: []string{"string"}, + Format: "", + }, + }, + "objects": { + SchemaProps: spec.SchemaProps{ + Description: "objects is the list of custom resource objects to be converted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + }, + Required: []string{"uid", "desiredAPIVersion", "objects"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionResponse describes a conversion response.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "uid is an identifier for the individual request/response. This should be copied over from the corresponding `request.uid`.", + Type: []string{"string"}, + Format: "", + }, + }, + "convertedObjects": { + SchemaProps: spec.SchemaProps{ + Description: "convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + "result": { + SchemaProps: spec.SchemaProps{ + Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + }, + Required: []string{"uid", "convertedObjects", "result"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionReview describes a conversion request/response.", + 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: "", + }, + }, + "request": { + SchemaProps: spec.SchemaProps{ + Description: "request describes the attributes for the conversion request.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest"), + }, + }, + "response": { + SchemaProps: spec.SchemaProps{ + Description: "response describes the attributes for the conversion response.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceColumnDefinition specifies a column for server side printing.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is a human readable name for the column.", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is a human readable description of this column.", + Type: []string{"string"}, + Format: "", + }, + }, + "priority": { + SchemaProps: spec.SchemaProps{ + Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "JSONPath": { + SchemaProps: spec.SchemaProps{ + Description: "JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "type", "JSONPath"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceConversion describes how to convert different versions of a CR.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "strategy": { + SchemaProps: spec.SchemaProps{ + Description: "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.", + Type: []string{"string"}, + Format: "", + }, + }, + "webhookClientConfig": { + SchemaProps: spec.SchemaProps{ + Description: "webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Required when `strategy` is set to `Webhook`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"), + }, + }, + "conversionReviewVersions": { + SchemaProps: spec.SchemaProps{ + Description: "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Defaults to `[\"v1beta1\"]`.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"strategy"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. Deprecated in v1.16, planned for removal in v1.19. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec describes how the user wants the resources to appear", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status indicates the actual state of the CustomResourceDefinition", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionCondition contains details for the current condition of this pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of the condition. Types include Established, NamesAccepted and Terminating.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the status of the condition. Can be True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason is a unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message is a human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items list individual CustomResourceDefinition objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "plural": { + SchemaProps: spec.SchemaProps{ + Description: "plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.", + Type: []string{"string"}, + Format: "", + }, + }, + "singular": { + SchemaProps: spec.SchemaProps{ + Description: "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.", + Type: []string{"string"}, + Format: "", + }, + }, + "shortNames": { + SchemaProps: spec.SchemaProps{ + Description: "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.", + Type: []string{"string"}, + Format: "", + }, + }, + "listKind": { + SchemaProps: spec.SchemaProps{ + Description: "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".", + Type: []string{"string"}, + Format: "", + }, + }, + "categories": { + SchemaProps: spec.SchemaProps{ + Description: "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"plural", "kind"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionSpec describes how a user wants their resource to appear", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "version is the API version of the defined custom resource. The custom resources are served under `/apis///...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.", + Type: []string{"string"}, + Format: "", + }, + }, + "names": { + SchemaProps: spec.SchemaProps{ + Description: "names specify the resource and kind names for the custom resource.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.", + Type: []string{"string"}, + Format: "", + }, + }, + "validation": { + SchemaProps: spec.SchemaProps{ + Description: "validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + }, + }, + "subresources": { + SchemaProps: spec.SchemaProps{ + Description: "subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion"), + }, + }, + }, + }, + }, + "additionalPrinterColumns": { + SchemaProps: spec.SchemaProps{ + Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + }, + }, + }, + }, + }, + "conversion": { + SchemaProps: spec.SchemaProps{ + Description: "conversion defines conversion settings for the CRD.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion"), + }, + }, + "preserveUnknownFields": { + SchemaProps: spec.SchemaProps{ + Description: "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"group", "names", "scope"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "conditions indicate state for particular aspects of a CustomResourceDefinition", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition"), + }, + }, + }, + }, + }, + "acceptedNames": { + SchemaProps: spec.SchemaProps{ + Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + }, + }, + "storedVersions": { + SchemaProps: spec.SchemaProps{ + Description: "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionVersion describes a version for CRD.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.", + Type: []string{"string"}, + Format: "", + }, + }, + "served": { + SchemaProps: spec.SchemaProps{ + Description: "served is a flag enabling/disabling this version from being served via REST APIs", + Type: []string{"boolean"}, + Format: "", + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "schema": { + SchemaProps: spec.SchemaProps{ + Description: "schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + }, + }, + "subresources": { + SchemaProps: spec.SchemaProps{ + Description: "subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + }, + }, + "additionalPrinterColumns": { + SchemaProps: spec.SchemaProps{ + Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "served", "storage"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "specReplicasPath": { + SchemaProps: spec.SchemaProps{ + Description: "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.", + Type: []string{"string"}, + Format: "", + }, + }, + "statusReplicasPath": { + SchemaProps: spec.SchemaProps{ + Description: "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.", + Type: []string{"string"}, + Format: "", + }, + }, + "labelSelectorPath": { + SchemaProps: spec.SchemaProps{ + Description: "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"specReplicasPath", "statusReplicasPath"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"), + }, + }, + "scale": { + SchemaProps: spec.SchemaProps{ + Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceValidation is a list of validation methods for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "openAPIV3Schema": { + SchemaProps: spec.SchemaProps{ + Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalDocumentation allows referencing an external resource for extended documentation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "url": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", + Type: v1beta1.JSON{}.OpenAPISchemaType(), + Format: v1beta1.JSON{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "$schema": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "$ref": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + Type: []string{"string"}, + Format: "", + }, + }, + "title": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "default": { + SchemaProps: spec.SchemaProps{ + Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + }, + }, + "maximum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "exclusiveMaximum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "minimum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "exclusiveMinimum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "maxLength": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minLength": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "pattern": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "maxItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "uniqueItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "multipleOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "enum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + }, + }, + }, + }, + }, + "maxProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "required": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray"), + }, + }, + "allOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "oneOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "anyOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "not": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + "properties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "additionalProperties": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + }, + }, + "patternProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "dependencies": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"), + }, + }, + }, + }, + }, + "additionalItems": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + }, + }, + "definitions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "externalDocs": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation"), + }, + }, + "example": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + }, + }, + "nullable": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-preserve-unknown-fields": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-embedded-resource": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-int-or-string": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-list-map-keys": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "x-kubernetes-list-type": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", + Type: []string{"string"}, + Format: "", + }, + }, + "x-kubernetes-map-type": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", + Type: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), + Format: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", + Type: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), + Format: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", + Type: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), + Format: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "namespace is the namespace of the service. Required", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the service. Required", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "path is an optional URL path at which the webhook will be contacted.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + Type: []string{"string"}, + Format: "", + }, + }, + "service": { + SchemaProps: spec.SchemaProps{ + Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"), + }, + }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Description: "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"}, + } +} + +func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + Type: resource.Quantity{}.OpenAPISchemaType(), + Format: resource.Quantity{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_apimachinery_pkg_api_resource_int64Amount(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "value": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "scale": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"value", "scale"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIGroup contains the name, the supported versions, and the preferred version of a group.", + 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: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the group.", + Type: []string{"string"}, + Format: "", + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions are the versions supported in this group.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + }, + }, + }, + }, + }, + "preferredVersion": { + SchemaProps: spec.SchemaProps{ + Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + }, + }, + "serverAddressByClientCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "versions"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + } +} + +func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + 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: "", + }, + }, + "groups": { + SchemaProps: spec.SchemaProps{ + Description: "groups is a list of APIGroup.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), + }, + }, + }, + }, + }, + }, + Required: []string{"groups"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, + } +} + +func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIResource specifies the name of a resource and whether it is namespaced.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the plural name of the resource.", + Type: []string{"string"}, + Format: "", + }, + }, + "singularName": { + SchemaProps: spec.SchemaProps{ + Description: "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespaced": { + SchemaProps: spec.SchemaProps{ + Description: "namespaced indicates if a resource is namespaced or not.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + Type: []string{"string"}, + Format: "", + }, + }, + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "shortNames": { + 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{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "categories": { + SchemaProps: spec.SchemaProps{ + Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "storageVersionHash": { + SchemaProps: spec.SchemaProps{ + Description: "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "singularName", "namespaced", "kind", "verbs"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + 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: "", + }, + }, + "groupVersion": { + SchemaProps: spec.SchemaProps{ + Description: "groupVersion is the group and version this APIResourceList is for.", + Type: []string{"string"}, + Format: "", + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "resources contains the name of the resources and if they are namespaced.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), + }, + }, + }, + }, + }, + }, + Required: []string{"groupVersion", "resources"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, + } +} + +func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", + 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: "", + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions are the api versions that are available.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "serverAddressByClientCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + }, + }, + }, + }, + }, + }, + Required: []string{"versions", "serverAddressByClientCIDRs"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + } +} + +func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CreateOptions may be provided when creating an API object.", + 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: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "fieldManager": { + SchemaProps: spec.SchemaProps{ + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeleteOptions may be provided when deleting an API object.", + 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: "", + }, + }, + "gracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "preconditions": { + SchemaProps: spec.SchemaProps{ + Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + }, + }, + "orphanDependents": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "propagationPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, + } +} + +func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", + Type: metav1.Duration{}.OpenAPISchemaType(), + Format: metav1.Duration{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_ExportOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExportOptions is the query options to the standard REST get call. Deprecated. Planned for removal in 1.18.", + 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: "", + }, + }, + "export": { + SchemaProps: spec.SchemaProps{ + Description: "Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "exact": { + SchemaProps: spec.SchemaProps{ + Description: "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"export", "exact"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_FieldsV1(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GetOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GetOptions is the standard query options to the standard REST get call.", + 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: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupKind(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "kind"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "resource"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "version"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "groupVersion": { + SchemaProps: spec.SchemaProps{ + Description: "groupVersion specifies the API group and version in the form \"group/version\"", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"groupVersion", "version"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupVersionKind(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "version", "kind"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupVersionResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "version", "resource"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalEvent makes watch.Event versioned", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "Object": { + SchemaProps: spec.SchemaProps{ + Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), + }, + }, + }, + Required: []string{"Type", "Object"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.Object"}, + } +} + +func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "matchLabels": { + SchemaProps: spec.SchemaProps{ + Description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "matchExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, + } +} + +func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "key", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "key is the label key that the selector applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"key", "operator"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "List holds a list of objects, which may not be known by the server.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "selfLink": { + SchemaProps: spec.SchemaProps{ + Description: "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + Type: []string{"string"}, + Format: "", + }, + }, + "continue": { + SchemaProps: spec.SchemaProps{ + Description: "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", + Type: []string{"string"}, + Format: "", + }, + }, + "remainingItemCount": { + SchemaProps: spec.SchemaProps{ + Description: "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ListOptions is the query options to a standard REST list call.", + 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: "", + }, + }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + Type: []string{"string"}, + Format: "", + }, + }, + "watch": { + SchemaProps: spec.SchemaProps{ + Description: "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowWatchBookmarks": { + SchemaProps: spec.SchemaProps{ + Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "limit": { + SchemaProps: spec.SchemaProps{ + Description: "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "continue": { + SchemaProps: spec.SchemaProps{ + Description: "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "manager": { + SchemaProps: spec.SchemaProps{ + Description: "Manager is an identifier of the workflow managing these fields.", + Type: []string{"string"}, + Format: "", + }, + }, + "operation": { + SchemaProps: spec.SchemaProps{ + Description: "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", + Type: []string{"string"}, + Format: "", + }, + }, + "time": { + SchemaProps: spec.SchemaProps{ + Description: "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "fieldsType": { + SchemaProps: spec.SchemaProps{ + Description: "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldsV1": { + SchemaProps: spec.SchemaProps{ + Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_meta_v1_MicroTime(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MicroTime is version of Time with microsecond level precision.", + Type: metav1.MicroTime{}.OpenAPISchemaType(), + Format: metav1.MicroTime{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", + }, + }, + "generateName": { + SchemaProps: spec.SchemaProps{ + Description: "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + Type: []string{"string"}, + Format: "", + }, + }, + "selfLink": { + SchemaProps: spec.SchemaProps{ + Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + Type: []string{"string"}, + Format: "", + }, + }, + "generation": { + SchemaProps: spec.SchemaProps{ + Description: "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "creationTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deletionTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deletionGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "ownerReferences": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + }, + }, + }, + }, + }, + "finalizers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "clusterName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", + Type: []string{"string"}, + Format: "", + }, + }, + "managedFields": { + SchemaProps: spec.SchemaProps{ + Description: "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API version of the referent.", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "controller": { + SchemaProps: spec.SchemaProps{ + Description: "If true, this reference points to the managing controller.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "blockOwnerDeletion": { + SchemaProps: spec.SchemaProps{ + Description: "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"apiVersion", "kind", "name", "uid"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.", + 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PartialObjectMetadataList contains a list of objects containing only their metadata", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items contains each of the included items.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, + } +} + +func schema_pkg_apis_meta_v1_Patch(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.", + 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: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "force": { + SchemaProps: spec.SchemaProps{ + Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "fieldManager": { + SchemaProps: spec.SchemaProps{ + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Preconditions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the target UID.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the target ResourceVersion", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_RootPaths(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "paths": { + SchemaProps: spec.SchemaProps{ + Description: "paths are the paths available at root.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"paths"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clientCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", + Type: []string{"string"}, + Format: "", + }, + }, + "serverAddress": { + SchemaProps: spec.SchemaProps{ + Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"clientCIDR", "serverAddress"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Status is a return value for calls that don't return other objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable description of the status of this operation.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + Type: []string{"string"}, + Format: "", + }, + }, + "details": { + SchemaProps: spec.SchemaProps{ + Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), + }, + }, + "code": { + SchemaProps: spec.SchemaProps{ + Description: "Suggested HTTP return code for this status, 0 if not set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, + } +} + +func schema_pkg_apis_meta_v1_StatusCause(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "A machine-readable description of the cause of the error. If this value is empty there is no information available.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + Type: []string{"string"}, + Format: "", + }, + }, + "field": { + SchemaProps: spec.SchemaProps{ + Description: "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", + Type: []string{"string"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "The group attribute of the resource associated with the status StatusReason.", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "causes": { + SchemaProps: spec.SchemaProps{ + Description: "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), + }, + }, + }, + }, + }, + "retryAfterSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, + } +} + +func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "columnDefinitions": { + SchemaProps: spec.SchemaProps{ + Description: "columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), + }, + }, + }, + }, + }, + "rows": { + SchemaProps: spec.SchemaProps{ + Description: "rows is the list of items in the table.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), + }, + }, + }, + }, + }, + }, + Required: []string{"columnDefinitions", "rows"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, + } +} + +func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableColumnDefinition contains information about a column returned in the Table.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is a human readable name for the column.", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is an OpenAPI type definition for this column, such as number, integer, string, or array. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an optional OpenAPI type modifier for this column. A format modifies the type and imposes additional rules, like date or time formatting for a string. The 'name' format is applied to the primary identifier column which has type 'string' to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is a human readable description of this column.", + Type: []string{"string"}, + Format: "", + }, + }, + "priority": { + SchemaProps: spec.SchemaProps{ + Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"name", "type", "format", "description", "priority"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_TableOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableOptions are used when a Table is requested by the caller.", + 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: "", + }, + }, + "includeObject": { + SchemaProps: spec.SchemaProps{ + Description: "includeObject decides whether to include each object along with its columnar information. Specifying \"None\" will return no object, specifying \"Object\" will return the full object contents, and specifying \"Metadata\" (the default) will return the object's metadata in the PartialObjectMetadata kind in version v1beta1 of the meta.k8s.io API group.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableRow is an individual row in a table.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cells": { + SchemaProps: spec.SchemaProps{ + Description: "cells will be as wide as the column definitions array and may contain strings, numbers (float64 or int64), booleans, simple maps, lists, or null. See the type field of the column definition for a more detailed description.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Format: "", + }, + }, + }, + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "conditions describe additional status of a row that are relevant for a human user. These conditions apply to the row, not to the object, and will be specific to table output. The only defined condition type is 'Completed', for a row that indicates a resource that has run to completion and can be given less visual priority.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), + }, + }, + }, + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"cells"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_meta_v1_TableRowCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableRowCondition allows a row to be marked with additional information.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of row condition. The only defined value is 'Completed' indicating that the object this row represents has reached a completed state and may be given less visual priority than other rows. Clients are not required to honor any conditions but should be consistent where possible about handling the conditions.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) machine readable reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Time(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + Type: metav1.Time{}.OpenAPISchemaType(), + Format: metav1.Time{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Timestamp(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "seconds": { + SchemaProps: spec.SchemaProps{ + Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "nanos": { + SchemaProps: spec.SchemaProps{ + Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"seconds", "nanos"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", + 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: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.", + 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: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "fieldManager": { + SchemaProps: spec.SchemaProps{ + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event represents a single event to a watched resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"type", "object"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PartialObjectMetadataList contains a list of objects containing only their metadata.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items contains each of the included items.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, + } +} + +func schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", + Type: []string{"object"}, + }, + }, + } +} + +func schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this: type MyAwesomeAPIObject struct {\n runtime.TypeMeta `json:\",inline\"`\n ... // other fields\n} func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind\n\nTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "Raw": { + SchemaProps: spec.SchemaProps{ + Description: "Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.", + Type: []string{"string"}, + Format: "byte", + }, + }, + "ContentEncoding": { + SchemaProps: spec.SchemaProps{ + Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", + Type: []string{"string"}, + Format: "", + }, + }, + "ContentType": { + SchemaProps: spec.SchemaProps{ + Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"Raw", "ContentEncoding", "ContentType"}, + }, + }, + } +} + +func schema_apimachinery_pkg_util_intstr_IntOrString(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.", + Type: intstr.IntOrString{}.OpenAPISchemaType(), + Format: intstr.IntOrString{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_k8sio_apimachinery_pkg_version_Info(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Info contains versioning information. how we'll want to distribute that information.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "major": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "minor": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "gitVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "gitCommit": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "gitTreeState": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "buildDate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "goVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "compiler": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "platform": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, + }, + }, + } +} + +func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event captures all the information that can be included in an API audit log.", + 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: "", + }, + }, + "level": { + SchemaProps: spec.SchemaProps{ + Description: "AuditLevel at which event was generated", + Type: []string{"string"}, + Format: "", + }, + }, + "auditID": { + SchemaProps: spec.SchemaProps{ + Description: "Unique audit ID, generated for each request.", + Type: []string{"string"}, + Format: "", + }, + }, + "stage": { + SchemaProps: spec.SchemaProps{ + Description: "Stage of the request handling when this event instance was generated.", + Type: []string{"string"}, + Format: "", + }, + }, + "requestURI": { + SchemaProps: spec.SchemaProps{ + Description: "RequestURI is the request URI as sent by the client to a server.", + Type: []string{"string"}, + Format: "", + }, + }, + "verb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "Authenticated user information.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "impersonatedUser": { + SchemaProps: spec.SchemaProps{ + Description: "Impersonated user information.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "sourceIPs": { + SchemaProps: spec.SchemaProps{ + Description: "Source IPs, from where the request originated and intermediate proxies.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "userAgent": { + SchemaProps: spec.SchemaProps{ + Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", + Type: []string{"string"}, + Format: "", + }, + }, + "objectRef": { + SchemaProps: spec.SchemaProps{ + Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"), + }, + }, + "responseStatus": { + SchemaProps: spec.SchemaProps{ + Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + "requestObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "responseObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "requestReceivedTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached the apiserver.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "stageTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached current audit stage.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"level", "auditID", "stage", "requestURI", "verb", "user"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"}, + } +} + +func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventList is a list of audit Events.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Event"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Event"}, + } +} + +func schema_pkg_apis_audit_v1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupResources represents resource kinds in an API group.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", + Type: []string{"string"}, + Format: "", + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_audit_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the name of the API group that contains the referred object. The empty string represents the core API group.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion is the version of the API group that contains the referred object.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "subresource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", + 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: "ObjectMeta is included for interoperability with API infrastructure.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"), + }, + }, + }, + }, + }, + "omitStages": { + SchemaProps: spec.SchemaProps{ + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"rules"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"}, + } +} + +func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyList is a list of audit Policies.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Policy"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Policy"}, + } +} + +func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "level": { + SchemaProps: spec.SchemaProps{ + Description: "The Level that requests matching this rule are recorded at.", + Type: []string{"string"}, + Format: "", + }, + }, + "users": { + SchemaProps: spec.SchemaProps{ + Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "userGroups": { + SchemaProps: spec.SchemaProps{ + Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "The verbs that match this rule. An empty list implies every verb.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"), + }, + }, + }, + }, + }, + "namespaces": { + SchemaProps: spec.SchemaProps{ + Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "omitStages": { + SchemaProps: spec.SchemaProps{ + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"level"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"}, + } +} + +func schema_pkg_apis_audit_v1alpha1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event captures all the information that can be included in an API audit log.", + 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: "ObjectMeta is included for interoperability with API infrastructure.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "level": { + SchemaProps: spec.SchemaProps{ + Description: "AuditLevel at which event was generated", + Type: []string{"string"}, + Format: "", + }, + }, + "timestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached the apiserver.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "auditID": { + SchemaProps: spec.SchemaProps{ + Description: "Unique audit ID, generated for each request.", + Type: []string{"string"}, + Format: "", + }, + }, + "stage": { + SchemaProps: spec.SchemaProps{ + Description: "Stage of the request handling when this event instance was generated.", + Type: []string{"string"}, + Format: "", + }, + }, + "requestURI": { + SchemaProps: spec.SchemaProps{ + Description: "RequestURI is the request URI as sent by the client to a server.", + Type: []string{"string"}, + Format: "", + }, + }, + "verb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "Authenticated user information.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "impersonatedUser": { + SchemaProps: spec.SchemaProps{ + Description: "Impersonated user information.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "sourceIPs": { + SchemaProps: spec.SchemaProps{ + Description: "Source IPs, from where the request originated and intermediate proxies.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "userAgent": { + SchemaProps: spec.SchemaProps{ + Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", + Type: []string{"string"}, + Format: "", + }, + }, + "objectRef": { + SchemaProps: spec.SchemaProps{ + Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference"), + }, + }, + "responseStatus": { + SchemaProps: spec.SchemaProps{ + Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + "requestObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "responseObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "requestReceivedTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached the apiserver.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "stageTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached current audit stage.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"level", "timestamp", "auditID", "stage", "requestURI", "verb", "user"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference"}, + } +} + +func schema_pkg_apis_audit_v1alpha1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventList is a list of audit Events.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event"}, + } +} + +func schema_pkg_apis_audit_v1alpha1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupResources represents resource kinds in an API group.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", + Type: []string{"string"}, + Format: "", + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_audit_v1alpha1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "subresource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_audit_v1alpha1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", + 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: "ObjectMeta is included for interoperability with API infrastructure.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule"), + }, + }, + }, + }, + }, + "omitStages": { + SchemaProps: spec.SchemaProps{ + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"rules"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule"}, + } +} + +func schema_pkg_apis_audit_v1alpha1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyList is a list of audit Policies.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy"}, + } +} + +func schema_pkg_apis_audit_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "level": { + SchemaProps: spec.SchemaProps{ + Description: "The Level that requests matching this rule are recorded at.", + Type: []string{"string"}, + Format: "", + }, + }, + "users": { + SchemaProps: spec.SchemaProps{ + Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "userGroups": { + SchemaProps: spec.SchemaProps{ + Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "The verbs that match this rule. An empty list implies every verb.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources"), + }, + }, + }, + }, + }, + "namespaces": { + SchemaProps: spec.SchemaProps{ + Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "omitStages": { + SchemaProps: spec.SchemaProps{ + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"level"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources"}, + } +} + +func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event captures all the information that can be included in an API audit log.", + 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: "ObjectMeta is included for interoperability with API infrastructure. DEPRECATED: Use StageTimestamp which supports micro second instead of ObjectMeta.CreateTimestamp and the rest of the object is not used", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "level": { + SchemaProps: spec.SchemaProps{ + Description: "AuditLevel at which event was generated", + Type: []string{"string"}, + Format: "", + }, + }, + "timestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached the apiserver. DEPRECATED: Use RequestReceivedTimestamp which supports micro second instead.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "auditID": { + SchemaProps: spec.SchemaProps{ + Description: "Unique audit ID, generated for each request.", + Type: []string{"string"}, + Format: "", + }, + }, + "stage": { + SchemaProps: spec.SchemaProps{ + Description: "Stage of the request handling when this event instance was generated.", + Type: []string{"string"}, + Format: "", + }, + }, + "requestURI": { + SchemaProps: spec.SchemaProps{ + Description: "RequestURI is the request URI as sent by the client to a server.", + Type: []string{"string"}, + Format: "", + }, + }, + "verb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "Authenticated user information.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "impersonatedUser": { + SchemaProps: spec.SchemaProps{ + Description: "Impersonated user information.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "sourceIPs": { + SchemaProps: spec.SchemaProps{ + Description: "Source IPs, from where the request originated and intermediate proxies.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "userAgent": { + SchemaProps: spec.SchemaProps{ + Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", + Type: []string{"string"}, + Format: "", + }, + }, + "objectRef": { + SchemaProps: spec.SchemaProps{ + Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference"), + }, + }, + "responseStatus": { + SchemaProps: spec.SchemaProps{ + Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + "requestObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "responseObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "requestReceivedTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached the apiserver.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "stageTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached current audit stage.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"level", "timestamp", "auditID", "stage", "requestURI", "verb", "user"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference"}, + } +} + +func schema_pkg_apis_audit_v1beta1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventList is a list of audit Events.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.Event"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.Event"}, + } +} + +func schema_pkg_apis_audit_v1beta1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupResources represents resource kinds in an API group.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", + Type: []string{"string"}, + Format: "", + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_audit_v1beta1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the name of the API group that contains the referred object. The empty string represents the core API group.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion is the version of the API group that contains the referred object.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "subresource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_audit_v1beta1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", + 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: "ObjectMeta is included for interoperability with API infrastructure.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule"), + }, + }, + }, + }, + }, + "omitStages": { + SchemaProps: spec.SchemaProps{ + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"rules"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule"}, + } +} + +func schema_pkg_apis_audit_v1beta1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyList is a list of audit Policies.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy"}, + } +} + +func schema_pkg_apis_audit_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "level": { + SchemaProps: spec.SchemaProps{ + Description: "The Level that requests matching this rule are recorded at.", + Type: []string{"string"}, + Format: "", + }, + }, + "users": { + SchemaProps: spec.SchemaProps{ + Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "userGroups": { + SchemaProps: spec.SchemaProps{ + Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "The verbs that match this rule. An empty list implies every verb.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources"), + }, + }, + }, + }, + }, + "namespaces": { + SchemaProps: spec.SchemaProps{ + Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "omitStages": { + SchemaProps: spec.SchemaProps{ + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"level"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources"}, + } +} + +func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", + 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: "", + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information passed to the plugin by the transport. This contains request and runtime specific information, such as if the session is interactive.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus"}, + } +} + +func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredenitalSpec holds request and runtime specific information provided by the transport.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "response": { + SchemaProps: spec.SchemaProps{ + Description: "Response is populated when the transport encounters HTTP status codes, such as 401, suggesting previous credentials were invalid.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response"), + }, + }, + "interactive": { + SchemaProps: spec.SchemaProps{ + Description: "Interactive is true when the transport detects the command is being called from an interactive prompt.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response"}, + } +} + +func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "expirationTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "token": { + SchemaProps: spec.SchemaProps{ + Description: "Token is a bearer token used by the client for request authentication.", + Type: []string{"string"}, + Format: "", + }, + }, + "clientCertificateData": { + SchemaProps: spec.SchemaProps{ + Description: "PEM-encoded client TLS certificates (including intermediates, if any).", + Type: []string{"string"}, + Format: "", + }, + }, + "clientKeyData": { + SchemaProps: spec.SchemaProps{ + Description: "PEM-encoded private key for the above certificate.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_clientauthentication_v1alpha1_Response(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Response defines metadata about a failed request, including HTTP status code and response headers.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "header": { + SchemaProps: spec.SchemaProps{ + Description: "Header holds HTTP headers returned by the server.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + "code": { + SchemaProps: spec.SchemaProps{ + Description: "Code is the HTTP status code returned by the server.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentials is used by exec-based plugins to communicate credentials to HTTP transports.", + 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: "", + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information passed to the plugin by the transport. This contains request and runtime specific information, such as if the session is interactive.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"}, + } +} + +func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredenitalSpec holds request and runtime specific information provided by the transport.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "expirationTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "token": { + SchemaProps: spec.SchemaProps{ + Description: "Token is a bearer token used by the client for request authentication.", + Type: []string{"string"}, + Format: "", + }, + }, + "clientCertificateData": { + SchemaProps: spec.SchemaProps{ + Description: "PEM-encoded client TLS certificates (including intermediates, if any).", + Type: []string{"string"}, + Format: "", + }, + }, + "clientKeyData": { + SchemaProps: spec.SchemaProps{ + Description: "PEM-encoded private key for the above certificate.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_apiregistration_v1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec contains information for locating and communicating with a server", + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status contains derived information about an API server", + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"}, + } +} + +func schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceCondition describes the state of an APIService at a particular point", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is the type of the condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the status of the condition. Can be True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_apiregistration_v1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceList is a list of APIService objects.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"}, + } +} + +func schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "service": { + SchemaProps: spec.SchemaProps{ + Description: "Service is a reference to the service for this API server. It must communicate on port 443 If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"), + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group is the API group name this server hosts", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version is the API version this server hosts. For example, \"v1\"", + Type: []string{"string"}, + Format: "", + }, + }, + "insecureSkipTLSVerify": { + SchemaProps: spec.SchemaProps{ + Description: "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Description: "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + "groupPriorityMinimum": { + SchemaProps: spec.SchemaProps{ + Description: "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "versionPriority": { + SchemaProps: spec.SchemaProps{ + Description: "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"groupPriorityMinimum", "versionPriority"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"}, + } +} + +func schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceStatus contains derived information about an API server", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Current service state of apiService.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"}, + } +} + +func schema_pkg_apis_apiregistration_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace of the service", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the service", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec contains information for locating and communicating with a server", + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status contains derived information about an API server", + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"}, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceCondition describes the state of an APIService at a particular point", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is the type of the condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the status of the condition. Can be True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceList is a list of APIService objects.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"}, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "service": { + SchemaProps: spec.SchemaProps{ + Description: "Service is a reference to the service for this API server. It must communicate on port 443 If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"), + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group is the API group name this server hosts", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version is the API version this server hosts. For example, \"v1\"", + Type: []string{"string"}, + Format: "", + }, + }, + "insecureSkipTLSVerify": { + SchemaProps: spec.SchemaProps{ + Description: "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Description: "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + "groupPriorityMinimum": { + SchemaProps: spec.SchemaProps{ + Description: "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "versionPriority": { + SchemaProps: spec.SchemaProps{ + Description: "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"groupPriorityMinimum", "versionPriority"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"}, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceStatus contains derived information about an API server", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Current service state of apiService.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"}, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace of the service", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the service", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AttachDetachControllerConfiguration contains elements describing AttachDetachController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "DisableAttachDetachReconcilerSync": { + SchemaProps: spec.SchemaProps{ + Description: "Reconciler runs a periodic loop to reconcile the desired state of the with the actual state of the world by triggering attach detach operations. This flag enables or disables reconcile. Is false by default, and thus enabled.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "ReconcilerSyncLoopPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop wait between successive executions. Is set to 5 sec by default.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"DisableAttachDetachReconcilerSync", "ReconcilerSyncLoopPeriod"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSRSigningControllerConfiguration contains elements describing CSRSigningController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ClusterSigningCertFile": { + SchemaProps: spec.SchemaProps{ + Description: "clusterSigningCertFile is the filename containing a PEM-encoded X509 CA certificate used to issue cluster-scoped certificates", + Type: []string{"string"}, + Format: "", + }, + }, + "ClusterSigningKeyFile": { + SchemaProps: spec.SchemaProps{ + Description: "clusterSigningCertFile is the filename containing a PEM-encoded RSA or ECDSA private key used to issue cluster-scoped certificates", + Type: []string{"string"}, + Format: "", + }, + }, + "ClusterSigningDuration": { + SchemaProps: spec.SchemaProps{ + Description: "clusterSigningDuration is the length of duration signed certificates will be given.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"ClusterSigningCertFile", "ClusterSigningKeyFile", "ClusterSigningDuration"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_CloudProviderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CloudProviderConfiguration contains basically elements about cloud provider.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the provider for cloud services.", + Type: []string{"string"}, + Format: "", + }, + }, + "CloudConfigFile": { + SchemaProps: spec.SchemaProps{ + Description: "cloudConfigFile is the path to the cloud provider configuration file.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"Name", "CloudConfigFile"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetControllerConfiguration contains elements describing DaemonSetController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentDaemonSetSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentDaemonSetSyncs is the number of daemonset objects that are allowed to sync concurrently. Larger number = more responsive daemonset, but more CPU (and network) load.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ConcurrentDaemonSetSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentControllerConfiguration contains elements describing DeploymentController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentDeploymentSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentDeploymentSyncs is the number of deployment objects that are allowed to sync concurrently. Larger number = more responsive deployments, but more CPU (and network) load.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "DeploymentControllerSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "deploymentControllerSyncPeriod is the period for syncing the deployments.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"ConcurrentDeploymentSyncs", "DeploymentControllerSyncPeriod"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeprecatedControllerConfiguration contains elements be deprecated.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "DeletingPodsQPS": { + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in case of node failure.", + Type: []string{"number"}, + Format: "float", + }, + }, + "DeletingPodsBurst": { + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED: deletingPodsBurst is the number of nodes on which pods are bursty deleted in case of node failure. For more details look into RateLimiter.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "RegisterRetryCount": { + SchemaProps: spec.SchemaProps{ + Description: "registerRetryCount is the number of retries for initial node registration. Retry interval equals node-sync-period.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"DeletingPodsQPS", "DeletingPodsBurst", "RegisterRetryCount"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointControllerConfiguration contains elements describing EndpointController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentEndpointSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentEndpointSyncs is the number of endpoint syncing operations that will be done concurrently. Larger number = faster endpoint updating, but more CPU (and network) load.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "EndpointUpdatesBatchPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"ConcurrentEndpointSyncs", "EndpointUpdatesBatchPeriod"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointSliceControllerConfiguration contains elements describing EndpointSliceController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentServiceEndpointSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentServiceEndpointSyncs is the number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "MaxEndpointsPerSlice": { + SchemaProps: spec.SchemaProps{ + Description: "maxEndpointsPerSlice is the maximum number of endpoints that will be added to an EndpointSlice. More endpoints per slice will result in fewer and larger endpoint slices, but larger resources.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "EndpointUpdatesBatchPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"ConcurrentServiceEndpointSyncs", "MaxEndpointsPerSlice", "EndpointUpdatesBatchPeriod"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "EnableGarbageCollector": { + SchemaProps: spec.SchemaProps{ + Description: "enables the generic garbage collector. MUST be synced with the corresponding flag of the kube-apiserver. WARNING: the generic garbage collector is an alpha feature.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "ConcurrentGCSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentGCSyncs is the number of garbage collector workers that are allowed to sync concurrently.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "GCIgnoredResources": { + SchemaProps: spec.SchemaProps{ + Description: "gcIgnoredResources is the list of GroupResources that garbage collection should ignore.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"), + }, + }, + }, + }, + }, + }, + Required: []string{"EnableGarbageCollector", "ConcurrentGCSyncs", "GCIgnoredResources"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GenericControllerManagerConfiguration holds configuration for a generic controller-manager.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Port": { + SchemaProps: spec.SchemaProps{ + Description: "port is the port that the controller-manager's http service runs on.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "Address": { + SchemaProps: spec.SchemaProps{ + Description: "address is the IP address to serve on (set to 0.0.0.0 for all interfaces).", + Type: []string{"string"}, + Format: "", + }, + }, + "MinResyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "minResyncPeriod is the resync period in reflectors; will be random between minResyncPeriod and 2*minResyncPeriod.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "ClientConnection": { + SchemaProps: spec.SchemaProps{ + Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + }, + }, + "ControllerStartInterval": { + SchemaProps: spec.SchemaProps{ + Description: "How long to wait between starting controller managers", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "LeaderElection": { + SchemaProps: spec.SchemaProps{ + Description: "leaderElection defines the configuration of leader election client.", + Ref: ref("k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"), + }, + }, + "Controllers": { + SchemaProps: spec.SchemaProps{ + Description: "Controllers is the list of controllers to enable or disable '*' means \"all enabled by default controllers\" 'foo' means \"enable 'foo'\" '-foo' means \"disable 'foo'\" first item for a particular name wins", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "Debugging": { + SchemaProps: spec.SchemaProps{ + Description: "DebuggingConfiguration holds configuration for Debugging related features.", + Ref: ref("k8s.io/component-base/config/v1alpha1.DebuggingConfiguration"), + }, + }, + }, + Required: []string{"Port", "Address", "MinResyncPeriod", "ClientConnection", "ControllerStartInterval", "LeaderElection", "Controllers", "Debugging"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.DebuggingConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupResource describes an group resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Group": { + SchemaProps: spec.SchemaProps{ + Description: "group is the group portion of the GroupResource.", + Type: []string{"string"}, + Format: "", + }, + }, + "Resource": { + SchemaProps: spec.SchemaProps{ + Description: "resource is the resource portion of the GroupResource.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"Group", "Resource"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HPAControllerConfiguration contains elements describing HPAController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "HorizontalPodAutoscalerSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerSyncPeriod is the period for syncing the number of pods in horizontal pod autoscaler.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerUpscaleForbiddenWindow": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerUpscaleForbiddenWindow is a period after which next upscale allowed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerDownscaleStabilizationWindow": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerDowncaleStabilizationWindow is a period for which autoscaler will look backwards and not scale down below any recommendation it made during that period.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerDownscaleForbiddenWindow": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerDownscaleForbiddenWindow is a period after which next downscale allowed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerTolerance": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerTolerance is the tolerance for when resource usage suggests upscaling/downscaling", + Type: []string{"number"}, + Format: "double", + }, + }, + "HorizontalPodAutoscalerUseRESTClients": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerUseRESTClients causes the HPA controller to use REST clients through the kube-aggregator when enabled, instead of using the legacy metrics client through the API server proxy.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "HorizontalPodAutoscalerCPUInitializationPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerCPUInitializationPeriod is the period after pod start when CPU samples might be skipped.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerInitialReadinessDelay": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerInitialReadinessDelay is period after pod start during which readiness changes are treated as readiness being set for the first time. The only effect of this is that HPA will disregard CPU samples from unready pods that had last readiness change during that period.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"HorizontalPodAutoscalerSyncPeriod", "HorizontalPodAutoscalerUpscaleForbiddenWindow", "HorizontalPodAutoscalerDownscaleStabilizationWindow", "HorizontalPodAutoscalerDownscaleForbiddenWindow", "HorizontalPodAutoscalerTolerance", "HorizontalPodAutoscalerUseRESTClients", "HorizontalPodAutoscalerCPUInitializationPeriod", "HorizontalPodAutoscalerInitialReadinessDelay"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobControllerConfiguration contains elements describing JobController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentJobSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentJobSyncs is the number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ConcurrentJobSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_KubeCloudSharedConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeCloudSharedConfiguration contains elements shared by both kube-controller manager and cloud-controller manager, but not genericconfig.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "CloudProvider": { + SchemaProps: spec.SchemaProps{ + Description: "CloudProviderConfiguration holds configuration for CloudProvider related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CloudProviderConfiguration"), + }, + }, + "ExternalCloudVolumePlugin": { + SchemaProps: spec.SchemaProps{ + Description: "externalCloudVolumePlugin specifies the plugin to use when cloudProvider is \"external\". It is currently used by the in repo cloud providers to handle node and volume control in the KCM.", + Type: []string{"string"}, + Format: "", + }, + }, + "UseServiceAccountCredentials": { + SchemaProps: spec.SchemaProps{ + Description: "useServiceAccountCredentials indicates whether controllers should be run with individual service account credentials.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "AllowUntaggedCloud": { + SchemaProps: spec.SchemaProps{ + Description: "run with untagged cloud instances", + Type: []string{"boolean"}, + Format: "", + }, + }, + "RouteReconciliationPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "routeReconciliationPeriod is the period for reconciling routes created for Nodes by cloud provider..", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "NodeMonitorPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "nodeMonitorPeriod is the period for syncing NodeStatus in NodeController.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "ClusterName": { + SchemaProps: spec.SchemaProps{ + Description: "clusterName is the instance prefix for the cluster.", + Type: []string{"string"}, + Format: "", + }, + }, + "ClusterCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "clusterCIDR is CIDR Range for Pods in cluster.", + Type: []string{"string"}, + Format: "", + }, + }, + "AllocateNodeCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "AllocateNodeCIDRs enables CIDRs for Pods to be allocated and, if ConfigureCloudRoutes is true, to be set on the cloud provider.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "CIDRAllocatorType": { + SchemaProps: spec.SchemaProps{ + Description: "CIDRAllocatorType determines what kind of pod CIDR allocator will be used.", + Type: []string{"string"}, + Format: "", + }, + }, + "ConfigureCloudRoutes": { + SchemaProps: spec.SchemaProps{ + Description: "configureCloudRoutes enables CIDRs allocated with allocateNodeCIDRs to be configured on the cloud provider.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "NodeSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "nodeSyncPeriod is the period for syncing nodes from cloudprovider. Longer periods will result in fewer calls to cloud provider, but may delay addition of new nodes to cluster.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"CloudProvider", "ExternalCloudVolumePlugin", "UseServiceAccountCredentials", "AllowUntaggedCloud", "RouteReconciliationPeriod", "NodeMonitorPeriod", "ClusterName", "ClusterCIDR", "AllocateNodeCIDRs", "CIDRAllocatorType", "ConfigureCloudRoutes", "NodeSyncPeriod"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.CloudProviderConfiguration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeControllerManagerConfiguration contains elements describing kube-controller manager.", + 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: "", + }, + }, + "Generic": { + SchemaProps: spec.SchemaProps{ + Description: "Generic holds configuration for a generic controller-manager", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), + }, + }, + "KubeCloudShared": { + SchemaProps: spec.SchemaProps{ + Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.KubeCloudSharedConfiguration"), + }, + }, + "AttachDetachController": { + SchemaProps: spec.SchemaProps{ + Description: "AttachDetachControllerConfiguration holds configuration for AttachDetachController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration"), + }, + }, + "CSRSigningController": { + SchemaProps: spec.SchemaProps{ + Description: "CSRSigningControllerConfiguration holds configuration for CSRSigningController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration"), + }, + }, + "DaemonSetController": { + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetControllerConfiguration holds configuration for DaemonSetController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration"), + }, + }, + "DeploymentController": { + SchemaProps: spec.SchemaProps{ + Description: "DeploymentControllerConfiguration holds configuration for DeploymentController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration"), + }, + }, + "StatefulSetController": { + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetControllerConfiguration holds configuration for StatefulSetController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration"), + }, + }, + "DeprecatedController": { + SchemaProps: spec.SchemaProps{ + Description: "DeprecatedControllerConfiguration holds configuration for some deprecated features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration"), + }, + }, + "EndpointController": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointControllerConfiguration holds configuration for EndpointController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration"), + }, + }, + "EndpointSliceController": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointSliceControllerConfiguration holds configuration for EndpointSliceController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration"), + }, + }, + "GarbageCollectorController": { + SchemaProps: spec.SchemaProps{ + Description: "GarbageCollectorControllerConfiguration holds configuration for GarbageCollectorController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration"), + }, + }, + "HPAController": { + SchemaProps: spec.SchemaProps{ + Description: "HPAControllerConfiguration holds configuration for HPAController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration"), + }, + }, + "JobController": { + SchemaProps: spec.SchemaProps{ + Description: "JobControllerConfiguration holds configuration for JobController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration"), + }, + }, + "NamespaceController": { + SchemaProps: spec.SchemaProps{ + Description: "NamespaceControllerConfiguration holds configuration for NamespaceController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration"), + }, + }, + "NodeIPAMController": { + SchemaProps: spec.SchemaProps{ + Description: "NodeIPAMControllerConfiguration holds configuration for NodeIPAMController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration"), + }, + }, + "NodeLifecycleController": { + SchemaProps: spec.SchemaProps{ + Description: "NodeLifecycleControllerConfiguration holds configuration for NodeLifecycleController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration"), + }, + }, + "PersistentVolumeBinderController": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeBinderControllerConfiguration holds configuration for PersistentVolumeBinderController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration"), + }, + }, + "PodGCController": { + SchemaProps: spec.SchemaProps{ + Description: "PodGCControllerConfiguration holds configuration for PodGCController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration"), + }, + }, + "ReplicaSetController": { + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetControllerConfiguration holds configuration for ReplicaSet related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration"), + }, + }, + "ReplicationController": { + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerConfiguration holds configuration for ReplicationController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration"), + }, + }, + "ResourceQuotaController": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuotaControllerConfiguration holds configuration for ResourceQuotaController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration"), + }, + }, + "SAController": { + SchemaProps: spec.SchemaProps{ + Description: "SAControllerConfiguration holds configuration for ServiceAccountController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration"), + }, + }, + "ServiceController": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ServiceControllerConfiguration"), + }, + }, + "TTLAfterFinishedController": { + SchemaProps: spec.SchemaProps{ + Description: "TTLAfterFinishedControllerConfiguration holds configuration for TTLAfterFinishedController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"), + }, + }, + }, + Required: []string{"Generic", "KubeCloudShared", "AttachDetachController", "CSRSigningController", "DaemonSetController", "DeploymentController", "StatefulSetController", "DeprecatedController", "EndpointController", "EndpointSliceController", "GarbageCollectorController", "HPAController", "JobController", "NamespaceController", "NodeIPAMController", "NodeLifecycleController", "PersistentVolumeBinderController", "PodGCController", "ReplicaSetController", "ReplicationController", "ResourceQuotaController", "SAController", "ServiceController", "TTLAfterFinishedController"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.GenericControllerManagerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ServiceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NamespaceControllerConfiguration contains elements describing NamespaceController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "NamespaceSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "namespaceSyncPeriod is the period for syncing namespace life-cycle updates.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "ConcurrentNamespaceSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentNamespaceSyncs is the number of namespace objects that are allowed to sync concurrently.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"NamespaceSyncPeriod", "ConcurrentNamespaceSyncs"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeIPAMControllerConfiguration contains elements describing NodeIpamController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ServiceCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "serviceCIDR is CIDR Range for Services in cluster.", + Type: []string{"string"}, + Format: "", + }, + }, + "SecondaryServiceCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "secondaryServiceCIDR is CIDR Range for Services in cluster. This is used in dual stack clusters. SecondaryServiceCIDR must be of different IP family than ServiceCIDR", + Type: []string{"string"}, + Format: "", + }, + }, + "NodeCIDRMaskSize": { + SchemaProps: spec.SchemaProps{ + Description: "NodeCIDRMaskSize is the mask size for node cidr in cluster.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "NodeCIDRMaskSizeIPv4": { + SchemaProps: spec.SchemaProps{ + Description: "NodeCIDRMaskSizeIPv4 is the mask size for node cidr in dual-stack cluster.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "NodeCIDRMaskSizeIPv6": { + SchemaProps: spec.SchemaProps{ + Description: "NodeCIDRMaskSizeIPv6 is the mask size for node cidr in dual-stack cluster.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ServiceCIDR", "SecondaryServiceCIDR", "NodeCIDRMaskSize", "NodeCIDRMaskSizeIPv4", "NodeCIDRMaskSizeIPv6"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeLifecycleControllerConfiguration contains elements describing NodeLifecycleController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "EnableTaintManager": { + SchemaProps: spec.SchemaProps{ + Description: "If set to true enables NoExecute Taints and will evict all not-tolerating Pod running on Nodes tainted with this kind of Taints.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "NodeEvictionRate": { + SchemaProps: spec.SchemaProps{ + Description: "nodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is healthy", + Type: []string{"number"}, + Format: "float", + }, + }, + "SecondaryNodeEvictionRate": { + SchemaProps: spec.SchemaProps{ + Description: "secondaryNodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy", + Type: []string{"number"}, + Format: "float", + }, + }, + "NodeStartupGracePeriod": { + SchemaProps: spec.SchemaProps{ + Description: "nodeStartupGracePeriod is the amount of time which we allow starting a node to be unresponsive before marking it unhealthy.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "NodeMonitorGracePeriod": { + SchemaProps: spec.SchemaProps{ + Description: "nodeMontiorGracePeriod is the amount of time which we allow a running node to be unresponsive before marking it unhealthy. Must be N times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "PodEvictionTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "podEvictionTimeout is the grace period for deleting pods on failed nodes.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "LargeClusterSizeThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "secondaryNodeEvictionRate is implicitly overridden to 0 for clusters smaller than or equal to largeClusterSizeThreshold", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "UnhealthyZoneThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "Zone is treated as unhealthy in nodeEvictionRate and secondaryNodeEvictionRate when at least unhealthyZoneThreshold (no less than 3) of Nodes in the zone are NotReady", + Type: []string{"number"}, + Format: "float", + }, + }, + }, + Required: []string{"EnableTaintManager", "NodeEvictionRate", "SecondaryNodeEvictionRate", "NodeStartupGracePeriod", "NodeMonitorGracePeriod", "PodEvictionTimeout", "LargeClusterSizeThreshold", "UnhealthyZoneThreshold"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeBinderControllerConfiguration contains elements describing PersistentVolumeBinderController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "PVClaimBinderSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "pvClaimBinderSyncPeriod is the period for syncing persistent volumes and persistent volume claims.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "VolumeConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "volumeConfiguration holds configuration for volume related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"), + }, + }, + }, + Required: []string{"PVClaimBinderSyncPeriod", "VolumeConfiguration"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeRecyclerConfiguration contains elements describing persistent volume plugins.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "MaximumRetry": { + SchemaProps: spec.SchemaProps{ + Description: "maximumRetry is number of retries the PV recycler will execute on failure to recycle PV.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "MinimumTimeoutNFS": { + SchemaProps: spec.SchemaProps{ + Description: "minimumTimeoutNFS is the minimum ActiveDeadlineSeconds to use for an NFS Recycler pod.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "PodTemplateFilePathNFS": { + SchemaProps: spec.SchemaProps{ + Description: "podTemplateFilePathNFS is the file path to a pod definition used as a template for NFS persistent volume recycling", + Type: []string{"string"}, + Format: "", + }, + }, + "IncrementTimeoutNFS": { + SchemaProps: spec.SchemaProps{ + Description: "incrementTimeoutNFS is the increment of time added per Gi to ActiveDeadlineSeconds for an NFS scrubber pod.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "PodTemplateFilePathHostPath": { + SchemaProps: spec.SchemaProps{ + Description: "podTemplateFilePathHostPath is the file path to a pod definition used as a template for HostPath persistent volume recycling. This is for development and testing only and will not work in a multi-node cluster.", + Type: []string{"string"}, + Format: "", + }, + }, + "MinimumTimeoutHostPath": { + SchemaProps: spec.SchemaProps{ + Description: "minimumTimeoutHostPath is the minimum ActiveDeadlineSeconds to use for a HostPath Recycler pod. This is for development and testing only and will not work in a multi-node cluster.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "IncrementTimeoutHostPath": { + SchemaProps: spec.SchemaProps{ + Description: "incrementTimeoutHostPath is the increment of time added per Gi to ActiveDeadlineSeconds for a HostPath scrubber pod. This is for development and testing only and will not work in a multi-node cluster.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"MaximumRetry", "MinimumTimeoutNFS", "PodTemplateFilePathNFS", "IncrementTimeoutNFS", "PodTemplateFilePathHostPath", "MinimumTimeoutHostPath", "IncrementTimeoutHostPath"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodGCControllerConfiguration contains elements describing PodGCController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TerminatedPodGCThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "terminatedPodGCThreshold is the number of terminated pods that can exist before the terminated pod garbage collector starts deleting terminated pods. If <= 0, the terminated pod garbage collector is disabled.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"TerminatedPodGCThreshold"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicaSetControllerConfiguration contains elements describing ReplicaSetController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentRSSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentRSSyncs is the number of replica sets that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ConcurrentRSSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerConfiguration contains elements describing ReplicationController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentRCSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentRCSyncs is the number of replication controllers that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ConcurrentRCSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuotaControllerConfiguration contains elements describing ResourceQuotaController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ResourceQuotaSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "resourceQuotaSyncPeriod is the period for syncing quota usage status in the system.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "ConcurrentResourceQuotaSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentResourceQuotaSyncs is the number of resource quotas that are allowed to sync concurrently. Larger number = more responsive quota management, but more CPU (and network) load.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ResourceQuotaSyncPeriod", "ConcurrentResourceQuotaSyncs"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SAControllerConfiguration contains elements describing ServiceAccountController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ServiceAccountKeyFile": { + SchemaProps: spec.SchemaProps{ + Description: "serviceAccountKeyFile is the filename containing a PEM-encoded private RSA key used to sign service account tokens.", + Type: []string{"string"}, + Format: "", + }, + }, + "ConcurrentSATokenSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentSATokenSyncs is the number of service account token syncing operations that will be done concurrently.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "RootCAFile": { + SchemaProps: spec.SchemaProps{ + Description: "rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"ServiceAccountKeyFile", "ConcurrentSATokenSyncs", "RootCAFile"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_ServiceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceControllerConfiguration contains elements describing ServiceController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentServiceSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentServiceSyncs is the number of services that are allowed to sync concurrently. Larger number = more responsive service management, but more CPU (and network) load.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ConcurrentServiceSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetControllerConfiguration contains elements describing StatefulSetController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentStatefulSetSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentStatefulSetSyncs is the number of statefulset objects that are allowed to sync concurrently. Larger number = more responsive statefulsets, but more CPU (and network) load.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ConcurrentStatefulSetSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TTLAfterFinishedControllerConfiguration contains elements describing TTLAfterFinishedController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentTTLSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentTTLSyncs is the number of TTL-after-finished collector workers that are allowed to sync concurrently.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ConcurrentTTLSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeConfiguration contains *all* enumerated flags meant to configure all volume plugins. From this config, the controller-manager binary will create many instances of volume.VolumeConfig, each containing only the configuration needed for that plugin which are then passed to the appropriate plugin. The ControllerManager binary is the only part of the code which knows what plugins are supported and which flags correspond to each plugin.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "EnableHostPathProvisioning": { + SchemaProps: spec.SchemaProps{ + Description: "enableHostPathProvisioning enables HostPath PV provisioning when running without a cloud provider. This allows testing and development of provisioning features. HostPath provisioning is not supported in any way, won't work in a multi-node cluster, and should not be used for anything other than testing or development.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "EnableDynamicProvisioning": { + SchemaProps: spec.SchemaProps{ + Description: "enableDynamicProvisioning enables the provisioning of volumes when running within an environment that supports dynamic provisioning. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "PersistentVolumeRecyclerConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "persistentVolumeRecyclerConfiguration holds configuration for persistent volume plugins.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"), + }, + }, + "FlexVolumePluginDir": { + SchemaProps: spec.SchemaProps{ + Description: "volumePluginDir is the full path of the directory in which the flex volume plugin should search for additional third party volume plugins", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"EnableHostPathProvisioning", "EnableDynamicProvisioning", "PersistentVolumeRecyclerConfiguration", "FlexVolumePluginDir"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"}, + } +} + +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeProxyConfiguration contains everything necessary to configure the Kubernetes proxy server.", + 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: "", + }, + }, + "featureGates": { + SchemaProps: spec.SchemaProps{ + Description: "featureGates is a map of feature names to bools that enable or disable alpha/experimental features.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + "bindAddress": { + SchemaProps: spec.SchemaProps{ + Description: "bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0 for all interfaces)", + Type: []string{"string"}, + Format: "", + }, + }, + "healthzBindAddress": { + SchemaProps: spec.SchemaProps{ + Description: "healthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10256", + Type: []string{"string"}, + Format: "", + }, + }, + "metricsBindAddress": { + SchemaProps: spec.SchemaProps{ + Description: "metricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces)", + Type: []string{"string"}, + Format: "", + }, + }, + "enableProfiling": { + SchemaProps: spec.SchemaProps{ + Description: "enableProfiling enables profiling via web interface on /debug/pprof handler. Profiling handlers will be handled by metrics server.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "clusterCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "clusterCIDR is the CIDR range of the pods in the cluster. It is used to bridge traffic coming from outside of the cluster. If not provided, no off-cluster bridging will be performed.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostnameOverride": { + SchemaProps: spec.SchemaProps{ + Description: "hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.", + Type: []string{"string"}, + Format: "", + }, + }, + "clientConnection": { + SchemaProps: spec.SchemaProps{ + Description: "clientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + }, + }, + "iptables": { + SchemaProps: spec.SchemaProps{ + Description: "iptables contains iptables-related configuration options.", + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration"), + }, + }, + "ipvs": { + SchemaProps: spec.SchemaProps{ + Description: "ipvs contains ipvs-related configuration options.", + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration"), + }, + }, + "oomScoreAdj": { + SchemaProps: spec.SchemaProps{ + Description: "oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "mode specifies which proxy mode to use.", + Type: []string{"string"}, + Format: "", + }, + }, + "portRange": { + SchemaProps: spec.SchemaProps{ + Description: "portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.", + Type: []string{"string"}, + Format: "", + }, + }, + "udpIdleTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxyMode=userspace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "conntrack": { + SchemaProps: spec.SchemaProps{ + Description: "conntrack contains conntrack-related configuration options.", + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration"), + }, + }, + "configSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater than 0.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "nodePortAddresses": { + SchemaProps: spec.SchemaProps{ + Description: "nodePortAddresses is the --nodeport-addresses value for kube-proxy process. Values must be valid IP blocks. These values are as a parameter to select the interfaces where nodeport works. In case someone would like to expose a service on localhost for local visit and some other interfaces for particular purpose, a list of IP blocks would do that. If set it to \"127.0.0.0/8\", kube-proxy will only select the loopback interface for NodePort. If set it to a non-zero IP block, kube-proxy will filter that down to just the IPs that applied to the node. An empty string slice is meant to select all network interfaces.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "winkernel": { + SchemaProps: spec.SchemaProps{ + Description: "winkernel contains winkernel-related configuration options.", + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"), + }, + }, + "showHiddenMetricsForVersion": { + SchemaProps: spec.SchemaProps{ + Description: "ShowHiddenMetricsForVersion is the version for which you want to show hidden metrics.", + Type: []string{"string"}, + Format: "", + }, + }, + "detectLocalMode": { + SchemaProps: spec.SchemaProps{ + Description: "DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"bindAddress", "healthzBindAddress", "metricsBindAddress", "enableProfiling", "clusterCIDR", "hostnameOverride", "clientConnection", "iptables", "ipvs", "oomScoreAdj", "mode", "portRange", "udpIdleTimeout", "conntrack", "configSyncPeriod", "nodePortAddresses", "winkernel", "showHiddenMetricsForVersion", "detectLocalMode"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"}, + } +} + +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeProxyConntrackConfiguration contains conntrack settings for the Kubernetes proxy server.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxPerCore": { + SchemaProps: spec.SchemaProps{ + Description: "maxPerCore is the maximum number of NAT connections to track per CPU core (0 to leave the limit as-is and ignore min).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "min": { + SchemaProps: spec.SchemaProps{ + Description: "min is the minimum value of connect-tracking records to allocate, regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "tcpEstablishedTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "tcpEstablishedTimeout is how long an idle TCP connection will be kept open (e.g. '2s'). Must be greater than 0 to set.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "tcpCloseWaitTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "tcpCloseWaitTimeout is how long an idle conntrack entry in CLOSE_WAIT state will remain in the conntrack table. (e.g. '60s'). Must be greater than 0 to set.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"maxPerCore", "min", "tcpEstablishedTimeout", "tcpCloseWaitTimeout"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeProxyIPTablesConfiguration contains iptables-related configuration details for the Kubernetes proxy server.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "masqueradeBit": { + SchemaProps: spec.SchemaProps{ + Description: "masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using the pure iptables proxy mode. Values must be within the range [0, 31].", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "masqueradeAll": { + SchemaProps: spec.SchemaProps{ + Description: "masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "syncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "syncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "minSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "minSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m').", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"masqueradeBit", "masqueradeAll", "syncPeriod", "minSyncPeriod"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeProxyIPVSConfiguration contains ipvs-related configuration details for the Kubernetes proxy server.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "syncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "syncPeriod is the period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "minSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "minSyncPeriod is the minimum period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m').", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "scheduler": { + SchemaProps: spec.SchemaProps{ + Description: "ipvs scheduler", + Type: []string{"string"}, + Format: "", + }, + }, + "excludeCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch when cleaning up ipvs services.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "strictARP": { + SchemaProps: spec.SchemaProps{ + Description: "strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries from kube-ipvs0 interface", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tcpTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "tcpTimeout is the timeout value used for idle IPVS TCP sessions. The default value is 0, which preserves the current timeout value on the system.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "tcpFinTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "tcpFinTimeout is the timeout value used for IPVS TCP sessions after receiving a FIN. The default value is 0, which preserves the current timeout value on the system.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "udpTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "udpTimeout is the timeout value used for IPVS UDP packets. The default value is 0, which preserves the current timeout value on the system.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"syncPeriod", "minSyncPeriod", "scheduler", "excludeCIDRs", "strictARP", "tcpTimeout", "tcpFinTimeout", "udpTimeout"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeProxyWinkernelConfiguration contains Windows/HNS settings for the Kubernetes proxy server.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "networkName": { + SchemaProps: spec.SchemaProps{ + Description: "networkName is the name of the network kube-proxy will use to create endpoints and policies", + Type: []string{"string"}, + Format: "", + }, + }, + "sourceVip": { + SchemaProps: spec.SchemaProps{ + Description: "sourceVip is the IP address of the source VIP endoint used for NAT when loadbalancing", + Type: []string{"string"}, + Format: "", + }, + }, + "enableDSR": { + SchemaProps: spec.SchemaProps{ + Description: "enableDSR tells kube-proxy whether HNS policies should be created with DSR", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"networkName", "sourceVip", "enableDSR"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1_Extender(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, it is assumed that the extender chose not to provide that extension.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "urlPrefix": { + SchemaProps: spec.SchemaProps{ + Description: "URLPrefix at which the extender is available", + Type: []string{"string"}, + Format: "", + }, + }, + "filterVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.", + Type: []string{"string"}, + Format: "", + }, + }, + "preemptVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.", + Type: []string{"string"}, + Format: "", + }, + }, + "prioritizeVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.", + Type: []string{"string"}, + Format: "", + }, + }, + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "The numeric multiplier for the node scores that the prioritize call generates. The weight should be a positive integer", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "bindVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender can implement this function.", + Type: []string{"string"}, + Format: "", + }, + }, + "enableHttps": { + SchemaProps: spec.SchemaProps{ + Description: "EnableHTTPS specifies whether https should be used to communicate with the extender", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tlsConfig": { + SchemaProps: spec.SchemaProps{ + Description: "TLSConfig specifies the transport layer security config", + Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"), + }, + }, + "httpTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "nodeCacheCapable": { + SchemaProps: spec.SchemaProps{ + Description: "NodeCacheCapable specifies that the extender is capable of caching node information, so the scheduler should only send minimal information about the eligible nodes assuming that the extender already cached full details of all nodes in the cluster", + Type: []string{"boolean"}, + Format: "", + }, + }, + "managedResources": { + SchemaProps: spec.SchemaProps{ + Description: "ManagedResources is a list of extended resources that are managed by this extender. - A pod will be sent to the extender on the Filter, Prioritize and Bind\n (if the extender is the binder) phases iff the pod requests at least\n one of the extended resources in this list. If empty or unspecified,\n all pods will be sent to this extender.\n- If IgnoredByScheduler is set to true for a resource, kube-scheduler\n will skip checking the resource in predicates.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderManagedResource"), + }, + }, + }, + }, + }, + "ignorable": { + SchemaProps: spec.SchemaProps{ + Description: "Ignorable specifies if the extender is ignorable, i.e. scheduling should not fail when the extender returns an error or is not reachable.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"urlPrefix"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1_ExtenderManagedResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExtenderManagedResource describes the arguments of extended resources managed by an extender.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the extended resource name.", + Type: []string{"string"}, + Format: "", + }, + }, + "ignoredByScheduler": { + SchemaProps: spec.SchemaProps{ + Description: "IgnoredByScheduler indicates whether kube-scheduler should ignore this resource when applying predicates.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1_ExtenderTLSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExtenderTLSConfig contains settings to enable TLS with extender", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "insecure": { + SchemaProps: spec.SchemaProps{ + Description: "Server should be accessed without verifying the TLS certificate. For testing only.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "serverName": { + SchemaProps: spec.SchemaProps{ + Description: "ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "certFile": { + SchemaProps: spec.SchemaProps{ + Description: "Server requires TLS client certificate authentication", + Type: []string{"string"}, + Format: "", + }, + }, + "keyFile": { + SchemaProps: spec.SchemaProps{ + Description: "Server requires TLS client certificate authentication", + Type: []string{"string"}, + Format: "", + }, + }, + "caFile": { + SchemaProps: spec.SchemaProps{ + Description: "Trusted root certificates for server", + Type: []string{"string"}, + Format: "", + }, + }, + "certData": { + SchemaProps: spec.SchemaProps{ + Description: "CertData holds PEM-encoded bytes (typically read from a client certificate file). CertData takes precedence over CertFile", + Type: []string{"string"}, + Format: "byte", + }, + }, + "keyData": { + SchemaProps: spec.SchemaProps{ + Description: "KeyData holds PEM-encoded bytes (typically read from a client certificate key file). KeyData takes precedence over KeyFile", + Type: []string{"string"}, + Format: "byte", + }, + }, + "caData": { + SchemaProps: spec.SchemaProps{ + Description: "CAData holds PEM-encoded bytes (typically read from a root certificates bundle). CAData takes precedence over CAFile", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1_LabelPreference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LabelPreference holds the parameters that are used to configure the corresponding priority function", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "label": { + SchemaProps: spec.SchemaProps{ + Description: "Used to identify node \"groups\"", + Type: []string{"string"}, + Format: "", + }, + }, + "presence": { + SchemaProps: spec.SchemaProps{ + Description: "This is a boolean flag If true, higher priority is given to nodes that have the label If false, higher priority is given to nodes that do not have the label", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"label", "presence"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1_LabelsPresence(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LabelsPresence holds the parameters that are used to configure the corresponding predicate in scheduler policy configuration.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "The list of labels that identify node \"groups\" All of the labels should be either present (or absent) for the node to be considered a fit for hosting the pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "presence": { + SchemaProps: spec.SchemaProps{ + Description: "The boolean flag that indicates whether the labels should be present or absent from the node", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"labels", "presence"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Policy describes a struct for a policy resource used in api.", + 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: "", + }, + }, + "predicates": { + SchemaProps: spec.SchemaProps{ + Description: "Holds the information to configure the fit predicate functions", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1.PredicatePolicy"), + }, + }, + }, + }, + }, + "priorities": { + SchemaProps: spec.SchemaProps{ + Description: "Holds the information to configure the priority functions", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1.PriorityPolicy"), + }, + }, + }, + }, + }, + "extenders": { + SchemaProps: spec.SchemaProps{ + Description: "Holds the information to communicate with the extender(s)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1.Extender"), + }, + }, + }, + }, + }, + "hardPodAffinitySymmetricWeight": { + SchemaProps: spec.SchemaProps{ + Description: "RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding to every RequiredDuringScheduling affinity rule. HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 1-100.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "alwaysCheckAllPredicates": { + SchemaProps: spec.SchemaProps{ + Description: "When AlwaysCheckAllPredicates is set to true, scheduler checks all the configured predicates even after one or more of them fails. When the flag is set to false, scheduler skips checking the rest of the predicates after it finds one predicate that failed.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"predicates", "priorities", "extenders", "hardPodAffinitySymmetricWeight", "alwaysCheckAllPredicates"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.Extender", "k8s.io/kube-scheduler/config/v1.PredicatePolicy", "k8s.io/kube-scheduler/config/v1.PriorityPolicy"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1_PredicateArgument(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PredicateArgument represents the arguments to configure predicate functions in scheduler policy configuration. Only one of its members may be specified", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "serviceAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "The predicate that provides affinity for pods belonging to a service It uses a label to identify nodes that belong to the same \"group\"", + Ref: ref("k8s.io/kube-scheduler/config/v1.ServiceAffinity"), + }, + }, + "labelsPresence": { + SchemaProps: spec.SchemaProps{ + Description: "The predicate that checks whether a particular node has a certain label defined or not, regardless of value", + Ref: ref("k8s.io/kube-scheduler/config/v1.LabelsPresence"), + }, + }, + }, + Required: []string{"serviceAffinity", "labelsPresence"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.LabelsPresence", "k8s.io/kube-scheduler/config/v1.ServiceAffinity"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1_PredicatePolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PredicatePolicy describes a struct of a predicate policy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Identifier of the predicate policy For a custom predicate, the name can be user-defined For the Kubernetes provided predicates, the name is the identifier of the pre-defined predicate", + Type: []string{"string"}, + Format: "", + }, + }, + "argument": { + SchemaProps: spec.SchemaProps{ + Description: "Holds the parameters to configure the given predicate", + Ref: ref("k8s.io/kube-scheduler/config/v1.PredicateArgument"), + }, + }, + }, + Required: []string{"name", "argument"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.PredicateArgument"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1_PriorityArgument(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityArgument represents the arguments to configure priority functions in scheduler policy configuration. Only one of its members may be specified", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "serviceAntiAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "The priority function that ensures a good spread (anti-affinity) for pods belonging to a service It uses a label to identify nodes that belong to the same \"group\"", + Ref: ref("k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity"), + }, + }, + "labelPreference": { + SchemaProps: spec.SchemaProps{ + Description: "The priority function that checks whether a particular node has a certain label defined or not, regardless of value", + Ref: ref("k8s.io/kube-scheduler/config/v1.LabelPreference"), + }, + }, + "requestedToCapacityRatioArguments": { + SchemaProps: spec.SchemaProps{ + Description: "The RequestedToCapacityRatio priority function is parametrized with function shape.", + Ref: ref("k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments"), + }, + }, + }, + Required: []string{"serviceAntiAffinity", "labelPreference", "requestedToCapacityRatioArguments"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.LabelPreference", "k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments", "k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1_PriorityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityPolicy describes a struct of a priority policy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Identifier of the priority policy For a custom priority, the name can be user-defined For the Kubernetes provided priority functions, the name is the identifier of the pre-defined priority function", + Type: []string{"string"}, + Format: "", + }, + }, + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "The numeric multiplier for the node scores that the priority function generates The weight should be non-zero and can be a positive or a negative integer", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "argument": { + SchemaProps: spec.SchemaProps{ + Description: "Holds the parameters to configure the given priority function", + Ref: ref("k8s.io/kube-scheduler/config/v1.PriorityArgument"), + }, + }, + }, + Required: []string{"name", "weight", "argument"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.PriorityArgument"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioArguments(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RequestedToCapacityRatioArguments holds arguments specific to RequestedToCapacityRatio priority function.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "shape": { + SchemaProps: spec.SchemaProps{ + Description: "Array of point defining priority function shape.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"), + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1.ResourceSpec"), + }, + }, + }, + }, + }, + }, + Required: []string{"shape"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.ResourceSpec", "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceSpec represents single resource and weight for bin packing of priority RequestedToCapacityRatioArguments.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the resource to be managed by RequestedToCapacityRatio function.", + Type: []string{"string"}, + Format: "", + }, + }, + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "Weight of the resource.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1_ServiceAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceAffinity holds the parameters that are used to configure the corresponding predicate in scheduler policy configuration.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "The list of labels that identify node \"groups\" All of the labels should match for the node to be considered a fit for hosting the pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"labels"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1_ServiceAntiAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceAntiAffinity holds the parameters that are used to configure the corresponding priority function", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "label": { + SchemaProps: spec.SchemaProps{ + Description: "Used to identify node \"groups\"", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"label"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UtilizationShapePoint represents single point of priority function shape.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "utilization": { + SchemaProps: spec.SchemaProps{ + Description: "Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "score": { + SchemaProps: spec.SchemaProps{ + Description: "Score assigned to given utilization (y axis). Valid values are 0 to 10.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"utilization", "score"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeSchedulerConfiguration configures a scheduler", + 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: "", + }, + }, + "schedulerName": { + SchemaProps: spec.SchemaProps{ + Description: "SchedulerName is name of the scheduler, used to select which pods will be processed by this scheduler, based on pod's \"spec.SchedulerName\".", + Type: []string{"string"}, + Format: "", + }, + }, + "algorithmSource": { + SchemaProps: spec.SchemaProps{ + Description: "AlgorithmSource specifies the scheduler algorithm source.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.SchedulerAlgorithmSource"), + }, + }, + "hardPodAffinitySymmetricWeight": { + SchemaProps: spec.SchemaProps{ + Description: "RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding to every RequiredDuringScheduling affinity rule. HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "leaderElection": { + SchemaProps: spec.SchemaProps{ + Description: "LeaderElection defines the configuration of leader election client.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.KubeSchedulerLeaderElectionConfiguration"), + }, + }, + "clientConnection": { + SchemaProps: spec.SchemaProps{ + Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + }, + }, + "healthzBindAddress": { + SchemaProps: spec.SchemaProps{ + Description: "HealthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10251", + Type: []string{"string"}, + Format: "", + }, + }, + "metricsBindAddress": { + SchemaProps: spec.SchemaProps{ + Description: "MetricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 0.0.0.0:10251.", + Type: []string{"string"}, + Format: "", + }, + }, + "enableProfiling": { + SchemaProps: spec.SchemaProps{ + Description: "enableProfiling enables profiling via web interface host:port/debug/pprof/", + Type: []string{"boolean"}, + Format: "", + }, + }, + "enableContentionProfiling": { + SchemaProps: spec.SchemaProps{ + Description: "enableContentionProfiling enables lock contention profiling, if enableProfiling is true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "disablePreemption": { + SchemaProps: spec.SchemaProps{ + Description: "DisablePreemption disables the pod preemption feature.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "percentageOfNodesToScore": { + SchemaProps: spec.SchemaProps{ + Description: "PercentageOfNodeToScore is the percentage of all nodes that once found feasible for running a pod, the scheduler stops its search for more feasible nodes in the cluster. This helps improve scheduler's performance. Scheduler always tries to find at least \"minFeasibleNodesToFind\" feasible nodes no matter what the value of this flag is. Example: if the cluster size is 500 nodes and the value of this flag is 30, then scheduler stops finding further feasible nodes once it finds 150 feasible ones. When the value is 0, default percentage (5%--50% based on the size of the cluster) of the nodes will be scored.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "bindTimeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Duration to wait for a binding operation to complete before timing out Value must be non-negative integer. The value zero indicates no waiting. If this value is nil, the default value will be used.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "podInitialBackoffSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "PodInitialBackoffSeconds is the initial backoff for unschedulable pods. If specified, it must be greater than 0. If this value is null, the default value (1s) will be used.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "podMaxBackoffSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "PodMaxBackoffSeconds is the max backoff for unschedulable pods. If specified, it must be greater than podInitialBackoffSeconds. If this value is null, the default value (10s) will be used.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "plugins": { + SchemaProps: spec.SchemaProps{ + Description: "Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.Plugins"), + }, + }, + "pluginConfig": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "PluginConfig is an optional set of custom plugin arguments for each plugin. Omitting config args for a plugin is equivalent to using the default config for that plugin.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginConfig"), + }, + }, + }, + }, + }, + }, + Required: []string{"algorithmSource", "leaderElection", "clientConnection", "bindTimeoutSeconds", "podInitialBackoffSeconds", "podMaxBackoffSeconds"}, + }, + }, + Dependencies: []string{ + "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/kube-scheduler/config/v1alpha1.KubeSchedulerLeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1alpha1.PluginConfig", "k8s.io/kube-scheduler/config/v1alpha1.Plugins", "k8s.io/kube-scheduler/config/v1alpha1.SchedulerAlgorithmSource"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerLeaderElectionConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeSchedulerLeaderElectionConfiguration expands LeaderElectionConfiguration to include scheduler specific configuration.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "leaderElect": { + SchemaProps: spec.SchemaProps{ + Description: "leaderElect enables a leader election client to gain leadership before executing the main loop. Enable this when running replicated components for high availability.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "leaseDuration": { + SchemaProps: spec.SchemaProps{ + Description: "leaseDuration is the duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "renewDeadline": { + SchemaProps: spec.SchemaProps{ + Description: "renewDeadline is the interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration. This is only applicable if leader election is enabled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "retryPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "retryPeriod is the duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "resourceLock": { + SchemaProps: spec.SchemaProps{ + Description: "resourceLock indicates the resource object type that will be used to lock during leader election cycles.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceName": { + SchemaProps: spec.SchemaProps{ + Description: "resourceName indicates the name of resource object that will be used to lock during leader election cycles.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "resourceName indicates the namespace of resource object that will be used to lock during leader election cycles.", + Type: []string{"string"}, + Format: "", + }, + }, + "lockObjectNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "LockObjectNamespace defines the namespace of the lock object DEPRECATED: will be removed in favor of resourceNamespace", + Type: []string{"string"}, + Format: "", + }, + }, + "lockObjectName": { + SchemaProps: spec.SchemaProps{ + Description: "LockObjectName defines the lock object name DEPRECATED: will be removed in favor of resourceName", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"leaderElect", "leaseDuration", "renewDeadline", "retryPeriod", "resourceLock", "resourceName", "resourceNamespace", "lockObjectNamespace", "lockObjectName"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha1_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name defines the name of plugin", + Type: []string{"string"}, + Format: "", + }, + }, + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "Weight defines the weight of plugin, only used for Score plugins.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha1_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. It is up to the plugin to process these Args.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name defines the name of plugin being configured", + Type: []string{"string"}, + Format: "", + }, + }, + "args": { + SchemaProps: spec.SchemaProps{ + Description: "Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.Unknown"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha1_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PluginSet specifies enabled and disabled plugins for an extension point. If an array is empty, missing, or nil, default plugins at that extension point will be used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Enabled specifies plugins that should be enabled in addition to default plugins. These are called after default plugins and in the same order specified here.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.Plugin"), + }, + }, + }, + }, + }, + "disabled": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Disabled specifies default plugins that should be disabled. When all default plugins need to be disabled, an array containing only one \"*\" should be provided.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.Plugin"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1alpha1.Plugin"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha1_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Plugins include multiple extension points. When specified, the list of plugins for a particular extension point are the only ones enabled. If an extension point is omitted from the config, then the default set of plugins is used for that extension point. Enabled plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "queueSort": { + SchemaProps: spec.SchemaProps{ + Description: "QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + "preFilter": { + SchemaProps: spec.SchemaProps{ + Description: "PreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + "filter": { + SchemaProps: spec.SchemaProps{ + Description: "Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + "postFilter": { + SchemaProps: spec.SchemaProps{ + Description: "PostFilter is a list of plugins that are invoked after filtering out infeasible nodes.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + "score": { + SchemaProps: spec.SchemaProps{ + Description: "Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + "reserve": { + SchemaProps: spec.SchemaProps{ + Description: "Reserve is a list of plugins invoked when reserving a node to run the pod.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + "permit": { + SchemaProps: spec.SchemaProps{ + Description: "Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + "preBind": { + SchemaProps: spec.SchemaProps{ + Description: "PreBind is a list of plugins that should be invoked before a pod is bound.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + "bind": { + SchemaProps: spec.SchemaProps{ + Description: "Bind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework. The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + "postBind": { + SchemaProps: spec.SchemaProps{ + Description: "PostBind is a list of plugins that should be invoked after a pod is successfully bound.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + "unreserve": { + SchemaProps: spec.SchemaProps{ + Description: "Unreserve is a list of plugins invoked when a pod that was previously reserved is rejected in a later phase.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1alpha1.PluginSet"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerAlgorithmSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SchedulerAlgorithmSource is the source of a scheduler algorithm. One source field must be specified, and source fields are mutually exclusive.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "policy": { + SchemaProps: spec.SchemaProps{ + Description: "Policy is a policy based algorithm source.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicySource"), + }, + }, + "provider": { + SchemaProps: spec.SchemaProps{ + Description: "Provider is the name of a scheduling algorithm provider to use.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicySource"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicyConfigMapSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SchedulerPolicyConfigMapSource is a policy serialized into a config map value under the SchedulerPolicyConfigMapKey key.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace of the policy config map.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of hte policy config map.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicyFileSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SchedulerPolicyFileSource is a policy serialized to disk and accessed via path.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the location of a serialized policy.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"path"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicySource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SchedulerPolicySource configures a means to obtain a scheduler Policy. One source field must be specified, and source fields are mutually exclusive.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "file": { + SchemaProps: spec.SchemaProps{ + Description: "File is a file policy source.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyFileSource"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap is a config map policy source.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyConfigMapSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyConfigMapSource", "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyFileSource"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeSchedulerConfiguration configures a scheduler", + 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: "", + }, + }, + "leaderElection": { + SchemaProps: spec.SchemaProps{ + Description: "LeaderElection defines the configuration of leader election client.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerLeaderElectionConfiguration"), + }, + }, + "clientConnection": { + SchemaProps: spec.SchemaProps{ + Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + }, + }, + "healthzBindAddress": { + SchemaProps: spec.SchemaProps{ + Description: "HealthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10251", + Type: []string{"string"}, + Format: "", + }, + }, + "metricsBindAddress": { + SchemaProps: spec.SchemaProps{ + Description: "MetricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 0.0.0.0:10251.", + Type: []string{"string"}, + Format: "", + }, + }, + "enableProfiling": { + SchemaProps: spec.SchemaProps{ + Description: "enableProfiling enables profiling via web interface host:port/debug/pprof/", + Type: []string{"boolean"}, + Format: "", + }, + }, + "enableContentionProfiling": { + SchemaProps: spec.SchemaProps{ + Description: "enableContentionProfiling enables lock contention profiling, if enableProfiling is true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "disablePreemption": { + SchemaProps: spec.SchemaProps{ + Description: "DisablePreemption disables the pod preemption feature.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "percentageOfNodesToScore": { + SchemaProps: spec.SchemaProps{ + Description: "PercentageOfNodeToScore is the percentage of all nodes that once found feasible for running a pod, the scheduler stops its search for more feasible nodes in the cluster. This helps improve scheduler's performance. Scheduler always tries to find at least \"minFeasibleNodesToFind\" feasible nodes no matter what the value of this flag is. Example: if the cluster size is 500 nodes and the value of this flag is 30, then scheduler stops finding further feasible nodes once it finds 150 feasible ones. When the value is 0, default percentage (5%--50% based on the size of the cluster) of the nodes will be scored.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "bindTimeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Duration to wait for a binding operation to complete before timing out Value must be non-negative integer. The value zero indicates no waiting. If this value is nil, the default value will be used.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "podInitialBackoffSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "PodInitialBackoffSeconds is the initial backoff for unschedulable pods. If specified, it must be greater than 0. If this value is null, the default value (1s) will be used.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "podMaxBackoffSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "PodMaxBackoffSeconds is the max backoff for unschedulable pods. If specified, it must be greater than podInitialBackoffSeconds. If this value is null, the default value (10s) will be used.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "profiles": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "schedulerName", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Profiles are scheduling profiles that kube-scheduler supports. Pods can choose to be scheduled under a particular profile by setting its associated scheduler name. Pods that don't specify any scheduler name are scheduled with the \"default-scheduler\" profile, if present here.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerProfile"), + }, + }, + }, + }, + }, + "extenders": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Extenders are the list of scheduler extenders, each holding the values of how to communicate with the extender. These extenders are shared by all scheduler profiles.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1.Extender"), + }, + }, + }, + }, + }, + }, + Required: []string{"leaderElection", "clientConnection", "bindTimeoutSeconds", "podInitialBackoffSeconds", "podMaxBackoffSeconds", "profiles", "extenders"}, + }, + }, + Dependencies: []string{ + "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/kube-scheduler/config/v1.Extender", "k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerLeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerProfile"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerLeaderElectionConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeSchedulerLeaderElectionConfiguration expands LeaderElectionConfiguration to include scheduler specific configuration.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "leaderElect": { + SchemaProps: spec.SchemaProps{ + Description: "leaderElect enables a leader election client to gain leadership before executing the main loop. Enable this when running replicated components for high availability.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "leaseDuration": { + SchemaProps: spec.SchemaProps{ + Description: "leaseDuration is the duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "renewDeadline": { + SchemaProps: spec.SchemaProps{ + Description: "renewDeadline is the interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration. This is only applicable if leader election is enabled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "retryPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "retryPeriod is the duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "resourceLock": { + SchemaProps: spec.SchemaProps{ + Description: "resourceLock indicates the resource object type that will be used to lock during leader election cycles.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceName": { + SchemaProps: spec.SchemaProps{ + Description: "resourceName indicates the name of resource object that will be used to lock during leader election cycles.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "resourceName indicates the namespace of resource object that will be used to lock during leader election cycles.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"leaderElect", "leaseDuration", "renewDeadline", "retryPeriod", "resourceLock", "resourceName", "resourceNamespace"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeSchedulerProfile is a scheduling profile.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "schedulerName": { + SchemaProps: spec.SchemaProps{ + Description: "SchedulerName is the name of the scheduler associated to this profile. If SchedulerName matches with the pod's \"spec.schedulerName\", then the pod is scheduled with this profile.", + Type: []string{"string"}, + Format: "", + }, + }, + "plugins": { + SchemaProps: spec.SchemaProps{ + Description: "Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and PluginConfig must be specified for all profiles.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.Plugins"), + }, + }, + "pluginConfig": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "PluginConfig is an optional set of custom plugin arguments for each plugin. Omitting config args for a plugin is equivalent to using the default config for that plugin.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginConfig"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1alpha2.PluginConfig", "k8s.io/kube-scheduler/config/v1alpha2.Plugins"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha2_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name defines the name of plugin", + Type: []string{"string"}, + Format: "", + }, + }, + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "Weight defines the weight of plugin, only used for Score plugins.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha2_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. It is up to the plugin to process these Args.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name defines the name of plugin being configured", + Type: []string{"string"}, + Format: "", + }, + }, + "args": { + SchemaProps: spec.SchemaProps{ + Description: "Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.Unknown"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha2_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PluginSet specifies enabled and disabled plugins for an extension point. If an array is empty, missing, or nil, default plugins at that extension point will be used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Enabled specifies plugins that should be enabled in addition to default plugins. These are called after default plugins and in the same order specified here.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.Plugin"), + }, + }, + }, + }, + }, + "disabled": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Disabled specifies default plugins that should be disabled. When all default plugins need to be disabled, an array containing only one \"*\" should be provided.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.Plugin"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1alpha2.Plugin"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1alpha2_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Plugins include multiple extension points. When specified, the list of plugins for a particular extension point are the only ones enabled. If an extension point is omitted from the config, then the default set of plugins is used for that extension point. Enabled plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "queueSort": { + SchemaProps: spec.SchemaProps{ + Description: "QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + "preFilter": { + SchemaProps: spec.SchemaProps{ + Description: "PreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + "filter": { + SchemaProps: spec.SchemaProps{ + Description: "Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + "preScore": { + SchemaProps: spec.SchemaProps{ + Description: "PreScore is a list of plugins that are invoked before scoring.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + "score": { + SchemaProps: spec.SchemaProps{ + Description: "Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + "reserve": { + SchemaProps: spec.SchemaProps{ + Description: "Reserve is a list of plugins invoked when reserving a node to run the pod.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + "permit": { + SchemaProps: spec.SchemaProps{ + Description: "Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + "preBind": { + SchemaProps: spec.SchemaProps{ + Description: "PreBind is a list of plugins that should be invoked before a pod is bound.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + "bind": { + SchemaProps: spec.SchemaProps{ + Description: "Bind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework. The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + "postBind": { + SchemaProps: spec.SchemaProps{ + Description: "PostBind is a list of plugins that should be invoked after a pod is successfully bound.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + "unreserve": { + SchemaProps: spec.SchemaProps{ + Description: "Unreserve is a list of plugins invoked when a pod that was previously reserved is rejected in a later phase.", + Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1alpha2.PluginSet"}, + } +} + +func schema_k8sio_kubelet_config_v1beta1_KubeletAnonymousAuthentication(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled allows anonymous requests to the kubelet server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_kubelet_config_v1beta1_KubeletAuthentication(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "x509": { + SchemaProps: spec.SchemaProps{ + Description: "x509 contains settings related to x509 client certificate authentication", + Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletX509Authentication"), + }, + }, + "webhook": { + SchemaProps: spec.SchemaProps{ + Description: "webhook contains settings related to webhook bearer token authentication", + Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication"), + }, + }, + "anonymous": { + SchemaProps: spec.SchemaProps{ + Description: "anonymous contains settings related to anonymous authentication", + Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletX509Authentication"}, + } +} + +func schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "mode is the authorization mode to apply to requests to the kubelet server. Valid values are AlwaysAllow and Webhook. Webhook mode uses the SubjectAccessReview API to determine authorization.", + Type: []string{"string"}, + Format: "", + }, + }, + "webhook": { + SchemaProps: spec.SchemaProps{ + Description: "webhook contains settings related to Webhook authorization.", + Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization"}, + } +} + +func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeletConfiguration contains the configuration for the Kubelet", + 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: "", + }, + }, + "staticPodPath": { + SchemaProps: spec.SchemaProps{ + Description: "staticPodPath is the path to the directory containing local (static) pods to run, or the path to a single static pod file. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that the set of static pods specified at the new path may be different than the ones the Kubelet initially started with, and this may disrupt your node. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "syncFrequency": { + SchemaProps: spec.SchemaProps{ + Description: "syncFrequency is the max period between synchronizing running containers and config. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that shortening this duration may have a negative performance impact, especially as the number of Pods on the node increases. Alternatively, increasing this duration will result in longer refresh times for ConfigMaps and Secrets. Default: \"1m\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "fileCheckFrequency": { + SchemaProps: spec.SchemaProps{ + Description: "fileCheckFrequency is the duration between checking config files for new data Dynamic Kubelet Config (beta): If dynamically updating this field, consider that shortening the duration will cause the Kubelet to reload local Static Pod configurations more frequently, which may have a negative performance impact. Default: \"20s\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "httpCheckFrequency": { + SchemaProps: spec.SchemaProps{ + Description: "httpCheckFrequency is the duration between checking http for new data Dynamic Kubelet Config (beta): If dynamically updating this field, consider that shortening the duration will cause the Kubelet to poll staticPodURL more frequently, which may have a negative performance impact. Default: \"20s\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "staticPodURL": { + SchemaProps: spec.SchemaProps{ + Description: "staticPodURL is the URL for accessing static pods to run Dynamic Kubelet Config (beta): If dynamically updating this field, consider that the set of static pods specified at the new URL may be different than the ones the Kubelet initially started with, and this may disrupt your node. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "staticPodURLHeader": { + SchemaProps: spec.SchemaProps{ + Description: "staticPodURLHeader is a map of slices with HTTP headers to use when accessing the podURL Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt the ability to read the latest set of static pods from StaticPodURL. Default: nil", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + "address": { + SchemaProps: spec.SchemaProps{ + Description: "address is the IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces). Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"0.0.0.0\"", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "port is the port for the Kubelet to serve on. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: 10250", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readOnlyPort": { + SchemaProps: spec.SchemaProps{ + Description: "readOnlyPort is the read-only port for the Kubelet to serve on with no authentication/authorization. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: 0 (disabled)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "tlsCertFile": { + SchemaProps: spec.SchemaProps{ + Description: "tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If tlsCertFile and tlsPrivateKeyFile are not provided, a self-signed certificate and key are generated for the public address and saved to the directory passed to the Kubelet's --cert-dir flag. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "tlsPrivateKeyFile": { + SchemaProps: spec.SchemaProps{ + Description: "tlsPrivateKeyFile is the file containing x509 private key matching tlsCertFile Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "tlsCipherSuites": { + SchemaProps: spec.SchemaProps{ + Description: "TLSCipherSuites is the list of allowed cipher suites for the server. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: nil", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tlsMinVersion": { + SchemaProps: spec.SchemaProps{ + Description: "TLSMinVersion is the minimum TLS version supported. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "rotateCertificates": { + SchemaProps: spec.SchemaProps{ + Description: "rotateCertificates enables client certificate rotation. The Kubelet will request a new certificate from the certificates.k8s.io API. This requires an approver to approve the certificate signing requests. The RotateKubeletClientCertificate feature must be enabled. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that disabling it may disrupt the Kubelet's ability to authenticate with the API server after the current certificate expires. Default: false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "serverTLSBootstrap": { + SchemaProps: spec.SchemaProps{ + Description: "serverTLSBootstrap enables server certificate bootstrap. Instead of self signing a serving certificate, the Kubelet will request a certificate from the certificates.k8s.io API. This requires an approver to approve the certificate signing requests. The RotateKubeletServerCertificate feature must be enabled. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that disabling it will stop the renewal of Kubelet server certificates, which can disrupt components that interact with the Kubelet server in the long term, due to certificate expiration. Default: false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "authentication": { + SchemaProps: spec.SchemaProps{ + Description: "authentication specifies how requests to the Kubelet's server are authenticated Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Defaults:\n anonymous:\n enabled: false\n webhook:\n enabled: true\n cacheTTL: \"2m\"", + Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletAuthentication"), + }, + }, + "authorization": { + SchemaProps: spec.SchemaProps{ + Description: "authorization specifies how requests to the Kubelet's server are authorized Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Defaults:\n mode: Webhook\n webhook:\n cacheAuthorizedTTL: \"5m\"\n cacheUnauthorizedTTL: \"30s\"", + Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletAuthorization"), + }, + }, + "registryPullQPS": { + SchemaProps: spec.SchemaProps{ + Description: "registryPullQPS is the limit of registry pulls per second. Set to 0 for no limit. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by image pulls. Default: 5", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "registryBurst": { + SchemaProps: spec.SchemaProps{ + Description: "registryBurst is the maximum size of bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registryPullQPS. Only used if registryPullQPS > 0. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by image pulls. Default: 10", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "eventRecordQPS": { + SchemaProps: spec.SchemaProps{ + Description: "eventRecordQPS is the maximum event creations per second. If 0, there is no limit enforced. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by event creations. Default: 5", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "eventBurst": { + SchemaProps: spec.SchemaProps{ + Description: "eventBurst is the maximum size of a burst of event creations, temporarily allows event creations to burst to this number, while still not exceeding eventRecordQPS. Only used if eventRecordQPS > 0. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by event creations. Default: 10", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "enableDebuggingHandlers": { + SchemaProps: spec.SchemaProps{ + Description: "enableDebuggingHandlers enables server endpoints for log access and local running of containers and commands, including the exec, attach, logs, and portforward features. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that disabling it may disrupt components that interact with the Kubelet server. Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "enableContentionProfiling": { + SchemaProps: spec.SchemaProps{ + Description: "enableContentionProfiling enables lock contention profiling, if enableDebuggingHandlers is true. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that enabling it may carry a performance impact. Default: false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "healthzPort": { + SchemaProps: spec.SchemaProps{ + Description: "healthzPort is the port of the localhost healthz endpoint (set to 0 to disable) Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that monitor Kubelet health. Default: 10248", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "healthzBindAddress": { + SchemaProps: spec.SchemaProps{ + Description: "healthzBindAddress is the IP address for the healthz server to serve on Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that monitor Kubelet health. Default: \"127.0.0.1\"", + Type: []string{"string"}, + Format: "", + }, + }, + "oomScoreAdj": { + SchemaProps: spec.SchemaProps{ + Description: "oomScoreAdj is The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000]. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact the stability of nodes under memory pressure. Default: -999", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "clusterDomain": { + SchemaProps: spec.SchemaProps{ + Description: "clusterDomain is the DNS domain for this cluster. If set, kubelet will configure all containers to search this domain in addition to the host's search domains. Dynamic Kubelet Config (beta): Dynamically updating this field is not recommended, as it should be kept in sync with the rest of the cluster. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "clusterDNS": { + SchemaProps: spec.SchemaProps{ + Description: "clusterDNS is a list of IP addresses for the cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution instead of the host's DNS servers. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changes will only take effect on Pods created after the update. Draining the node is recommended before changing this field. Default: nil", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "streamingConnectionIdleTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "streamingConnectionIdleTimeout is the maximum time a streaming connection can be idle before the connection is automatically closed. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact components that rely on infrequent updates over streaming connections to the Kubelet server. Default: \"4h\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "nodeStatusUpdateFrequency": { + SchemaProps: spec.SchemaProps{ + Description: "nodeStatusUpdateFrequency is the frequency that kubelet computes node status. If node lease feature is not enabled, it is also the frequency that kubelet posts node status to master. Note: When node lease feature is not enabled, be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact node scalability, and also that the node controller's nodeMonitorGracePeriod must be set to N*NodeStatusUpdateFrequency, where N is the number of retries before the node controller marks the node unhealthy. Default: \"10s\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "nodeStatusReportFrequency": { + SchemaProps: spec.SchemaProps{ + Description: "nodeStatusReportFrequency is the frequency that kubelet posts node status to master if node status does not change. Kubelet will ignore this frequency and post node status immediately if any change is detected. It is only used when node lease feature is enabled. nodeStatusReportFrequency's default value is 1m. But if nodeStatusUpdateFrequency is set explicitly, nodeStatusReportFrequency's default value will be set to nodeStatusUpdateFrequency for backward compatibility. Default: \"1m\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "nodeLeaseDurationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "nodeLeaseDurationSeconds is the duration the Kubelet will set on its corresponding Lease, when the NodeLease feature is enabled. This feature provides an indicator of node health by having the Kubelet create and periodically renew a lease, named after the node, in the kube-node-lease namespace. If the lease expires, the node can be considered unhealthy. The lease is currently renewed every 10s, per KEP-0009. In the future, the lease renewal interval may be set based on the lease duration. Requires the NodeLease feature gate to be enabled. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that decreasing the duration may reduce tolerance for issues that temporarily prevent the Kubelet from renewing the lease (e.g. a short-lived network issue). Default: 40", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "imageMinimumGCAge": { + SchemaProps: spec.SchemaProps{ + Description: "imageMinimumGCAge is the minimum age for an unused image before it is garbage collected. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: \"2m\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "imageGCHighThresholdPercent": { + SchemaProps: spec.SchemaProps{ + Description: "imageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run. The percent is calculated as this field value out of 100. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: 85", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "imageGCLowThresholdPercent": { + SchemaProps: spec.SchemaProps{ + Description: "imageGCLowThresholdPercent is the percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to. The percent is calculated as this field value out of 100. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: 80", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "volumeStatsAggPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "How frequently to calculate and cache volume disk usage for all pods Dynamic Kubelet Config (beta): If dynamically updating this field, consider that shortening the period may carry a performance impact. Default: \"1m\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "kubeletCgroups": { + SchemaProps: spec.SchemaProps{ + Description: "kubeletCgroups is the absolute name of cgroups to isolate the kubelet in Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "systemCgroups": { + SchemaProps: spec.SchemaProps{ + Description: "systemCgroups is absolute name of cgroups in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "cgroupRoot": { + SchemaProps: spec.SchemaProps{ + Description: "cgroupRoot is the root cgroup to use for pods. This is handled by the container runtime on a best effort basis. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "cgroupsPerQOS": { + SchemaProps: spec.SchemaProps{ + Description: "Enable QoS based Cgroup hierarchy: top level cgroups for QoS Classes And all Burstable and BestEffort pods are brought up under their specific top level QoS cgroup. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "cgroupDriver": { + SchemaProps: spec.SchemaProps{ + Description: "driver that the kubelet uses to manipulate cgroups on the host (cgroupfs or systemd) Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"cgroupfs\"", + Type: []string{"string"}, + Format: "", + }, + }, + "cpuManagerPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "CPUManagerPolicy is the name of the policy to use. Requires the CPUManager feature gate to be enabled. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"none\"", + Type: []string{"string"}, + Format: "", + }, + }, + "cpuManagerReconcilePeriod": { + SchemaProps: spec.SchemaProps{ + Description: "CPU Manager reconciliation period. Requires the CPUManager feature gate to be enabled. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that shortening the period may carry a performance impact. Default: \"10s\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "topologyManagerPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "TopologyManagerPolicy is the name of the policy to use. Policies other than \"none\" require the TopologyManager feature gate to be enabled. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"none\"", + Type: []string{"string"}, + Format: "", + }, + }, + "qosReserved": { + SchemaProps: spec.SchemaProps{ + Description: "qosReserved is a set of resource name to percentage pairs that specify the minimum percentage of a resource reserved for exclusive use by the guaranteed QoS tier. Currently supported resources: \"memory\" Requires the QOSReserved feature gate to be enabled. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: nil", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "runtimeRequestTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "runtimeRequestTimeout is the timeout for all runtime requests except long running requests - pull, logs, exec and attach. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"2m\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "hairpinMode": { + SchemaProps: spec.SchemaProps{ + Description: "hairpinMode specifies how the Kubelet should configure the container bridge for hairpin packets. Setting this flag allows endpoints in a Service to loadbalance back to themselves if they should try to access their own Service. Values:\n \"promiscuous-bridge\": make the container bridge promiscuous.\n \"hairpin-veth\": set the hairpin flag on container veth interfaces.\n \"none\": do nothing.\nGenerally, one must set --hairpin-mode=hairpin-veth to achieve hairpin NAT, because promiscuous-bridge assumes the existence of a container bridge named cbr0. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may require a node reboot, depending on the network plugin. Default: \"promiscuous-bridge\"", + Type: []string{"string"}, + Format: "", + }, + }, + "maxPods": { + SchemaProps: spec.SchemaProps{ + Description: "maxPods is the number of pods that can run on this Kubelet. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changes may cause Pods to fail admission on Kubelet restart, and may change the value reported in Node.Status.Capacity[v1.ResourcePods], thus affecting future scheduling decisions. Increasing this value may also decrease performance, as more Pods can be packed into a single node. Default: 110", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "podCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. Dynamic Kubelet Config (beta): This field should always be set to the empty default. It should only set for standalone Kubelets, which cannot use Dynamic Kubelet Config. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "podPidsLimit": { + SchemaProps: spec.SchemaProps{ + Description: "PodPidsLimit is the maximum number of pids in any pod. Requires the SupportPodPidsLimit feature gate to be enabled. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that lowering it may prevent container processes from forking after the change. Default: -1", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "resolvConf": { + SchemaProps: spec.SchemaProps{ + Description: "ResolverConfig is the resolver configuration file used as the basis for the container DNS resolution configuration. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changes will only take effect on Pods created after the update. Draining the node is recommended before changing this field. Default: \"/etc/resolv.conf\"", + Type: []string{"string"}, + Format: "", + }, + }, + "cpuCFSQuota": { + SchemaProps: spec.SchemaProps{ + Description: "cpuCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that disabling it may reduce node stability. Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "cpuCFSQuotaPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "CPUCFSQuotaPeriod is the CPU CFS quota period value, cpu.cfs_period_us. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that limits set for containers will result in different cpu.cfs_quota settings. This will trigger container restarts on the node being reconfigured. Default: \"100ms\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "maxOpenFiles": { + SchemaProps: spec.SchemaProps{ + Description: "maxOpenFiles is Number of files that can be opened by Kubelet process. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact the ability of the Kubelet to interact with the node's filesystem. Default: 1000000", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "contentType": { + SchemaProps: spec.SchemaProps{ + Description: "contentType is contentType of requests sent to apiserver. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact the ability for the Kubelet to communicate with the API server. If the Kubelet loses contact with the API server due to a change to this field, the change cannot be reverted via dynamic Kubelet config. Default: \"application/vnd.kubernetes.protobuf\"", + Type: []string{"string"}, + Format: "", + }, + }, + "kubeAPIQPS": { + SchemaProps: spec.SchemaProps{ + Description: "kubeAPIQPS is the QPS to use while talking with kubernetes apiserver Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic the Kubelet sends to the API server. Default: 5", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "kubeAPIBurst": { + SchemaProps: spec.SchemaProps{ + Description: "kubeAPIBurst is the burst to allow while talking with kubernetes apiserver Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic the Kubelet sends to the API server. Default: 10", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "serializeImagePulls": { + SchemaProps: spec.SchemaProps{ + Description: "serializeImagePulls when enabled, tells the Kubelet to pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact the performance of image pulls. Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "evictionHard": { + SchemaProps: spec.SchemaProps{ + Description: "Map of signal names to quantities that defines hard eviction thresholds. For example: {\"memory.available\": \"300Mi\"}. To explicitly disable, pass a 0% or 100% threshold on an arbitrary resource. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay Pod evictions. Default:\n memory.available: \"100Mi\"\n nodefs.available: \"10%\"\n nodefs.inodesFree: \"5%\"\n imagefs.available: \"15%\"", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "evictionSoft": { + SchemaProps: spec.SchemaProps{ + Description: "Map of signal names to quantities that defines soft eviction thresholds. For example: {\"memory.available\": \"300Mi\"}. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay Pod evictions, and may change the allocatable reported by the node. Default: nil", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "evictionSoftGracePeriod": { + SchemaProps: spec.SchemaProps{ + Description: "Map of signal names to quantities that defines grace periods for each soft eviction signal. For example: {\"memory.available\": \"30s\"}. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay Pod evictions. Default: nil", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "evictionPressureTransitionPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that lowering it may decrease the stability of the node when the node is overcommitted. Default: \"5m\"", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "evictionMaxPodGracePeriod": { + SchemaProps: spec.SchemaProps{ + Description: "Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met. This value effectively caps the Pod's TerminationGracePeriodSeconds value during soft evictions. Note: Due to issue #64530, the behavior has a bug where this value currently just overrides the grace period during soft eviction, which can increase the grace period from what is set on the Pod. This bug will be fixed in a future release. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that lowering it decreases the amount of time Pods will have to gracefully clean up before being killed during a soft eviction. Default: 0", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "evictionMinimumReclaim": { + SchemaProps: spec.SchemaProps{ + Description: "Map of signal names to quantities that defines minimum reclaims, which describe the minimum amount of a given resource the kubelet will reclaim when performing a pod eviction while that resource is under pressure. For example: {\"imagefs.available\": \"2Gi\"} Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may change how well eviction can manage resource pressure. Default: nil", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "podsPerCore": { + SchemaProps: spec.SchemaProps{ + Description: "podsPerCore is the maximum number of pods per core. Cannot exceed MaxPods. If 0, this field is ignored. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changes may cause Pods to fail admission on Kubelet restart, and may change the value reported in Node.Status.Capacity[v1.ResourcePods], thus affecting future scheduling decisions. Increasing this value may also decrease performance, as more Pods can be packed into a single node. Default: 0", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "enableControllerAttachDetach": { + SchemaProps: spec.SchemaProps{ + Description: "enableControllerAttachDetach enables the Attach/Detach controller to manage attachment/detachment of volumes scheduled to this node, and disables kubelet from executing any attach/detach operations Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changing which component is responsible for volume management on a live node may result in volumes refusing to detach if the node is not drained prior to the update, and if Pods are scheduled to the node before the volumes.kubernetes.io/controller-managed-attach-detach annotation is updated by the Kubelet. In general, it is safest to leave this value set the same as local config. Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "protectKernelDefaults": { + SchemaProps: spec.SchemaProps{ + Description: "protectKernelDefaults, if true, causes the Kubelet to error if kernel flags are not as it expects. Otherwise the Kubelet will attempt to modify kernel flags to match its expectation. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that enabling it may cause the Kubelet to crash-loop if the Kernel is not configured as Kubelet expects. Default: false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "makeIPTablesUtilChains": { + SchemaProps: spec.SchemaProps{ + Description: "If true, Kubelet ensures a set of iptables rules are present on host. These rules will serve as utility rules for various components, e.g. KubeProxy. The rules will be created based on IPTablesMasqueradeBit and IPTablesDropBit. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that disabling it will prevent the Kubelet from healing locally misconfigured iptables rules. Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "iptablesMasqueradeBit": { + SchemaProps: spec.SchemaProps{ + Description: "iptablesMasqueradeBit is the bit of the iptables fwmark space to mark for SNAT Values must be within the range [0, 31]. Must be different from other mark bits. Warning: Please match the value of the corresponding parameter in kube-proxy. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it needs to be coordinated with other components, like kube-proxy, and the update will only be effective if MakeIPTablesUtilChains is enabled. Default: 14", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "iptablesDropBit": { + SchemaProps: spec.SchemaProps{ + Description: "iptablesDropBit is the bit of the iptables fwmark space to mark for dropping packets. Values must be within the range [0, 31]. Must be different from other mark bits. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it needs to be coordinated with other components, like kube-proxy, and the update will only be effective if MakeIPTablesUtilChains is enabled. Default: 15", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "featureGates": { + SchemaProps: spec.SchemaProps{ + Description: "featureGates is a map of feature names to bools that enable or disable alpha/experimental features. This field modifies piecemeal the built-in default values from \"k8s.io/kubernetes/pkg/features/kube_features.go\". Dynamic Kubelet Config (beta): If dynamically updating this field, consider the documentation for the features you are enabling or disabling. While we encourage feature developers to make it possible to dynamically enable and disable features, some changes may require node reboots, and some features may require careful coordination to retroactively disable. Default: nil", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + "failSwapOn": { + SchemaProps: spec.SchemaProps{ + Description: "failSwapOn tells the Kubelet to fail to start if swap is enabled on the node. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that setting it to true will cause the Kubelet to crash-loop if swap is enabled. Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "containerLogMaxSize": { + SchemaProps: spec.SchemaProps{ + Description: "A quantity defines the maximum size of the container log file before it is rotated. For example: \"5Mi\" or \"256Ki\". Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger log rotation. Default: \"10Mi\"", + Type: []string{"string"}, + Format: "", + }, + }, + "containerLogMaxFiles": { + SchemaProps: spec.SchemaProps{ + Description: "Maximum number of container log files that can be present for a container. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that lowering it may cause log files to be deleted. Default: 5", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "configMapAndSecretChangeDetectionStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapAndSecretChangeDetectionStrategy is a mode in which config map and secret managers are running. Default: \"Watch\"", + Type: []string{"string"}, + Format: "", + }, + }, + "systemReserved": { + SchemaProps: spec.SchemaProps{ + Description: "systemReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for non-kubernetes components. Currently only cpu and memory are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may not be possible to increase the reserved resources, because this requires resizing cgroups. Always look for a NodeAllocatableEnforced event after updating this field to ensure that the update was successful. Default: nil", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "kubeReserved": { + SchemaProps: spec.SchemaProps{ + Description: "A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for kubernetes system components. Currently cpu, memory and local storage for root file system are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may not be possible to increase the reserved resources, because this requires resizing cgroups. Always look for a NodeAllocatableEnforced event after updating this field to ensure that the update was successful. Default: nil", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "reservedSystemCPUs": { + SchemaProps: spec.SchemaProps{ + Description: "This ReservedSystemCPUs option specifies the cpu list reserved for the host level system threads and kubernetes related threads. This provide a \"static\" CPU list rather than the \"dynamic\" list by system-reserved and kube-reserved. This option overwrites CPUs provided by system-reserved and kube-reserved.", + Type: []string{"string"}, + Format: "", + }, + }, + "showHiddenMetricsForVersion": { + SchemaProps: spec.SchemaProps{ + Description: "The previous version for which you want to show hidden metrics. Only the previous minor version is meaningful, other values will not be allowed. The format is ., e.g.: '1.16'. The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, rather than being surprised when they are permanently removed in the release after that. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "systemReservedCgroup": { + SchemaProps: spec.SchemaProps{ + Description: "This flag helps kubelet identify absolute name of top level cgroup used to enforce `SystemReserved` compute resource reservation for OS system daemons. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "kubeReservedCgroup": { + SchemaProps: spec.SchemaProps{ + Description: "This flag helps kubelet identify absolute name of top level cgroup used to enforce `KubeReserved` compute resource reservation for Kubernetes node system daemons. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "enforceNodeAllocatable": { + SchemaProps: spec.SchemaProps{ + Description: "This flag specifies the various Node Allocatable enforcements that Kubelet needs to perform. This flag accepts a list of options. Acceptable options are `none`, `pods`, `system-reserved` & `kube-reserved`. If `none` is specified, no other options may be specified. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that removing enforcements may reduce the stability of the node. Alternatively, adding enforcements may reduce the stability of components which were using more than the reserved amount of resources; for example, enforcing kube-reserved may cause Kubelets to OOM if it uses more than the reserved resources, and enforcing system-reserved may cause system daemons to OOM if they use more than the reserved resources. Default: [\"pods\"]", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allowedUnsafeSysctls": { + SchemaProps: spec.SchemaProps{ + Description: "A comma separated whitelist of unsafe sysctls or sysctl patterns (ending in *). Unsafe sysctl groups are kernel.shm*, kernel.msg*, kernel.sem, fs.mqueue.*, and net.*. These sysctls are namespaced but not allowed by default. For example: \"kernel.msg*,net.ipv4.route.min_pmtu\" Default: []", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kubelet/config/v1beta1.KubeletAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletAuthorization"}, + } +} + +func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled allows bearer token authentication backed by the tokenreviews.authentication.k8s.io API", + Type: []string{"boolean"}, + Format: "", + }, + }, + "cacheTTL": { + SchemaProps: spec.SchemaProps{ + Description: "cacheTTL enables caching of authentication results", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cacheAuthorizedTTL": { + SchemaProps: spec.SchemaProps{ + Description: "cacheAuthorizedTTL is the duration to cache 'authorized' responses from the webhook authorizer.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "cacheUnauthorizedTTL": { + SchemaProps: spec.SchemaProps{ + Description: "cacheUnauthorizedTTL is the duration to cache 'unauthorized' responses from the webhook authorizer.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kubelet_config_v1beta1_KubeletX509Authentication(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clientCAFile": { + SchemaProps: spec.SchemaProps{ + Description: "clientCAFile is the path to a PEM-encoded certificate bundle. If set, any request presenting a client certificate signed by one of the authorities in the bundle is authenticated with a username corresponding to the CommonName, and groups corresponding to the Organization in the client certificate.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SerializedNodeConfigSource allows us to serialize v1.NodeConfigSource. This type is used internally by the Kubelet for tracking checkpointed dynamic configs. It exists in the kubeletconfig API group because it is classified as a versioned input to the Kubelet.", + 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: "", + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source is the source that we are serializing", + Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeConfigSource"}, + } +} + +func schema_app_apis_config_v1alpha1_CloudControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + 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: "", + }, + }, + "Generic": { + SchemaProps: spec.SchemaProps{ + Description: "Generic holds configuration for a generic controller-manager", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), + }, + }, + "KubeCloudShared": { + SchemaProps: spec.SchemaProps{ + Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.KubeCloudSharedConfiguration"), + }, + }, + "ServiceController": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ServiceControllerConfiguration"), + }, + }, + "NodeStatusUpdateFrequency": { + SchemaProps: spec.SchemaProps{ + Description: "NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"Generic", "KubeCloudShared", "ServiceController", "NodeStatusUpdateFrequency"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.GenericControllerManagerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ServiceControllerConfiguration"}, + } +} + +func schema_pkg_apis_abac_v1beta1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Policy contains a single ABAC policy rule", + 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: "", + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec describes the policy rule", + Ref: ref("k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec"}, + } +} + +func schema_pkg_apis_abac_v1beta1_PolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicySpec contains the attributes for a policy rule", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "user": { + SchemaProps: spec.SchemaProps{ + Description: "User is the username this rule applies to. Either user or group is required to match the request. \"*\" matches all users.", + Type: []string{"string"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group is the group this rule applies to. Either user or group is required to match the request. \"*\" matches all groups.", + Type: []string{"string"}, + Format: "", + }, + }, + "readonly": { + SchemaProps: spec.SchemaProps{ + Description: "Readonly matches readonly requests when true, and all requests when false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the name of an API group. APIGroup, Resource, and Namespace are required to match resource requests. \"*\" matches all API groups", + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Resource is the name of a resource. APIGroup, Resource, and Namespace are required to match resource requests. \"*\" matches all resources", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the name of a namespace. APIGroup, Resource, and Namespace are required to match resource requests. \"*\" matches all namespaces (including unnamespaced requests)", + Type: []string{"string"}, + Format: "", + }, + }, + "nonResourcePath": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourcePath matches non-resource request paths. \"*\" matches all paths \"/foo/*\" matches all subpaths of foo", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_custom_metrics_v1beta1_MetricListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricListOptions is used to select metrics by their label selectors", + 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: "", + }, + }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + Type: []string{"string"}, + Format: "", + }, + }, + "metricLabelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A selector to restrict the list of returned metrics by their labels", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricValue is a metric value for some object", + 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: "", + }, + }, + "describedObject": { + SchemaProps: spec.SchemaProps{ + Description: "a reference to the described object", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "the name of the metric", + Type: []string{"string"}, + Format: "", + }, + }, + "timestamp": { + SchemaProps: spec.SchemaProps{ + Description: "indicates the time at which the metrics were produced", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "window": { + SchemaProps: spec.SchemaProps{ + Description: "indicates the window ([Timestamp-Window, Timestamp]) from which these metrics were calculated, when returning rate metrics calculated from cumulative metrics (or zero for non-calculated instantaneous metrics).", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "the value of the metric for this", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector represents the label selector that could be used to select this metric, and will generally just be the selector passed in to the query used to fetch this metric. When left blank, only the metric's Name will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"describedObject", "metricName", "timestamp", "value"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricValueList is a list of values for a given metric for some set of objects", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "the value of the metric across the described objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue"}, + } +} + +func schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricIdentifier identifies a metric by name and, optionally, selector", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the given metric", + Type: []string{"string"}, + Format: "", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector represents the label selector that could be used to select this metric, and will generally just be the selector passed in to the query used to fetch this metric. When left blank, only the metric's Name will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_pkg_apis_custom_metrics_v1beta2_MetricListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricListOptions is used to select metrics by their label selectors", + 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: "", + }, + }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + Type: []string{"string"}, + Format: "", + }, + }, + "metricLabelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A selector to restrict the list of returned metrics by their labels", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricValue is the metric value for some object", + 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: "", + }, + }, + "describedObject": { + SchemaProps: spec.SchemaProps{ + Description: "a reference to the described object", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "metric": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier"), + }, + }, + "timestamp": { + SchemaProps: spec.SchemaProps{ + Description: "indicates the time at which the metrics were produced", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "windowSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "indicates the window ([Timestamp-Window, Timestamp]) from which these metrics were calculated, when returning rate metrics calculated from cumulative metrics (or zero for non-calculated instantaneous metrics).", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "the value of the metric for this", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"describedObject", "metric", "timestamp", "value"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier"}, + } +} + +func schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricValueList is a list of values for a given metric for some set of objects", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "the value of the metric across the described objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue"}, + } +} + +func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalMetricValue is a metric value for external metric A single metric value is identified by metric name and a set of string labels. For one metric there can be multiple values with different sets of labels.", + 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: "", + }, + }, + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "the name of the metric", + Type: []string{"string"}, + Format: "", + }, + }, + "metricLabels": { + SchemaProps: spec.SchemaProps{ + Description: "a set of labels that identify a single time series for the metric", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "timestamp": { + SchemaProps: spec.SchemaProps{ + Description: "indicates the time at which the metrics were produced", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "window": { + SchemaProps: spec.SchemaProps{ + Description: "indicates the window ([Timestamp-Window, Timestamp]) from which these metrics were calculated, when returning rate metrics calculated from cumulative metrics (or zero for non-calculated instantaneous metrics).", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "the value of the metric", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"metricName", "metricLabels", "timestamp", "value"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalMetricValueList is a list of values for a given metric for some set labels", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "value of the metric matching a given set of labels", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue"}, + } +} + +func schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerMetrics sets resource usage metrics of a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Container name corresponding to the one from pod.spec.containers.", + Type: []string{"string"}, + Format: "", + }, + }, + "usage": { + SchemaProps: spec.SchemaProps{ + Description: "The memory usage is the memory working set.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "usage"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeMetrics sets resource usage metrics of a node.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "timestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "window": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "usage": { + SchemaProps: spec.SchemaProps{ + Description: "The memory usage is the memory working set.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + Required: []string{"timestamp", "window", "usage"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeMetricsList is a list of NodeMetrics.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of node metrics.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics"}, + } +} + +func schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodMetrics sets resource usage metrics of a pod.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "timestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "window": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "containers": { + SchemaProps: spec.SchemaProps{ + Description: "Metrics for all containers are collected within the same time window.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics"), + }, + }, + }, + }, + }, + }, + Required: []string{"timestamp", "window", "containers"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics"}, + } +} + +func schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodMetricsList is a list of PodMetrics.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of pod metrics.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics"}, + } +} + +func schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerMetrics sets resource usage metrics of a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Container name corresponding to the one from pod.spec.containers.", + Type: []string{"string"}, + Format: "", + }, + }, + "usage": { + SchemaProps: spec.SchemaProps{ + Description: "The memory usage is the memory working set.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "usage"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeMetrics sets resource usage metrics of a node.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "timestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "window": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "usage": { + SchemaProps: spec.SchemaProps{ + Description: "The memory usage is the memory working set.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + Required: []string{"timestamp", "window", "usage"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeMetricsList is a list of NodeMetrics.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of node metrics.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics"}, + } +} + +func schema_pkg_apis_metrics_v1beta1_PodMetrics(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodMetrics sets resource usage metrics of a pod.", + 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{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "timestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "window": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "containers": { + SchemaProps: spec.SchemaProps{ + Description: "Metrics for all containers are collected within the same time window.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics"), + }, + }, + }, + }, + }, + }, + Required: []string{"timestamp", "window", "containers"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics"}, + } +} + +func schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodMetricsList is a list of PodMetrics.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of pod metrics.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics"}, + } +} From 326af03d411e9eaf8d0cf8cea8b715fa5fdaa570 Mon Sep 17 00:00:00 2001 From: David Festal Date: Wed, 11 Aug 2021 19:10:11 +0200 Subject: [PATCH 18/87] HACK: Add CRD tenancy... ...This commit hacks CRD tenancy by ensuring that logical clusters are taken in account in: - CRD-related controllers - APIServices-related controllers - Discovery + OpenAPI endpoints In the current Kubernetes design, those 3 areas are highly coupled and intricated, which explains why this commit had to hack the code at various levels: - client-go level - controllers level, - http handlers level. While this gives a detailed idea of which code needs to be touched in order to enable CRD tenancy, a clean implementation would first require some refactoring, in order to build the required abstraction layers that would allow decoupling those areas. In the current implementation, we ensure that the clusterName is managed consistently and do not allow any operation that involves (or results in) an object having an empty `clusterName` Signed-off-by: David Festal --- cmd/kube-apiserver/app/aggregator.go | 2 +- .../crdregistration_controller.go | 43 +- .../crdregistration_controller_test.go | 7 +- pkg/generated/openapi/zz_generated.openapi.go | 27125 ++++++++++------ pkg/genericcontrolplane/aggregator.go | 7 +- .../clientutils/multiclusterconfig.go | 157 + pkg/genericcontrolplane/server.go | 83 +- .../pkg/apiserver/apiserver.go | 6 +- .../pkg/apiserver/customresource_discovery.go | 75 +- .../customresource_discovery_controller.go | 53 +- .../pkg/apiserver/customresource_handler.go | 30 +- .../apiserver/customresource_handler_test.go | 26 +- .../establish/establishing_controller.go | 5 +- .../pkg/controller/finalizer/crd_finalizer.go | 5 +- .../pkg/controller/openapi/controller.go | 111 +- .../controller/status/naming_controller.go | 11 +- .../endpoints/discovery/storageversionhash.go | 4 +- .../pkg/endpoints/discovery/version.go | 4 +- .../pkg/endpoints/discovery/version_hack.go | 76 +- .../apiserver/pkg/endpoints/installer.go | 2 +- .../apiserver/pkg/server/genericapiserver.go | 11 +- .../k8s.io/apiserver/pkg/server/handler.go | 11 +- .../apiserver/pkg/server/mux/pathrecorder.go | 2 +- .../apiserver/pkg/server/routes/index.go | 14 +- .../apiserver/pkg/server/routes/openapi.go | 137 +- .../src/k8s.io/client-go/tools/cache/store.go | 11 +- .../k8s.io/client-go/tools/clusters/cache.go | 30 + .../pkg/apiserver/apiserver.go | 70 +- .../pkg/apiserver/apiservice_controller.go | 2 +- .../pkg/apiserver/handler_apis.go | 42 +- .../autoregister/autoregister_controller.go | 59 +- .../openapi/aggregator/aggregator.go | 2 +- test/e2e/apimachinery/discovery.go | 2 +- 33 files changed, 18612 insertions(+), 9613 deletions(-) create mode 100644 pkg/genericcontrolplane/clientutils/multiclusterconfig.go create mode 100644 staging/src/k8s.io/client-go/tools/clusters/cache.go diff --git a/cmd/kube-apiserver/app/aggregator.go b/cmd/kube-apiserver/app/aggregator.go index 581d236c857e2..d2fde0470dce2 100644 --- a/cmd/kube-apiserver/app/aggregator.go +++ b/cmd/kube-apiserver/app/aggregator.go @@ -286,7 +286,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{ func apiServicesToRegister(delegateAPIServer genericapiserver.DelegationTarget, registration autoregister.AutoAPIServiceRegistration) []*v1.APIService { apiServices := []*v1.APIService{} - for _, curr := range delegateAPIServer.ListedPaths() { + for _, curr := range delegateAPIServer.ListedPaths("") { if curr == "/api/v1" { apiService := makeAPIService(schema.GroupVersion{Group: "", Version: "v1"}) registration.AddAPIServiceToSyncOnStart(apiService) diff --git a/pkg/controlplane/controller/crdregistration/crdregistration_controller.go b/pkg/controlplane/controller/crdregistration/crdregistration_controller.go index 5ee06f6a74581..b9663f28eb9c1 100644 --- a/pkg/controlplane/controller/crdregistration/crdregistration_controller.go +++ b/pkg/controlplane/controller/crdregistration/crdregistration_controller.go @@ -20,6 +20,7 @@ import ( "fmt" "time" + "k8s.io/apiserver/pkg/endpoints/discovery" "k8s.io/klog/v2" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -27,10 +28,10 @@ import ( crdlisters "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/clusters" "k8s.io/client-go/util/workqueue" v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" ) @@ -41,7 +42,7 @@ type AutoAPIServiceRegistration interface { // AddAPIServiceToSync adds an API service to auto-register. AddAPIServiceToSync(in *v1.APIService) // RemoveAPIServiceToSync removes an API service to auto-register. - RemoveAPIServiceToSync(name string) + RemoveAPIServiceToSync(clusterAndName string) } type crdRegistrationController struct { @@ -50,7 +51,7 @@ type crdRegistrationController struct { apiServiceRegistration AutoAPIServiceRegistration - syncHandler func(groupVersion schema.GroupVersion) error + syncHandler func(clusterGroupVersion discovery.ClusterGroupVersion) error syncedInitialSet chan struct{} @@ -122,7 +123,11 @@ func (c *crdRegistrationController) Run(workers int, stopCh <-chan struct{}) { } else { for _, crd := range crds { for _, version := range crd.Spec.Versions { - if err := c.syncHandler(schema.GroupVersion{Group: crd.Spec.Group, Version: version.Name}); err != nil { + if err := c.syncHandler(discovery.ClusterGroupVersion{ + ClusterName: crd.GetClusterName(), + Group: crd.Spec.Group, + Version: version.Name, + }); err != nil { utilruntime.HandleError(err) } } @@ -164,7 +169,7 @@ func (c *crdRegistrationController) processNextWorkItem() bool { defer c.queue.Done(key) // do your work on the key. This method will contains your "do stuff" logic - err := c.syncHandler(key.(schema.GroupVersion)) + err := c.syncHandler(key.(discovery.ClusterGroupVersion)) if err == nil { // if you had no error, tell the queue to stop tracking history for your key. This will // reset things like failure counts for per-item rate limiting @@ -186,12 +191,16 @@ func (c *crdRegistrationController) processNextWorkItem() bool { func (c *crdRegistrationController) enqueueCRD(crd *apiextensionsv1.CustomResourceDefinition) { for _, version := range crd.Spec.Versions { - c.queue.Add(schema.GroupVersion{Group: crd.Spec.Group, Version: version.Name}) + c.queue.Add(discovery.ClusterGroupVersion{ + ClusterName: crd.GetClusterName(), + Group: crd.Spec.Group, + Version: version.Name, + }) } } -func (c *crdRegistrationController) handleVersionUpdate(groupVersion schema.GroupVersion) error { - apiServiceName := groupVersion.Version + "." + groupVersion.Group +func (c *crdRegistrationController) handleVersionUpdate(clusterGroupVersion discovery.ClusterGroupVersion) error { + apiServiceName := clusterGroupVersion.Version + "." + clusterGroupVersion.Group // check all CRDs. There shouldn't that many, but if we have problems later we can index them crds, err := c.crdLister.List(labels.Everything()) @@ -199,19 +208,25 @@ func (c *crdRegistrationController) handleVersionUpdate(groupVersion schema.Grou return err } for _, crd := range crds { - if crd.Spec.Group != groupVersion.Group { + if crd.GetClusterName() != clusterGroupVersion.ClusterName { + continue + } + if crd.Spec.Group != clusterGroupVersion.Group { continue } for _, version := range crd.Spec.Versions { - if version.Name != groupVersion.Version || !version.Served { + if version.Name != clusterGroupVersion.Version || !version.Served { continue } c.apiServiceRegistration.AddAPIServiceToSync(&v1.APIService{ - ObjectMeta: metav1.ObjectMeta{Name: apiServiceName}, + ObjectMeta: metav1.ObjectMeta{ + Name: apiServiceName, + ClusterName: clusterGroupVersion.ClusterName, + }, Spec: v1.APIServiceSpec{ - Group: groupVersion.Group, - Version: groupVersion.Version, + Group: clusterGroupVersion.Group, + Version: clusterGroupVersion.Version, GroupPriorityMinimum: 1000, // CRDs should have relatively low priority VersionPriority: 100, // CRDs will be sorted by kube-like versions like any other APIService with the same VersionPriority }, @@ -220,6 +235,6 @@ func (c *crdRegistrationController) handleVersionUpdate(groupVersion schema.Grou } } - c.apiServiceRegistration.RemoveAPIServiceToSync(apiServiceName) + c.apiServiceRegistration.RemoveAPIServiceToSync(clusters.ToClusterAwareKey(clusterGroupVersion.ClusterName, apiServiceName)) return nil } diff --git a/pkg/controlplane/controller/crdregistration/crdregistration_controller_test.go b/pkg/controlplane/controller/crdregistration/crdregistration_controller_test.go index e99e57021847e..e98e82513998c 100644 --- a/pkg/controlplane/controller/crdregistration/crdregistration_controller_test.go +++ b/pkg/controlplane/controller/crdregistration/crdregistration_controller_test.go @@ -24,6 +24,7 @@ import ( crdlisters "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/endpoints/discovery" "k8s.io/client-go/tools/cache" apiregistration "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" ) @@ -104,7 +105,11 @@ func TestHandleVersionUpdate(t *testing.T) { crdCache.Add(test.startingCRDs[i]) } - c.handleVersionUpdate(test.version) + c.handleVersionUpdate(discovery.ClusterGroupVersion{ + ClusterName: "", + Group: test.version.Group, + Version: test.version.Version, + }) if !reflect.DeepEqual(test.expectedAdded, registration.added) { t.Errorf("%s expected %v, got %v", test.name, test.expectedAdded, registration.added) diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index ac93ea80530ec..a3c3c7f441969 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -23,918 +23,1029 @@ limitations under the License. package openapi import ( - spec "github.com/go-openapi/spec" v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" resource "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" intstr "k8s.io/apimachinery/pkg/util/intstr" common "k8s.io/kube-openapi/pkg/common" + spec "k8s.io/kube-openapi/pkg/validation/spec" ) func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "k8s.io/api/admissionregistration/v1.MutatingWebhook": schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref), - "k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref), - "k8s.io/api/admissionregistration/v1.MutatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList(ref), - "k8s.io/api/admissionregistration/v1.Rule": schema_k8sio_api_admissionregistration_v1_Rule(ref), - "k8s.io/api/admissionregistration/v1.RuleWithOperations": schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref), - "k8s.io/api/admissionregistration/v1.ServiceReference": schema_k8sio_api_admissionregistration_v1_ServiceReference(ref), - "k8s.io/api/admissionregistration/v1.ValidatingWebhook": schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref), - "k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(ref), - "k8s.io/api/admissionregistration/v1.ValidatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationList(ref), - "k8s.io/api/admissionregistration/v1.WebhookClientConfig": schema_k8sio_api_admissionregistration_v1_WebhookClientConfig(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhook": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration(ref), - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfigurationList(ref), - "k8s.io/api/admissionregistration/v1beta1.Rule": schema_k8sio_api_admissionregistration_v1beta1_Rule(ref), - "k8s.io/api/admissionregistration/v1beta1.RuleWithOperations": schema_k8sio_api_admissionregistration_v1beta1_RuleWithOperations(ref), - "k8s.io/api/admissionregistration/v1beta1.ServiceReference": schema_k8sio_api_admissionregistration_v1beta1_ServiceReference(ref), - "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref), - "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/apps/v1.ControllerRevision": schema_k8sio_api_apps_v1_ControllerRevision(ref), - "k8s.io/api/apps/v1.ControllerRevisionList": schema_k8sio_api_apps_v1_ControllerRevisionList(ref), - "k8s.io/api/apps/v1.DaemonSet": schema_k8sio_api_apps_v1_DaemonSet(ref), - "k8s.io/api/apps/v1.DaemonSetCondition": schema_k8sio_api_apps_v1_DaemonSetCondition(ref), - "k8s.io/api/apps/v1.DaemonSetList": schema_k8sio_api_apps_v1_DaemonSetList(ref), - "k8s.io/api/apps/v1.DaemonSetSpec": schema_k8sio_api_apps_v1_DaemonSetSpec(ref), - "k8s.io/api/apps/v1.DaemonSetStatus": schema_k8sio_api_apps_v1_DaemonSetStatus(ref), - "k8s.io/api/apps/v1.DaemonSetUpdateStrategy": schema_k8sio_api_apps_v1_DaemonSetUpdateStrategy(ref), - "k8s.io/api/apps/v1.Deployment": schema_k8sio_api_apps_v1_Deployment(ref), - "k8s.io/api/apps/v1.DeploymentCondition": schema_k8sio_api_apps_v1_DeploymentCondition(ref), - "k8s.io/api/apps/v1.DeploymentList": schema_k8sio_api_apps_v1_DeploymentList(ref), - "k8s.io/api/apps/v1.DeploymentSpec": schema_k8sio_api_apps_v1_DeploymentSpec(ref), - "k8s.io/api/apps/v1.DeploymentStatus": schema_k8sio_api_apps_v1_DeploymentStatus(ref), - "k8s.io/api/apps/v1.DeploymentStrategy": schema_k8sio_api_apps_v1_DeploymentStrategy(ref), - "k8s.io/api/apps/v1.ReplicaSet": schema_k8sio_api_apps_v1_ReplicaSet(ref), - "k8s.io/api/apps/v1.ReplicaSetCondition": schema_k8sio_api_apps_v1_ReplicaSetCondition(ref), - "k8s.io/api/apps/v1.ReplicaSetList": schema_k8sio_api_apps_v1_ReplicaSetList(ref), - "k8s.io/api/apps/v1.ReplicaSetSpec": schema_k8sio_api_apps_v1_ReplicaSetSpec(ref), - "k8s.io/api/apps/v1.ReplicaSetStatus": schema_k8sio_api_apps_v1_ReplicaSetStatus(ref), - "k8s.io/api/apps/v1.RollingUpdateDaemonSet": schema_k8sio_api_apps_v1_RollingUpdateDaemonSet(ref), - "k8s.io/api/apps/v1.RollingUpdateDeployment": schema_k8sio_api_apps_v1_RollingUpdateDeployment(ref), - "k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1_RollingUpdateStatefulSetStrategy(ref), - "k8s.io/api/apps/v1.StatefulSet": schema_k8sio_api_apps_v1_StatefulSet(ref), - "k8s.io/api/apps/v1.StatefulSetCondition": schema_k8sio_api_apps_v1_StatefulSetCondition(ref), - "k8s.io/api/apps/v1.StatefulSetList": schema_k8sio_api_apps_v1_StatefulSetList(ref), - "k8s.io/api/apps/v1.StatefulSetSpec": schema_k8sio_api_apps_v1_StatefulSetSpec(ref), - "k8s.io/api/apps/v1.StatefulSetStatus": schema_k8sio_api_apps_v1_StatefulSetStatus(ref), - "k8s.io/api/apps/v1.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref), - "k8s.io/api/apps/v1beta1.ControllerRevision": schema_k8sio_api_apps_v1beta1_ControllerRevision(ref), - "k8s.io/api/apps/v1beta1.ControllerRevisionList": schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref), - "k8s.io/api/apps/v1beta1.Deployment": schema_k8sio_api_apps_v1beta1_Deployment(ref), - "k8s.io/api/apps/v1beta1.DeploymentCondition": schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref), - "k8s.io/api/apps/v1beta1.DeploymentList": schema_k8sio_api_apps_v1beta1_DeploymentList(ref), - "k8s.io/api/apps/v1beta1.DeploymentRollback": schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref), - "k8s.io/api/apps/v1beta1.DeploymentSpec": schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref), - "k8s.io/api/apps/v1beta1.DeploymentStatus": schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref), - "k8s.io/api/apps/v1beta1.DeploymentStrategy": schema_k8sio_api_apps_v1beta1_DeploymentStrategy(ref), - "k8s.io/api/apps/v1beta1.RollbackConfig": schema_k8sio_api_apps_v1beta1_RollbackConfig(ref), - "k8s.io/api/apps/v1beta1.RollingUpdateDeployment": schema_k8sio_api_apps_v1beta1_RollingUpdateDeployment(ref), - "k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1beta1_RollingUpdateStatefulSetStrategy(ref), - "k8s.io/api/apps/v1beta1.Scale": schema_k8sio_api_apps_v1beta1_Scale(ref), - "k8s.io/api/apps/v1beta1.ScaleSpec": schema_k8sio_api_apps_v1beta1_ScaleSpec(ref), - "k8s.io/api/apps/v1beta1.ScaleStatus": schema_k8sio_api_apps_v1beta1_ScaleStatus(ref), - "k8s.io/api/apps/v1beta1.StatefulSet": schema_k8sio_api_apps_v1beta1_StatefulSet(ref), - "k8s.io/api/apps/v1beta1.StatefulSetCondition": schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref), - "k8s.io/api/apps/v1beta1.StatefulSetList": schema_k8sio_api_apps_v1beta1_StatefulSetList(ref), - "k8s.io/api/apps/v1beta1.StatefulSetSpec": schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref), - "k8s.io/api/apps/v1beta1.StatefulSetStatus": schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref), - "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1beta1_StatefulSetUpdateStrategy(ref), - "k8s.io/api/apps/v1beta2.ControllerRevision": schema_k8sio_api_apps_v1beta2_ControllerRevision(ref), - "k8s.io/api/apps/v1beta2.ControllerRevisionList": schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref), - "k8s.io/api/apps/v1beta2.DaemonSet": schema_k8sio_api_apps_v1beta2_DaemonSet(ref), - "k8s.io/api/apps/v1beta2.DaemonSetCondition": schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref), - "k8s.io/api/apps/v1beta2.DaemonSetList": schema_k8sio_api_apps_v1beta2_DaemonSetList(ref), - "k8s.io/api/apps/v1beta2.DaemonSetSpec": schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref), - "k8s.io/api/apps/v1beta2.DaemonSetStatus": schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref), - "k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy": schema_k8sio_api_apps_v1beta2_DaemonSetUpdateStrategy(ref), - "k8s.io/api/apps/v1beta2.Deployment": schema_k8sio_api_apps_v1beta2_Deployment(ref), - "k8s.io/api/apps/v1beta2.DeploymentCondition": schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref), - "k8s.io/api/apps/v1beta2.DeploymentList": schema_k8sio_api_apps_v1beta2_DeploymentList(ref), - "k8s.io/api/apps/v1beta2.DeploymentSpec": schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref), - "k8s.io/api/apps/v1beta2.DeploymentStatus": schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref), - "k8s.io/api/apps/v1beta2.DeploymentStrategy": schema_k8sio_api_apps_v1beta2_DeploymentStrategy(ref), - "k8s.io/api/apps/v1beta2.ReplicaSet": schema_k8sio_api_apps_v1beta2_ReplicaSet(ref), - "k8s.io/api/apps/v1beta2.ReplicaSetCondition": schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref), - "k8s.io/api/apps/v1beta2.ReplicaSetList": schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref), - "k8s.io/api/apps/v1beta2.ReplicaSetSpec": schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref), - "k8s.io/api/apps/v1beta2.ReplicaSetStatus": schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref), - "k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet": schema_k8sio_api_apps_v1beta2_RollingUpdateDaemonSet(ref), - "k8s.io/api/apps/v1beta2.RollingUpdateDeployment": schema_k8sio_api_apps_v1beta2_RollingUpdateDeployment(ref), - "k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1beta2_RollingUpdateStatefulSetStrategy(ref), - "k8s.io/api/apps/v1beta2.Scale": schema_k8sio_api_apps_v1beta2_Scale(ref), - "k8s.io/api/apps/v1beta2.ScaleSpec": schema_k8sio_api_apps_v1beta2_ScaleSpec(ref), - "k8s.io/api/apps/v1beta2.ScaleStatus": schema_k8sio_api_apps_v1beta2_ScaleStatus(ref), - "k8s.io/api/apps/v1beta2.StatefulSet": schema_k8sio_api_apps_v1beta2_StatefulSet(ref), - "k8s.io/api/apps/v1beta2.StatefulSetCondition": schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref), - "k8s.io/api/apps/v1beta2.StatefulSetList": schema_k8sio_api_apps_v1beta2_StatefulSetList(ref), - "k8s.io/api/apps/v1beta2.StatefulSetSpec": schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref), - "k8s.io/api/apps/v1beta2.StatefulSetStatus": schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref), - "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref), - "k8s.io/api/auditregistration/v1alpha1.AuditSink": schema_k8sio_api_auditregistration_v1alpha1_AuditSink(ref), - "k8s.io/api/auditregistration/v1alpha1.AuditSinkList": schema_k8sio_api_auditregistration_v1alpha1_AuditSinkList(ref), - "k8s.io/api/auditregistration/v1alpha1.AuditSinkSpec": schema_k8sio_api_auditregistration_v1alpha1_AuditSinkSpec(ref), - "k8s.io/api/auditregistration/v1alpha1.Policy": schema_k8sio_api_auditregistration_v1alpha1_Policy(ref), - "k8s.io/api/auditregistration/v1alpha1.ServiceReference": schema_k8sio_api_auditregistration_v1alpha1_ServiceReference(ref), - "k8s.io/api/auditregistration/v1alpha1.Webhook": schema_k8sio_api_auditregistration_v1alpha1_Webhook(ref), - "k8s.io/api/auditregistration/v1alpha1.WebhookClientConfig": schema_k8sio_api_auditregistration_v1alpha1_WebhookClientConfig(ref), - "k8s.io/api/auditregistration/v1alpha1.WebhookThrottleConfig": schema_k8sio_api_auditregistration_v1alpha1_WebhookThrottleConfig(ref), - "k8s.io/api/authentication/v1.BoundObjectReference": schema_k8sio_api_authentication_v1_BoundObjectReference(ref), - "k8s.io/api/authentication/v1.TokenRequest": schema_k8sio_api_authentication_v1_TokenRequest(ref), - "k8s.io/api/authentication/v1.TokenRequestSpec": schema_k8sio_api_authentication_v1_TokenRequestSpec(ref), - "k8s.io/api/authentication/v1.TokenRequestStatus": schema_k8sio_api_authentication_v1_TokenRequestStatus(ref), - "k8s.io/api/authentication/v1.TokenReview": schema_k8sio_api_authentication_v1_TokenReview(ref), - "k8s.io/api/authentication/v1.TokenReviewSpec": schema_k8sio_api_authentication_v1_TokenReviewSpec(ref), - "k8s.io/api/authentication/v1.TokenReviewStatus": schema_k8sio_api_authentication_v1_TokenReviewStatus(ref), - "k8s.io/api/authentication/v1.UserInfo": schema_k8sio_api_authentication_v1_UserInfo(ref), - "k8s.io/api/authentication/v1beta1.TokenReview": schema_k8sio_api_authentication_v1beta1_TokenReview(ref), - "k8s.io/api/authentication/v1beta1.TokenReviewSpec": schema_k8sio_api_authentication_v1beta1_TokenReviewSpec(ref), - "k8s.io/api/authentication/v1beta1.TokenReviewStatus": schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref), - "k8s.io/api/authentication/v1beta1.UserInfo": schema_k8sio_api_authentication_v1beta1_UserInfo(ref), - "k8s.io/api/authorization/v1.LocalSubjectAccessReview": schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref), - "k8s.io/api/authorization/v1.NonResourceAttributes": schema_k8sio_api_authorization_v1_NonResourceAttributes(ref), - "k8s.io/api/authorization/v1.NonResourceRule": schema_k8sio_api_authorization_v1_NonResourceRule(ref), - "k8s.io/api/authorization/v1.ResourceAttributes": schema_k8sio_api_authorization_v1_ResourceAttributes(ref), - "k8s.io/api/authorization/v1.ResourceRule": schema_k8sio_api_authorization_v1_ResourceRule(ref), - "k8s.io/api/authorization/v1.SelfSubjectAccessReview": schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref), - "k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec": schema_k8sio_api_authorization_v1_SelfSubjectAccessReviewSpec(ref), - "k8s.io/api/authorization/v1.SelfSubjectRulesReview": schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref), - "k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec": schema_k8sio_api_authorization_v1_SelfSubjectRulesReviewSpec(ref), - "k8s.io/api/authorization/v1.SubjectAccessReview": schema_k8sio_api_authorization_v1_SubjectAccessReview(ref), - "k8s.io/api/authorization/v1.SubjectAccessReviewSpec": schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref), - "k8s.io/api/authorization/v1.SubjectAccessReviewStatus": schema_k8sio_api_authorization_v1_SubjectAccessReviewStatus(ref), - "k8s.io/api/authorization/v1.SubjectRulesReviewStatus": schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref), - "k8s.io/api/authorization/v1beta1.LocalSubjectAccessReview": schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref), - "k8s.io/api/authorization/v1beta1.NonResourceAttributes": schema_k8sio_api_authorization_v1beta1_NonResourceAttributes(ref), - "k8s.io/api/authorization/v1beta1.NonResourceRule": schema_k8sio_api_authorization_v1beta1_NonResourceRule(ref), - "k8s.io/api/authorization/v1beta1.ResourceAttributes": schema_k8sio_api_authorization_v1beta1_ResourceAttributes(ref), - "k8s.io/api/authorization/v1beta1.ResourceRule": schema_k8sio_api_authorization_v1beta1_ResourceRule(ref), - "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReview": schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref), - "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec": schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReviewSpec(ref), - "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReview": schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref), - "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec": schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReviewSpec(ref), - "k8s.io/api/authorization/v1beta1.SubjectAccessReview": schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref), - "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec": schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref), - "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus": schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewStatus(ref), - "k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus": schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref), - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref), - "k8s.io/api/autoscaling/v1.ExternalMetricSource": schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref), - "k8s.io/api/autoscaling/v1.ExternalMetricStatus": schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref), - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref), - "k8s.io/api/autoscaling/v1.MetricSpec": schema_k8sio_api_autoscaling_v1_MetricSpec(ref), - "k8s.io/api/autoscaling/v1.MetricStatus": schema_k8sio_api_autoscaling_v1_MetricStatus(ref), - "k8s.io/api/autoscaling/v1.ObjectMetricSource": schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref), - "k8s.io/api/autoscaling/v1.ObjectMetricStatus": schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref), - "k8s.io/api/autoscaling/v1.PodsMetricSource": schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref), - "k8s.io/api/autoscaling/v1.PodsMetricStatus": schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref), - "k8s.io/api/autoscaling/v1.ResourceMetricSource": schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref), - "k8s.io/api/autoscaling/v1.ResourceMetricStatus": schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v1.Scale": schema_k8sio_api_autoscaling_v1_Scale(ref), - "k8s.io/api/autoscaling/v1.ScaleSpec": schema_k8sio_api_autoscaling_v1_ScaleSpec(ref), - "k8s.io/api/autoscaling/v1.ScaleStatus": schema_k8sio_api_autoscaling_v1_ScaleStatus(ref), - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref), - "k8s.io/api/autoscaling/v2beta1.ExternalMetricSource": schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref), - "k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref), - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref), - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref), - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref), - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref), - "k8s.io/api/autoscaling/v2beta1.MetricSpec": schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref), - "k8s.io/api/autoscaling/v2beta1.MetricStatus": schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref), - "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource": schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref), - "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta1.PodsMetricSource": schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref), - "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus": schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource": schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref), - "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref), - "k8s.io/api/autoscaling/v2beta2.ExternalMetricSource": schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref), - "k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy": schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref), - "k8s.io/api/autoscaling/v2beta2.HPAScalingRules": schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref), - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref), - "k8s.io/api/autoscaling/v2beta2.MetricIdentifier": schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref), - "k8s.io/api/autoscaling/v2beta2.MetricSpec": schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref), - "k8s.io/api/autoscaling/v2beta2.MetricStatus": schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.MetricTarget": schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref), - "k8s.io/api/autoscaling/v2beta2.MetricValueStatus": schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref), - "k8s.io/api/autoscaling/v2beta2.ObjectMetricSource": schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref), - "k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.PodsMetricSource": schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref), - "k8s.io/api/autoscaling/v2beta2.PodsMetricStatus": schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref), - "k8s.io/api/autoscaling/v2beta2.ResourceMetricSource": schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref), - "k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref), - "k8s.io/api/batch/v1.Job": schema_k8sio_api_batch_v1_Job(ref), - "k8s.io/api/batch/v1.JobCondition": schema_k8sio_api_batch_v1_JobCondition(ref), - "k8s.io/api/batch/v1.JobList": schema_k8sio_api_batch_v1_JobList(ref), - "k8s.io/api/batch/v1.JobSpec": schema_k8sio_api_batch_v1_JobSpec(ref), - "k8s.io/api/batch/v1.JobStatus": schema_k8sio_api_batch_v1_JobStatus(ref), - "k8s.io/api/batch/v1beta1.CronJob": schema_k8sio_api_batch_v1beta1_CronJob(ref), - "k8s.io/api/batch/v1beta1.CronJobList": schema_k8sio_api_batch_v1beta1_CronJobList(ref), - "k8s.io/api/batch/v1beta1.CronJobSpec": schema_k8sio_api_batch_v1beta1_CronJobSpec(ref), - "k8s.io/api/batch/v1beta1.CronJobStatus": schema_k8sio_api_batch_v1beta1_CronJobStatus(ref), - "k8s.io/api/batch/v1beta1.JobTemplate": schema_k8sio_api_batch_v1beta1_JobTemplate(ref), - "k8s.io/api/batch/v1beta1.JobTemplateSpec": schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref), - "k8s.io/api/batch/v2alpha1.CronJob": schema_k8sio_api_batch_v2alpha1_CronJob(ref), - "k8s.io/api/batch/v2alpha1.CronJobList": schema_k8sio_api_batch_v2alpha1_CronJobList(ref), - "k8s.io/api/batch/v2alpha1.CronJobSpec": schema_k8sio_api_batch_v2alpha1_CronJobSpec(ref), - "k8s.io/api/batch/v2alpha1.CronJobStatus": schema_k8sio_api_batch_v2alpha1_CronJobStatus(ref), - "k8s.io/api/batch/v2alpha1.JobTemplate": schema_k8sio_api_batch_v2alpha1_JobTemplate(ref), - "k8s.io/api/batch/v2alpha1.JobTemplateSpec": schema_k8sio_api_batch_v2alpha1_JobTemplateSpec(ref), - "k8s.io/api/certificates/v1beta1.CertificateSigningRequest": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref), - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(ref), - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestList": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref), - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref), - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref), - "k8s.io/api/coordination/v1.Lease": schema_k8sio_api_coordination_v1_Lease(ref), - "k8s.io/api/coordination/v1.LeaseList": schema_k8sio_api_coordination_v1_LeaseList(ref), - "k8s.io/api/coordination/v1.LeaseSpec": schema_k8sio_api_coordination_v1_LeaseSpec(ref), - "k8s.io/api/coordination/v1beta1.Lease": schema_k8sio_api_coordination_v1beta1_Lease(ref), - "k8s.io/api/coordination/v1beta1.LeaseList": schema_k8sio_api_coordination_v1beta1_LeaseList(ref), - "k8s.io/api/coordination/v1beta1.LeaseSpec": schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref), - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), - "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), - "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), - "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), - "k8s.io/api/core/v1.AzureDiskVolumeSource": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), - "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), - "k8s.io/api/core/v1.AzureFileVolumeSource": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), - "k8s.io/api/core/v1.Binding": schema_k8sio_api_core_v1_Binding(ref), - "k8s.io/api/core/v1.CSIPersistentVolumeSource": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CSIVolumeSource": schema_k8sio_api_core_v1_CSIVolumeSource(ref), - "k8s.io/api/core/v1.Capabilities": schema_k8sio_api_core_v1_Capabilities(ref), - "k8s.io/api/core/v1.CephFSPersistentVolumeSource": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CephFSVolumeSource": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), - "k8s.io/api/core/v1.CinderPersistentVolumeSource": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CinderVolumeSource": schema_k8sio_api_core_v1_CinderVolumeSource(ref), - "k8s.io/api/core/v1.ClientIPConfig": schema_k8sio_api_core_v1_ClientIPConfig(ref), - "k8s.io/api/core/v1.ComponentCondition": schema_k8sio_api_core_v1_ComponentCondition(ref), - "k8s.io/api/core/v1.ComponentStatus": schema_k8sio_api_core_v1_ComponentStatus(ref), - "k8s.io/api/core/v1.ComponentStatusList": schema_k8sio_api_core_v1_ComponentStatusList(ref), - "k8s.io/api/core/v1.ConfigMap": schema_k8sio_api_core_v1_ConfigMap(ref), - "k8s.io/api/core/v1.ConfigMapEnvSource": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), - "k8s.io/api/core/v1.ConfigMapKeySelector": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), - "k8s.io/api/core/v1.ConfigMapList": schema_k8sio_api_core_v1_ConfigMapList(ref), - "k8s.io/api/core/v1.ConfigMapNodeConfigSource": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), - "k8s.io/api/core/v1.ConfigMapProjection": schema_k8sio_api_core_v1_ConfigMapProjection(ref), - "k8s.io/api/core/v1.ConfigMapVolumeSource": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), - "k8s.io/api/core/v1.Container": schema_k8sio_api_core_v1_Container(ref), - "k8s.io/api/core/v1.ContainerImage": schema_k8sio_api_core_v1_ContainerImage(ref), - "k8s.io/api/core/v1.ContainerPort": schema_k8sio_api_core_v1_ContainerPort(ref), - "k8s.io/api/core/v1.ContainerState": schema_k8sio_api_core_v1_ContainerState(ref), - "k8s.io/api/core/v1.ContainerStateRunning": schema_k8sio_api_core_v1_ContainerStateRunning(ref), - "k8s.io/api/core/v1.ContainerStateTerminated": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), - "k8s.io/api/core/v1.ContainerStateWaiting": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), - "k8s.io/api/core/v1.ContainerStatus": schema_k8sio_api_core_v1_ContainerStatus(ref), - "k8s.io/api/core/v1.DaemonEndpoint": schema_k8sio_api_core_v1_DaemonEndpoint(ref), - "k8s.io/api/core/v1.DownwardAPIProjection": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeFile": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeSource": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), - "k8s.io/api/core/v1.EmptyDirVolumeSource": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), - "k8s.io/api/core/v1.EndpointAddress": schema_k8sio_api_core_v1_EndpointAddress(ref), - "k8s.io/api/core/v1.EndpointPort": schema_k8sio_api_core_v1_EndpointPort(ref), - "k8s.io/api/core/v1.EndpointSubset": schema_k8sio_api_core_v1_EndpointSubset(ref), - "k8s.io/api/core/v1.Endpoints": schema_k8sio_api_core_v1_Endpoints(ref), - "k8s.io/api/core/v1.EndpointsList": schema_k8sio_api_core_v1_EndpointsList(ref), - "k8s.io/api/core/v1.EnvFromSource": schema_k8sio_api_core_v1_EnvFromSource(ref), - "k8s.io/api/core/v1.EnvVar": schema_k8sio_api_core_v1_EnvVar(ref), - "k8s.io/api/core/v1.EnvVarSource": schema_k8sio_api_core_v1_EnvVarSource(ref), - "k8s.io/api/core/v1.EphemeralContainer": schema_k8sio_api_core_v1_EphemeralContainer(ref), - "k8s.io/api/core/v1.EphemeralContainerCommon": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), - "k8s.io/api/core/v1.EphemeralContainers": schema_k8sio_api_core_v1_EphemeralContainers(ref), - "k8s.io/api/core/v1.Event": schema_k8sio_api_core_v1_Event(ref), - "k8s.io/api/core/v1.EventList": schema_k8sio_api_core_v1_EventList(ref), - "k8s.io/api/core/v1.EventSeries": schema_k8sio_api_core_v1_EventSeries(ref), - "k8s.io/api/core/v1.EventSource": schema_k8sio_api_core_v1_EventSource(ref), - "k8s.io/api/core/v1.ExecAction": schema_k8sio_api_core_v1_ExecAction(ref), - "k8s.io/api/core/v1.FCVolumeSource": schema_k8sio_api_core_v1_FCVolumeSource(ref), - "k8s.io/api/core/v1.FlexPersistentVolumeSource": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), - "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), - "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), - "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), - "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), - "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), - "k8s.io/api/core/v1.Handler": schema_k8sio_api_core_v1_Handler(ref), - "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), - "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), - "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), - "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), - "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), - "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), - "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), - "k8s.io/api/core/v1.LimitRangeSpec": schema_k8sio_api_core_v1_LimitRangeSpec(ref), - "k8s.io/api/core/v1.List": schema_k8sio_api_core_v1_List(ref), - "k8s.io/api/core/v1.LoadBalancerIngress": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), - "k8s.io/api/core/v1.LoadBalancerStatus": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), - "k8s.io/api/core/v1.LocalObjectReference": schema_k8sio_api_core_v1_LocalObjectReference(ref), - "k8s.io/api/core/v1.LocalVolumeSource": schema_k8sio_api_core_v1_LocalVolumeSource(ref), - "k8s.io/api/core/v1.NFSVolumeSource": schema_k8sio_api_core_v1_NFSVolumeSource(ref), - "k8s.io/api/core/v1.Namespace": schema_k8sio_api_core_v1_Namespace(ref), - "k8s.io/api/core/v1.NamespaceCondition": schema_k8sio_api_core_v1_NamespaceCondition(ref), - "k8s.io/api/core/v1.NamespaceList": schema_k8sio_api_core_v1_NamespaceList(ref), - "k8s.io/api/core/v1.NamespaceSpec": schema_k8sio_api_core_v1_NamespaceSpec(ref), - "k8s.io/api/core/v1.NamespaceStatus": schema_k8sio_api_core_v1_NamespaceStatus(ref), - "k8s.io/api/core/v1.Node": schema_k8sio_api_core_v1_Node(ref), - "k8s.io/api/core/v1.NodeAddress": schema_k8sio_api_core_v1_NodeAddress(ref), - "k8s.io/api/core/v1.NodeAffinity": schema_k8sio_api_core_v1_NodeAffinity(ref), - "k8s.io/api/core/v1.NodeCondition": schema_k8sio_api_core_v1_NodeCondition(ref), - "k8s.io/api/core/v1.NodeConfigSource": schema_k8sio_api_core_v1_NodeConfigSource(ref), - "k8s.io/api/core/v1.NodeConfigStatus": schema_k8sio_api_core_v1_NodeConfigStatus(ref), - "k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), - "k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref), - "k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref), - "k8s.io/api/core/v1.NodeResources": schema_k8sio_api_core_v1_NodeResources(ref), - "k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref), - "k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), - "k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), - "k8s.io/api/core/v1.NodeSpec": schema_k8sio_api_core_v1_NodeSpec(ref), - "k8s.io/api/core/v1.NodeStatus": schema_k8sio_api_core_v1_NodeStatus(ref), - "k8s.io/api/core/v1.NodeSystemInfo": schema_k8sio_api_core_v1_NodeSystemInfo(ref), - "k8s.io/api/core/v1.ObjectFieldSelector": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), - "k8s.io/api/core/v1.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref), - "k8s.io/api/core/v1.PersistentVolume": schema_k8sio_api_core_v1_PersistentVolume(ref), - "k8s.io/api/core/v1.PersistentVolumeClaim": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimCondition": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimList": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimSpec": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimStatus": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeList": schema_k8sio_api_core_v1_PersistentVolumeList(ref), - "k8s.io/api/core/v1.PersistentVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeSpec": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeStatus": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), - "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.Pod": schema_k8sio_api_core_v1_Pod(ref), - "k8s.io/api/core/v1.PodAffinity": schema_k8sio_api_core_v1_PodAffinity(ref), - "k8s.io/api/core/v1.PodAffinityTerm": schema_k8sio_api_core_v1_PodAffinityTerm(ref), - "k8s.io/api/core/v1.PodAntiAffinity": schema_k8sio_api_core_v1_PodAntiAffinity(ref), - "k8s.io/api/core/v1.PodAttachOptions": schema_k8sio_api_core_v1_PodAttachOptions(ref), - "k8s.io/api/core/v1.PodCondition": schema_k8sio_api_core_v1_PodCondition(ref), - "k8s.io/api/core/v1.PodDNSConfig": schema_k8sio_api_core_v1_PodDNSConfig(ref), - "k8s.io/api/core/v1.PodDNSConfigOption": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), - "k8s.io/api/core/v1.PodExecOptions": schema_k8sio_api_core_v1_PodExecOptions(ref), - "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), - "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), - "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), - "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), - "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), - "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), - "k8s.io/api/core/v1.PodSecurityContext": schema_k8sio_api_core_v1_PodSecurityContext(ref), - "k8s.io/api/core/v1.PodSignature": schema_k8sio_api_core_v1_PodSignature(ref), - "k8s.io/api/core/v1.PodSpec": schema_k8sio_api_core_v1_PodSpec(ref), - "k8s.io/api/core/v1.PodStatus": schema_k8sio_api_core_v1_PodStatus(ref), - "k8s.io/api/core/v1.PodStatusResult": schema_k8sio_api_core_v1_PodStatusResult(ref), - "k8s.io/api/core/v1.PodTemplate": schema_k8sio_api_core_v1_PodTemplate(ref), - "k8s.io/api/core/v1.PodTemplateList": schema_k8sio_api_core_v1_PodTemplateList(ref), - "k8s.io/api/core/v1.PodTemplateSpec": schema_k8sio_api_core_v1_PodTemplateSpec(ref), - "k8s.io/api/core/v1.PortworxVolumeSource": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), - "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), - "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), - "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), - "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), - "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), - "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), - "k8s.io/api/core/v1.RBDVolumeSource": schema_k8sio_api_core_v1_RBDVolumeSource(ref), - "k8s.io/api/core/v1.RangeAllocation": schema_k8sio_api_core_v1_RangeAllocation(ref), - "k8s.io/api/core/v1.ReplicationController": schema_k8sio_api_core_v1_ReplicationController(ref), - "k8s.io/api/core/v1.ReplicationControllerCondition": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), - "k8s.io/api/core/v1.ReplicationControllerList": schema_k8sio_api_core_v1_ReplicationControllerList(ref), - "k8s.io/api/core/v1.ReplicationControllerSpec": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), - "k8s.io/api/core/v1.ReplicationControllerStatus": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), - "k8s.io/api/core/v1.ResourceFieldSelector": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), - "k8s.io/api/core/v1.ResourceQuota": schema_k8sio_api_core_v1_ResourceQuota(ref), - "k8s.io/api/core/v1.ResourceQuotaList": schema_k8sio_api_core_v1_ResourceQuotaList(ref), - "k8s.io/api/core/v1.ResourceQuotaSpec": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), - "k8s.io/api/core/v1.ResourceQuotaStatus": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), - "k8s.io/api/core/v1.ResourceRequirements": schema_k8sio_api_core_v1_ResourceRequirements(ref), - "k8s.io/api/core/v1.SELinuxOptions": schema_k8sio_api_core_v1_SELinuxOptions(ref), - "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ScaleIOVolumeSource": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), - "k8s.io/api/core/v1.ScopeSelector": schema_k8sio_api_core_v1_ScopeSelector(ref), - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), - "k8s.io/api/core/v1.Secret": schema_k8sio_api_core_v1_Secret(ref), - "k8s.io/api/core/v1.SecretEnvSource": schema_k8sio_api_core_v1_SecretEnvSource(ref), - "k8s.io/api/core/v1.SecretKeySelector": schema_k8sio_api_core_v1_SecretKeySelector(ref), - "k8s.io/api/core/v1.SecretList": schema_k8sio_api_core_v1_SecretList(ref), - "k8s.io/api/core/v1.SecretProjection": schema_k8sio_api_core_v1_SecretProjection(ref), - "k8s.io/api/core/v1.SecretReference": schema_k8sio_api_core_v1_SecretReference(ref), - "k8s.io/api/core/v1.SecretVolumeSource": schema_k8sio_api_core_v1_SecretVolumeSource(ref), - "k8s.io/api/core/v1.SecurityContext": schema_k8sio_api_core_v1_SecurityContext(ref), - "k8s.io/api/core/v1.SerializedReference": schema_k8sio_api_core_v1_SerializedReference(ref), - "k8s.io/api/core/v1.Service": schema_k8sio_api_core_v1_Service(ref), - "k8s.io/api/core/v1.ServiceAccount": schema_k8sio_api_core_v1_ServiceAccount(ref), - "k8s.io/api/core/v1.ServiceAccountList": schema_k8sio_api_core_v1_ServiceAccountList(ref), - "k8s.io/api/core/v1.ServiceAccountTokenProjection": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), - "k8s.io/api/core/v1.ServiceList": schema_k8sio_api_core_v1_ServiceList(ref), - "k8s.io/api/core/v1.ServicePort": schema_k8sio_api_core_v1_ServicePort(ref), - "k8s.io/api/core/v1.ServiceProxyOptions": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), - "k8s.io/api/core/v1.ServiceSpec": schema_k8sio_api_core_v1_ServiceSpec(ref), - "k8s.io/api/core/v1.ServiceStatus": schema_k8sio_api_core_v1_ServiceStatus(ref), - "k8s.io/api/core/v1.SessionAffinityConfig": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), - "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.StorageOSVolumeSource": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), - "k8s.io/api/core/v1.Sysctl": schema_k8sio_api_core_v1_Sysctl(ref), - "k8s.io/api/core/v1.TCPSocketAction": schema_k8sio_api_core_v1_TCPSocketAction(ref), - "k8s.io/api/core/v1.Taint": schema_k8sio_api_core_v1_Taint(ref), - "k8s.io/api/core/v1.Toleration": schema_k8sio_api_core_v1_Toleration(ref), - "k8s.io/api/core/v1.TopologySelectorLabelRequirement": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), - "k8s.io/api/core/v1.TopologySelectorTerm": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), - "k8s.io/api/core/v1.TopologySpreadConstraint": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), - "k8s.io/api/core/v1.TypedLocalObjectReference": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), - "k8s.io/api/core/v1.Volume": schema_k8sio_api_core_v1_Volume(ref), - "k8s.io/api/core/v1.VolumeDevice": schema_k8sio_api_core_v1_VolumeDevice(ref), - "k8s.io/api/core/v1.VolumeMount": schema_k8sio_api_core_v1_VolumeMount(ref), - "k8s.io/api/core/v1.VolumeNodeAffinity": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), - "k8s.io/api/core/v1.VolumeProjection": schema_k8sio_api_core_v1_VolumeProjection(ref), - "k8s.io/api/core/v1.VolumeSource": schema_k8sio_api_core_v1_VolumeSource(ref), - "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), - "k8s.io/api/core/v1.WeightedPodAffinityTerm": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), - "k8s.io/api/core/v1.WindowsSecurityContextOptions": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), - "k8s.io/api/discovery/v1alpha1.Endpoint": schema_k8sio_api_discovery_v1alpha1_Endpoint(ref), - "k8s.io/api/discovery/v1alpha1.EndpointConditions": schema_k8sio_api_discovery_v1alpha1_EndpointConditions(ref), - "k8s.io/api/discovery/v1alpha1.EndpointPort": schema_k8sio_api_discovery_v1alpha1_EndpointPort(ref), - "k8s.io/api/discovery/v1alpha1.EndpointSlice": schema_k8sio_api_discovery_v1alpha1_EndpointSlice(ref), - "k8s.io/api/discovery/v1alpha1.EndpointSliceList": schema_k8sio_api_discovery_v1alpha1_EndpointSliceList(ref), - "k8s.io/api/discovery/v1beta1.Endpoint": schema_k8sio_api_discovery_v1beta1_Endpoint(ref), - "k8s.io/api/discovery/v1beta1.EndpointConditions": schema_k8sio_api_discovery_v1beta1_EndpointConditions(ref), - "k8s.io/api/discovery/v1beta1.EndpointPort": schema_k8sio_api_discovery_v1beta1_EndpointPort(ref), - "k8s.io/api/discovery/v1beta1.EndpointSlice": schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref), - "k8s.io/api/discovery/v1beta1.EndpointSliceList": schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref), - "k8s.io/api/events/v1beta1.Event": schema_k8sio_api_events_v1beta1_Event(ref), - "k8s.io/api/events/v1beta1.EventList": schema_k8sio_api_events_v1beta1_EventList(ref), - "k8s.io/api/events/v1beta1.EventSeries": schema_k8sio_api_events_v1beta1_EventSeries(ref), - "k8s.io/api/extensions/v1beta1.AllowedCSIDriver": schema_k8sio_api_extensions_v1beta1_AllowedCSIDriver(ref), - "k8s.io/api/extensions/v1beta1.AllowedFlexVolume": schema_k8sio_api_extensions_v1beta1_AllowedFlexVolume(ref), - "k8s.io/api/extensions/v1beta1.AllowedHostPath": schema_k8sio_api_extensions_v1beta1_AllowedHostPath(ref), - "k8s.io/api/extensions/v1beta1.DaemonSet": schema_k8sio_api_extensions_v1beta1_DaemonSet(ref), - "k8s.io/api/extensions/v1beta1.DaemonSetCondition": schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref), - "k8s.io/api/extensions/v1beta1.DaemonSetList": schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref), - "k8s.io/api/extensions/v1beta1.DaemonSetSpec": schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref), - "k8s.io/api/extensions/v1beta1.DaemonSetStatus": schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref), - "k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy": schema_k8sio_api_extensions_v1beta1_DaemonSetUpdateStrategy(ref), - "k8s.io/api/extensions/v1beta1.Deployment": schema_k8sio_api_extensions_v1beta1_Deployment(ref), - "k8s.io/api/extensions/v1beta1.DeploymentCondition": schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref), - "k8s.io/api/extensions/v1beta1.DeploymentList": schema_k8sio_api_extensions_v1beta1_DeploymentList(ref), - "k8s.io/api/extensions/v1beta1.DeploymentRollback": schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref), - "k8s.io/api/extensions/v1beta1.DeploymentSpec": schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref), - "k8s.io/api/extensions/v1beta1.DeploymentStatus": schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref), - "k8s.io/api/extensions/v1beta1.DeploymentStrategy": schema_k8sio_api_extensions_v1beta1_DeploymentStrategy(ref), - "k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions": schema_k8sio_api_extensions_v1beta1_FSGroupStrategyOptions(ref), - "k8s.io/api/extensions/v1beta1.HTTPIngressPath": schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref), - "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue": schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref), - "k8s.io/api/extensions/v1beta1.HostPortRange": schema_k8sio_api_extensions_v1beta1_HostPortRange(ref), - "k8s.io/api/extensions/v1beta1.IDRange": schema_k8sio_api_extensions_v1beta1_IDRange(ref), - "k8s.io/api/extensions/v1beta1.IPBlock": schema_k8sio_api_extensions_v1beta1_IPBlock(ref), - "k8s.io/api/extensions/v1beta1.Ingress": schema_k8sio_api_extensions_v1beta1_Ingress(ref), - "k8s.io/api/extensions/v1beta1.IngressBackend": schema_k8sio_api_extensions_v1beta1_IngressBackend(ref), - "k8s.io/api/extensions/v1beta1.IngressList": schema_k8sio_api_extensions_v1beta1_IngressList(ref), - "k8s.io/api/extensions/v1beta1.IngressRule": schema_k8sio_api_extensions_v1beta1_IngressRule(ref), - "k8s.io/api/extensions/v1beta1.IngressRuleValue": schema_k8sio_api_extensions_v1beta1_IngressRuleValue(ref), - "k8s.io/api/extensions/v1beta1.IngressSpec": schema_k8sio_api_extensions_v1beta1_IngressSpec(ref), - "k8s.io/api/extensions/v1beta1.IngressStatus": schema_k8sio_api_extensions_v1beta1_IngressStatus(ref), - "k8s.io/api/extensions/v1beta1.IngressTLS": schema_k8sio_api_extensions_v1beta1_IngressTLS(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicy": schema_k8sio_api_extensions_v1beta1_NetworkPolicy(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule": schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule": schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicyList": schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer": schema_k8sio_api_extensions_v1beta1_NetworkPolicyPeer(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicyPort": schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref), - "k8s.io/api/extensions/v1beta1.NetworkPolicySpec": schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref), - "k8s.io/api/extensions/v1beta1.PodSecurityPolicy": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicy(ref), - "k8s.io/api/extensions/v1beta1.PodSecurityPolicyList": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicyList(ref), - "k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref), - "k8s.io/api/extensions/v1beta1.ReplicaSet": schema_k8sio_api_extensions_v1beta1_ReplicaSet(ref), - "k8s.io/api/extensions/v1beta1.ReplicaSetCondition": schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref), - "k8s.io/api/extensions/v1beta1.ReplicaSetList": schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref), - "k8s.io/api/extensions/v1beta1.ReplicaSetSpec": schema_k8sio_api_extensions_v1beta1_ReplicaSetSpec(ref), - "k8s.io/api/extensions/v1beta1.ReplicaSetStatus": schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref), - "k8s.io/api/extensions/v1beta1.RollbackConfig": schema_k8sio_api_extensions_v1beta1_RollbackConfig(ref), - "k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet": schema_k8sio_api_extensions_v1beta1_RollingUpdateDaemonSet(ref), - "k8s.io/api/extensions/v1beta1.RollingUpdateDeployment": schema_k8sio_api_extensions_v1beta1_RollingUpdateDeployment(ref), - "k8s.io/api/extensions/v1beta1.RunAsGroupStrategyOptions": schema_k8sio_api_extensions_v1beta1_RunAsGroupStrategyOptions(ref), - "k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions": schema_k8sio_api_extensions_v1beta1_RunAsUserStrategyOptions(ref), - "k8s.io/api/extensions/v1beta1.RuntimeClassStrategyOptions": schema_k8sio_api_extensions_v1beta1_RuntimeClassStrategyOptions(ref), - "k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions": schema_k8sio_api_extensions_v1beta1_SELinuxStrategyOptions(ref), - "k8s.io/api/extensions/v1beta1.Scale": schema_k8sio_api_extensions_v1beta1_Scale(ref), - "k8s.io/api/extensions/v1beta1.ScaleSpec": schema_k8sio_api_extensions_v1beta1_ScaleSpec(ref), - "k8s.io/api/extensions/v1beta1.ScaleStatus": schema_k8sio_api_extensions_v1beta1_ScaleStatus(ref), - "k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions": schema_k8sio_api_extensions_v1beta1_SupplementalGroupsStrategyOptions(ref), - "k8s.io/api/flowcontrol/v1alpha1.FlowDistinguisherMethod": schema_k8sio_api_flowcontrol_v1alpha1_FlowDistinguisherMethod(ref), - "k8s.io/api/flowcontrol/v1alpha1.FlowSchema": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchema(ref), - "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaCondition": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaCondition(ref), - "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaList": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaList(ref), - "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaSpec": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaSpec(ref), - "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaStatus": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaStatus(ref), - "k8s.io/api/flowcontrol/v1alpha1.GroupSubject": schema_k8sio_api_flowcontrol_v1alpha1_GroupSubject(ref), - "k8s.io/api/flowcontrol/v1alpha1.LimitResponse": schema_k8sio_api_flowcontrol_v1alpha1_LimitResponse(ref), - "k8s.io/api/flowcontrol/v1alpha1.LimitedPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1alpha1_LimitedPriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1alpha1.NonResourcePolicyRule": schema_k8sio_api_flowcontrol_v1alpha1_NonResourcePolicyRule(ref), - "k8s.io/api/flowcontrol/v1alpha1.PolicyRulesWithSubjects": schema_k8sio_api_flowcontrol_v1alpha1_PolicyRulesWithSubjects(ref), - "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfiguration(ref), - "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationCondition": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationCondition(ref), - "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationList": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationList(ref), - "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationReference": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationReference(ref), - "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationSpec": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationSpec(ref), - "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationStatus": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationStatus(ref), - "k8s.io/api/flowcontrol/v1alpha1.QueuingConfiguration": schema_k8sio_api_flowcontrol_v1alpha1_QueuingConfiguration(ref), - "k8s.io/api/flowcontrol/v1alpha1.ResourcePolicyRule": schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref), - "k8s.io/api/flowcontrol/v1alpha1.ServiceAccountSubject": schema_k8sio_api_flowcontrol_v1alpha1_ServiceAccountSubject(ref), - "k8s.io/api/flowcontrol/v1alpha1.Subject": schema_k8sio_api_flowcontrol_v1alpha1_Subject(ref), - "k8s.io/api/flowcontrol/v1alpha1.UserSubject": schema_k8sio_api_flowcontrol_v1alpha1_UserSubject(ref), - "k8s.io/api/imagepolicy/v1alpha1.ImageReview": schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref), - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref), - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref), - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref), - "k8s.io/api/networking/v1.IPBlock": schema_k8sio_api_networking_v1_IPBlock(ref), - "k8s.io/api/networking/v1.NetworkPolicy": schema_k8sio_api_networking_v1_NetworkPolicy(ref), - "k8s.io/api/networking/v1.NetworkPolicyEgressRule": schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref), - "k8s.io/api/networking/v1.NetworkPolicyIngressRule": schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref), - "k8s.io/api/networking/v1.NetworkPolicyList": schema_k8sio_api_networking_v1_NetworkPolicyList(ref), - "k8s.io/api/networking/v1.NetworkPolicyPeer": schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref), - "k8s.io/api/networking/v1.NetworkPolicyPort": schema_k8sio_api_networking_v1_NetworkPolicyPort(ref), - "k8s.io/api/networking/v1.NetworkPolicySpec": schema_k8sio_api_networking_v1_NetworkPolicySpec(ref), - "k8s.io/api/networking/v1beta1.HTTPIngressPath": schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref), - "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue": schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref), - "k8s.io/api/networking/v1beta1.Ingress": schema_k8sio_api_networking_v1beta1_Ingress(ref), - "k8s.io/api/networking/v1beta1.IngressBackend": schema_k8sio_api_networking_v1beta1_IngressBackend(ref), - "k8s.io/api/networking/v1beta1.IngressClass": schema_k8sio_api_networking_v1beta1_IngressClass(ref), - "k8s.io/api/networking/v1beta1.IngressClassList": schema_k8sio_api_networking_v1beta1_IngressClassList(ref), - "k8s.io/api/networking/v1beta1.IngressClassSpec": schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref), - "k8s.io/api/networking/v1beta1.IngressList": schema_k8sio_api_networking_v1beta1_IngressList(ref), - "k8s.io/api/networking/v1beta1.IngressRule": schema_k8sio_api_networking_v1beta1_IngressRule(ref), - "k8s.io/api/networking/v1beta1.IngressRuleValue": schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref), - "k8s.io/api/networking/v1beta1.IngressSpec": schema_k8sio_api_networking_v1beta1_IngressSpec(ref), - "k8s.io/api/networking/v1beta1.IngressStatus": schema_k8sio_api_networking_v1beta1_IngressStatus(ref), - "k8s.io/api/networking/v1beta1.IngressTLS": schema_k8sio_api_networking_v1beta1_IngressTLS(ref), - "k8s.io/api/node/v1alpha1.Overhead": schema_k8sio_api_node_v1alpha1_Overhead(ref), - "k8s.io/api/node/v1alpha1.RuntimeClass": schema_k8sio_api_node_v1alpha1_RuntimeClass(ref), - "k8s.io/api/node/v1alpha1.RuntimeClassList": schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref), - "k8s.io/api/node/v1alpha1.RuntimeClassSpec": schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref), - "k8s.io/api/node/v1alpha1.Scheduling": schema_k8sio_api_node_v1alpha1_Scheduling(ref), - "k8s.io/api/node/v1beta1.Overhead": schema_k8sio_api_node_v1beta1_Overhead(ref), - "k8s.io/api/node/v1beta1.RuntimeClass": schema_k8sio_api_node_v1beta1_RuntimeClass(ref), - "k8s.io/api/node/v1beta1.RuntimeClassList": schema_k8sio_api_node_v1beta1_RuntimeClassList(ref), - "k8s.io/api/node/v1beta1.Scheduling": schema_k8sio_api_node_v1beta1_Scheduling(ref), - "k8s.io/api/policy/v1beta1.AllowedCSIDriver": schema_k8sio_api_policy_v1beta1_AllowedCSIDriver(ref), - "k8s.io/api/policy/v1beta1.AllowedFlexVolume": schema_k8sio_api_policy_v1beta1_AllowedFlexVolume(ref), - "k8s.io/api/policy/v1beta1.AllowedHostPath": schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref), - "k8s.io/api/policy/v1beta1.Eviction": schema_k8sio_api_policy_v1beta1_Eviction(ref), - "k8s.io/api/policy/v1beta1.FSGroupStrategyOptions": schema_k8sio_api_policy_v1beta1_FSGroupStrategyOptions(ref), - "k8s.io/api/policy/v1beta1.HostPortRange": schema_k8sio_api_policy_v1beta1_HostPortRange(ref), - "k8s.io/api/policy/v1beta1.IDRange": schema_k8sio_api_policy_v1beta1_IDRange(ref), - "k8s.io/api/policy/v1beta1.PodDisruptionBudget": schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref), - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetList": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref), - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref), - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref), - "k8s.io/api/policy/v1beta1.PodSecurityPolicy": schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref), - "k8s.io/api/policy/v1beta1.PodSecurityPolicyList": schema_k8sio_api_policy_v1beta1_PodSecurityPolicyList(ref), - "k8s.io/api/policy/v1beta1.PodSecurityPolicySpec": schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref), - "k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions": schema_k8sio_api_policy_v1beta1_RunAsGroupStrategyOptions(ref), - "k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions": schema_k8sio_api_policy_v1beta1_RunAsUserStrategyOptions(ref), - "k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions": schema_k8sio_api_policy_v1beta1_RuntimeClassStrategyOptions(ref), - "k8s.io/api/policy/v1beta1.SELinuxStrategyOptions": schema_k8sio_api_policy_v1beta1_SELinuxStrategyOptions(ref), - "k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions": schema_k8sio_api_policy_v1beta1_SupplementalGroupsStrategyOptions(ref), - "k8s.io/api/rbac/v1.AggregationRule": schema_k8sio_api_rbac_v1_AggregationRule(ref), - "k8s.io/api/rbac/v1.ClusterRole": schema_k8sio_api_rbac_v1_ClusterRole(ref), - "k8s.io/api/rbac/v1.ClusterRoleBinding": schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref), - "k8s.io/api/rbac/v1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref), - "k8s.io/api/rbac/v1.ClusterRoleList": schema_k8sio_api_rbac_v1_ClusterRoleList(ref), - "k8s.io/api/rbac/v1.PolicyRule": schema_k8sio_api_rbac_v1_PolicyRule(ref), - "k8s.io/api/rbac/v1.Role": schema_k8sio_api_rbac_v1_Role(ref), - "k8s.io/api/rbac/v1.RoleBinding": schema_k8sio_api_rbac_v1_RoleBinding(ref), - "k8s.io/api/rbac/v1.RoleBindingList": schema_k8sio_api_rbac_v1_RoleBindingList(ref), - "k8s.io/api/rbac/v1.RoleList": schema_k8sio_api_rbac_v1_RoleList(ref), - "k8s.io/api/rbac/v1.RoleRef": schema_k8sio_api_rbac_v1_RoleRef(ref), - "k8s.io/api/rbac/v1.Subject": schema_k8sio_api_rbac_v1_Subject(ref), - "k8s.io/api/rbac/v1alpha1.AggregationRule": schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref), - "k8s.io/api/rbac/v1alpha1.ClusterRole": schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref), - "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding": schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref), - "k8s.io/api/rbac/v1alpha1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref), - "k8s.io/api/rbac/v1alpha1.ClusterRoleList": schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref), - "k8s.io/api/rbac/v1alpha1.PolicyRule": schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref), - "k8s.io/api/rbac/v1alpha1.Role": schema_k8sio_api_rbac_v1alpha1_Role(ref), - "k8s.io/api/rbac/v1alpha1.RoleBinding": schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref), - "k8s.io/api/rbac/v1alpha1.RoleBindingList": schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref), - "k8s.io/api/rbac/v1alpha1.RoleList": schema_k8sio_api_rbac_v1alpha1_RoleList(ref), - "k8s.io/api/rbac/v1alpha1.RoleRef": schema_k8sio_api_rbac_v1alpha1_RoleRef(ref), - "k8s.io/api/rbac/v1alpha1.Subject": schema_k8sio_api_rbac_v1alpha1_Subject(ref), - "k8s.io/api/rbac/v1beta1.AggregationRule": schema_k8sio_api_rbac_v1beta1_AggregationRule(ref), - "k8s.io/api/rbac/v1beta1.ClusterRole": schema_k8sio_api_rbac_v1beta1_ClusterRole(ref), - "k8s.io/api/rbac/v1beta1.ClusterRoleBinding": schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref), - "k8s.io/api/rbac/v1beta1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref), - "k8s.io/api/rbac/v1beta1.ClusterRoleList": schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref), - "k8s.io/api/rbac/v1beta1.PolicyRule": schema_k8sio_api_rbac_v1beta1_PolicyRule(ref), - "k8s.io/api/rbac/v1beta1.Role": schema_k8sio_api_rbac_v1beta1_Role(ref), - "k8s.io/api/rbac/v1beta1.RoleBinding": schema_k8sio_api_rbac_v1beta1_RoleBinding(ref), - "k8s.io/api/rbac/v1beta1.RoleBindingList": schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref), - "k8s.io/api/rbac/v1beta1.RoleList": schema_k8sio_api_rbac_v1beta1_RoleList(ref), - "k8s.io/api/rbac/v1beta1.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(ref), - "k8s.io/api/rbac/v1beta1.Subject": schema_k8sio_api_rbac_v1beta1_Subject(ref), - "k8s.io/api/scheduling/v1.PriorityClass": schema_k8sio_api_scheduling_v1_PriorityClass(ref), - "k8s.io/api/scheduling/v1.PriorityClassList": schema_k8sio_api_scheduling_v1_PriorityClassList(ref), - "k8s.io/api/scheduling/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), - "k8s.io/api/scheduling/v1alpha1.PriorityClassList": schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref), - "k8s.io/api/scheduling/v1beta1.PriorityClass": schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref), - "k8s.io/api/scheduling/v1beta1.PriorityClassList": schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref), - "k8s.io/api/settings/v1alpha1.PodPreset": schema_k8sio_api_settings_v1alpha1_PodPreset(ref), - "k8s.io/api/settings/v1alpha1.PodPresetList": schema_k8sio_api_settings_v1alpha1_PodPresetList(ref), - "k8s.io/api/settings/v1alpha1.PodPresetSpec": schema_k8sio_api_settings_v1alpha1_PodPresetSpec(ref), - "k8s.io/api/storage/v1.CSIDriver": schema_k8sio_api_storage_v1_CSIDriver(ref), - "k8s.io/api/storage/v1.CSIDriverList": schema_k8sio_api_storage_v1_CSIDriverList(ref), - "k8s.io/api/storage/v1.CSIDriverSpec": schema_k8sio_api_storage_v1_CSIDriverSpec(ref), - "k8s.io/api/storage/v1.CSINode": schema_k8sio_api_storage_v1_CSINode(ref), - "k8s.io/api/storage/v1.CSINodeDriver": schema_k8sio_api_storage_v1_CSINodeDriver(ref), - "k8s.io/api/storage/v1.CSINodeList": schema_k8sio_api_storage_v1_CSINodeList(ref), - "k8s.io/api/storage/v1.CSINodeSpec": schema_k8sio_api_storage_v1_CSINodeSpec(ref), - "k8s.io/api/storage/v1.StorageClass": schema_k8sio_api_storage_v1_StorageClass(ref), - "k8s.io/api/storage/v1.StorageClassList": schema_k8sio_api_storage_v1_StorageClassList(ref), - "k8s.io/api/storage/v1.VolumeAttachment": schema_k8sio_api_storage_v1_VolumeAttachment(ref), - "k8s.io/api/storage/v1.VolumeAttachmentList": schema_k8sio_api_storage_v1_VolumeAttachmentList(ref), - "k8s.io/api/storage/v1.VolumeAttachmentSource": schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref), - "k8s.io/api/storage/v1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref), - "k8s.io/api/storage/v1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref), - "k8s.io/api/storage/v1.VolumeError": schema_k8sio_api_storage_v1_VolumeError(ref), - "k8s.io/api/storage/v1.VolumeNodeResources": schema_k8sio_api_storage_v1_VolumeNodeResources(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttachment": schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttachmentList": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref), - "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref), - "k8s.io/api/storage/v1alpha1.VolumeError": schema_k8sio_api_storage_v1alpha1_VolumeError(ref), - "k8s.io/api/storage/v1beta1.CSIDriver": schema_k8sio_api_storage_v1beta1_CSIDriver(ref), - "k8s.io/api/storage/v1beta1.CSIDriverList": schema_k8sio_api_storage_v1beta1_CSIDriverList(ref), - "k8s.io/api/storage/v1beta1.CSIDriverSpec": schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref), - "k8s.io/api/storage/v1beta1.CSINode": schema_k8sio_api_storage_v1beta1_CSINode(ref), - "k8s.io/api/storage/v1beta1.CSINodeDriver": schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref), - "k8s.io/api/storage/v1beta1.CSINodeList": schema_k8sio_api_storage_v1beta1_CSINodeList(ref), - "k8s.io/api/storage/v1beta1.CSINodeSpec": schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref), - "k8s.io/api/storage/v1beta1.StorageClass": schema_k8sio_api_storage_v1beta1_StorageClass(ref), - "k8s.io/api/storage/v1beta1.StorageClassList": schema_k8sio_api_storage_v1beta1_StorageClassList(ref), - "k8s.io/api/storage/v1beta1.VolumeAttachment": schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref), - "k8s.io/api/storage/v1beta1.VolumeAttachmentList": schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref), - "k8s.io/api/storage/v1beta1.VolumeAttachmentSource": schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref), - "k8s.io/api/storage/v1beta1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref), - "k8s.io/api/storage/v1beta1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref), - "k8s.io/api/storage/v1beta1.VolumeError": schema_k8sio_api_storage_v1beta1_VolumeError(ref), - "k8s.io/api/storage/v1beta1.VolumeNodeResources": schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest": schema_pkg_apis_apiextensions_v1_ConversionRequest(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse": schema_pkg_apis_apiextensions_v1_ConversionResponse(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionReview": schema_pkg_apis_apiextensions_v1_ConversionReview(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition": schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion": schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition": schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionList": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources": schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation": schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation": schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON": schema_pkg_apis_apiextensions_v1_JSON(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps": schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference": schema_pkg_apis_apiextensions_v1_ServiceReference(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion": schema_pkg_apis_apiextensions_v1_WebhookConversion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest": schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse": schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionReview": schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion": schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionList": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation": schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation": schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON": schema_pkg_apis_apiextensions_v1beta1_JSON(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference": schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref), - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref), - "k8s.io/apimachinery/pkg/api/resource.Quantity": schema_apimachinery_pkg_api_resource_Quantity(ref), - "k8s.io/apimachinery/pkg/api/resource.int64Amount": schema_apimachinery_pkg_api_resource_int64Amount(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ExportOptions": schema_pkg_apis_meta_v1_ExportOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1beta1.PartialObjectMetadataList": schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), - "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), - "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), - "k8s.io/apimachinery/pkg/util/intstr.IntOrString": schema_apimachinery_pkg_util_intstr_IntOrString(ref), - "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.Event": schema_pkg_apis_audit_v1_Event(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.EventList": schema_pkg_apis_audit_v1_EventList(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.GroupResources": schema_pkg_apis_audit_v1_GroupResources(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference": schema_pkg_apis_audit_v1_ObjectReference(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.Policy": schema_pkg_apis_audit_v1_Policy(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.PolicyList": schema_pkg_apis_audit_v1_PolicyList(ref), - "k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule": schema_pkg_apis_audit_v1_PolicyRule(ref), - "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event": schema_pkg_apis_audit_v1alpha1_Event(ref), - "k8s.io/apiserver/pkg/apis/audit/v1alpha1.EventList": schema_pkg_apis_audit_v1alpha1_EventList(ref), - "k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources": schema_pkg_apis_audit_v1alpha1_GroupResources(ref), - "k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference": schema_pkg_apis_audit_v1alpha1_ObjectReference(ref), - "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy": schema_pkg_apis_audit_v1alpha1_Policy(ref), - "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyList": schema_pkg_apis_audit_v1alpha1_PolicyList(ref), - "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule": schema_pkg_apis_audit_v1alpha1_PolicyRule(ref), - "k8s.io/apiserver/pkg/apis/audit/v1beta1.Event": schema_pkg_apis_audit_v1beta1_Event(ref), - "k8s.io/apiserver/pkg/apis/audit/v1beta1.EventList": schema_pkg_apis_audit_v1beta1_EventList(ref), - "k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources": schema_pkg_apis_audit_v1beta1_GroupResources(ref), - "k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference": schema_pkg_apis_audit_v1beta1_ObjectReference(ref), - "k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy": schema_pkg_apis_audit_v1beta1_Policy(ref), - "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyList": schema_pkg_apis_audit_v1beta1_PolicyList(ref), - "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule": schema_pkg_apis_audit_v1beta1_PolicyRule(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredential": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredential(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialSpec(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialStatus(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response": schema_pkg_apis_clientauthentication_v1alpha1_Response(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredential": schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec": schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref), - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus": schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService": schema_pkg_apis_apiregistration_v1_APIService(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition": schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceList": schema_pkg_apis_apiregistration_v1_APIServiceList(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec": schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus": schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference": schema_pkg_apis_apiregistration_v1_ServiceReference(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService": schema_pkg_apis_apiregistration_v1beta1_APIService(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition": schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceList": schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec": schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus": schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref), - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference": schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.CloudProviderConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_CloudProviderConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.GenericControllerManagerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource": schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.KubeCloudSharedConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_KubeCloudSharedConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.KubeControllerManagerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.ServiceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ServiceControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref), - "k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref), - "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref), - "k8s.io/kube-scheduler/config/v1.Extender": schema_k8sio_kube_scheduler_config_v1_Extender(ref), - "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource": schema_k8sio_kube_scheduler_config_v1_ExtenderManagedResource(ref), - "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig": schema_k8sio_kube_scheduler_config_v1_ExtenderTLSConfig(ref), - "k8s.io/kube-scheduler/config/v1.LabelPreference": schema_k8sio_kube_scheduler_config_v1_LabelPreference(ref), - "k8s.io/kube-scheduler/config/v1.LabelsPresence": schema_k8sio_kube_scheduler_config_v1_LabelsPresence(ref), - "k8s.io/kube-scheduler/config/v1.Policy": schema_k8sio_kube_scheduler_config_v1_Policy(ref), - "k8s.io/kube-scheduler/config/v1.PredicateArgument": schema_k8sio_kube_scheduler_config_v1_PredicateArgument(ref), - "k8s.io/kube-scheduler/config/v1.PredicatePolicy": schema_k8sio_kube_scheduler_config_v1_PredicatePolicy(ref), - "k8s.io/kube-scheduler/config/v1.PriorityArgument": schema_k8sio_kube_scheduler_config_v1_PriorityArgument(ref), - "k8s.io/kube-scheduler/config/v1.PriorityPolicy": schema_k8sio_kube_scheduler_config_v1_PriorityPolicy(ref), - "k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments": schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioArguments(ref), - "k8s.io/kube-scheduler/config/v1.ResourceSpec": schema_k8sio_kube_scheduler_config_v1_ResourceSpec(ref), - "k8s.io/kube-scheduler/config/v1.ServiceAffinity": schema_k8sio_kube_scheduler_config_v1_ServiceAffinity(ref), - "k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity": schema_k8sio_kube_scheduler_config_v1_ServiceAntiAffinity(ref), - "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint": schema_k8sio_kube_scheduler_config_v1_UtilizationShapePoint(ref), - "k8s.io/kube-scheduler/config/v1alpha1.KubeSchedulerConfiguration": schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerConfiguration(ref), - "k8s.io/kube-scheduler/config/v1alpha1.KubeSchedulerLeaderElectionConfiguration": schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerLeaderElectionConfiguration(ref), - "k8s.io/kube-scheduler/config/v1alpha1.Plugin": schema_k8sio_kube_scheduler_config_v1alpha1_Plugin(ref), - "k8s.io/kube-scheduler/config/v1alpha1.PluginConfig": schema_k8sio_kube_scheduler_config_v1alpha1_PluginConfig(ref), - "k8s.io/kube-scheduler/config/v1alpha1.PluginSet": schema_k8sio_kube_scheduler_config_v1alpha1_PluginSet(ref), - "k8s.io/kube-scheduler/config/v1alpha1.Plugins": schema_k8sio_kube_scheduler_config_v1alpha1_Plugins(ref), - "k8s.io/kube-scheduler/config/v1alpha1.SchedulerAlgorithmSource": schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerAlgorithmSource(ref), - "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyConfigMapSource": schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicyConfigMapSource(ref), - "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyFileSource": schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicyFileSource(ref), - "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicySource": schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicySource(ref), - "k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerConfiguration": schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerConfiguration(ref), - "k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerLeaderElectionConfiguration": schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerLeaderElectionConfiguration(ref), - "k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerProfile": schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerProfile(ref), - "k8s.io/kube-scheduler/config/v1alpha2.Plugin": schema_k8sio_kube_scheduler_config_v1alpha2_Plugin(ref), - "k8s.io/kube-scheduler/config/v1alpha2.PluginConfig": schema_k8sio_kube_scheduler_config_v1alpha2_PluginConfig(ref), - "k8s.io/kube-scheduler/config/v1alpha2.PluginSet": schema_k8sio_kube_scheduler_config_v1alpha2_PluginSet(ref), - "k8s.io/kube-scheduler/config/v1alpha2.Plugins": schema_k8sio_kube_scheduler_config_v1alpha2_Plugins(ref), - "k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletAnonymousAuthentication(ref), - "k8s.io/kubelet/config/v1beta1.KubeletAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletAuthentication(ref), - "k8s.io/kubelet/config/v1beta1.KubeletAuthorization": schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref), - "k8s.io/kubelet/config/v1beta1.KubeletConfiguration": schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref), - "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref), - "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization": schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref), - "k8s.io/kubelet/config/v1beta1.KubeletX509Authentication": schema_k8sio_kubelet_config_v1beta1_KubeletX509Authentication(ref), - "k8s.io/kubelet/config/v1beta1.SerializedNodeConfigSource": schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref), - "k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config/v1alpha1.CloudControllerManagerConfiguration": schema_app_apis_config_v1alpha1_CloudControllerManagerConfiguration(ref), - "k8s.io/kubernetes/pkg/apis/abac/v1beta1.Policy": schema_pkg_apis_abac_v1beta1_Policy(ref), - "k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec": schema_pkg_apis_abac_v1beta1_PolicySpec(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricListOptions": schema_pkg_apis_custom_metrics_v1beta1_MetricListOptions(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue": schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValueList": schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier": schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricListOptions": schema_pkg_apis_custom_metrics_v1beta2_MetricListOptions(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue": schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref), - "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValueList": schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref), - "k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue": schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref), - "k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValueList": schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref), - "k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics": schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics": schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetricsList": schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref), - "k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics": schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetricsList": schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref), - "k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics": schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics": schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetricsList": schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref), - "k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics": schema_pkg_apis_metrics_v1beta1_PodMetrics(ref), - "k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetricsList": schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref), + "k8s.io/api/admissionregistration/v1.MutatingWebhook": schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref), + "k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref), + "k8s.io/api/admissionregistration/v1.MutatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList(ref), + "k8s.io/api/admissionregistration/v1.Rule": schema_k8sio_api_admissionregistration_v1_Rule(ref), + "k8s.io/api/admissionregistration/v1.RuleWithOperations": schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref), + "k8s.io/api/admissionregistration/v1.ServiceReference": schema_k8sio_api_admissionregistration_v1_ServiceReference(ref), + "k8s.io/api/admissionregistration/v1.ValidatingWebhook": schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref), + "k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(ref), + "k8s.io/api/admissionregistration/v1.ValidatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationList(ref), + "k8s.io/api/admissionregistration/v1.WebhookClientConfig": schema_k8sio_api_admissionregistration_v1_WebhookClientConfig(ref), + "k8s.io/api/admissionregistration/v1beta1.MutatingWebhook": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref), + "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration(ref), + "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfigurationList": schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfigurationList(ref), + "k8s.io/api/admissionregistration/v1beta1.Rule": schema_k8sio_api_admissionregistration_v1beta1_Rule(ref), + "k8s.io/api/admissionregistration/v1beta1.RuleWithOperations": schema_k8sio_api_admissionregistration_v1beta1_RuleWithOperations(ref), + "k8s.io/api/admissionregistration/v1beta1.ServiceReference": schema_k8sio_api_admissionregistration_v1beta1_ServiceReference(ref), + "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook": schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref), + "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/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), + "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionList": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionList(ref), + "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionSpec": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionSpec(ref), + "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionStatus": schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionStatus(ref), + "k8s.io/api/apps/v1.ControllerRevision": schema_k8sio_api_apps_v1_ControllerRevision(ref), + "k8s.io/api/apps/v1.ControllerRevisionList": schema_k8sio_api_apps_v1_ControllerRevisionList(ref), + "k8s.io/api/apps/v1.DaemonSet": schema_k8sio_api_apps_v1_DaemonSet(ref), + "k8s.io/api/apps/v1.DaemonSetCondition": schema_k8sio_api_apps_v1_DaemonSetCondition(ref), + "k8s.io/api/apps/v1.DaemonSetList": schema_k8sio_api_apps_v1_DaemonSetList(ref), + "k8s.io/api/apps/v1.DaemonSetSpec": schema_k8sio_api_apps_v1_DaemonSetSpec(ref), + "k8s.io/api/apps/v1.DaemonSetStatus": schema_k8sio_api_apps_v1_DaemonSetStatus(ref), + "k8s.io/api/apps/v1.DaemonSetUpdateStrategy": schema_k8sio_api_apps_v1_DaemonSetUpdateStrategy(ref), + "k8s.io/api/apps/v1.Deployment": schema_k8sio_api_apps_v1_Deployment(ref), + "k8s.io/api/apps/v1.DeploymentCondition": schema_k8sio_api_apps_v1_DeploymentCondition(ref), + "k8s.io/api/apps/v1.DeploymentList": schema_k8sio_api_apps_v1_DeploymentList(ref), + "k8s.io/api/apps/v1.DeploymentSpec": schema_k8sio_api_apps_v1_DeploymentSpec(ref), + "k8s.io/api/apps/v1.DeploymentStatus": schema_k8sio_api_apps_v1_DeploymentStatus(ref), + "k8s.io/api/apps/v1.DeploymentStrategy": schema_k8sio_api_apps_v1_DeploymentStrategy(ref), + "k8s.io/api/apps/v1.ReplicaSet": schema_k8sio_api_apps_v1_ReplicaSet(ref), + "k8s.io/api/apps/v1.ReplicaSetCondition": schema_k8sio_api_apps_v1_ReplicaSetCondition(ref), + "k8s.io/api/apps/v1.ReplicaSetList": schema_k8sio_api_apps_v1_ReplicaSetList(ref), + "k8s.io/api/apps/v1.ReplicaSetSpec": schema_k8sio_api_apps_v1_ReplicaSetSpec(ref), + "k8s.io/api/apps/v1.ReplicaSetStatus": schema_k8sio_api_apps_v1_ReplicaSetStatus(ref), + "k8s.io/api/apps/v1.RollingUpdateDaemonSet": schema_k8sio_api_apps_v1_RollingUpdateDaemonSet(ref), + "k8s.io/api/apps/v1.RollingUpdateDeployment": schema_k8sio_api_apps_v1_RollingUpdateDeployment(ref), + "k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1_RollingUpdateStatefulSetStrategy(ref), + "k8s.io/api/apps/v1.StatefulSet": schema_k8sio_api_apps_v1_StatefulSet(ref), + "k8s.io/api/apps/v1.StatefulSetCondition": schema_k8sio_api_apps_v1_StatefulSetCondition(ref), + "k8s.io/api/apps/v1.StatefulSetList": schema_k8sio_api_apps_v1_StatefulSetList(ref), + "k8s.io/api/apps/v1.StatefulSetSpec": schema_k8sio_api_apps_v1_StatefulSetSpec(ref), + "k8s.io/api/apps/v1.StatefulSetStatus": schema_k8sio_api_apps_v1_StatefulSetStatus(ref), + "k8s.io/api/apps/v1.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref), + "k8s.io/api/apps/v1beta1.ControllerRevision": schema_k8sio_api_apps_v1beta1_ControllerRevision(ref), + "k8s.io/api/apps/v1beta1.ControllerRevisionList": schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref), + "k8s.io/api/apps/v1beta1.Deployment": schema_k8sio_api_apps_v1beta1_Deployment(ref), + "k8s.io/api/apps/v1beta1.DeploymentCondition": schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref), + "k8s.io/api/apps/v1beta1.DeploymentList": schema_k8sio_api_apps_v1beta1_DeploymentList(ref), + "k8s.io/api/apps/v1beta1.DeploymentRollback": schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref), + "k8s.io/api/apps/v1beta1.DeploymentSpec": schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref), + "k8s.io/api/apps/v1beta1.DeploymentStatus": schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref), + "k8s.io/api/apps/v1beta1.DeploymentStrategy": schema_k8sio_api_apps_v1beta1_DeploymentStrategy(ref), + "k8s.io/api/apps/v1beta1.RollbackConfig": schema_k8sio_api_apps_v1beta1_RollbackConfig(ref), + "k8s.io/api/apps/v1beta1.RollingUpdateDeployment": schema_k8sio_api_apps_v1beta1_RollingUpdateDeployment(ref), + "k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1beta1_RollingUpdateStatefulSetStrategy(ref), + "k8s.io/api/apps/v1beta1.Scale": schema_k8sio_api_apps_v1beta1_Scale(ref), + "k8s.io/api/apps/v1beta1.ScaleSpec": schema_k8sio_api_apps_v1beta1_ScaleSpec(ref), + "k8s.io/api/apps/v1beta1.ScaleStatus": schema_k8sio_api_apps_v1beta1_ScaleStatus(ref), + "k8s.io/api/apps/v1beta1.StatefulSet": schema_k8sio_api_apps_v1beta1_StatefulSet(ref), + "k8s.io/api/apps/v1beta1.StatefulSetCondition": schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref), + "k8s.io/api/apps/v1beta1.StatefulSetList": schema_k8sio_api_apps_v1beta1_StatefulSetList(ref), + "k8s.io/api/apps/v1beta1.StatefulSetSpec": schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref), + "k8s.io/api/apps/v1beta1.StatefulSetStatus": schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref), + "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1beta1_StatefulSetUpdateStrategy(ref), + "k8s.io/api/apps/v1beta2.ControllerRevision": schema_k8sio_api_apps_v1beta2_ControllerRevision(ref), + "k8s.io/api/apps/v1beta2.ControllerRevisionList": schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref), + "k8s.io/api/apps/v1beta2.DaemonSet": schema_k8sio_api_apps_v1beta2_DaemonSet(ref), + "k8s.io/api/apps/v1beta2.DaemonSetCondition": schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref), + "k8s.io/api/apps/v1beta2.DaemonSetList": schema_k8sio_api_apps_v1beta2_DaemonSetList(ref), + "k8s.io/api/apps/v1beta2.DaemonSetSpec": schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref), + "k8s.io/api/apps/v1beta2.DaemonSetStatus": schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref), + "k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy": schema_k8sio_api_apps_v1beta2_DaemonSetUpdateStrategy(ref), + "k8s.io/api/apps/v1beta2.Deployment": schema_k8sio_api_apps_v1beta2_Deployment(ref), + "k8s.io/api/apps/v1beta2.DeploymentCondition": schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref), + "k8s.io/api/apps/v1beta2.DeploymentList": schema_k8sio_api_apps_v1beta2_DeploymentList(ref), + "k8s.io/api/apps/v1beta2.DeploymentSpec": schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref), + "k8s.io/api/apps/v1beta2.DeploymentStatus": schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref), + "k8s.io/api/apps/v1beta2.DeploymentStrategy": schema_k8sio_api_apps_v1beta2_DeploymentStrategy(ref), + "k8s.io/api/apps/v1beta2.ReplicaSet": schema_k8sio_api_apps_v1beta2_ReplicaSet(ref), + "k8s.io/api/apps/v1beta2.ReplicaSetCondition": schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref), + "k8s.io/api/apps/v1beta2.ReplicaSetList": schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref), + "k8s.io/api/apps/v1beta2.ReplicaSetSpec": schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref), + "k8s.io/api/apps/v1beta2.ReplicaSetStatus": schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref), + "k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet": schema_k8sio_api_apps_v1beta2_RollingUpdateDaemonSet(ref), + "k8s.io/api/apps/v1beta2.RollingUpdateDeployment": schema_k8sio_api_apps_v1beta2_RollingUpdateDeployment(ref), + "k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy": schema_k8sio_api_apps_v1beta2_RollingUpdateStatefulSetStrategy(ref), + "k8s.io/api/apps/v1beta2.Scale": schema_k8sio_api_apps_v1beta2_Scale(ref), + "k8s.io/api/apps/v1beta2.ScaleSpec": schema_k8sio_api_apps_v1beta2_ScaleSpec(ref), + "k8s.io/api/apps/v1beta2.ScaleStatus": schema_k8sio_api_apps_v1beta2_ScaleStatus(ref), + "k8s.io/api/apps/v1beta2.StatefulSet": schema_k8sio_api_apps_v1beta2_StatefulSet(ref), + "k8s.io/api/apps/v1beta2.StatefulSetCondition": schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref), + "k8s.io/api/apps/v1beta2.StatefulSetList": schema_k8sio_api_apps_v1beta2_StatefulSetList(ref), + "k8s.io/api/apps/v1beta2.StatefulSetSpec": schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref), + "k8s.io/api/apps/v1beta2.StatefulSetStatus": schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref), + "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref), + "k8s.io/api/authentication/v1.BoundObjectReference": schema_k8sio_api_authentication_v1_BoundObjectReference(ref), + "k8s.io/api/authentication/v1.TokenRequest": schema_k8sio_api_authentication_v1_TokenRequest(ref), + "k8s.io/api/authentication/v1.TokenRequestSpec": schema_k8sio_api_authentication_v1_TokenRequestSpec(ref), + "k8s.io/api/authentication/v1.TokenRequestStatus": schema_k8sio_api_authentication_v1_TokenRequestStatus(ref), + "k8s.io/api/authentication/v1.TokenReview": schema_k8sio_api_authentication_v1_TokenReview(ref), + "k8s.io/api/authentication/v1.TokenReviewSpec": schema_k8sio_api_authentication_v1_TokenReviewSpec(ref), + "k8s.io/api/authentication/v1.TokenReviewStatus": schema_k8sio_api_authentication_v1_TokenReviewStatus(ref), + "k8s.io/api/authentication/v1.UserInfo": schema_k8sio_api_authentication_v1_UserInfo(ref), + "k8s.io/api/authentication/v1beta1.TokenReview": schema_k8sio_api_authentication_v1beta1_TokenReview(ref), + "k8s.io/api/authentication/v1beta1.TokenReviewSpec": schema_k8sio_api_authentication_v1beta1_TokenReviewSpec(ref), + "k8s.io/api/authentication/v1beta1.TokenReviewStatus": schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref), + "k8s.io/api/authentication/v1beta1.UserInfo": schema_k8sio_api_authentication_v1beta1_UserInfo(ref), + "k8s.io/api/authorization/v1.LocalSubjectAccessReview": schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref), + "k8s.io/api/authorization/v1.NonResourceAttributes": schema_k8sio_api_authorization_v1_NonResourceAttributes(ref), + "k8s.io/api/authorization/v1.NonResourceRule": schema_k8sio_api_authorization_v1_NonResourceRule(ref), + "k8s.io/api/authorization/v1.ResourceAttributes": schema_k8sio_api_authorization_v1_ResourceAttributes(ref), + "k8s.io/api/authorization/v1.ResourceRule": schema_k8sio_api_authorization_v1_ResourceRule(ref), + "k8s.io/api/authorization/v1.SelfSubjectAccessReview": schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref), + "k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec": schema_k8sio_api_authorization_v1_SelfSubjectAccessReviewSpec(ref), + "k8s.io/api/authorization/v1.SelfSubjectRulesReview": schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref), + "k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec": schema_k8sio_api_authorization_v1_SelfSubjectRulesReviewSpec(ref), + "k8s.io/api/authorization/v1.SubjectAccessReview": schema_k8sio_api_authorization_v1_SubjectAccessReview(ref), + "k8s.io/api/authorization/v1.SubjectAccessReviewSpec": schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref), + "k8s.io/api/authorization/v1.SubjectAccessReviewStatus": schema_k8sio_api_authorization_v1_SubjectAccessReviewStatus(ref), + "k8s.io/api/authorization/v1.SubjectRulesReviewStatus": schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref), + "k8s.io/api/authorization/v1beta1.LocalSubjectAccessReview": schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref), + "k8s.io/api/authorization/v1beta1.NonResourceAttributes": schema_k8sio_api_authorization_v1beta1_NonResourceAttributes(ref), + "k8s.io/api/authorization/v1beta1.NonResourceRule": schema_k8sio_api_authorization_v1beta1_NonResourceRule(ref), + "k8s.io/api/authorization/v1beta1.ResourceAttributes": schema_k8sio_api_authorization_v1beta1_ResourceAttributes(ref), + "k8s.io/api/authorization/v1beta1.ResourceRule": schema_k8sio_api_authorization_v1beta1_ResourceRule(ref), + "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReview": schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref), + "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec": schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReviewSpec(ref), + "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReview": schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref), + "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec": schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReviewSpec(ref), + "k8s.io/api/authorization/v1beta1.SubjectAccessReview": schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref), + "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec": schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref), + "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus": schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewStatus(ref), + "k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus": schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref), + "k8s.io/api/autoscaling/v1.ContainerResourceMetricSource": schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref), + "k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus": schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref), + "k8s.io/api/autoscaling/v1.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref), + "k8s.io/api/autoscaling/v1.ExternalMetricSource": schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref), + "k8s.io/api/autoscaling/v1.ExternalMetricStatus": schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref), + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref), + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref), + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref), + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref), + "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref), + "k8s.io/api/autoscaling/v1.MetricSpec": schema_k8sio_api_autoscaling_v1_MetricSpec(ref), + "k8s.io/api/autoscaling/v1.MetricStatus": schema_k8sio_api_autoscaling_v1_MetricStatus(ref), + "k8s.io/api/autoscaling/v1.ObjectMetricSource": schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref), + "k8s.io/api/autoscaling/v1.ObjectMetricStatus": schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref), + "k8s.io/api/autoscaling/v1.PodsMetricSource": schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref), + "k8s.io/api/autoscaling/v1.PodsMetricStatus": schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref), + "k8s.io/api/autoscaling/v1.ResourceMetricSource": schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref), + "k8s.io/api/autoscaling/v1.ResourceMetricStatus": schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref), + "k8s.io/api/autoscaling/v1.Scale": schema_k8sio_api_autoscaling_v1_Scale(ref), + "k8s.io/api/autoscaling/v1.ScaleSpec": schema_k8sio_api_autoscaling_v1_ScaleSpec(ref), + "k8s.io/api/autoscaling/v1.ScaleStatus": schema_k8sio_api_autoscaling_v1_ScaleStatus(ref), + "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource": schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref), + "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref), + "k8s.io/api/autoscaling/v2beta1.ExternalMetricSource": schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref), + "k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref), + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref), + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref), + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref), + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref), + "k8s.io/api/autoscaling/v2beta1.MetricSpec": schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref), + "k8s.io/api/autoscaling/v2beta1.MetricStatus": schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref), + "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource": schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref), + "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta1.PodsMetricSource": schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref), + "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus": schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource": schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref), + "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource": schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref), + "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref), + "k8s.io/api/autoscaling/v2beta2.ExternalMetricSource": schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref), + "k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy": schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref), + "k8s.io/api/autoscaling/v2beta2.HPAScalingRules": schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref), + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref), + "k8s.io/api/autoscaling/v2beta2.MetricIdentifier": schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref), + "k8s.io/api/autoscaling/v2beta2.MetricSpec": schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref), + "k8s.io/api/autoscaling/v2beta2.MetricStatus": schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.MetricTarget": schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref), + "k8s.io/api/autoscaling/v2beta2.MetricValueStatus": schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref), + "k8s.io/api/autoscaling/v2beta2.ObjectMetricSource": schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref), + "k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.PodsMetricSource": schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref), + "k8s.io/api/autoscaling/v2beta2.PodsMetricStatus": schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref), + "k8s.io/api/autoscaling/v2beta2.ResourceMetricSource": schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref), + "k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref), + "k8s.io/api/batch/v1.CronJob": schema_k8sio_api_batch_v1_CronJob(ref), + "k8s.io/api/batch/v1.CronJobList": schema_k8sio_api_batch_v1_CronJobList(ref), + "k8s.io/api/batch/v1.CronJobSpec": schema_k8sio_api_batch_v1_CronJobSpec(ref), + "k8s.io/api/batch/v1.CronJobStatus": schema_k8sio_api_batch_v1_CronJobStatus(ref), + "k8s.io/api/batch/v1.Job": schema_k8sio_api_batch_v1_Job(ref), + "k8s.io/api/batch/v1.JobCondition": schema_k8sio_api_batch_v1_JobCondition(ref), + "k8s.io/api/batch/v1.JobList": schema_k8sio_api_batch_v1_JobList(ref), + "k8s.io/api/batch/v1.JobSpec": schema_k8sio_api_batch_v1_JobSpec(ref), + "k8s.io/api/batch/v1.JobStatus": schema_k8sio_api_batch_v1_JobStatus(ref), + "k8s.io/api/batch/v1.JobTemplateSpec": schema_k8sio_api_batch_v1_JobTemplateSpec(ref), + "k8s.io/api/batch/v1.UncountedTerminatedPods": schema_k8sio_api_batch_v1_UncountedTerminatedPods(ref), + "k8s.io/api/batch/v1beta1.CronJob": schema_k8sio_api_batch_v1beta1_CronJob(ref), + "k8s.io/api/batch/v1beta1.CronJobList": schema_k8sio_api_batch_v1beta1_CronJobList(ref), + "k8s.io/api/batch/v1beta1.CronJobSpec": schema_k8sio_api_batch_v1beta1_CronJobSpec(ref), + "k8s.io/api/batch/v1beta1.CronJobStatus": schema_k8sio_api_batch_v1beta1_CronJobStatus(ref), + "k8s.io/api/batch/v1beta1.JobTemplate": schema_k8sio_api_batch_v1beta1_JobTemplate(ref), + "k8s.io/api/batch/v1beta1.JobTemplateSpec": schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref), + "k8s.io/api/certificates/v1.CertificateSigningRequest": schema_k8sio_api_certificates_v1_CertificateSigningRequest(ref), + "k8s.io/api/certificates/v1.CertificateSigningRequestCondition": schema_k8sio_api_certificates_v1_CertificateSigningRequestCondition(ref), + "k8s.io/api/certificates/v1.CertificateSigningRequestList": schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref), + "k8s.io/api/certificates/v1.CertificateSigningRequestSpec": schema_k8sio_api_certificates_v1_CertificateSigningRequestSpec(ref), + "k8s.io/api/certificates/v1.CertificateSigningRequestStatus": schema_k8sio_api_certificates_v1_CertificateSigningRequestStatus(ref), + "k8s.io/api/certificates/v1beta1.CertificateSigningRequest": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref), + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(ref), + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestList": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref), + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref), + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus": schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref), + "k8s.io/api/coordination/v1.Lease": schema_k8sio_api_coordination_v1_Lease(ref), + "k8s.io/api/coordination/v1.LeaseList": schema_k8sio_api_coordination_v1_LeaseList(ref), + "k8s.io/api/coordination/v1.LeaseSpec": schema_k8sio_api_coordination_v1_LeaseSpec(ref), + "k8s.io/api/coordination/v1beta1.Lease": schema_k8sio_api_coordination_v1beta1_Lease(ref), + "k8s.io/api/coordination/v1beta1.LeaseList": schema_k8sio_api_coordination_v1beta1_LeaseList(ref), + "k8s.io/api/coordination/v1beta1.LeaseSpec": schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref), + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), + "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), + "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), + "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), + "k8s.io/api/core/v1.AzureDiskVolumeSource": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), + "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), + "k8s.io/api/core/v1.AzureFileVolumeSource": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), + "k8s.io/api/core/v1.Binding": schema_k8sio_api_core_v1_Binding(ref), + "k8s.io/api/core/v1.CSIPersistentVolumeSource": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CSIVolumeSource": schema_k8sio_api_core_v1_CSIVolumeSource(ref), + "k8s.io/api/core/v1.Capabilities": schema_k8sio_api_core_v1_Capabilities(ref), + "k8s.io/api/core/v1.CephFSPersistentVolumeSource": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CephFSVolumeSource": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), + "k8s.io/api/core/v1.CinderPersistentVolumeSource": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CinderVolumeSource": schema_k8sio_api_core_v1_CinderVolumeSource(ref), + "k8s.io/api/core/v1.ClientIPConfig": schema_k8sio_api_core_v1_ClientIPConfig(ref), + "k8s.io/api/core/v1.ComponentCondition": schema_k8sio_api_core_v1_ComponentCondition(ref), + "k8s.io/api/core/v1.ComponentStatus": schema_k8sio_api_core_v1_ComponentStatus(ref), + "k8s.io/api/core/v1.ComponentStatusList": schema_k8sio_api_core_v1_ComponentStatusList(ref), + "k8s.io/api/core/v1.ConfigMap": schema_k8sio_api_core_v1_ConfigMap(ref), + "k8s.io/api/core/v1.ConfigMapEnvSource": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), + "k8s.io/api/core/v1.ConfigMapKeySelector": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), + "k8s.io/api/core/v1.ConfigMapList": schema_k8sio_api_core_v1_ConfigMapList(ref), + "k8s.io/api/core/v1.ConfigMapNodeConfigSource": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), + "k8s.io/api/core/v1.ConfigMapProjection": schema_k8sio_api_core_v1_ConfigMapProjection(ref), + "k8s.io/api/core/v1.ConfigMapVolumeSource": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), + "k8s.io/api/core/v1.Container": schema_k8sio_api_core_v1_Container(ref), + "k8s.io/api/core/v1.ContainerImage": schema_k8sio_api_core_v1_ContainerImage(ref), + "k8s.io/api/core/v1.ContainerPort": schema_k8sio_api_core_v1_ContainerPort(ref), + "k8s.io/api/core/v1.ContainerState": schema_k8sio_api_core_v1_ContainerState(ref), + "k8s.io/api/core/v1.ContainerStateRunning": schema_k8sio_api_core_v1_ContainerStateRunning(ref), + "k8s.io/api/core/v1.ContainerStateTerminated": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), + "k8s.io/api/core/v1.ContainerStateWaiting": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), + "k8s.io/api/core/v1.ContainerStatus": schema_k8sio_api_core_v1_ContainerStatus(ref), + "k8s.io/api/core/v1.DaemonEndpoint": schema_k8sio_api_core_v1_DaemonEndpoint(ref), + "k8s.io/api/core/v1.DownwardAPIProjection": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), + "k8s.io/api/core/v1.DownwardAPIVolumeFile": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), + "k8s.io/api/core/v1.DownwardAPIVolumeSource": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), + "k8s.io/api/core/v1.EmptyDirVolumeSource": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), + "k8s.io/api/core/v1.EndpointAddress": schema_k8sio_api_core_v1_EndpointAddress(ref), + "k8s.io/api/core/v1.EndpointPort": schema_k8sio_api_core_v1_EndpointPort(ref), + "k8s.io/api/core/v1.EndpointSubset": schema_k8sio_api_core_v1_EndpointSubset(ref), + "k8s.io/api/core/v1.Endpoints": schema_k8sio_api_core_v1_Endpoints(ref), + "k8s.io/api/core/v1.EndpointsList": schema_k8sio_api_core_v1_EndpointsList(ref), + "k8s.io/api/core/v1.EnvFromSource": schema_k8sio_api_core_v1_EnvFromSource(ref), + "k8s.io/api/core/v1.EnvVar": schema_k8sio_api_core_v1_EnvVar(ref), + "k8s.io/api/core/v1.EnvVarSource": schema_k8sio_api_core_v1_EnvVarSource(ref), + "k8s.io/api/core/v1.EphemeralContainer": schema_k8sio_api_core_v1_EphemeralContainer(ref), + "k8s.io/api/core/v1.EphemeralContainerCommon": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), + "k8s.io/api/core/v1.EphemeralVolumeSource": schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), + "k8s.io/api/core/v1.Event": schema_k8sio_api_core_v1_Event(ref), + "k8s.io/api/core/v1.EventList": schema_k8sio_api_core_v1_EventList(ref), + "k8s.io/api/core/v1.EventSeries": schema_k8sio_api_core_v1_EventSeries(ref), + "k8s.io/api/core/v1.EventSource": schema_k8sio_api_core_v1_EventSource(ref), + "k8s.io/api/core/v1.ExecAction": schema_k8sio_api_core_v1_ExecAction(ref), + "k8s.io/api/core/v1.FCVolumeSource": schema_k8sio_api_core_v1_FCVolumeSource(ref), + "k8s.io/api/core/v1.FlexPersistentVolumeSource": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), + "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), + "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), + "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), + "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), + "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), + "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), + "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), + "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), + "k8s.io/api/core/v1.Handler": schema_k8sio_api_core_v1_Handler(ref), + "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), + "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), + "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), + "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), + "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), + "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), + "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), + "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), + "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), + "k8s.io/api/core/v1.LimitRangeSpec": schema_k8sio_api_core_v1_LimitRangeSpec(ref), + "k8s.io/api/core/v1.List": schema_k8sio_api_core_v1_List(ref), + "k8s.io/api/core/v1.LoadBalancerIngress": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), + "k8s.io/api/core/v1.LoadBalancerStatus": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), + "k8s.io/api/core/v1.LocalObjectReference": schema_k8sio_api_core_v1_LocalObjectReference(ref), + "k8s.io/api/core/v1.LocalVolumeSource": schema_k8sio_api_core_v1_LocalVolumeSource(ref), + "k8s.io/api/core/v1.NFSVolumeSource": schema_k8sio_api_core_v1_NFSVolumeSource(ref), + "k8s.io/api/core/v1.Namespace": schema_k8sio_api_core_v1_Namespace(ref), + "k8s.io/api/core/v1.NamespaceCondition": schema_k8sio_api_core_v1_NamespaceCondition(ref), + "k8s.io/api/core/v1.NamespaceList": schema_k8sio_api_core_v1_NamespaceList(ref), + "k8s.io/api/core/v1.NamespaceSpec": schema_k8sio_api_core_v1_NamespaceSpec(ref), + "k8s.io/api/core/v1.NamespaceStatus": schema_k8sio_api_core_v1_NamespaceStatus(ref), + "k8s.io/api/core/v1.Node": schema_k8sio_api_core_v1_Node(ref), + "k8s.io/api/core/v1.NodeAddress": schema_k8sio_api_core_v1_NodeAddress(ref), + "k8s.io/api/core/v1.NodeAffinity": schema_k8sio_api_core_v1_NodeAffinity(ref), + "k8s.io/api/core/v1.NodeCondition": schema_k8sio_api_core_v1_NodeCondition(ref), + "k8s.io/api/core/v1.NodeConfigSource": schema_k8sio_api_core_v1_NodeConfigSource(ref), + "k8s.io/api/core/v1.NodeConfigStatus": schema_k8sio_api_core_v1_NodeConfigStatus(ref), + "k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), + "k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref), + "k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref), + "k8s.io/api/core/v1.NodeResources": schema_k8sio_api_core_v1_NodeResources(ref), + "k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref), + "k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), + "k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), + "k8s.io/api/core/v1.NodeSpec": schema_k8sio_api_core_v1_NodeSpec(ref), + "k8s.io/api/core/v1.NodeStatus": schema_k8sio_api_core_v1_NodeStatus(ref), + "k8s.io/api/core/v1.NodeSystemInfo": schema_k8sio_api_core_v1_NodeSystemInfo(ref), + "k8s.io/api/core/v1.ObjectFieldSelector": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), + "k8s.io/api/core/v1.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref), + "k8s.io/api/core/v1.PersistentVolume": schema_k8sio_api_core_v1_PersistentVolume(ref), + "k8s.io/api/core/v1.PersistentVolumeClaim": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimCondition": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimList": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimSpec": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimStatus": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimTemplate": schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), + "k8s.io/api/core/v1.PersistentVolumeList": schema_k8sio_api_core_v1_PersistentVolumeList(ref), + "k8s.io/api/core/v1.PersistentVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), + "k8s.io/api/core/v1.PersistentVolumeSpec": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), + "k8s.io/api/core/v1.PersistentVolumeStatus": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), + "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), + "k8s.io/api/core/v1.Pod": schema_k8sio_api_core_v1_Pod(ref), + "k8s.io/api/core/v1.PodAffinity": schema_k8sio_api_core_v1_PodAffinity(ref), + "k8s.io/api/core/v1.PodAffinityTerm": schema_k8sio_api_core_v1_PodAffinityTerm(ref), + "k8s.io/api/core/v1.PodAntiAffinity": schema_k8sio_api_core_v1_PodAntiAffinity(ref), + "k8s.io/api/core/v1.PodAttachOptions": schema_k8sio_api_core_v1_PodAttachOptions(ref), + "k8s.io/api/core/v1.PodCondition": schema_k8sio_api_core_v1_PodCondition(ref), + "k8s.io/api/core/v1.PodDNSConfig": schema_k8sio_api_core_v1_PodDNSConfig(ref), + "k8s.io/api/core/v1.PodDNSConfigOption": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), + "k8s.io/api/core/v1.PodExecOptions": schema_k8sio_api_core_v1_PodExecOptions(ref), + "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), + "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), + "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), + "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), + "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), + "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), + "k8s.io/api/core/v1.PodSecurityContext": schema_k8sio_api_core_v1_PodSecurityContext(ref), + "k8s.io/api/core/v1.PodSignature": schema_k8sio_api_core_v1_PodSignature(ref), + "k8s.io/api/core/v1.PodSpec": schema_k8sio_api_core_v1_PodSpec(ref), + "k8s.io/api/core/v1.PodStatus": schema_k8sio_api_core_v1_PodStatus(ref), + "k8s.io/api/core/v1.PodStatusResult": schema_k8sio_api_core_v1_PodStatusResult(ref), + "k8s.io/api/core/v1.PodTemplate": schema_k8sio_api_core_v1_PodTemplate(ref), + "k8s.io/api/core/v1.PodTemplateList": schema_k8sio_api_core_v1_PodTemplateList(ref), + "k8s.io/api/core/v1.PodTemplateSpec": schema_k8sio_api_core_v1_PodTemplateSpec(ref), + "k8s.io/api/core/v1.PortStatus": schema_k8sio_api_core_v1_PortStatus(ref), + "k8s.io/api/core/v1.PortworxVolumeSource": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), + "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), + "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), + "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), + "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), + "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), + "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), + "k8s.io/api/core/v1.RBDVolumeSource": schema_k8sio_api_core_v1_RBDVolumeSource(ref), + "k8s.io/api/core/v1.RangeAllocation": schema_k8sio_api_core_v1_RangeAllocation(ref), + "k8s.io/api/core/v1.ReplicationController": schema_k8sio_api_core_v1_ReplicationController(ref), + "k8s.io/api/core/v1.ReplicationControllerCondition": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), + "k8s.io/api/core/v1.ReplicationControllerList": schema_k8sio_api_core_v1_ReplicationControllerList(ref), + "k8s.io/api/core/v1.ReplicationControllerSpec": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), + "k8s.io/api/core/v1.ReplicationControllerStatus": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), + "k8s.io/api/core/v1.ResourceFieldSelector": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), + "k8s.io/api/core/v1.ResourceQuota": schema_k8sio_api_core_v1_ResourceQuota(ref), + "k8s.io/api/core/v1.ResourceQuotaList": schema_k8sio_api_core_v1_ResourceQuotaList(ref), + "k8s.io/api/core/v1.ResourceQuotaSpec": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), + "k8s.io/api/core/v1.ResourceQuotaStatus": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), + "k8s.io/api/core/v1.ResourceRequirements": schema_k8sio_api_core_v1_ResourceRequirements(ref), + "k8s.io/api/core/v1.SELinuxOptions": schema_k8sio_api_core_v1_SELinuxOptions(ref), + "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), + "k8s.io/api/core/v1.ScaleIOVolumeSource": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), + "k8s.io/api/core/v1.ScopeSelector": schema_k8sio_api_core_v1_ScopeSelector(ref), + "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), + "k8s.io/api/core/v1.SeccompProfile": schema_k8sio_api_core_v1_SeccompProfile(ref), + "k8s.io/api/core/v1.Secret": schema_k8sio_api_core_v1_Secret(ref), + "k8s.io/api/core/v1.SecretEnvSource": schema_k8sio_api_core_v1_SecretEnvSource(ref), + "k8s.io/api/core/v1.SecretKeySelector": schema_k8sio_api_core_v1_SecretKeySelector(ref), + "k8s.io/api/core/v1.SecretList": schema_k8sio_api_core_v1_SecretList(ref), + "k8s.io/api/core/v1.SecretProjection": schema_k8sio_api_core_v1_SecretProjection(ref), + "k8s.io/api/core/v1.SecretReference": schema_k8sio_api_core_v1_SecretReference(ref), + "k8s.io/api/core/v1.SecretVolumeSource": schema_k8sio_api_core_v1_SecretVolumeSource(ref), + "k8s.io/api/core/v1.SecurityContext": schema_k8sio_api_core_v1_SecurityContext(ref), + "k8s.io/api/core/v1.SerializedReference": schema_k8sio_api_core_v1_SerializedReference(ref), + "k8s.io/api/core/v1.Service": schema_k8sio_api_core_v1_Service(ref), + "k8s.io/api/core/v1.ServiceAccount": schema_k8sio_api_core_v1_ServiceAccount(ref), + "k8s.io/api/core/v1.ServiceAccountList": schema_k8sio_api_core_v1_ServiceAccountList(ref), + "k8s.io/api/core/v1.ServiceAccountTokenProjection": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), + "k8s.io/api/core/v1.ServiceList": schema_k8sio_api_core_v1_ServiceList(ref), + "k8s.io/api/core/v1.ServicePort": schema_k8sio_api_core_v1_ServicePort(ref), + "k8s.io/api/core/v1.ServiceProxyOptions": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), + "k8s.io/api/core/v1.ServiceSpec": schema_k8sio_api_core_v1_ServiceSpec(ref), + "k8s.io/api/core/v1.ServiceStatus": schema_k8sio_api_core_v1_ServiceStatus(ref), + "k8s.io/api/core/v1.SessionAffinityConfig": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), + "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), + "k8s.io/api/core/v1.StorageOSVolumeSource": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), + "k8s.io/api/core/v1.Sysctl": schema_k8sio_api_core_v1_Sysctl(ref), + "k8s.io/api/core/v1.TCPSocketAction": schema_k8sio_api_core_v1_TCPSocketAction(ref), + "k8s.io/api/core/v1.Taint": schema_k8sio_api_core_v1_Taint(ref), + "k8s.io/api/core/v1.Toleration": schema_k8sio_api_core_v1_Toleration(ref), + "k8s.io/api/core/v1.TopologySelectorLabelRequirement": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), + "k8s.io/api/core/v1.TopologySelectorTerm": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), + "k8s.io/api/core/v1.TopologySpreadConstraint": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), + "k8s.io/api/core/v1.TypedLocalObjectReference": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), + "k8s.io/api/core/v1.Volume": schema_k8sio_api_core_v1_Volume(ref), + "k8s.io/api/core/v1.VolumeDevice": schema_k8sio_api_core_v1_VolumeDevice(ref), + "k8s.io/api/core/v1.VolumeMount": schema_k8sio_api_core_v1_VolumeMount(ref), + "k8s.io/api/core/v1.VolumeNodeAffinity": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), + "k8s.io/api/core/v1.VolumeProjection": schema_k8sio_api_core_v1_VolumeProjection(ref), + "k8s.io/api/core/v1.VolumeSource": schema_k8sio_api_core_v1_VolumeSource(ref), + "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), + "k8s.io/api/core/v1.WeightedPodAffinityTerm": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), + "k8s.io/api/core/v1.WindowsSecurityContextOptions": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), + "k8s.io/api/discovery/v1.Endpoint": schema_k8sio_api_discovery_v1_Endpoint(ref), + "k8s.io/api/discovery/v1.EndpointConditions": schema_k8sio_api_discovery_v1_EndpointConditions(ref), + "k8s.io/api/discovery/v1.EndpointHints": schema_k8sio_api_discovery_v1_EndpointHints(ref), + "k8s.io/api/discovery/v1.EndpointPort": schema_k8sio_api_discovery_v1_EndpointPort(ref), + "k8s.io/api/discovery/v1.EndpointSlice": schema_k8sio_api_discovery_v1_EndpointSlice(ref), + "k8s.io/api/discovery/v1.EndpointSliceList": schema_k8sio_api_discovery_v1_EndpointSliceList(ref), + "k8s.io/api/discovery/v1.ForZone": schema_k8sio_api_discovery_v1_ForZone(ref), + "k8s.io/api/discovery/v1beta1.Endpoint": schema_k8sio_api_discovery_v1beta1_Endpoint(ref), + "k8s.io/api/discovery/v1beta1.EndpointConditions": schema_k8sio_api_discovery_v1beta1_EndpointConditions(ref), + "k8s.io/api/discovery/v1beta1.EndpointHints": schema_k8sio_api_discovery_v1beta1_EndpointHints(ref), + "k8s.io/api/discovery/v1beta1.EndpointPort": schema_k8sio_api_discovery_v1beta1_EndpointPort(ref), + "k8s.io/api/discovery/v1beta1.EndpointSlice": schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref), + "k8s.io/api/discovery/v1beta1.EndpointSliceList": schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref), + "k8s.io/api/discovery/v1beta1.ForZone": schema_k8sio_api_discovery_v1beta1_ForZone(ref), + "k8s.io/api/events/v1.Event": schema_k8sio_api_events_v1_Event(ref), + "k8s.io/api/events/v1.EventList": schema_k8sio_api_events_v1_EventList(ref), + "k8s.io/api/events/v1.EventSeries": schema_k8sio_api_events_v1_EventSeries(ref), + "k8s.io/api/events/v1beta1.Event": schema_k8sio_api_events_v1beta1_Event(ref), + "k8s.io/api/events/v1beta1.EventList": schema_k8sio_api_events_v1beta1_EventList(ref), + "k8s.io/api/events/v1beta1.EventSeries": schema_k8sio_api_events_v1beta1_EventSeries(ref), + "k8s.io/api/extensions/v1beta1.AllowedCSIDriver": schema_k8sio_api_extensions_v1beta1_AllowedCSIDriver(ref), + "k8s.io/api/extensions/v1beta1.AllowedFlexVolume": schema_k8sio_api_extensions_v1beta1_AllowedFlexVolume(ref), + "k8s.io/api/extensions/v1beta1.AllowedHostPath": schema_k8sio_api_extensions_v1beta1_AllowedHostPath(ref), + "k8s.io/api/extensions/v1beta1.DaemonSet": schema_k8sio_api_extensions_v1beta1_DaemonSet(ref), + "k8s.io/api/extensions/v1beta1.DaemonSetCondition": schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref), + "k8s.io/api/extensions/v1beta1.DaemonSetList": schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref), + "k8s.io/api/extensions/v1beta1.DaemonSetSpec": schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref), + "k8s.io/api/extensions/v1beta1.DaemonSetStatus": schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref), + "k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy": schema_k8sio_api_extensions_v1beta1_DaemonSetUpdateStrategy(ref), + "k8s.io/api/extensions/v1beta1.Deployment": schema_k8sio_api_extensions_v1beta1_Deployment(ref), + "k8s.io/api/extensions/v1beta1.DeploymentCondition": schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref), + "k8s.io/api/extensions/v1beta1.DeploymentList": schema_k8sio_api_extensions_v1beta1_DeploymentList(ref), + "k8s.io/api/extensions/v1beta1.DeploymentRollback": schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref), + "k8s.io/api/extensions/v1beta1.DeploymentSpec": schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref), + "k8s.io/api/extensions/v1beta1.DeploymentStatus": schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref), + "k8s.io/api/extensions/v1beta1.DeploymentStrategy": schema_k8sio_api_extensions_v1beta1_DeploymentStrategy(ref), + "k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions": schema_k8sio_api_extensions_v1beta1_FSGroupStrategyOptions(ref), + "k8s.io/api/extensions/v1beta1.HTTPIngressPath": schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref), + "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue": schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref), + "k8s.io/api/extensions/v1beta1.HostPortRange": schema_k8sio_api_extensions_v1beta1_HostPortRange(ref), + "k8s.io/api/extensions/v1beta1.IDRange": schema_k8sio_api_extensions_v1beta1_IDRange(ref), + "k8s.io/api/extensions/v1beta1.IPBlock": schema_k8sio_api_extensions_v1beta1_IPBlock(ref), + "k8s.io/api/extensions/v1beta1.Ingress": schema_k8sio_api_extensions_v1beta1_Ingress(ref), + "k8s.io/api/extensions/v1beta1.IngressBackend": schema_k8sio_api_extensions_v1beta1_IngressBackend(ref), + "k8s.io/api/extensions/v1beta1.IngressList": schema_k8sio_api_extensions_v1beta1_IngressList(ref), + "k8s.io/api/extensions/v1beta1.IngressRule": schema_k8sio_api_extensions_v1beta1_IngressRule(ref), + "k8s.io/api/extensions/v1beta1.IngressRuleValue": schema_k8sio_api_extensions_v1beta1_IngressRuleValue(ref), + "k8s.io/api/extensions/v1beta1.IngressSpec": schema_k8sio_api_extensions_v1beta1_IngressSpec(ref), + "k8s.io/api/extensions/v1beta1.IngressStatus": schema_k8sio_api_extensions_v1beta1_IngressStatus(ref), + "k8s.io/api/extensions/v1beta1.IngressTLS": schema_k8sio_api_extensions_v1beta1_IngressTLS(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicy": schema_k8sio_api_extensions_v1beta1_NetworkPolicy(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule": schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule": schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicyList": schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer": schema_k8sio_api_extensions_v1beta1_NetworkPolicyPeer(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicyPort": schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref), + "k8s.io/api/extensions/v1beta1.NetworkPolicySpec": schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref), + "k8s.io/api/extensions/v1beta1.PodSecurityPolicy": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicy(ref), + "k8s.io/api/extensions/v1beta1.PodSecurityPolicyList": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicyList(ref), + "k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec": schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref), + "k8s.io/api/extensions/v1beta1.ReplicaSet": schema_k8sio_api_extensions_v1beta1_ReplicaSet(ref), + "k8s.io/api/extensions/v1beta1.ReplicaSetCondition": schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref), + "k8s.io/api/extensions/v1beta1.ReplicaSetList": schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref), + "k8s.io/api/extensions/v1beta1.ReplicaSetSpec": schema_k8sio_api_extensions_v1beta1_ReplicaSetSpec(ref), + "k8s.io/api/extensions/v1beta1.ReplicaSetStatus": schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref), + "k8s.io/api/extensions/v1beta1.RollbackConfig": schema_k8sio_api_extensions_v1beta1_RollbackConfig(ref), + "k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet": schema_k8sio_api_extensions_v1beta1_RollingUpdateDaemonSet(ref), + "k8s.io/api/extensions/v1beta1.RollingUpdateDeployment": schema_k8sio_api_extensions_v1beta1_RollingUpdateDeployment(ref), + "k8s.io/api/extensions/v1beta1.RunAsGroupStrategyOptions": schema_k8sio_api_extensions_v1beta1_RunAsGroupStrategyOptions(ref), + "k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions": schema_k8sio_api_extensions_v1beta1_RunAsUserStrategyOptions(ref), + "k8s.io/api/extensions/v1beta1.RuntimeClassStrategyOptions": schema_k8sio_api_extensions_v1beta1_RuntimeClassStrategyOptions(ref), + "k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions": schema_k8sio_api_extensions_v1beta1_SELinuxStrategyOptions(ref), + "k8s.io/api/extensions/v1beta1.Scale": schema_k8sio_api_extensions_v1beta1_Scale(ref), + "k8s.io/api/extensions/v1beta1.ScaleSpec": schema_k8sio_api_extensions_v1beta1_ScaleSpec(ref), + "k8s.io/api/extensions/v1beta1.ScaleStatus": schema_k8sio_api_extensions_v1beta1_ScaleStatus(ref), + "k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions": schema_k8sio_api_extensions_v1beta1_SupplementalGroupsStrategyOptions(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowDistinguisherMethod": schema_k8sio_api_flowcontrol_v1alpha1_FlowDistinguisherMethod(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowSchema": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchema(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaCondition": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaCondition(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaList": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaList(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaSpec": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaSpec(ref), + "k8s.io/api/flowcontrol/v1alpha1.FlowSchemaStatus": schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaStatus(ref), + "k8s.io/api/flowcontrol/v1alpha1.GroupSubject": schema_k8sio_api_flowcontrol_v1alpha1_GroupSubject(ref), + "k8s.io/api/flowcontrol/v1alpha1.LimitResponse": schema_k8sio_api_flowcontrol_v1alpha1_LimitResponse(ref), + "k8s.io/api/flowcontrol/v1alpha1.LimitedPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1alpha1_LimitedPriorityLevelConfiguration(ref), + "k8s.io/api/flowcontrol/v1alpha1.NonResourcePolicyRule": schema_k8sio_api_flowcontrol_v1alpha1_NonResourcePolicyRule(ref), + "k8s.io/api/flowcontrol/v1alpha1.PolicyRulesWithSubjects": schema_k8sio_api_flowcontrol_v1alpha1_PolicyRulesWithSubjects(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfiguration(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationCondition": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationCondition(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationList": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationList(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationReference": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationReference(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationSpec": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationSpec(ref), + "k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationStatus": schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationStatus(ref), + "k8s.io/api/flowcontrol/v1alpha1.QueuingConfiguration": schema_k8sio_api_flowcontrol_v1alpha1_QueuingConfiguration(ref), + "k8s.io/api/flowcontrol/v1alpha1.ResourcePolicyRule": schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref), + "k8s.io/api/flowcontrol/v1alpha1.ServiceAccountSubject": schema_k8sio_api_flowcontrol_v1alpha1_ServiceAccountSubject(ref), + "k8s.io/api/flowcontrol/v1alpha1.Subject": schema_k8sio_api_flowcontrol_v1alpha1_Subject(ref), + "k8s.io/api/flowcontrol/v1alpha1.UserSubject": schema_k8sio_api_flowcontrol_v1alpha1_UserSubject(ref), + "k8s.io/api/flowcontrol/v1beta1.FlowDistinguisherMethod": schema_k8sio_api_flowcontrol_v1beta1_FlowDistinguisherMethod(ref), + "k8s.io/api/flowcontrol/v1beta1.FlowSchema": schema_k8sio_api_flowcontrol_v1beta1_FlowSchema(ref), + "k8s.io/api/flowcontrol/v1beta1.FlowSchemaCondition": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaCondition(ref), + "k8s.io/api/flowcontrol/v1beta1.FlowSchemaList": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaList(ref), + "k8s.io/api/flowcontrol/v1beta1.FlowSchemaSpec": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaSpec(ref), + "k8s.io/api/flowcontrol/v1beta1.FlowSchemaStatus": schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaStatus(ref), + "k8s.io/api/flowcontrol/v1beta1.GroupSubject": schema_k8sio_api_flowcontrol_v1beta1_GroupSubject(ref), + "k8s.io/api/flowcontrol/v1beta1.LimitResponse": schema_k8sio_api_flowcontrol_v1beta1_LimitResponse(ref), + "k8s.io/api/flowcontrol/v1beta1.LimitedPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta1_LimitedPriorityLevelConfiguration(ref), + "k8s.io/api/flowcontrol/v1beta1.NonResourcePolicyRule": schema_k8sio_api_flowcontrol_v1beta1_NonResourcePolicyRule(ref), + "k8s.io/api/flowcontrol/v1beta1.PolicyRulesWithSubjects": schema_k8sio_api_flowcontrol_v1beta1_PolicyRulesWithSubjects(ref), + "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfiguration(ref), + "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationCondition": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationCondition(ref), + "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationList": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationList(ref), + "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationReference": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationReference(ref), + "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationSpec": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationSpec(ref), + "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationStatus": schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationStatus(ref), + "k8s.io/api/flowcontrol/v1beta1.QueuingConfiguration": schema_k8sio_api_flowcontrol_v1beta1_QueuingConfiguration(ref), + "k8s.io/api/flowcontrol/v1beta1.ResourcePolicyRule": schema_k8sio_api_flowcontrol_v1beta1_ResourcePolicyRule(ref), + "k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject": schema_k8sio_api_flowcontrol_v1beta1_ServiceAccountSubject(ref), + "k8s.io/api/flowcontrol/v1beta1.Subject": schema_k8sio_api_flowcontrol_v1beta1_Subject(ref), + "k8s.io/api/flowcontrol/v1beta1.UserSubject": schema_k8sio_api_flowcontrol_v1beta1_UserSubject(ref), + "k8s.io/api/imagepolicy/v1alpha1.ImageReview": schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref), + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref), + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref), + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref), + "k8s.io/api/networking/v1.HTTPIngressPath": schema_k8sio_api_networking_v1_HTTPIngressPath(ref), + "k8s.io/api/networking/v1.HTTPIngressRuleValue": schema_k8sio_api_networking_v1_HTTPIngressRuleValue(ref), + "k8s.io/api/networking/v1.IPBlock": schema_k8sio_api_networking_v1_IPBlock(ref), + "k8s.io/api/networking/v1.Ingress": schema_k8sio_api_networking_v1_Ingress(ref), + "k8s.io/api/networking/v1.IngressBackend": schema_k8sio_api_networking_v1_IngressBackend(ref), + "k8s.io/api/networking/v1.IngressClass": schema_k8sio_api_networking_v1_IngressClass(ref), + "k8s.io/api/networking/v1.IngressClassList": schema_k8sio_api_networking_v1_IngressClassList(ref), + "k8s.io/api/networking/v1.IngressClassParametersReference": schema_k8sio_api_networking_v1_IngressClassParametersReference(ref), + "k8s.io/api/networking/v1.IngressClassSpec": schema_k8sio_api_networking_v1_IngressClassSpec(ref), + "k8s.io/api/networking/v1.IngressList": schema_k8sio_api_networking_v1_IngressList(ref), + "k8s.io/api/networking/v1.IngressRule": schema_k8sio_api_networking_v1_IngressRule(ref), + "k8s.io/api/networking/v1.IngressRuleValue": schema_k8sio_api_networking_v1_IngressRuleValue(ref), + "k8s.io/api/networking/v1.IngressServiceBackend": schema_k8sio_api_networking_v1_IngressServiceBackend(ref), + "k8s.io/api/networking/v1.IngressSpec": schema_k8sio_api_networking_v1_IngressSpec(ref), + "k8s.io/api/networking/v1.IngressStatus": schema_k8sio_api_networking_v1_IngressStatus(ref), + "k8s.io/api/networking/v1.IngressTLS": schema_k8sio_api_networking_v1_IngressTLS(ref), + "k8s.io/api/networking/v1.NetworkPolicy": schema_k8sio_api_networking_v1_NetworkPolicy(ref), + "k8s.io/api/networking/v1.NetworkPolicyEgressRule": schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref), + "k8s.io/api/networking/v1.NetworkPolicyIngressRule": schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref), + "k8s.io/api/networking/v1.NetworkPolicyList": schema_k8sio_api_networking_v1_NetworkPolicyList(ref), + "k8s.io/api/networking/v1.NetworkPolicyPeer": schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref), + "k8s.io/api/networking/v1.NetworkPolicyPort": schema_k8sio_api_networking_v1_NetworkPolicyPort(ref), + "k8s.io/api/networking/v1.NetworkPolicySpec": schema_k8sio_api_networking_v1_NetworkPolicySpec(ref), + "k8s.io/api/networking/v1.ServiceBackendPort": schema_k8sio_api_networking_v1_ServiceBackendPort(ref), + "k8s.io/api/networking/v1beta1.HTTPIngressPath": schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref), + "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue": schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref), + "k8s.io/api/networking/v1beta1.Ingress": schema_k8sio_api_networking_v1beta1_Ingress(ref), + "k8s.io/api/networking/v1beta1.IngressBackend": schema_k8sio_api_networking_v1beta1_IngressBackend(ref), + "k8s.io/api/networking/v1beta1.IngressClass": schema_k8sio_api_networking_v1beta1_IngressClass(ref), + "k8s.io/api/networking/v1beta1.IngressClassList": schema_k8sio_api_networking_v1beta1_IngressClassList(ref), + "k8s.io/api/networking/v1beta1.IngressClassParametersReference": schema_k8sio_api_networking_v1beta1_IngressClassParametersReference(ref), + "k8s.io/api/networking/v1beta1.IngressClassSpec": schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref), + "k8s.io/api/networking/v1beta1.IngressList": schema_k8sio_api_networking_v1beta1_IngressList(ref), + "k8s.io/api/networking/v1beta1.IngressRule": schema_k8sio_api_networking_v1beta1_IngressRule(ref), + "k8s.io/api/networking/v1beta1.IngressRuleValue": schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref), + "k8s.io/api/networking/v1beta1.IngressSpec": schema_k8sio_api_networking_v1beta1_IngressSpec(ref), + "k8s.io/api/networking/v1beta1.IngressStatus": schema_k8sio_api_networking_v1beta1_IngressStatus(ref), + "k8s.io/api/networking/v1beta1.IngressTLS": schema_k8sio_api_networking_v1beta1_IngressTLS(ref), + "k8s.io/api/node/v1.Overhead": schema_k8sio_api_node_v1_Overhead(ref), + "k8s.io/api/node/v1.RuntimeClass": schema_k8sio_api_node_v1_RuntimeClass(ref), + "k8s.io/api/node/v1.RuntimeClassList": schema_k8sio_api_node_v1_RuntimeClassList(ref), + "k8s.io/api/node/v1.Scheduling": schema_k8sio_api_node_v1_Scheduling(ref), + "k8s.io/api/node/v1alpha1.Overhead": schema_k8sio_api_node_v1alpha1_Overhead(ref), + "k8s.io/api/node/v1alpha1.RuntimeClass": schema_k8sio_api_node_v1alpha1_RuntimeClass(ref), + "k8s.io/api/node/v1alpha1.RuntimeClassList": schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref), + "k8s.io/api/node/v1alpha1.RuntimeClassSpec": schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref), + "k8s.io/api/node/v1alpha1.Scheduling": schema_k8sio_api_node_v1alpha1_Scheduling(ref), + "k8s.io/api/node/v1beta1.Overhead": schema_k8sio_api_node_v1beta1_Overhead(ref), + "k8s.io/api/node/v1beta1.RuntimeClass": schema_k8sio_api_node_v1beta1_RuntimeClass(ref), + "k8s.io/api/node/v1beta1.RuntimeClassList": schema_k8sio_api_node_v1beta1_RuntimeClassList(ref), + "k8s.io/api/node/v1beta1.Scheduling": schema_k8sio_api_node_v1beta1_Scheduling(ref), + "k8s.io/api/policy/v1.Eviction": schema_k8sio_api_policy_v1_Eviction(ref), + "k8s.io/api/policy/v1.PodDisruptionBudget": schema_k8sio_api_policy_v1_PodDisruptionBudget(ref), + "k8s.io/api/policy/v1.PodDisruptionBudgetList": schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref), + "k8s.io/api/policy/v1.PodDisruptionBudgetSpec": schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref), + "k8s.io/api/policy/v1.PodDisruptionBudgetStatus": schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref), + "k8s.io/api/policy/v1beta1.AllowedCSIDriver": schema_k8sio_api_policy_v1beta1_AllowedCSIDriver(ref), + "k8s.io/api/policy/v1beta1.AllowedFlexVolume": schema_k8sio_api_policy_v1beta1_AllowedFlexVolume(ref), + "k8s.io/api/policy/v1beta1.AllowedHostPath": schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref), + "k8s.io/api/policy/v1beta1.Eviction": schema_k8sio_api_policy_v1beta1_Eviction(ref), + "k8s.io/api/policy/v1beta1.FSGroupStrategyOptions": schema_k8sio_api_policy_v1beta1_FSGroupStrategyOptions(ref), + "k8s.io/api/policy/v1beta1.HostPortRange": schema_k8sio_api_policy_v1beta1_HostPortRange(ref), + "k8s.io/api/policy/v1beta1.IDRange": schema_k8sio_api_policy_v1beta1_IDRange(ref), + "k8s.io/api/policy/v1beta1.PodDisruptionBudget": schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref), + "k8s.io/api/policy/v1beta1.PodDisruptionBudgetList": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref), + "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref), + "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus": schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref), + "k8s.io/api/policy/v1beta1.PodSecurityPolicy": schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref), + "k8s.io/api/policy/v1beta1.PodSecurityPolicyList": schema_k8sio_api_policy_v1beta1_PodSecurityPolicyList(ref), + "k8s.io/api/policy/v1beta1.PodSecurityPolicySpec": schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref), + "k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions": schema_k8sio_api_policy_v1beta1_RunAsGroupStrategyOptions(ref), + "k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions": schema_k8sio_api_policy_v1beta1_RunAsUserStrategyOptions(ref), + "k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions": schema_k8sio_api_policy_v1beta1_RuntimeClassStrategyOptions(ref), + "k8s.io/api/policy/v1beta1.SELinuxStrategyOptions": schema_k8sio_api_policy_v1beta1_SELinuxStrategyOptions(ref), + "k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions": schema_k8sio_api_policy_v1beta1_SupplementalGroupsStrategyOptions(ref), + "k8s.io/api/rbac/v1.AggregationRule": schema_k8sio_api_rbac_v1_AggregationRule(ref), + "k8s.io/api/rbac/v1.ClusterRole": schema_k8sio_api_rbac_v1_ClusterRole(ref), + "k8s.io/api/rbac/v1.ClusterRoleBinding": schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref), + "k8s.io/api/rbac/v1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref), + "k8s.io/api/rbac/v1.ClusterRoleList": schema_k8sio_api_rbac_v1_ClusterRoleList(ref), + "k8s.io/api/rbac/v1.PolicyRule": schema_k8sio_api_rbac_v1_PolicyRule(ref), + "k8s.io/api/rbac/v1.Role": schema_k8sio_api_rbac_v1_Role(ref), + "k8s.io/api/rbac/v1.RoleBinding": schema_k8sio_api_rbac_v1_RoleBinding(ref), + "k8s.io/api/rbac/v1.RoleBindingList": schema_k8sio_api_rbac_v1_RoleBindingList(ref), + "k8s.io/api/rbac/v1.RoleList": schema_k8sio_api_rbac_v1_RoleList(ref), + "k8s.io/api/rbac/v1.RoleRef": schema_k8sio_api_rbac_v1_RoleRef(ref), + "k8s.io/api/rbac/v1.Subject": schema_k8sio_api_rbac_v1_Subject(ref), + "k8s.io/api/rbac/v1alpha1.AggregationRule": schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref), + "k8s.io/api/rbac/v1alpha1.ClusterRole": schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref), + "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding": schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref), + "k8s.io/api/rbac/v1alpha1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref), + "k8s.io/api/rbac/v1alpha1.ClusterRoleList": schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref), + "k8s.io/api/rbac/v1alpha1.PolicyRule": schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref), + "k8s.io/api/rbac/v1alpha1.Role": schema_k8sio_api_rbac_v1alpha1_Role(ref), + "k8s.io/api/rbac/v1alpha1.RoleBinding": schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref), + "k8s.io/api/rbac/v1alpha1.RoleBindingList": schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref), + "k8s.io/api/rbac/v1alpha1.RoleList": schema_k8sio_api_rbac_v1alpha1_RoleList(ref), + "k8s.io/api/rbac/v1alpha1.RoleRef": schema_k8sio_api_rbac_v1alpha1_RoleRef(ref), + "k8s.io/api/rbac/v1alpha1.Subject": schema_k8sio_api_rbac_v1alpha1_Subject(ref), + "k8s.io/api/rbac/v1beta1.AggregationRule": schema_k8sio_api_rbac_v1beta1_AggregationRule(ref), + "k8s.io/api/rbac/v1beta1.ClusterRole": schema_k8sio_api_rbac_v1beta1_ClusterRole(ref), + "k8s.io/api/rbac/v1beta1.ClusterRoleBinding": schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref), + "k8s.io/api/rbac/v1beta1.ClusterRoleBindingList": schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref), + "k8s.io/api/rbac/v1beta1.ClusterRoleList": schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref), + "k8s.io/api/rbac/v1beta1.PolicyRule": schema_k8sio_api_rbac_v1beta1_PolicyRule(ref), + "k8s.io/api/rbac/v1beta1.Role": schema_k8sio_api_rbac_v1beta1_Role(ref), + "k8s.io/api/rbac/v1beta1.RoleBinding": schema_k8sio_api_rbac_v1beta1_RoleBinding(ref), + "k8s.io/api/rbac/v1beta1.RoleBindingList": schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref), + "k8s.io/api/rbac/v1beta1.RoleList": schema_k8sio_api_rbac_v1beta1_RoleList(ref), + "k8s.io/api/rbac/v1beta1.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(ref), + "k8s.io/api/rbac/v1beta1.Subject": schema_k8sio_api_rbac_v1beta1_Subject(ref), + "k8s.io/api/scheduling/v1.PriorityClass": schema_k8sio_api_scheduling_v1_PriorityClass(ref), + "k8s.io/api/scheduling/v1.PriorityClassList": schema_k8sio_api_scheduling_v1_PriorityClassList(ref), + "k8s.io/api/scheduling/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), + "k8s.io/api/scheduling/v1alpha1.PriorityClassList": schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref), + "k8s.io/api/scheduling/v1beta1.PriorityClass": schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref), + "k8s.io/api/scheduling/v1beta1.PriorityClassList": schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref), + "k8s.io/api/storage/v1.CSIDriver": schema_k8sio_api_storage_v1_CSIDriver(ref), + "k8s.io/api/storage/v1.CSIDriverList": schema_k8sio_api_storage_v1_CSIDriverList(ref), + "k8s.io/api/storage/v1.CSIDriverSpec": schema_k8sio_api_storage_v1_CSIDriverSpec(ref), + "k8s.io/api/storage/v1.CSINode": schema_k8sio_api_storage_v1_CSINode(ref), + "k8s.io/api/storage/v1.CSINodeDriver": schema_k8sio_api_storage_v1_CSINodeDriver(ref), + "k8s.io/api/storage/v1.CSINodeList": schema_k8sio_api_storage_v1_CSINodeList(ref), + "k8s.io/api/storage/v1.CSINodeSpec": schema_k8sio_api_storage_v1_CSINodeSpec(ref), + "k8s.io/api/storage/v1.StorageClass": schema_k8sio_api_storage_v1_StorageClass(ref), + "k8s.io/api/storage/v1.StorageClassList": schema_k8sio_api_storage_v1_StorageClassList(ref), + "k8s.io/api/storage/v1.TokenRequest": schema_k8sio_api_storage_v1_TokenRequest(ref), + "k8s.io/api/storage/v1.VolumeAttachment": schema_k8sio_api_storage_v1_VolumeAttachment(ref), + "k8s.io/api/storage/v1.VolumeAttachmentList": schema_k8sio_api_storage_v1_VolumeAttachmentList(ref), + "k8s.io/api/storage/v1.VolumeAttachmentSource": schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref), + "k8s.io/api/storage/v1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref), + "k8s.io/api/storage/v1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref), + "k8s.io/api/storage/v1.VolumeError": schema_k8sio_api_storage_v1_VolumeError(ref), + "k8s.io/api/storage/v1.VolumeNodeResources": schema_k8sio_api_storage_v1_VolumeNodeResources(ref), + "k8s.io/api/storage/v1alpha1.CSIStorageCapacity": schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref), + "k8s.io/api/storage/v1alpha1.CSIStorageCapacityList": schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref), + "k8s.io/api/storage/v1alpha1.VolumeAttachment": schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref), + "k8s.io/api/storage/v1alpha1.VolumeAttachmentList": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref), + "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref), + "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref), + "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref), + "k8s.io/api/storage/v1alpha1.VolumeError": schema_k8sio_api_storage_v1alpha1_VolumeError(ref), + "k8s.io/api/storage/v1beta1.CSIDriver": schema_k8sio_api_storage_v1beta1_CSIDriver(ref), + "k8s.io/api/storage/v1beta1.CSIDriverList": schema_k8sio_api_storage_v1beta1_CSIDriverList(ref), + "k8s.io/api/storage/v1beta1.CSIDriverSpec": schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref), + "k8s.io/api/storage/v1beta1.CSINode": schema_k8sio_api_storage_v1beta1_CSINode(ref), + "k8s.io/api/storage/v1beta1.CSINodeDriver": schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref), + "k8s.io/api/storage/v1beta1.CSINodeList": schema_k8sio_api_storage_v1beta1_CSINodeList(ref), + "k8s.io/api/storage/v1beta1.CSINodeSpec": schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref), + "k8s.io/api/storage/v1beta1.CSIStorageCapacity": schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref), + "k8s.io/api/storage/v1beta1.CSIStorageCapacityList": schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref), + "k8s.io/api/storage/v1beta1.StorageClass": schema_k8sio_api_storage_v1beta1_StorageClass(ref), + "k8s.io/api/storage/v1beta1.StorageClassList": schema_k8sio_api_storage_v1beta1_StorageClassList(ref), + "k8s.io/api/storage/v1beta1.TokenRequest": schema_k8sio_api_storage_v1beta1_TokenRequest(ref), + "k8s.io/api/storage/v1beta1.VolumeAttachment": schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref), + "k8s.io/api/storage/v1beta1.VolumeAttachmentList": schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref), + "k8s.io/api/storage/v1beta1.VolumeAttachmentSource": schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref), + "k8s.io/api/storage/v1beta1.VolumeAttachmentSpec": schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref), + "k8s.io/api/storage/v1beta1.VolumeAttachmentStatus": schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref), + "k8s.io/api/storage/v1beta1.VolumeError": schema_k8sio_api_storage_v1beta1_VolumeError(ref), + "k8s.io/api/storage/v1beta1.VolumeNodeResources": schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest": schema_pkg_apis_apiextensions_v1_ConversionRequest(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse": schema_pkg_apis_apiextensions_v1_ConversionResponse(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionReview": schema_pkg_apis_apiextensions_v1_ConversionReview(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition": schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion": schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition": schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionList": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion": schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus": schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources": schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation": schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation": schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON": schema_pkg_apis_apiextensions_v1_JSON(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps": schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference": schema_pkg_apis_apiextensions_v1_ServiceReference(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion": schema_pkg_apis_apiextensions_v1_WebhookConversion(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest": schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse": schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionReview": schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion": schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionList": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion": schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources": schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation": schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation": schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON": schema_pkg_apis_apiextensions_v1beta1_JSON(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference": schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref), + "k8s.io/apimachinery/pkg/api/resource.Quantity": schema_apimachinery_pkg_api_resource_Quantity(ref), + "k8s.io/apimachinery/pkg/api/resource.int64Amount": schema_apimachinery_pkg_api_resource_int64Amount(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ApplyOptions": schema_pkg_apis_meta_v1_ApplyOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1beta1.PartialObjectMetadataList": schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref), + "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), + "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), + "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), + "k8s.io/apimachinery/pkg/util/intstr.IntOrString": schema_apimachinery_pkg_util_intstr_IntOrString(ref), + "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.Event": schema_pkg_apis_audit_v1_Event(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.EventList": schema_pkg_apis_audit_v1_EventList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.GroupResources": schema_pkg_apis_audit_v1_GroupResources(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference": schema_pkg_apis_audit_v1_ObjectReference(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.Policy": schema_pkg_apis_audit_v1_Policy(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.PolicyList": schema_pkg_apis_audit_v1_PolicyList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule": schema_pkg_apis_audit_v1_PolicyRule(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event": schema_pkg_apis_audit_v1alpha1_Event(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.EventList": schema_pkg_apis_audit_v1alpha1_EventList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources": schema_pkg_apis_audit_v1alpha1_GroupResources(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference": schema_pkg_apis_audit_v1alpha1_ObjectReference(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy": schema_pkg_apis_audit_v1alpha1_Policy(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyList": schema_pkg_apis_audit_v1alpha1_PolicyList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule": schema_pkg_apis_audit_v1alpha1_PolicyRule(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.Event": schema_pkg_apis_audit_v1beta1_Event(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.EventList": schema_pkg_apis_audit_v1beta1_EventList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources": schema_pkg_apis_audit_v1beta1_GroupResources(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference": schema_pkg_apis_audit_v1beta1_ObjectReference(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy": schema_pkg_apis_audit_v1beta1_Policy(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyList": schema_pkg_apis_audit_v1beta1_PolicyList(ref), + "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule": schema_pkg_apis_audit_v1beta1_PolicyRule(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster": schema_pkg_apis_clientauthentication_v1_Cluster(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredential": schema_pkg_apis_clientauthentication_v1_ExecCredential(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec": schema_pkg_apis_clientauthentication_v1_ExecCredentialSpec(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus": schema_pkg_apis_clientauthentication_v1_ExecCredentialStatus(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredential": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredential(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialSpec(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus": schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialStatus(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response": schema_pkg_apis_clientauthentication_v1alpha1_Response(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster": schema_pkg_apis_clientauthentication_v1beta1_Cluster(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredential": schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec": schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref), + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus": schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref), + "k8s.io/cloud-provider/config/v1alpha1.CloudControllerManagerConfiguration": schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfiguration(ref), + "k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration": schema_k8sio_cloud_provider_config_v1alpha1_CloudProviderConfiguration(ref), + "k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration": schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(ref), + "k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration": schema_k8sio_controller_manager_config_v1alpha1_ControllerLeaderConfiguration(ref), + "k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration": schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref), + "k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration": schema_k8sio_controller_manager_config_v1alpha1_LeaderMigrationConfiguration(ref), + "k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration": schema_k8sio_controller_manager_config_v1beta1_ControllerLeaderConfiguration(ref), + "k8s.io/controller-manager/config/v1beta1.LeaderMigrationConfiguration": schema_k8sio_controller_manager_config_v1beta1_LeaderMigrationConfiguration(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService": schema_pkg_apis_apiregistration_v1_APIService(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition": schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceList": schema_pkg_apis_apiregistration_v1_APIServiceList(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec": schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus": schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference": schema_pkg_apis_apiregistration_v1_ServiceReference(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService": schema_pkg_apis_apiregistration_v1beta1_APIService(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition": schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceList": schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec": schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus": schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref), + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference": schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_CronJobControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroringControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource": schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.KubeControllerManagerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref), + "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref), + "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref), + "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref), + "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref), + "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref), + "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource": schema_k8sio_kube_scheduler_config_v1_ExtenderManagedResource(ref), + "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig": schema_k8sio_kube_scheduler_config_v1_ExtenderTLSConfig(ref), + "k8s.io/kube-scheduler/config/v1.LabelPreference": schema_k8sio_kube_scheduler_config_v1_LabelPreference(ref), + "k8s.io/kube-scheduler/config/v1.LabelsPresence": schema_k8sio_kube_scheduler_config_v1_LabelsPresence(ref), + "k8s.io/kube-scheduler/config/v1.LegacyExtender": schema_k8sio_kube_scheduler_config_v1_LegacyExtender(ref), + "k8s.io/kube-scheduler/config/v1.Policy": schema_k8sio_kube_scheduler_config_v1_Policy(ref), + "k8s.io/kube-scheduler/config/v1.PredicateArgument": schema_k8sio_kube_scheduler_config_v1_PredicateArgument(ref), + "k8s.io/kube-scheduler/config/v1.PredicatePolicy": schema_k8sio_kube_scheduler_config_v1_PredicatePolicy(ref), + "k8s.io/kube-scheduler/config/v1.PriorityArgument": schema_k8sio_kube_scheduler_config_v1_PriorityArgument(ref), + "k8s.io/kube-scheduler/config/v1.PriorityPolicy": schema_k8sio_kube_scheduler_config_v1_PriorityPolicy(ref), + "k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments": schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioArguments(ref), + "k8s.io/kube-scheduler/config/v1.ResourceSpec": schema_k8sio_kube_scheduler_config_v1_ResourceSpec(ref), + "k8s.io/kube-scheduler/config/v1.ServiceAffinity": schema_k8sio_kube_scheduler_config_v1_ServiceAffinity(ref), + "k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity": schema_k8sio_kube_scheduler_config_v1_ServiceAntiAffinity(ref), + "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint": schema_k8sio_kube_scheduler_config_v1_UtilizationShapePoint(ref), + "k8s.io/kube-scheduler/config/v1beta1.DefaultPreemptionArgs": schema_k8sio_kube_scheduler_config_v1beta1_DefaultPreemptionArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.Extender": schema_k8sio_kube_scheduler_config_v1beta1_Extender(ref), + "k8s.io/kube-scheduler/config/v1beta1.InterPodAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta1_InterPodAffinityArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.KubeSchedulerConfiguration": schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerConfiguration(ref), + "k8s.io/kube-scheduler/config/v1beta1.KubeSchedulerProfile": schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerProfile(ref), + "k8s.io/kube-scheduler/config/v1beta1.NodeAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeAffinityArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.NodeLabelArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeLabelArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.NodeResourcesBalancedAllocationArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesBalancedAllocationArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.NodeResourcesFitArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesFitArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.NodeResourcesLeastAllocatedArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesLeastAllocatedArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.NodeResourcesMostAllocatedArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesMostAllocatedArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.Plugin": schema_k8sio_kube_scheduler_config_v1beta1_Plugin(ref), + "k8s.io/kube-scheduler/config/v1beta1.PluginConfig": schema_k8sio_kube_scheduler_config_v1beta1_PluginConfig(ref), + "k8s.io/kube-scheduler/config/v1beta1.PluginSet": schema_k8sio_kube_scheduler_config_v1beta1_PluginSet(ref), + "k8s.io/kube-scheduler/config/v1beta1.Plugins": schema_k8sio_kube_scheduler_config_v1beta1_Plugins(ref), + "k8s.io/kube-scheduler/config/v1beta1.PodTopologySpreadArgs": schema_k8sio_kube_scheduler_config_v1beta1_PodTopologySpreadArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.RequestedToCapacityRatioArgs": schema_k8sio_kube_scheduler_config_v1beta1_RequestedToCapacityRatioArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.RequestedToCapacityRatioParam": schema_k8sio_kube_scheduler_config_v1beta1_RequestedToCapacityRatioParam(ref), + "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec": schema_k8sio_kube_scheduler_config_v1beta1_ResourceSpec(ref), + "k8s.io/kube-scheduler/config/v1beta1.ScoringStrategy": schema_k8sio_kube_scheduler_config_v1beta1_ScoringStrategy(ref), + "k8s.io/kube-scheduler/config/v1beta1.ServiceAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta1_ServiceAffinityArgs(ref), + "k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint": schema_k8sio_kube_scheduler_config_v1beta1_UtilizationShapePoint(ref), + "k8s.io/kube-scheduler/config/v1beta1.VolumeBindingArgs": schema_k8sio_kube_scheduler_config_v1beta1_VolumeBindingArgs(ref), + "k8s.io/kube-scheduler/config/v1beta2.DefaultPreemptionArgs": schema_k8sio_kube_scheduler_config_v1beta2_DefaultPreemptionArgs(ref), + "k8s.io/kube-scheduler/config/v1beta2.Extender": schema_k8sio_kube_scheduler_config_v1beta2_Extender(ref), + "k8s.io/kube-scheduler/config/v1beta2.InterPodAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta2_InterPodAffinityArgs(ref), + "k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerConfiguration": schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref), + "k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile": schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerProfile(ref), + "k8s.io/kube-scheduler/config/v1beta2.NodeAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta2_NodeAffinityArgs(ref), + "k8s.io/kube-scheduler/config/v1beta2.NodeResourcesBalancedAllocationArgs": schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesBalancedAllocationArgs(ref), + "k8s.io/kube-scheduler/config/v1beta2.NodeResourcesFitArgs": schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesFitArgs(ref), + "k8s.io/kube-scheduler/config/v1beta2.Plugin": schema_k8sio_kube_scheduler_config_v1beta2_Plugin(ref), + "k8s.io/kube-scheduler/config/v1beta2.PluginConfig": schema_k8sio_kube_scheduler_config_v1beta2_PluginConfig(ref), + "k8s.io/kube-scheduler/config/v1beta2.PluginSet": schema_k8sio_kube_scheduler_config_v1beta2_PluginSet(ref), + "k8s.io/kube-scheduler/config/v1beta2.Plugins": schema_k8sio_kube_scheduler_config_v1beta2_Plugins(ref), + "k8s.io/kube-scheduler/config/v1beta2.PodTopologySpreadArgs": schema_k8sio_kube_scheduler_config_v1beta2_PodTopologySpreadArgs(ref), + "k8s.io/kube-scheduler/config/v1beta2.RequestedToCapacityRatioParam": schema_k8sio_kube_scheduler_config_v1beta2_RequestedToCapacityRatioParam(ref), + "k8s.io/kube-scheduler/config/v1beta2.ResourceSpec": schema_k8sio_kube_scheduler_config_v1beta2_ResourceSpec(ref), + "k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy": schema_k8sio_kube_scheduler_config_v1beta2_ScoringStrategy(ref), + "k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint": schema_k8sio_kube_scheduler_config_v1beta2_UtilizationShapePoint(ref), + "k8s.io/kube-scheduler/config/v1beta2.VolumeBindingArgs": schema_k8sio_kube_scheduler_config_v1beta2_VolumeBindingArgs(ref), + "k8s.io/kubelet/config/v1alpha1.CredentialProvider": schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref), + "k8s.io/kubelet/config/v1alpha1.CredentialProviderConfig": schema_k8sio_kubelet_config_v1alpha1_CredentialProviderConfig(ref), + "k8s.io/kubelet/config/v1alpha1.ExecEnvVar": schema_k8sio_kubelet_config_v1alpha1_ExecEnvVar(ref), + "k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletAnonymousAuthentication(ref), + "k8s.io/kubelet/config/v1beta1.KubeletAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletAuthentication(ref), + "k8s.io/kubelet/config/v1beta1.KubeletAuthorization": schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref), + "k8s.io/kubelet/config/v1beta1.KubeletConfiguration": schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref), + "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication": schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref), + "k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization": schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref), + "k8s.io/kubelet/config/v1beta1.KubeletX509Authentication": schema_k8sio_kubelet_config_v1beta1_KubeletX509Authentication(ref), + "k8s.io/kubelet/config/v1beta1.MemoryReservation": schema_k8sio_kubelet_config_v1beta1_MemoryReservation(ref), + "k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration": schema_k8sio_kubelet_config_v1beta1_MemorySwapConfiguration(ref), + "k8s.io/kubelet/config/v1beta1.SerializedNodeConfigSource": schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref), + "k8s.io/kubernetes/pkg/apis/abac/v1beta1.Policy": schema_pkg_apis_abac_v1beta1_Policy(ref), + "k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec": schema_pkg_apis_abac_v1beta1_PolicySpec(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricListOptions": schema_pkg_apis_custom_metrics_v1beta1_MetricListOptions(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue": schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValueList": schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier": schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricListOptions": schema_pkg_apis_custom_metrics_v1beta2_MetricListOptions(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue": schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref), + "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValueList": schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref), + "k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue": schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref), + "k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValueList": schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref), + "k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics": schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics": schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetricsList": schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref), + "k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics": schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetricsList": schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref), + "k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics": schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics": schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetricsList": schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref), + "k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics": schema_pkg_apis_metrics_v1beta1_PodMetrics(ref), + "k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetricsList": schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref), } } @@ -948,6 +1059,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere "name": { SchemaProps: spec.SchemaProps{ Description: "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -955,6 +1067,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere "clientConfig": { SchemaProps: spec.SchemaProps{ Description: "ClientConfig defines how to communicate with the hook. Required", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/admissionregistration/v1.WebhookClientConfig"), }, }, @@ -965,7 +1078,8 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), }, }, }, @@ -999,7 +1113,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere }, "sideEffects": { SchemaProps: spec.SchemaProps{ - Description: "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", + Description: "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", Type: []string{"string"}, Format: "", }, @@ -1018,8 +1132,9 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhook(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1065,6 +1180,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; 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"), }, }, @@ -1081,7 +1197,8 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfiguration(ref Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1.MutatingWebhook"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1.MutatingWebhook"), }, }, }, @@ -1119,6 +1236,7 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList( "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -1129,7 +1247,8 @@ func schema_k8sio_api_admissionregistration_v1_MutatingWebhookConfigurationList( Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1.MutatingWebhookConfiguration"), }, }, }, @@ -1158,8 +1277,9 @@ func schema_k8sio_api_admissionregistration_v1_Rule(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1172,8 +1292,9 @@ func schema_k8sio_api_admissionregistration_v1_Rule(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1186,8 +1307,9 @@ func schema_k8sio_api_admissionregistration_v1_Rule(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1215,13 +1337,14 @@ func schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref common.Ref Properties: map[string]spec.Schema{ "operations": { SchemaProps: spec.SchemaProps{ - Description: "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.", + Description: "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1234,8 +1357,9 @@ func schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref common.Ref Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1248,8 +1372,9 @@ func schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref common.Ref Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1262,8 +1387,9 @@ func schema_k8sio_api_admissionregistration_v1_RuleWithOperations(ref common.Ref Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1292,6 +1418,7 @@ func schema_k8sio_api_admissionregistration_v1_ServiceReference(ref common.Refer "namespace": { SchemaProps: spec.SchemaProps{ Description: "`namespace` is the namespace of the service. Required", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1299,6 +1426,7 @@ func schema_k8sio_api_admissionregistration_v1_ServiceReference(ref common.Refer "name": { SchemaProps: spec.SchemaProps{ Description: "`name` is the name of the service. Required", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1334,6 +1462,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.Refe "name": { SchemaProps: spec.SchemaProps{ Description: "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1341,6 +1470,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.Refe "clientConfig": { SchemaProps: spec.SchemaProps{ Description: "ClientConfig defines how to communicate with the hook. Required", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/admissionregistration/v1.WebhookClientConfig"), }, }, @@ -1351,7 +1481,8 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.Refe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), }, }, }, @@ -1385,7 +1516,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.Refe }, "sideEffects": { SchemaProps: spec.SchemaProps{ - Description: "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", + Description: "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", Type: []string{"string"}, Format: "", }, @@ -1404,8 +1535,9 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhook(ref common.Refe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1444,6 +1576,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(re "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; 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"), }, }, @@ -1460,7 +1593,8 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfiguration(re Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingWebhook"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingWebhook"), }, }, }, @@ -1498,6 +1632,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationLis "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -1508,7 +1643,8 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingWebhookConfigurationLis Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1.ValidatingWebhookConfiguration"), }, }, }, @@ -1568,6 +1704,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R "name": { SchemaProps: spec.SchemaProps{ Description: "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1575,6 +1712,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R "clientConfig": { SchemaProps: spec.SchemaProps{ Description: "ClientConfig defines how to communicate with the hook. Required", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig"), }, }, @@ -1585,7 +1723,8 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.RuleWithOperations"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1beta1.RuleWithOperations"), }, }, }, @@ -1619,7 +1758,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R }, "sideEffects": { SchemaProps: spec.SchemaProps{ - Description: "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", + Description: "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", Type: []string{"string"}, Format: "", }, @@ -1638,8 +1777,9 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhook(ref common.R Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1685,6 +1825,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; 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"), }, }, @@ -1701,7 +1842,8 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingWebhook"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingWebhook"), }, }, }, @@ -1739,6 +1881,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -1749,7 +1892,8 @@ func schema_k8sio_api_admissionregistration_v1beta1_MutatingWebhookConfiguration Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration"), }, }, }, @@ -1778,8 +1922,9 @@ func schema_k8sio_api_admissionregistration_v1beta1_Rule(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1792,8 +1937,9 @@ func schema_k8sio_api_admissionregistration_v1beta1_Rule(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1806,8 +1952,9 @@ func schema_k8sio_api_admissionregistration_v1beta1_Rule(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1835,13 +1982,14 @@ func schema_k8sio_api_admissionregistration_v1beta1_RuleWithOperations(ref commo Properties: map[string]spec.Schema{ "operations": { SchemaProps: spec.SchemaProps{ - Description: "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.", + Description: "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1854,8 +2002,9 @@ func schema_k8sio_api_admissionregistration_v1beta1_RuleWithOperations(ref commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1868,8 +2017,9 @@ func schema_k8sio_api_admissionregistration_v1beta1_RuleWithOperations(ref commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1882,8 +2032,9 @@ func schema_k8sio_api_admissionregistration_v1beta1_RuleWithOperations(ref commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1912,6 +2063,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ServiceReference(ref common. "namespace": { SchemaProps: spec.SchemaProps{ Description: "`namespace` is the namespace of the service. Required", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1919,6 +2071,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ServiceReference(ref common. "name": { SchemaProps: spec.SchemaProps{ Description: "`name` is the name of the service. Required", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1954,6 +2107,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common "name": { SchemaProps: spec.SchemaProps{ Description: "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1961,6 +2115,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common "clientConfig": { SchemaProps: spec.SchemaProps{ Description: "ClientConfig defines how to communicate with the hook. Required", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig"), }, }, @@ -1971,7 +2126,8 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.RuleWithOperations"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1beta1.RuleWithOperations"), }, }, }, @@ -2005,7 +2161,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common }, "sideEffects": { SchemaProps: spec.SchemaProps{ - Description: "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", + Description: "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", Type: []string{"string"}, Format: "", }, @@ -2024,8 +2180,9 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhook(ref common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -2064,6 +2221,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurati "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; 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"), }, }, @@ -2080,7 +2238,8 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurati Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingWebhook"), }, }, }, @@ -2118,6 +2277,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurati "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -2128,7 +2288,8 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingWebhookConfigurati Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration"), }, }, }, @@ -2178,6 +2339,293 @@ func schema_k8sio_api_admissionregistration_v1beta1_WebhookClientConfig(ref comm } } +func schema_k8sio_api_apiserverinternal_v1alpha1_ServerStorageVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiServerID": { + SchemaProps: spec.SchemaProps{ + Description: "The ID of the reporting API server.", + Type: []string{"string"}, + Format: "", + }, + }, + "encodingVersion": { + SchemaProps: spec.SchemaProps{ + Description: "The API server encodes the object to this version when persisting it in the backend (e.g., etcd).", + Type: []string{"string"}, + Format: "", + }, + }, + "decodableVersions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The API server can decode objects encoded in these versions. The encodingVersion must be included in the decodableVersions.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "\n Storage version of a specific resource.", + 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: "The name is ..", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec is an empty spec. It is here to comply with Kubernetes API style.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apiserverinternal/v1alpha1.StorageVersionSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "API server instances report the version they can decode and the version they encode objects to when persisting objects in the backend.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apiserverinternal/v1alpha1.StorageVersionStatus"), + }, + }, + }, + Required: []string{"spec", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionSpec", "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Describes the state of the storageVersion at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of the condition.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "If set, this represents the .metadata.generation that the condition was set based upon.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status", "reason"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A list of StorageVersions.", + 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 list metadata. 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 holds a list of StorageVersion", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apiserverinternal/v1alpha1.StorageVersion"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/apiserverinternal/v1alpha1.StorageVersion", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageVersionSpec is an empty spec.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "API server instances report the versions they can decode and the version they encode objects to when persisting objects in the backend.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "storageVersions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "apiServerID", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The reported versions per API server instance.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apiserverinternal/v1alpha1.ServerStorageVersion"), + }, + }, + }, + }, + }, + "commonEncodingVersion": { + SchemaProps: spec.SchemaProps{ + Description: "If all API server instances agree on the same encoding storage version, then this field is set to that version. Otherwise this field is left empty. API servers should finish updating its storageVersionStatus entry before serving write operations, so that this field will be in sync with the reality.", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The latest available observations of the storageVersion's state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apiserverinternal/v1alpha1.StorageVersionCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apiserverinternal/v1alpha1.ServerStorageVersion", "k8s.io/api/apiserverinternal/v1alpha1.StorageVersionCondition"}, + } +} + func schema_k8sio_api_apps_v1_ControllerRevision(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -2202,18 +2650,21 @@ func schema_k8sio_api_apps_v1_ControllerRevision(ref common.ReferenceCallback) c "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "data": { SchemaProps: spec.SchemaProps{ Description: "Data is the serialized representation of the state.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, "revision": { SchemaProps: spec.SchemaProps{ Description: "Revision indicates the revision of the state represented by Data.", + Default: 0, Type: []string{"integer"}, Format: "int64", }, @@ -2251,6 +2702,7 @@ func schema_k8sio_api_apps_v1_ControllerRevisionList(ref common.ReferenceCallbac "metadata": { SchemaProps: spec.SchemaProps{ Description: "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"), }, }, @@ -2261,7 +2713,8 @@ func schema_k8sio_api_apps_v1_ControllerRevisionList(ref common.ReferenceCallbac Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.ControllerRevision"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1.ControllerRevision"), }, }, }, @@ -2300,18 +2753,21 @@ func schema_k8sio_api_apps_v1_DaemonSet(ref common.ReferenceCallback) common.Ope "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.DaemonSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.DaemonSetStatus"), }, }, @@ -2333,6 +2789,7 @@ func schema_k8sio_api_apps_v1_DaemonSetCondition(ref common.ReferenceCallback) c "type": { SchemaProps: spec.SchemaProps{ Description: "Type of DaemonSet condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2340,6 +2797,7 @@ func schema_k8sio_api_apps_v1_DaemonSetCondition(ref common.ReferenceCallback) c "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2347,6 +2805,7 @@ func schema_k8sio_api_apps_v1_DaemonSetCondition(ref common.ReferenceCallback) c "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -2397,6 +2856,7 @@ func schema_k8sio_api_apps_v1_DaemonSetList(ref common.ReferenceCallback) common "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. 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"), }, }, @@ -2407,7 +2867,8 @@ func schema_k8sio_api_apps_v1_DaemonSetList(ref common.ReferenceCallback) common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.DaemonSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1.DaemonSet"), }, }, }, @@ -2438,12 +2899,14 @@ func schema_k8sio_api_apps_v1_DaemonSetSpec(ref common.ReferenceCallback) common "template": { SchemaProps: spec.SchemaProps{ Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, "updateStrategy": { SchemaProps: spec.SchemaProps{ Description: "An update strategy to replace existing DaemonSet pods with new pods.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.DaemonSetUpdateStrategy"), }, }, @@ -2480,6 +2943,7 @@ func schema_k8sio_api_apps_v1_DaemonSetStatus(ref common.ReferenceCallback) comm "currentNumberScheduled": { SchemaProps: spec.SchemaProps{ Description: "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -2487,6 +2951,7 @@ func schema_k8sio_api_apps_v1_DaemonSetStatus(ref common.ReferenceCallback) comm "numberMisscheduled": { SchemaProps: spec.SchemaProps{ Description: "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -2494,6 +2959,7 @@ func schema_k8sio_api_apps_v1_DaemonSetStatus(ref common.ReferenceCallback) comm "desiredNumberScheduled": { SchemaProps: spec.SchemaProps{ Description: "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -2501,6 +2967,7 @@ func schema_k8sio_api_apps_v1_DaemonSetStatus(ref common.ReferenceCallback) comm "numberReady": { SchemaProps: spec.SchemaProps{ Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -2553,7 +3020,8 @@ func schema_k8sio_api_apps_v1_DaemonSetStatus(ref common.ReferenceCallback) comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.DaemonSetCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1.DaemonSetCondition"), }, }, }, @@ -2619,19 +3087,22 @@ func schema_k8sio_api_apps_v1_Deployment(ref common.ReferenceCallback) common.Op }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata.", + Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the Deployment.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.DeploymentSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the Deployment.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.DeploymentStatus"), }, }, @@ -2653,6 +3124,7 @@ func schema_k8sio_api_apps_v1_DeploymentCondition(ref common.ReferenceCallback) "type": { SchemaProps: spec.SchemaProps{ Description: "Type of deployment condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2660,6 +3132,7 @@ func schema_k8sio_api_apps_v1_DeploymentCondition(ref common.ReferenceCallback) "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2667,12 +3140,14 @@ func schema_k8sio_api_apps_v1_DeploymentCondition(ref common.ReferenceCallback) "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "The last time this condition was updated.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -2723,6 +3198,7 @@ func schema_k8sio_api_apps_v1_DeploymentList(ref common.ReferenceCallback) commo "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -2733,7 +3209,8 @@ func schema_k8sio_api_apps_v1_DeploymentList(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.Deployment"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1.Deployment"), }, }, }, @@ -2771,6 +3248,7 @@ func schema_k8sio_api_apps_v1_DeploymentSpec(ref common.ReferenceCallback) commo "template": { SchemaProps: spec.SchemaProps{ Description: "Template describes the pods that will be created.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -2782,6 +3260,7 @@ func schema_k8sio_api_apps_v1_DeploymentSpec(ref common.ReferenceCallback) commo }, SchemaProps: spec.SchemaProps{ Description: "The deployment strategy to use to replace existing pods with new ones.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.DeploymentStrategy"), }, }, @@ -2884,7 +3363,8 @@ func schema_k8sio_api_apps_v1_DeploymentStatus(ref common.ReferenceCallback) com Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.DeploymentCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1.DeploymentCondition"), }, }, }, @@ -2957,18 +3437,21 @@ func schema_k8sio_api_apps_v1_ReplicaSet(ref common.ReferenceCallback) common.Op "metadata": { SchemaProps: spec.SchemaProps{ Description: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.ReplicaSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.ReplicaSetStatus"), }, }, @@ -2990,6 +3473,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetCondition(ref common.ReferenceCallback) "type": { SchemaProps: spec.SchemaProps{ Description: "Type of replica set condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2997,6 +3481,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetCondition(ref common.ReferenceCallback) "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3004,6 +3489,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetCondition(ref common.ReferenceCallback) "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "The last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -3054,6 +3540,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetList(ref common.ReferenceCallback) commo "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -3064,7 +3551,8 @@ func schema_k8sio_api_apps_v1_ReplicaSetList(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.ReplicaSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1.ReplicaSet"), }, }, }, @@ -3109,6 +3597,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetSpec(ref common.ReferenceCallback) commo "template": { SchemaProps: spec.SchemaProps{ Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -3131,6 +3620,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetStatus(ref common.ReferenceCallback) com "replicas": { SchemaProps: spec.SchemaProps{ Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -3176,7 +3666,8 @@ func schema_k8sio_api_apps_v1_ReplicaSetStatus(ref common.ReferenceCallback) com Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.ReplicaSetCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1.ReplicaSetCondition"), }, }, }, @@ -3200,7 +3691,13 @@ func schema_k8sio_api_apps_v1_RollingUpdateDaemonSet(ref common.ReferenceCallbac Properties: map[string]spec.Schema{ "maxUnavailable": { SchemaProps: spec.SchemaProps{ - Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "maxSurge": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is beta field and enabled/disabled by DaemonSetUpdateSurge feature gate.", Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, @@ -3282,18 +3779,22 @@ func schema_k8sio_api_apps_v1_StatefulSet(ref common.ReferenceCallback) common.O }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired identities of pods in this set.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.StatefulSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.StatefulSetStatus"), }, }, @@ -3315,6 +3816,7 @@ func schema_k8sio_api_apps_v1_StatefulSetCondition(ref common.ReferenceCallback) "type": { SchemaProps: spec.SchemaProps{ Description: "Type of statefulset condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3322,6 +3824,7 @@ func schema_k8sio_api_apps_v1_StatefulSetCondition(ref common.ReferenceCallback) "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3329,6 +3832,7 @@ func schema_k8sio_api_apps_v1_StatefulSetCondition(ref common.ReferenceCallback) "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -3378,16 +3882,20 @@ func schema_k8sio_api_apps_v1_StatefulSetList(ref common.ReferenceCallback) comm }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard list's metadata. 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{ - Type: []string{"array"}, + Description: "Items is the list of stateful sets.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.StatefulSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1.StatefulSet"), }, }, }, @@ -3425,6 +3933,7 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm "template": { SchemaProps: spec.SchemaProps{ Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -3435,7 +3944,8 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), }, }, }, @@ -3444,6 +3954,7 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm "serviceName": { SchemaProps: spec.SchemaProps{ Description: "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3458,6 +3969,7 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm "updateStrategy": { SchemaProps: spec.SchemaProps{ Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1.StatefulSetUpdateStrategy"), }, }, @@ -3468,6 +3980,13 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm Format: "int32", }, }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, Required: []string{"selector", "template", "serviceName"}, }, @@ -3494,6 +4013,7 @@ func schema_k8sio_api_apps_v1_StatefulSetStatus(ref common.ReferenceCallback) co "replicas": { SchemaProps: spec.SchemaProps{ Description: "replicas is the number of Pods created by the StatefulSet controller.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -3553,12 +4073,20 @@ func schema_k8sio_api_apps_v1_StatefulSetStatus(ref common.ReferenceCallback) co Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.StatefulSetCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1.StatefulSetCondition"), }, }, }, }, }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. Remove omitempty when graduating to beta", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, Required: []string{"replicas"}, }, @@ -3620,18 +4148,21 @@ func schema_k8sio_api_apps_v1beta1_ControllerRevision(ref common.ReferenceCallba "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "data": { SchemaProps: spec.SchemaProps{ Description: "Data is the serialized representation of the state.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, "revision": { SchemaProps: spec.SchemaProps{ Description: "Revision indicates the revision of the state represented by Data.", + Default: 0, Type: []string{"integer"}, Format: "int64", }, @@ -3669,6 +4200,7 @@ func schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref common.ReferenceCa "metadata": { SchemaProps: spec.SchemaProps{ Description: "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"), }, }, @@ -3679,7 +4211,8 @@ func schema_k8sio_api_apps_v1beta1_ControllerRevisionList(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta1.ControllerRevision"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta1.ControllerRevision"), }, }, }, @@ -3718,18 +4251,21 @@ func schema_k8sio_api_apps_v1beta1_Deployment(ref common.ReferenceCallback) comm "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the Deployment.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta1.DeploymentSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the Deployment.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta1.DeploymentStatus"), }, }, @@ -3751,6 +4287,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref common.ReferenceCallb "type": { SchemaProps: spec.SchemaProps{ Description: "Type of deployment condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3758,6 +4295,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref common.ReferenceCallb "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3765,12 +4303,14 @@ func schema_k8sio_api_apps_v1beta1_DeploymentCondition(ref common.ReferenceCallb "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "The last time this condition was updated.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -3821,6 +4361,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentList(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -3831,7 +4372,8 @@ func schema_k8sio_api_apps_v1beta1_DeploymentList(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta1.Deployment"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta1.Deployment"), }, }, }, @@ -3870,6 +4412,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref common.ReferenceCallba "name": { SchemaProps: spec.SchemaProps{ Description: "Required: This must match the Name of a deployment.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3882,8 +4425,9 @@ func schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref common.ReferenceCallba Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -3892,6 +4436,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentRollback(ref common.ReferenceCallba "rollbackTo": { SchemaProps: spec.SchemaProps{ Description: "The config of this deployment rollback.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta1.RollbackConfig"), }, }, @@ -3927,6 +4472,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref common.ReferenceCallback) "template": { SchemaProps: spec.SchemaProps{ Description: "Template describes the pods that will be created.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -3938,6 +4484,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentSpec(ref common.ReferenceCallback) }, SchemaProps: spec.SchemaProps{ Description: "The deployment strategy to use to replace existing pods with new ones.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta1.DeploymentStrategy"), }, }, @@ -4046,7 +4593,8 @@ func schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta1.DeploymentCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta1.DeploymentCondition"), }, }, }, @@ -4186,18 +4734,21 @@ func schema_k8sio_api_apps_v1beta1_Scale(ref common.ReferenceCallback) common.Op "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta1.ScaleSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta1.ScaleStatus"), }, }, @@ -4239,6 +4790,7 @@ func schema_k8sio_api_apps_v1beta1_ScaleStatus(ref common.ReferenceCallback) com "replicas": { SchemaProps: spec.SchemaProps{ Description: "actual number of observed instances of the scaled object.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -4251,8 +4803,9 @@ func schema_k8sio_api_apps_v1beta1_ScaleStatus(ref common.ReferenceCallback) com Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -4295,18 +4848,21 @@ func schema_k8sio_api_apps_v1beta1_StatefulSet(ref common.ReferenceCallback) com }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired identities of pods in this set.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetStatus"), }, }, @@ -4328,6 +4884,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref common.ReferenceCall "type": { SchemaProps: spec.SchemaProps{ Description: "Type of statefulset condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -4335,6 +4892,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref common.ReferenceCall "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -4342,6 +4900,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref common.ReferenceCall "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -4391,7 +4950,8 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetList(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { @@ -4400,7 +4960,8 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetList(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta1.StatefulSet"), }, }, }, @@ -4438,6 +4999,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) "template": { SchemaProps: spec.SchemaProps{ Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -4448,7 +5010,8 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), }, }, }, @@ -4457,6 +5020,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) "serviceName": { SchemaProps: spec.SchemaProps{ Description: "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -4471,6 +5035,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) "updateStrategy": { SchemaProps: spec.SchemaProps{ Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy"), }, }, @@ -4481,6 +5046,13 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) Format: "int32", }, }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, Required: []string{"template", "serviceName"}, }, @@ -4507,6 +5079,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref common.ReferenceCallbac "replicas": { SchemaProps: spec.SchemaProps{ Description: "replicas is the number of Pods created by the StatefulSet controller.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -4566,12 +5139,20 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref common.ReferenceCallbac Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetCondition"), }, }, }, }, }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. Remove omitempty when graduating to beta", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, Required: []string{"replicas"}, }, @@ -4633,18 +5214,21 @@ func schema_k8sio_api_apps_v1beta2_ControllerRevision(ref common.ReferenceCallba "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "data": { SchemaProps: spec.SchemaProps{ Description: "Data is the serialized representation of the state.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, "revision": { SchemaProps: spec.SchemaProps{ Description: "Revision indicates the revision of the state represented by Data.", + Default: 0, Type: []string{"integer"}, Format: "int64", }, @@ -4682,6 +5266,7 @@ func schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref common.ReferenceCa "metadata": { SchemaProps: spec.SchemaProps{ Description: "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"), }, }, @@ -4692,7 +5277,8 @@ func schema_k8sio_api_apps_v1beta2_ControllerRevisionList(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.ControllerRevision"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta2.ControllerRevision"), }, }, }, @@ -4731,18 +5317,21 @@ func schema_k8sio_api_apps_v1beta2_DaemonSet(ref common.ReferenceCallback) commo "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetStatus"), }, }, @@ -4764,6 +5353,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref common.ReferenceCallba "type": { SchemaProps: spec.SchemaProps{ Description: "Type of DaemonSet condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -4771,6 +5361,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref common.ReferenceCallba "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -4778,6 +5369,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetCondition(ref common.ReferenceCallba "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -4828,6 +5420,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetList(ref common.ReferenceCallback) c "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. 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"), }, }, @@ -4838,7 +5431,8 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetList(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta2.DaemonSet"), }, }, }, @@ -4869,12 +5463,14 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetSpec(ref common.ReferenceCallback) c "template": { SchemaProps: spec.SchemaProps{ Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, "updateStrategy": { SchemaProps: spec.SchemaProps{ Description: "An update strategy to replace existing DaemonSet pods with new pods.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy"), }, }, @@ -4911,6 +5507,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref common.ReferenceCallback) "currentNumberScheduled": { SchemaProps: spec.SchemaProps{ Description: "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -4918,6 +5515,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref common.ReferenceCallback) "numberMisscheduled": { SchemaProps: spec.SchemaProps{ Description: "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -4925,6 +5523,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref common.ReferenceCallback) "desiredNumberScheduled": { SchemaProps: spec.SchemaProps{ Description: "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -4932,6 +5531,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref common.ReferenceCallback) "numberReady": { SchemaProps: spec.SchemaProps{ Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -4984,7 +5584,8 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetCondition"), }, }, }, @@ -5051,18 +5652,21 @@ func schema_k8sio_api_apps_v1beta2_Deployment(ref common.ReferenceCallback) comm "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the Deployment.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.DeploymentSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the Deployment.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.DeploymentStatus"), }, }, @@ -5084,6 +5688,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref common.ReferenceCallb "type": { SchemaProps: spec.SchemaProps{ Description: "Type of deployment condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -5091,6 +5696,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref common.ReferenceCallb "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -5098,12 +5704,14 @@ func schema_k8sio_api_apps_v1beta2_DeploymentCondition(ref common.ReferenceCallb "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "The last time this condition was updated.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -5154,6 +5762,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentList(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -5164,7 +5773,8 @@ func schema_k8sio_api_apps_v1beta2_DeploymentList(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.Deployment"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta2.Deployment"), }, }, }, @@ -5202,6 +5812,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref common.ReferenceCallback) "template": { SchemaProps: spec.SchemaProps{ Description: "Template describes the pods that will be created.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -5213,6 +5824,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentSpec(ref common.ReferenceCallback) }, SchemaProps: spec.SchemaProps{ Description: "The deployment strategy to use to replace existing pods with new ones.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.DeploymentStrategy"), }, }, @@ -5315,7 +5927,8 @@ func schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.DeploymentCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta2.DeploymentCondition"), }, }, }, @@ -5388,18 +6001,21 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSet(ref common.ReferenceCallback) comm "metadata": { SchemaProps: spec.SchemaProps{ Description: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetStatus"), }, }, @@ -5421,6 +6037,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref common.ReferenceCallb "type": { SchemaProps: spec.SchemaProps{ Description: "Type of replica set condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -5428,6 +6045,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref common.ReferenceCallb "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -5435,6 +6053,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetCondition(ref common.ReferenceCallb "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "The last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -5485,6 +6104,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -5495,7 +6115,8 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetList(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSet"), }, }, }, @@ -5540,6 +6161,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetSpec(ref common.ReferenceCallback) "template": { SchemaProps: spec.SchemaProps{ Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -5562,6 +6184,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref common.ReferenceCallback "replicas": { SchemaProps: spec.SchemaProps{ Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -5607,7 +6230,8 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetCondition"), }, }, }, @@ -5631,7 +6255,13 @@ func schema_k8sio_api_apps_v1beta2_RollingUpdateDaemonSet(ref common.ReferenceCa Properties: map[string]spec.Schema{ "maxUnavailable": { SchemaProps: spec.SchemaProps{ - Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "maxSurge": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is beta field and enabled/disabled by DaemonSetUpdateSurge feature gate.", Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, @@ -5714,18 +6344,21 @@ func schema_k8sio_api_apps_v1beta2_Scale(ref common.ReferenceCallback) common.Op "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.ScaleSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.ScaleStatus"), }, }, @@ -5767,11 +6400,17 @@ func schema_k8sio_api_apps_v1beta2_ScaleStatus(ref common.ReferenceCallback) com "replicas": { SchemaProps: spec.SchemaProps{ Description: "actual number of observed instances of the scaled object.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, "selector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", Type: []string{"object"}, @@ -5779,8 +6418,9 @@ func schema_k8sio_api_apps_v1beta2_ScaleStatus(ref common.ReferenceCallback) com Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -5823,18 +6463,21 @@ func schema_k8sio_api_apps_v1beta2_StatefulSet(ref common.ReferenceCallback) com }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired identities of pods in this set.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetStatus"), }, }, @@ -5856,6 +6499,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref common.ReferenceCall "type": { SchemaProps: spec.SchemaProps{ Description: "Type of statefulset condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -5863,6 +6507,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref common.ReferenceCall "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -5870,6 +6515,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref common.ReferenceCall "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -5919,7 +6565,8 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetList(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { @@ -5928,7 +6575,8 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetList(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta2.StatefulSet"), }, }, }, @@ -5966,6 +6614,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) "template": { SchemaProps: spec.SchemaProps{ Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -5976,7 +6625,8 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), }, }, }, @@ -5985,6 +6635,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) "serviceName": { SchemaProps: spec.SchemaProps{ Description: "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -5999,6 +6650,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) "updateStrategy": { SchemaProps: spec.SchemaProps{ Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy"), }, }, @@ -6009,6 +6661,13 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) Format: "int32", }, }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, Required: []string{"selector", "template", "serviceName"}, }, @@ -6035,6 +6694,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref common.ReferenceCallbac "replicas": { SchemaProps: spec.SchemaProps{ Description: "replicas is the number of Pods created by the StatefulSet controller.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -6094,12 +6754,20 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref common.ReferenceCallbac Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetCondition"), }, }, }, }, }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. Remove omitempty when graduating to beta", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, Required: []string{"replicas"}, }, @@ -6137,289 +6805,6 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref common.Referenc } } -func schema_k8sio_api_auditregistration_v1alpha1_AuditSink(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AuditSink represents a cluster level audit sink", - 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{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the audit configuration spec", - Ref: ref("k8s.io/api/auditregistration/v1alpha1.AuditSinkSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/auditregistration/v1alpha1.AuditSinkSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_auditregistration_v1alpha1_AuditSinkList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AuditSinkList is a list of AuditSink items.", - 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{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of audit configurations.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/auditregistration/v1alpha1.AuditSink"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/auditregistration/v1alpha1.AuditSink", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_auditregistration_v1alpha1_AuditSinkSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AuditSinkSpec holds the spec for the audit sink", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "policy": { - SchemaProps: spec.SchemaProps{ - Description: "Policy defines the policy for selecting which events should be sent to the webhook required", - Ref: ref("k8s.io/api/auditregistration/v1alpha1.Policy"), - }, - }, - "webhook": { - SchemaProps: spec.SchemaProps{ - Description: "Webhook to send events required", - Ref: ref("k8s.io/api/auditregistration/v1alpha1.Webhook"), - }, - }, - }, - Required: []string{"policy", "webhook"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/auditregistration/v1alpha1.Policy", "k8s.io/api/auditregistration/v1alpha1.Webhook"}, - } -} - -func schema_k8sio_api_auditregistration_v1alpha1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Policy defines the configuration of how audit events are logged", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "level": { - SchemaProps: spec.SchemaProps{ - Description: "The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required", - Type: []string{"string"}, - Format: "", - }, - }, - "stages": { - SchemaProps: spec.SchemaProps{ - Description: "Stages is a list of stages for which events are created.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"level"}, - }, - }, - } -} - -func schema_k8sio_api_auditregistration_v1alpha1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceReference holds a reference to Service.legacy.k8s.io", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "`namespace` is the namespace of the service. Required", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "`name` is the name of the service. Required", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "`path` is an optional URL path which will be sent in any request to this service.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"namespace", "name"}, - }, - }, - } -} - -func schema_k8sio_api_auditregistration_v1alpha1_Webhook(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Webhook holds the configuration of the webhook", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "throttle": { - SchemaProps: spec.SchemaProps{ - Description: "Throttle holds the options for throttling the webhook", - Ref: ref("k8s.io/api/auditregistration/v1alpha1.WebhookThrottleConfig"), - }, - }, - "clientConfig": { - SchemaProps: spec.SchemaProps{ - Description: "ClientConfig holds the connection parameters for the webhook required", - Ref: ref("k8s.io/api/auditregistration/v1alpha1.WebhookClientConfig"), - }, - }, - }, - Required: []string{"clientConfig"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/auditregistration/v1alpha1.WebhookClientConfig", "k8s.io/api/auditregistration/v1alpha1.WebhookThrottleConfig"}, - } -} - -func schema_k8sio_api_auditregistration_v1alpha1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "WebhookClientConfig contains the information to make a connection with the webhook", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "url": { - SchemaProps: spec.SchemaProps{ - Description: "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", - Type: []string{"string"}, - Format: "", - }, - }, - "service": { - SchemaProps: spec.SchemaProps{ - Description: "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/api/auditregistration/v1alpha1.ServiceReference"), - }, - }, - "caBundle": { - SchemaProps: spec.SchemaProps{ - Description: "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/auditregistration/v1alpha1.ServiceReference"}, - } -} - -func schema_k8sio_api_auditregistration_v1alpha1_WebhookThrottleConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "WebhookThrottleConfig holds the configuration for throttling events", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "qps": { - SchemaProps: spec.SchemaProps{ - Description: "ThrottleQPS maximum number of batches per second default 10 QPS", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "burst": { - SchemaProps: spec.SchemaProps{ - Description: "ThrottleBurst is the maximum number of events sent at the same moment default 15 QPS", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - } -} - func schema_k8sio_api_authentication_v1_BoundObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -6484,17 +6869,23 @@ func schema_k8sio_api_authentication_v1_TokenRequest(ref common.ReferenceCallbac }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/authentication/v1.TokenRequestSpec"), + Description: "Spec holds information about the request being evaluated", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/authentication/v1.TokenRequestSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/authentication/v1.TokenRequestStatus"), + Description: "Status is filled in by the server and indicates whether the token can be authenticated.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/authentication/v1.TokenRequestStatus"), }, }, }, @@ -6520,8 +6911,9 @@ func schema_k8sio_api_authentication_v1_TokenRequestSpec(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -6559,6 +6951,7 @@ func schema_k8sio_api_authentication_v1_TokenRequestStatus(ref common.ReferenceC "token": { SchemaProps: spec.SchemaProps{ Description: "Token is the opaque bearer token.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -6566,6 +6959,7 @@ func schema_k8sio_api_authentication_v1_TokenRequestStatus(ref common.ReferenceC "expirationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "ExpirationTimestamp is the time of expiration of the returned token.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -6601,18 +6995,22 @@ func schema_k8sio_api_authentication_v1_TokenReview(ref common.ReferenceCallback }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authentication/v1.TokenReviewSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request can be authenticated.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authentication/v1.TokenReviewStatus"), }, }, @@ -6646,8 +7044,9 @@ func schema_k8sio_api_authentication_v1_TokenReviewSpec(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -6676,6 +7075,7 @@ func schema_k8sio_api_authentication_v1_TokenReviewStatus(ref common.ReferenceCa "user": { SchemaProps: spec.SchemaProps{ Description: "User is the UserInfo associated with the provided token.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authentication/v1.UserInfo"), }, }, @@ -6686,8 +7086,9 @@ func schema_k8sio_api_authentication_v1_TokenReviewStatus(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -6736,8 +7137,9 @@ func schema_k8sio_api_authentication_v1_UserInfo(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -6755,8 +7157,9 @@ func schema_k8sio_api_authentication_v1_UserInfo(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -6794,18 +7197,22 @@ func schema_k8sio_api_authentication_v1beta1_TokenReview(ref common.ReferenceCal }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authentication/v1beta1.TokenReviewSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates whether the request can be authenticated.", + Description: "Status is filled in by the server and indicates whether the token can be authenticated.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authentication/v1beta1.TokenReviewStatus"), }, }, @@ -6839,8 +7246,9 @@ func schema_k8sio_api_authentication_v1beta1_TokenReviewSpec(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -6869,6 +7277,7 @@ func schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref common.Refere "user": { SchemaProps: spec.SchemaProps{ Description: "User is the UserInfo associated with the provided token.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authentication/v1beta1.UserInfo"), }, }, @@ -6879,8 +7288,9 @@ func schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -6929,8 +7339,9 @@ func schema_k8sio_api_authentication_v1beta1_UserInfo(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -6948,8 +7359,9 @@ func schema_k8sio_api_authentication_v1beta1_UserInfo(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -6987,18 +7399,22 @@ func schema_k8sio_api_authorization_v1_LocalSubjectAccessReview(ref common.Refer }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard list metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), }, }, @@ -7052,8 +7468,9 @@ func schema_k8sio_api_authorization_v1_NonResourceRule(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7066,8 +7483,9 @@ func schema_k8sio_api_authorization_v1_NonResourceRule(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7156,8 +7574,9 @@ func schema_k8sio_api_authorization_v1_ResourceRule(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7170,8 +7589,9 @@ func schema_k8sio_api_authorization_v1_ResourceRule(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7184,8 +7604,9 @@ func schema_k8sio_api_authorization_v1_ResourceRule(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7198,8 +7619,9 @@ func schema_k8sio_api_authorization_v1_ResourceRule(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7235,18 +7657,22 @@ func schema_k8sio_api_authorization_v1_SelfSubjectAccessReview(ref common.Refere }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard list metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated. user and groups must be empty", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), }, }, @@ -7309,18 +7735,22 @@ func schema_k8sio_api_authorization_v1_SelfSubjectRulesReview(ref common.Referen }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard list metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates the set of actions a user can perform.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1.SubjectRulesReviewStatus"), }, }, @@ -7337,7 +7767,8 @@ func schema_k8sio_api_authorization_v1_SelfSubjectRulesReviewSpec(ref common.Ref return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "namespace": { SchemaProps: spec.SchemaProps{ @@ -7375,18 +7806,22 @@ func schema_k8sio_api_authorization_v1_SubjectAccessReview(ref common.ReferenceC }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard list metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), }, }, @@ -7432,8 +7867,9 @@ func schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7451,8 +7887,9 @@ func schema_k8sio_api_authorization_v1_SubjectAccessReviewSpec(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7486,6 +7923,7 @@ func schema_k8sio_api_authorization_v1_SubjectAccessReviewStatus(ref common.Refe "allowed": { SchemaProps: spec.SchemaProps{ Description: "Allowed is required. True if the action would be allowed, false otherwise.", + Default: false, Type: []string{"boolean"}, Format: "", }, @@ -7532,7 +7970,8 @@ func schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref common.Refer Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/authorization/v1.ResourceRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/authorization/v1.ResourceRule"), }, }, }, @@ -7545,7 +7984,8 @@ func schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref common.Refer Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/authorization/v1.NonResourceRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/authorization/v1.NonResourceRule"), }, }, }, @@ -7554,6 +7994,7 @@ func schema_k8sio_api_authorization_v1_SubjectRulesReviewStatus(ref common.Refer "incomplete": { SchemaProps: spec.SchemaProps{ Description: "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.", + Default: false, Type: []string{"boolean"}, Format: "", }, @@ -7597,18 +8038,22 @@ func schema_k8sio_api_authorization_v1beta1_LocalSubjectAccessReview(ref common. }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard list metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), }, }, @@ -7662,8 +8107,9 @@ func schema_k8sio_api_authorization_v1beta1_NonResourceRule(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7676,8 +8122,9 @@ func schema_k8sio_api_authorization_v1beta1_NonResourceRule(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7766,8 +8213,9 @@ func schema_k8sio_api_authorization_v1beta1_ResourceRule(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7780,8 +8228,9 @@ func schema_k8sio_api_authorization_v1beta1_ResourceRule(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7794,8 +8243,9 @@ func schema_k8sio_api_authorization_v1beta1_ResourceRule(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7808,8 +8258,9 @@ func schema_k8sio_api_authorization_v1beta1_ResourceRule(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -7845,18 +8296,22 @@ func schema_k8sio_api_authorization_v1beta1_SelfSubjectAccessReview(ref common.R }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard list metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated. user and groups must be empty", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), }, }, @@ -7919,18 +8374,22 @@ func schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReview(ref common.Re }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard list metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates the set of actions a user can perform.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus"), }, }, @@ -7947,7 +8406,8 @@ func schema_k8sio_api_authorization_v1beta1_SelfSubjectRulesReviewSpec(ref commo return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "namespace": { SchemaProps: spec.SchemaProps{ @@ -7985,18 +8445,22 @@ func schema_k8sio_api_authorization_v1beta1_SubjectAccessReview(ref common.Refer }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard list metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec holds information about the request being evaluated", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is filled in by the server and indicates whether the request is allowed or not", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), }, }, @@ -8042,8 +8506,9 @@ func schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref common.R Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -8061,8 +8526,9 @@ func schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewSpec(ref common.R Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -8096,6 +8562,7 @@ func schema_k8sio_api_authorization_v1beta1_SubjectAccessReviewStatus(ref common "allowed": { SchemaProps: spec.SchemaProps{ Description: "Allowed is required. True if the action would be allowed, false otherwise.", + Default: false, Type: []string{"boolean"}, Format: "", }, @@ -8142,7 +8609,8 @@ func schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/authorization/v1beta1.ResourceRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/authorization/v1beta1.ResourceRule"), }, }, }, @@ -8155,7 +8623,8 @@ func schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceRule"), }, }, }, @@ -8164,6 +8633,7 @@ func schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref common. "incomplete": { SchemaProps: spec.SchemaProps{ Description: "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.", + Default: false, Type: []string{"boolean"}, Format: "", }, @@ -8184,6 +8654,97 @@ func schema_k8sio_api_authorization_v1beta1_SubjectRulesReviewStatus(ref common. } } +func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in the requests and limits, describing a single container in each of the pods of the current scale target(e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built into Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the resource in question.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "targetAverageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "targetAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "container is the name of the container in the pods of the scaling target.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "container"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_autoscaling_v1_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the resource in question.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "currentAverageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "container is the name of the container in the pods of the scaling taget", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "currentAverageValue", "container"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -8194,6 +8755,7 @@ func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.Refe "kind": { SchemaProps: spec.SchemaProps{ Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8201,6 +8763,7 @@ func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.Refe "name": { SchemaProps: spec.SchemaProps{ Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8215,6 +8778,11 @@ func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.Refe }, Required: []string{"kind", "name"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } @@ -8229,6 +8797,7 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricSource(ref common.ReferenceCa "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of the metric in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8270,6 +8839,7 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref common.ReferenceCa "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of a metric used for autoscaling in metric system.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8283,6 +8853,7 @@ func schema_k8sio_api_autoscaling_v1_ExternalMetricStatus(ref common.ReferenceCa "currentValue": { SchemaProps: spec.SchemaProps{ Description: "currentValue is the current value of the metric (as a quantity)", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -8325,18 +8896,21 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref common.Referenc "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "current information about the autoscaler.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus"), }, }, @@ -8358,6 +8932,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref common "type": { SchemaProps: spec.SchemaProps{ Description: "type describes the current condition", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8365,6 +8940,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref common "status": { SchemaProps: spec.SchemaProps{ Description: "status is the status of the condition (True, False, Unknown)", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8372,6 +8948,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerCondition(ref common "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -8422,6 +8999,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.Refe "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -8432,7 +9010,8 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.Refe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler"), }, }, }, @@ -8457,6 +9036,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.Refe "scaleTargetRef": { SchemaProps: spec.SchemaProps{ Description: "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), }, }, @@ -8470,6 +9050,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.Refe "maxReplicas": { SchemaProps: spec.SchemaProps{ Description: "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -8513,6 +9094,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re "currentReplicas": { SchemaProps: spec.SchemaProps{ Description: "current number of replicas of pods managed by this autoscaler.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -8520,6 +9102,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re "desiredReplicas": { SchemaProps: spec.SchemaProps{ Description: "desired number of replicas of pods managed by this autoscaler.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -8549,7 +9132,8 @@ func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) co Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", + Description: "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8572,6 +9156,12 @@ func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) co Ref: ref("k8s.io/api/autoscaling/v1.ResourceMetricSource"), }, }, + "containerResource": { + SchemaProps: spec.SchemaProps{ + Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricSource"), + }, + }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", @@ -8583,7 +9173,7 @@ func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ExternalMetricSource", "k8s.io/api/autoscaling/v1.ObjectMetricSource", "k8s.io/api/autoscaling/v1.PodsMetricSource", "k8s.io/api/autoscaling/v1.ResourceMetricSource"}, + "k8s.io/api/autoscaling/v1.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v1.ExternalMetricSource", "k8s.io/api/autoscaling/v1.ObjectMetricSource", "k8s.io/api/autoscaling/v1.PodsMetricSource", "k8s.io/api/autoscaling/v1.ResourceMetricSource"}, } } @@ -8596,7 +9186,8 @@ func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", + Description: "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8619,6 +9210,12 @@ func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback) Ref: ref("k8s.io/api/autoscaling/v1.ResourceMetricStatus"), }, }, + "containerResource": { + SchemaProps: spec.SchemaProps{ + Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus"), + }, + }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", @@ -8630,7 +9227,7 @@ func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ExternalMetricStatus", "k8s.io/api/autoscaling/v1.ObjectMetricStatus", "k8s.io/api/autoscaling/v1.PodsMetricStatus", "k8s.io/api/autoscaling/v1.ResourceMetricStatus"}, + "k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v1.ExternalMetricStatus", "k8s.io/api/autoscaling/v1.ObjectMetricStatus", "k8s.io/api/autoscaling/v1.PodsMetricStatus", "k8s.io/api/autoscaling/v1.ResourceMetricStatus"}, } } @@ -8644,12 +9241,14 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref common.ReferenceCall "target": { SchemaProps: spec.SchemaProps{ Description: "target is the described Kubernetes object.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), }, }, "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of the metric in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8657,6 +9256,7 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricSource(ref common.ReferenceCall "targetValue": { SchemaProps: spec.SchemaProps{ Description: "targetValue is the target value of the metric (as a quantity).", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -8691,12 +9291,14 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref common.ReferenceCall "target": { SchemaProps: spec.SchemaProps{ Description: "target is the described Kubernetes object.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), }, }, "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of the metric in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8704,6 +9306,7 @@ func schema_k8sio_api_autoscaling_v1_ObjectMetricStatus(ref common.ReferenceCall "currentValue": { SchemaProps: spec.SchemaProps{ Description: "currentValue is the current value of the metric (as a quantity).", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -8738,6 +9341,7 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref common.ReferenceCallba "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of the metric in question", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8745,6 +9349,7 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricSource(ref common.ReferenceCallba "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -8773,6 +9378,7 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref common.ReferenceCallba "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of the metric in question", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8780,6 +9386,7 @@ func schema_k8sio_api_autoscaling_v1_PodsMetricStatus(ref common.ReferenceCallba "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -8808,6 +9415,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricSource(ref common.ReferenceCa "name": { SchemaProps: spec.SchemaProps{ Description: "name is the name of the resource in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8844,6 +9452,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref common.ReferenceCa "name": { SchemaProps: spec.SchemaProps{ Description: "name is the name of the resource in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8858,6 +9467,7 @@ func schema_k8sio_api_autoscaling_v1_ResourceMetricStatus(ref common.ReferenceCa "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -8894,18 +9504,21 @@ func schema_k8sio_api_autoscaling_v1_Scale(ref common.ReferenceCallback) common. "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v1.ScaleSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v1.ScaleStatus"), }, }, @@ -8947,6 +9560,7 @@ func schema_k8sio_api_autoscaling_v1_ScaleStatus(ref common.ReferenceCallback) c "replicas": { SchemaProps: spec.SchemaProps{ Description: "actual number of observed instances of the scaled object.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -8965,6 +9579,97 @@ func schema_k8sio_api_autoscaling_v1_ScaleStatus(ref common.ReferenceCallback) c } } +func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the resource in question.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "targetAverageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "targetAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "container is the name of the container in the pods of the scaling target", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "container"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the resource in question.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "currentAverageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "container is the name of the container in the pods of the scaling target", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "currentAverageValue", "container"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + func schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -8975,6 +9680,7 @@ func schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref common "kind": { SchemaProps: spec.SchemaProps{ Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", + Default: "", Type: []string{"string"}, Format: "", }, @@ -8982,6 +9688,7 @@ func schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref common "name": { SchemaProps: spec.SchemaProps{ Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9010,6 +9717,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref common.Refere "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of the metric in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9051,6 +9759,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref common.Refere "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of a metric used for autoscaling in metric system.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9064,6 +9773,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref common.Refere "currentValue": { SchemaProps: spec.SchemaProps{ Description: "currentValue is the current value of the metric (as a quantity)", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -9106,18 +9816,21 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref common.Ref "metadata": { SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current information about the autoscaler.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus"), }, }, @@ -9139,6 +9852,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref c "type": { SchemaProps: spec.SchemaProps{ Description: "type describes the current condition", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9146,6 +9860,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref c "status": { SchemaProps: spec.SchemaProps{ Description: "status is the status of the condition (True, False, Unknown)", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9153,6 +9868,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref c "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -9203,6 +9919,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common "metadata": { SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -9213,7 +9930,8 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler"), }, }, }, @@ -9238,6 +9956,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common "scaleTargetRef": { SchemaProps: spec.SchemaProps{ Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), }, }, @@ -9251,6 +9970,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common "maxReplicas": { SchemaProps: spec.SchemaProps{ Description: "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -9262,7 +9982,8 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricSpec"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricSpec"), }, }, }, @@ -9300,6 +10021,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm "currentReplicas": { SchemaProps: spec.SchemaProps{ Description: "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -9307,6 +10029,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm "desiredReplicas": { SchemaProps: spec.SchemaProps{ Description: "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -9318,7 +10041,8 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricStatus"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricStatus"), }, }, }, @@ -9331,7 +10055,8 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition"), }, }, }, @@ -9355,7 +10080,8 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallbac Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", + Description: "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9378,6 +10104,12 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallbac Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"), }, }, + "containerResource": { + SchemaProps: spec.SchemaProps{ + Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource"), + }, + }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", @@ -9389,7 +10121,7 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta1.PodsMetricSource", "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"}, + "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v2beta1.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta1.PodsMetricSource", "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"}, } } @@ -9402,7 +10134,8 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallb Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", + Description: "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9425,6 +10158,12 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallb Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"), }, }, + "containerResource": { + SchemaProps: spec.SchemaProps{ + Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus"), + }, + }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", @@ -9436,7 +10175,7 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"}, + "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"}, } } @@ -9450,12 +10189,14 @@ func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref common.Referenc "target": { SchemaProps: spec.SchemaProps{ Description: "target is the described Kubernetes object.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), }, }, "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of the metric in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9463,6 +10204,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref common.Referenc "targetValue": { SchemaProps: spec.SchemaProps{ Description: "targetValue is the target value of the metric (as a quantity).", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -9497,12 +10239,14 @@ func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref common.Referenc "target": { SchemaProps: spec.SchemaProps{ Description: "target is the described Kubernetes object.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), }, }, "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of the metric in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9510,6 +10254,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref common.Referenc "currentValue": { SchemaProps: spec.SchemaProps{ Description: "currentValue is the current value of the metric (as a quantity).", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -9544,6 +10289,7 @@ func schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref common.ReferenceC "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of the metric in question", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9551,6 +10297,7 @@ func schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref common.ReferenceC "targetAverageValue": { SchemaProps: spec.SchemaProps{ Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -9579,6 +10326,7 @@ func schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref common.ReferenceC "metricName": { SchemaProps: spec.SchemaProps{ Description: "metricName is the name of the metric in question", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9586,6 +10334,7 @@ func schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref common.ReferenceC "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -9614,6 +10363,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref common.Refere "name": { SchemaProps: spec.SchemaProps{ Description: "name is the name of the resource in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9650,6 +10400,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref common.Refere "name": { SchemaProps: spec.SchemaProps{ Description: "name is the name of the resource in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9664,6 +10415,7 @@ func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref common.Refere "currentAverageValue": { SchemaProps: spec.SchemaProps{ Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -9676,6 +10428,84 @@ func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref common.Refere } } +func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the resource in question.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "container is the name of the container in the pods of the scaling target", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "target", "container"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the resource in question.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "current": { + SchemaProps: spec.SchemaProps{ + Description: "current contains the current value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "Container is the name of the container in the pods of the scaling target", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "current", "container"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + } +} + func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -9686,6 +10516,7 @@ func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common "kind": { SchemaProps: spec.SchemaProps{ Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9693,6 +10524,7 @@ func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common "name": { SchemaProps: spec.SchemaProps{ Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9721,12 +10553,14 @@ func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref common.Refere "metric": { SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), }, }, @@ -9749,12 +10583,14 @@ func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref common.Refere "metric": { SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, "current": { SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), }, }, @@ -9777,6 +10613,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref common.ReferenceC "type": { SchemaProps: spec.SchemaProps{ Description: "Type is used to specify the scaling policy.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9784,6 +10621,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref common.ReferenceC "value": { SchemaProps: spec.SchemaProps{ Description: "Value contains the amount of change which is permitted by the policy. It must be greater than zero", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -9791,6 +10629,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref common.ReferenceC "periodSeconds": { SchemaProps: spec.SchemaProps{ Description: "PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -9830,7 +10669,8 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy"), }, }, }, @@ -9868,18 +10708,21 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref common.Ref "metadata": { SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current information about the autoscaler.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus"), }, }, @@ -9928,6 +10771,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref c "type": { SchemaProps: spec.SchemaProps{ Description: "type describes the current condition", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9935,6 +10779,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref c "status": { SchemaProps: spec.SchemaProps{ Description: "status is the status of the condition (True, False, Unknown)", + Default: "", Type: []string{"string"}, Format: "", }, @@ -9942,6 +10787,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref c "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -9992,6 +10838,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common "metadata": { SchemaProps: spec.SchemaProps{ Description: "metadata is the standard list metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -10002,7 +10849,8 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler"), }, }, }, @@ -10027,6 +10875,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common "scaleTargetRef": { SchemaProps: spec.SchemaProps{ Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), }, }, @@ -10040,6 +10889,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common "maxReplicas": { SchemaProps: spec.SchemaProps{ Description: "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -10051,7 +10901,8 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricSpec"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricSpec"), }, }, }, @@ -10095,6 +10946,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm "currentReplicas": { SchemaProps: spec.SchemaProps{ Description: "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -10102,6 +10954,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm "desiredReplicas": { SchemaProps: spec.SchemaProps{ Description: "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -10113,7 +10966,8 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricStatus"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricStatus"), }, }, }, @@ -10126,7 +10980,8 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition"), }, }, }, @@ -10151,6 +11006,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref common.ReferenceC "name": { SchemaProps: spec.SchemaProps{ Description: "name is the name of the given metric", + Default: "", Type: []string{"string"}, Format: "", }, @@ -10179,7 +11035,8 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallbac Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", + Description: "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + Default: "", Type: []string{"string"}, Format: "", }, @@ -10202,6 +11059,12 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallbac Ref: ref("k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"), }, }, + "containerResource": { + SchemaProps: spec.SchemaProps{ + Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource"), + }, + }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", @@ -10213,7 +11076,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta2.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta2.PodsMetricSource", "k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"}, + "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v2beta2.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta2.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta2.PodsMetricSource", "k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"}, } } @@ -10226,7 +11089,8 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallb Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", + Description: "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + Default: "", Type: []string{"string"}, Format: "", }, @@ -10249,6 +11113,12 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallb Ref: ref("k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"), }, }, + "containerResource": { + SchemaProps: spec.SchemaProps{ + Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus"), + }, + }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", @@ -10260,7 +11130,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta2.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"}, + "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta2.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"}, } } @@ -10274,6 +11144,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref common.ReferenceCallb "type": { SchemaProps: spec.SchemaProps{ Description: "type represents whether the metric type is Utilization, Value, or AverageValue", + Default: "", Type: []string{"string"}, Format: "", }, @@ -10349,18 +11220,21 @@ func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref common.Referenc Properties: map[string]spec.Schema{ "describedObject": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), }, }, "metric": { SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, @@ -10383,18 +11257,21 @@ func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref common.Referenc "metric": { SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, "current": { SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), }, }, "describedObject": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), }, }, }, @@ -10416,12 +11293,14 @@ func schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref common.ReferenceC "metric": { SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), }, }, @@ -10444,12 +11323,14 @@ func schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref common.ReferenceC "metric": { SchemaProps: spec.SchemaProps{ Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, "current": { SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), }, }, @@ -10472,6 +11353,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref common.Refere "name": { SchemaProps: spec.SchemaProps{ Description: "name is the name of the resource in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -10479,6 +11361,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref common.Refere "target": { SchemaProps: spec.SchemaProps{ Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), }, }, @@ -10501,6 +11384,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.Refere "name": { SchemaProps: spec.SchemaProps{ Description: "Name is the name of the resource in question.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -10508,6 +11392,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.Refere "current": { SchemaProps: spec.SchemaProps{ Description: "current contains the current value for the given metric", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), }, }, @@ -10520,6 +11405,219 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.Refere } } +func schema_k8sio_api_batch_v1_CronJob(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJob represents the configuration of a single cron job.", + 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. 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"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.CronJobSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.CronJobStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1.CronJobSpec", "k8s.io/api/batch/v1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_batch_v1_CronJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJobList is a collection of cron jobs.", + 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 list metadata. 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 CronJobs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.CronJob"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_batch_v1_CronJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJobSpec describes how the job execution will look like and when it will actually run.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "schedule": { + SchemaProps: spec.SchemaProps{ + Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "startingDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "concurrencyPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", + Type: []string{"string"}, + Format: "", + }, + }, + "suspend": { + SchemaProps: spec.SchemaProps{ + Description: "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "jobTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the job that will be created when executing a CronJob.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.JobTemplateSpec"), + }, + }, + "successfulJobsHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failedJobsHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"schedule", "jobTemplate"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1.JobTemplateSpec"}, + } +} + +func schema_k8sio_api_batch_v1_CronJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJobStatus represents the current state of a cron job.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "active": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "A list of pointers to currently running jobs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + "lastScheduleTime": { + SchemaProps: spec.SchemaProps{ + Description: "Information when was the last time the job was successfully scheduled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastSuccessfulTime": { + SchemaProps: spec.SchemaProps{ + Description: "Information when was the last time the job successfully completed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + func schema_k8sio_api_batch_v1_Job(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -10544,18 +11642,21 @@ func schema_k8sio_api_batch_v1_Job(ref common.ReferenceCallback) common.OpenAPID "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/batch/v1.JobSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/batch/v1.JobStatus"), }, }, @@ -10577,6 +11678,7 @@ func schema_k8sio_api_batch_v1_JobCondition(ref common.ReferenceCallback) common "type": { SchemaProps: spec.SchemaProps{ Description: "Type of job condition, Complete or Failed.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -10584,6 +11686,7 @@ func schema_k8sio_api_batch_v1_JobCondition(ref common.ReferenceCallback) common "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -10591,12 +11694,14 @@ func schema_k8sio_api_batch_v1_JobCondition(ref common.ReferenceCallback) common "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition was checked.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transit from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -10647,6 +11752,7 @@ func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.Open "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. 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"), }, }, @@ -10657,7 +11763,8 @@ func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.Open Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/batch/v1.Job"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.Job"), }, }, }, @@ -10695,7 +11802,7 @@ func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.Open }, "activeDeadlineSeconds": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer", + Description: "Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.", Type: []string{"integer"}, Format: "int64", }, @@ -10723,6 +11830,7 @@ func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.Open "template": { SchemaProps: spec.SchemaProps{ Description: "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -10733,6 +11841,20 @@ func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.Open Format: "int32", }, }, + "completionMode": { + SchemaProps: spec.SchemaProps{ + Description: "CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nThis field is beta-level. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job.", + Type: []string{"string"}, + Format: "", + }, + }, + "suspend": { + SchemaProps: spec.SchemaProps{ + Description: "Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.\n\nThis field is beta-level, gated by SuspendJob feature flag (enabled by default).", + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"template"}, }, @@ -10752,17 +11874,19 @@ func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.Op "conditions": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", "x-kubernetes-patch-merge-key": "type", "x-kubernetes-patch-strategy": "merge", }, }, SchemaProps: spec.SchemaProps{ - Description: "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + Description: "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/batch/v1.JobCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.JobCondition"), }, }, }, @@ -10770,13 +11894,13 @@ func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.Op }, "startTime": { SchemaProps: spec.SchemaProps{ - Description: "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Description: "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.", Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "completionTime": { SchemaProps: spec.SchemaProps{ - Description: "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Description: "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully.", Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -10801,11 +11925,106 @@ func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.Op Format: "int32", }, }, + "completedIndexes": { + SchemaProps: spec.SchemaProps{ + Description: "CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", + Type: []string{"string"}, + Format: "", + }, + }, + "uncountedTerminatedPods": { + SchemaProps: spec.SchemaProps{ + Description: "UncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status: (1) Add the pod UID to the arrays in this field. (2) Remove the pod finalizer. (3) Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nThis field is alpha-level. The job controller only makes use of this field when the feature gate PodTrackingWithFinalizers is enabled. Old jobs might not be tracked using this field, in which case the field remains null.", + Ref: ref("k8s.io/api/batch/v1.UncountedTerminatedPods"), + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/batch/v1.JobCondition", "k8s.io/api/batch/v1.UncountedTerminatedPods", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_batch_v1_JobTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobTemplateSpec describes the data a Job should have when created from a template", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata of the jobs created from this template. 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"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.JobSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_batch_v1_UncountedTerminatedPods(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "succeeded": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Succeeded holds UIDs of succeeded Pods.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "failed": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Failed holds UIDs of failed Pods.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, } } @@ -10833,18 +12052,21 @@ func schema_k8sio_api_batch_v1beta1_CronJob(ref common.ReferenceCallback) common "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/batch/v1beta1.CronJobSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/batch/v1beta1.CronJobStatus"), }, }, @@ -10880,6 +12102,7 @@ func schema_k8sio_api_batch_v1beta1_CronJobList(ref common.ReferenceCallback) co "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. 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"), }, }, @@ -10890,7 +12113,8 @@ func schema_k8sio_api_batch_v1beta1_CronJobList(ref common.ReferenceCallback) co Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/batch/v1beta1.CronJob"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1beta1.CronJob"), }, }, }, @@ -10915,6 +12139,7 @@ func schema_k8sio_api_batch_v1beta1_CronJobSpec(ref common.ReferenceCallback) co "schedule": { SchemaProps: spec.SchemaProps{ Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -10943,6 +12168,7 @@ func schema_k8sio_api_batch_v1beta1_CronJobSpec(ref common.ReferenceCallback) co "jobTemplate": { SchemaProps: spec.SchemaProps{ Description: "Specifies the job that will be created when executing a CronJob.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), }, }, @@ -10977,13 +12203,19 @@ func schema_k8sio_api_batch_v1beta1_CronJobStatus(ref common.ReferenceCallback) Type: []string{"object"}, Properties: map[string]spec.Schema{ "active": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "A list of pointers to currently running jobs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, }, @@ -10995,6 +12227,12 @@ func schema_k8sio_api_batch_v1beta1_CronJobStatus(ref common.ReferenceCallback) Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, + "lastSuccessfulTime": { + SchemaProps: spec.SchemaProps{ + Description: "Information when was the last time the job successfully completed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, }, }, }, @@ -11027,12 +12265,14 @@ func schema_k8sio_api_batch_v1beta1_JobTemplate(ref common.ReferenceCallback) co "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), }, }, @@ -11054,12 +12294,14 @@ func schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref common.ReferenceCallback "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata of the jobs created from this template. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/batch/v1.JobSpec"), }, }, @@ -11071,11 +12313,11 @@ func schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref common.ReferenceCallback } } -func schema_k8sio_api_batch_v2alpha1_CronJob(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1_CertificateSigningRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJob represents the configuration of a single cron job.", + Description: "CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.\n\nKubelets use this API to obtain:\n 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName).\n 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName).\n\nThis API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -11094,35 +12336,98 @@ func schema_k8sio_api_batch_v2alpha1_CronJob(ref common.ReferenceCallback) commo }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v2alpha1.CronJobSpec"), + Description: "spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v2alpha1.CronJobStatus"), + Description: "status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestStatus"), }, }, }, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/batch/v2alpha1.CronJobSpec", "k8s.io/api/batch/v2alpha1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/certificates/v1.CertificateSigningRequestSpec", "k8s.io/api/certificates/v1.CertificateSigningRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_batch_v2alpha1_CronJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1_CertificateSigningRequestCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJobList is a collection of cron jobs.", + Description: "CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type of the condition. Known conditions are \"Approved\", \"Denied\", and \"Failed\".\n\nAn \"Approved\" condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer.\n\nA \"Denied\" condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer.\n\nA \"Failed\" condition is added via the /status subresource, indicating the signer failed to issue the certificate.\n\nApproved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added.\n\nOnly one condition of a given type is allowed.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\".", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason indicates a brief reason for the request state", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message contains a human readable message with details about the request state", + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastUpdateTime is the time of the last update to this condition", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CertificateSigningRequestList is a collection of CertificateSigningRequest objects", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -11141,18 +12446,19 @@ func schema_k8sio_api_batch_v2alpha1_CronJobList(ref common.ReferenceCallback) c }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { SchemaProps: spec.SchemaProps{ - Description: "items is the list of CronJobs.", + Description: "items is a collection of CertificateSigningRequest objects", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/batch/v2alpha1.CronJob"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequest"), }, }, }, @@ -11163,173 +12469,174 @@ func schema_k8sio_api_batch_v2alpha1_CronJobList(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/batch/v2alpha1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/certificates/v1.CertificateSigningRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_batch_v2alpha1_CronJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1_CertificateSigningRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJobSpec describes how the job execution will look like and when it will actually run.", + Description: "CertificateSigningRequestSpec contains the certificate request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "schedule": { - SchemaProps: spec.SchemaProps{ - Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", - Type: []string{"string"}, - Format: "", - }, - }, - "startingDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", - Type: []string{"integer"}, - Format: "int64", + "request": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "concurrencyPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", + Description: "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", Type: []string{"string"}, - Format: "", + Format: "byte", }, }, - "suspend": { + "signerName": { SchemaProps: spec.SchemaProps{ - Description: "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", - Type: []string{"boolean"}, + Description: "signerName indicates the requested signer, and is a qualified name.\n\nList/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.\n\nWell-known Kubernetes signers are:\n 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.\n Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.\n Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.\n Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n\nMore details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers\n\nCustom signerNames can also be specified. The signer defines:\n 1. Trust distribution: how trust (CA bundles) are distributed.\n 2. Permitted subjects: and behavior when a disallowed subject is requested.\n 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.\n 4. Required, permitted, or forbidden key usages / extended key usages.\n 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.\n 6. Whether or not requests for CA certificates are allowed.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "jobTemplate": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the job that will be created when executing a CronJob.", - Ref: ref("k8s.io/api/batch/v2alpha1.JobTemplateSpec"), - }, - }, - "successfulJobsHistoryLimit": { + "expirationSeconds": { SchemaProps: spec.SchemaProps{ - Description: "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + Description: "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.\n\nAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.", Type: []string{"integer"}, Format: "int32", }, }, - "failedJobsHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", - Type: []string{"integer"}, - Format: "int32", + "usages": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - }, - Required: []string{"schedule", "jobTemplate"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v2alpha1.JobTemplateSpec"}, - } -} - -func schema_k8sio_api_batch_v2alpha1_CronJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CronJobStatus represents the current state of a cron job.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "active": { SchemaProps: spec.SchemaProps{ - Description: "A list of pointers to currently running jobs.", + Description: "usages specifies a set of key usages requested in the issued certificate.\n\nRequests for TLS client certificates typically request: \"digital signature\", \"key encipherment\", \"client auth\".\n\nRequests for TLS serving certificates typically request: \"key encipherment\", \"digital signature\", \"server auth\".\n\nValid values are:\n \"signing\", \"digital signature\", \"content commitment\",\n \"key encipherment\", \"key agreement\", \"data encipherment\",\n \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\",\n \"server auth\", \"client auth\",\n \"code signing\", \"email protection\", \"s/mime\",\n \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\",\n \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "lastScheduleTime": { - SchemaProps: spec.SchemaProps{ - Description: "Information when was the last time the job was successfully scheduled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_batch_v2alpha1_JobTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JobTemplate describes a template for creating copies of a predefined pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "username": { 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", + Description: "username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "uid": { 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", + Description: "uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "groups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "groups contains group membership of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "template": { + "extra": { SchemaProps: spec.SchemaProps{ - Description: "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v2alpha1.JobTemplateSpec"), + Description: "extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, }, }, }, + Required: []string{"request", "signerName"}, }, }, - Dependencies: []string{ - "k8s.io/api/batch/v2alpha1.JobTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_batch_v2alpha1_JobTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1_CertificateSigningRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JobTemplateSpec describes the data a Job should have when created from a template", + Description: "CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metadata": { + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\".", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestCondition"), + }, + }, + }, }, }, - "spec": { + "certificate": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v1.JobSpec"), + Description: "certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificate must contain one or more PEM blocks.\n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data\n must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.\n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,\n to allow for explanatory text as described in section 5.2 of RFC7468.\n\nIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.\n\nThe certificate is encoded in PEM format.\n\nWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:\n\n base64(\n -----BEGIN CERTIFICATE-----\n ...\n -----END CERTIFICATE-----\n )", + Type: []string{"string"}, + Format: "byte", }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/certificates/v1.CertificateSigningRequestCondition"}, } } @@ -11356,22 +12663,26 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref common. }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "The certificate request itself and any additional information.", + Description: "spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Derived information about the request.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus"), }, }, }, + Required: []string{"spec"}, }, }, Dependencies: []string{ @@ -11387,7 +12698,16 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(re Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "request approval state, currently Approved or Denied.", + Description: "type of the condition. Known conditions include \"Approved\", \"Denied\", and \"Failed\".", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\". Defaults to \"True\". If unset, should be treated as \"True\".", + Default: "", Type: []string{"string"}, Format: "", }, @@ -11409,6 +12729,14 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(re "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "timestamp for the last update to this condition", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -11443,7 +12771,8 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref com }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { @@ -11452,7 +12781,8 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref com Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequest"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequest"), }, }, }, @@ -11471,10 +12801,15 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref com return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + Description: "CertificateSigningRequestSpec contains the certificate request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "request": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Base64-encoded PKCS#10 CSR data", Type: []string{"string"}, @@ -11488,15 +12823,28 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref com Format: "", }, }, + "expirationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.\n\nAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.", + Type: []string{"integer"}, + Format: "int32", + }, + }, "usages": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", + Description: "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12\nValid values are:\n \"signing\",\n \"digital signature\",\n \"content commitment\",\n \"key encipherment\",\n \"key agreement\",\n \"data encipherment\",\n \"cert sign\",\n \"crl sign\",\n \"encipher only\",\n \"decipher only\",\n \"any\",\n \"server auth\",\n \"client auth\",\n \"code signing\",\n \"email protection\",\n \"s/mime\",\n \"ipsec end system\",\n \"ipsec tunnel\",\n \"ipsec user\",\n \"timestamping\",\n \"ocsp signing\",\n \"microsoft sgc\",\n \"netscape sgc\"", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -11517,14 +12865,20 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref com }, }, "groups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Group information about the requesting user. See user.Info interface for details.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -11542,8 +12896,9 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref com Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -11566,19 +12921,33 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref c Type: []string{"object"}, Properties: map[string]spec.Schema{ "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Conditions applied to the request, such as approval or denial.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"), }, }, }, }, }, "certificate": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "If request was approved, the controller will place the issued certificate here.", Type: []string{"string"}, @@ -11617,12 +12986,14 @@ func schema_k8sio_api_coordination_v1_Lease(ref common.ReferenceCallback) common "metadata": { SchemaProps: spec.SchemaProps{ Description: "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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/coordination/v1.LeaseSpec"), }, }, @@ -11658,6 +13029,7 @@ func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) co "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. 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"), }, }, @@ -11668,7 +13040,8 @@ func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) co Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/coordination/v1.Lease"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/coordination/v1.Lease"), }, }, }, @@ -11755,12 +13128,14 @@ func schema_k8sio_api_coordination_v1beta1_Lease(ref common.ReferenceCallback) c "metadata": { SchemaProps: spec.SchemaProps{ Description: "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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/coordination/v1beta1.LeaseSpec"), }, }, @@ -11796,6 +13171,7 @@ func schema_k8sio_api_coordination_v1beta1_LeaseList(ref common.ReferenceCallbac "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. 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"), }, }, @@ -11806,7 +13182,8 @@ func schema_k8sio_api_coordination_v1beta1_LeaseList(ref common.ReferenceCallbac Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/coordination/v1beta1.Lease"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/coordination/v1beta1.Lease"), }, }, }, @@ -11879,6 +13256,7 @@ func schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref common.Refere "volumeID": { SchemaProps: spec.SchemaProps{ Description: "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Default: "", Type: []string{"string"}, Format: "", }, @@ -11954,6 +13332,7 @@ func schema_k8sio_api_core_v1_AttachedVolume(ref common.ReferenceCallback) commo "name": { SchemaProps: spec.SchemaProps{ Description: "Name of the attached volume", + Default: "", Type: []string{"string"}, Format: "", }, @@ -11961,6 +13340,7 @@ func schema_k8sio_api_core_v1_AttachedVolume(ref common.ReferenceCallback) commo "devicePath": { SchemaProps: spec.SchemaProps{ Description: "DevicePath represents the device path where the volume should be available", + Default: "", Type: []string{"string"}, Format: "", }, @@ -11986,7 +13366,8 @@ func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), }, }, }, @@ -12010,6 +13391,7 @@ func schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref common.ReferenceCallback "diskName": { SchemaProps: spec.SchemaProps{ Description: "The Name of the data disk in the blob storage", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12017,6 +13399,7 @@ func schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref common.ReferenceCallback "diskURI": { SchemaProps: spec.SchemaProps{ Description: "The URI the data disk in the blob storage", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12066,6 +13449,7 @@ func schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref common.Referen "secretName": { SchemaProps: spec.SchemaProps{ Description: "the name of secret that contains Azure Storage Account Name and Key", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12073,6 +13457,7 @@ func schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref common.Referen "shareName": { SchemaProps: spec.SchemaProps{ Description: "Share Name", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12108,6 +13493,7 @@ func schema_k8sio_api_core_v1_AzureFileVolumeSource(ref common.ReferenceCallback "secretName": { SchemaProps: spec.SchemaProps{ Description: "the name of secret that contains Azure Storage Account Name and Key", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12115,6 +13501,7 @@ func schema_k8sio_api_core_v1_AzureFileVolumeSource(ref common.ReferenceCallback "shareName": { SchemaProps: spec.SchemaProps{ Description: "Share Name", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12157,12 +13544,14 @@ func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenA "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "The target object that you want to bind to the standard object.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, @@ -12185,6 +13574,7 @@ func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCall "driver": { SchemaProps: spec.SchemaProps{ Description: "Driver is the name of the driver to use for this volume. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12192,6 +13582,7 @@ func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCall "volumeHandle": { SchemaProps: spec.SchemaProps{ Description: "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12218,8 +13609,9 @@ func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCall Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -12268,6 +13660,7 @@ func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) comm "driver": { SchemaProps: spec.SchemaProps{ Description: "Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12294,8 +13687,9 @@ func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) comm Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -12330,8 +13724,9 @@ func schema_k8sio_api_core_v1_Capabilities(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -12344,8 +13739,9 @@ func schema_k8sio_api_core_v1_Capabilities(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -12371,8 +13767,9 @@ func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceC Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -12435,8 +13832,9 @@ func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -12495,6 +13893,7 @@ func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceC "volumeID": { SchemaProps: spec.SchemaProps{ Description: "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12538,6 +13937,7 @@ func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) c "volumeID": { SchemaProps: spec.SchemaProps{ Description: "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12601,6 +14001,7 @@ func schema_k8sio_api_core_v1_ComponentCondition(ref common.ReferenceCallback) c "type": { SchemaProps: spec.SchemaProps{ Description: "Type of condition for a component. Valid value: \"Healthy\"", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12608,6 +14009,7 @@ func schema_k8sio_api_core_v1_ComponentCondition(ref common.ReferenceCallback) c "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12637,7 +14039,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", + Description: "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -12657,6 +14059,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, @@ -12673,7 +14076,8 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ComponentCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ComponentCondition"), }, }, }, @@ -12691,7 +14095,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Status of all the conditions for the component as a list of ComponentStatus objects.", + Description: "Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -12711,6 +14115,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -12721,7 +14126,8 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ComponentStatus"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ComponentStatus"), }, }, }, @@ -12760,12 +14166,13 @@ func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.Ope "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "immutable": { SchemaProps: spec.SchemaProps{ - Description: "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is an alpha field enabled by ImmutableEphemeralVolumes feature gate.", + Description: "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.", Type: []string{"boolean"}, Format: "", }, @@ -12778,8 +14185,9 @@ func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.Ope Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -12852,6 +14260,7 @@ func schema_k8sio_api_core_v1_ConfigMapKeySelector(ref common.ReferenceCallback) "key": { SchemaProps: spec.SchemaProps{ Description: "The key to select.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12866,6 +14275,11 @@ func schema_k8sio_api_core_v1_ConfigMapKeySelector(ref common.ReferenceCallback) }, Required: []string{"key"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } @@ -12894,6 +14308,7 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common "metadata": { SchemaProps: spec.SchemaProps{ Description: "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"), }, }, @@ -12904,7 +14319,8 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ConfigMap"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ConfigMap"), }, }, }, @@ -12923,12 +14339,13 @@ func schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref common.ReferenceCall return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node.", + Description: "ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration", Type: []string{"object"}, Properties: map[string]spec.Schema{ "namespace": { SchemaProps: spec.SchemaProps{ Description: "Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12936,6 +14353,7 @@ func schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref common.ReferenceCall "name": { SchemaProps: spec.SchemaProps{ Description: "Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12957,6 +14375,7 @@ func schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref common.ReferenceCall "kubeletConfigKey": { SchemaProps: spec.SchemaProps{ Description: "KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -12989,7 +14408,8 @@ func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.KeyToPath"), }, }, }, @@ -13031,7 +14451,8 @@ func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.KeyToPath"), }, }, }, @@ -13039,7 +14460,7 @@ func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback }, "defaultMode": { SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Description: "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", Type: []string{"integer"}, Format: "int32", }, @@ -13069,6 +14490,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope "name": { SchemaProps: spec.SchemaProps{ Description: "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -13082,13 +14504,14 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, "command": { SchemaProps: spec.SchemaProps{ - Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -13096,13 +14519,14 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, "args": { SchemaProps: spec.SchemaProps{ - Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -13133,7 +14557,8 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ContainerPort"), }, }, }, @@ -13146,7 +14571,8 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), }, }, }, @@ -13165,7 +14591,8 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EnvVar"), }, }, }, @@ -13173,7 +14600,8 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, "resources": { SchemaProps: spec.SchemaProps{ - Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), }, }, @@ -13190,7 +14618,8 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeMount"), }, }, }, @@ -13209,7 +14638,8 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), }, }, }, @@ -13229,7 +14659,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, "startupProbe": { SchemaProps: spec.SchemaProps{ - Description: "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is a beta feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Description: "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", Ref: ref("k8s.io/api/core/v1.Probe"), }, }, @@ -13262,7 +14692,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, "securityContext": { SchemaProps: spec.SchemaProps{ - Description: "Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", + Description: "SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", Ref: ref("k8s.io/api/core/v1.SecurityContext"), }, }, @@ -13310,8 +14740,9 @@ func schema_k8sio_api_core_v1_ContainerImage(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -13325,7 +14756,6 @@ func schema_k8sio_api_core_v1_ContainerImage(ref common.ReferenceCallback) commo }, }, }, - Required: []string{"names"}, }, }, } @@ -13355,6 +14785,7 @@ func schema_k8sio_api_core_v1_ContainerPort(ref common.ReferenceCallback) common "containerPort": { SchemaProps: spec.SchemaProps{ Description: "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -13362,6 +14793,7 @@ func schema_k8sio_api_core_v1_ContainerPort(ref common.ReferenceCallback) common "protocol": { SchemaProps: spec.SchemaProps{ Description: "Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".", + Default: "TCP", Type: []string{"string"}, Format: "", }, @@ -13423,6 +14855,7 @@ func schema_k8sio_api_core_v1_ContainerStateRunning(ref common.ReferenceCallback "startedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which the container was last (re-)started", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -13444,6 +14877,7 @@ func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallb "exitCode": { SchemaProps: spec.SchemaProps{ Description: "Exit status from the last termination of the container", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -13472,12 +14906,14 @@ func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallb "startedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which previous execution of the container started", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "finishedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which the container last terminated", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -13534,6 +14970,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "name": { SchemaProps: spec.SchemaProps{ Description: "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -13541,18 +14978,21 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "state": { SchemaProps: spec.SchemaProps{ Description: "Details about the container's current condition.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ContainerState"), }, }, "lastState": { SchemaProps: spec.SchemaProps{ Description: "Details about the container's last termination condition.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ContainerState"), }, }, "ready": { SchemaProps: spec.SchemaProps{ Description: "Specifies whether the container has passed its readiness probe.", + Default: false, Type: []string{"boolean"}, Format: "", }, @@ -13560,6 +15000,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "restartCount": { SchemaProps: spec.SchemaProps{ Description: "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -13567,6 +15008,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "image": { SchemaProps: spec.SchemaProps{ Description: "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images", + Default: "", Type: []string{"string"}, Format: "", }, @@ -13574,6 +15016,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "imageID": { SchemaProps: spec.SchemaProps{ Description: "ImageID of the container's image.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -13611,6 +15054,7 @@ func schema_k8sio_api_core_v1_DaemonEndpoint(ref common.ReferenceCallback) commo "Port": { SchemaProps: spec.SchemaProps{ Description: "Port number of the given endpoint.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -13636,7 +15080,8 @@ func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), }, }, }, @@ -13660,6 +15105,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback "path": { SchemaProps: spec.SchemaProps{ Description: "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + Default: "", Type: []string{"string"}, Format: "", }, @@ -13678,7 +15124,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback }, "mode": { SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Description: "Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", Type: []string{"integer"}, Format: "int32", }, @@ -13706,7 +15152,8 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), }, }, }, @@ -13714,7 +15161,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallba }, "defaultMode": { SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Description: "Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", Type: []string{"integer"}, Format: "int32", }, @@ -13765,6 +15212,7 @@ func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) comm "ip": { SchemaProps: spec.SchemaProps{ Description: "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -13792,6 +15240,11 @@ func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) comm }, Required: []string{"ip"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, Dependencies: []string{ "k8s.io/api/core/v1.ObjectReference"}, @@ -13815,6 +15268,7 @@ func schema_k8sio_api_core_v1_EndpointPort(ref common.ReferenceCallback) common. "port": { SchemaProps: spec.SchemaProps{ Description: "The port number of the endpoint.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -13828,7 +15282,7 @@ func schema_k8sio_api_core_v1_EndpointPort(ref common.ReferenceCallback) common. }, "appProtocol": { SchemaProps: spec.SchemaProps{ - Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. Field can be enabled with ServiceAppProtocol feature gate.", + Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", Type: []string{"string"}, Format: "", }, @@ -13836,6 +15290,11 @@ func schema_k8sio_api_core_v1_EndpointPort(ref common.ReferenceCallback) common. }, Required: []string{"port"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } @@ -13854,7 +15313,8 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EndpointAddress"), }, }, }, @@ -13867,7 +15327,8 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EndpointAddress"), }, }, }, @@ -13880,7 +15341,8 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointPort"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EndpointPort"), }, }, }, @@ -13918,6 +15380,7 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, @@ -13928,7 +15391,8 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointSubset"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EndpointSubset"), }, }, }, @@ -13966,6 +15430,7 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -13976,7 +15441,8 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Endpoints"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Endpoints"), }, }, }, @@ -14035,13 +15501,14 @@ func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAP "name": { SchemaProps: spec.SchemaProps{ Description: "Name of the environment variable. Must be a C_IDENTIFIER.", + Default: "", Type: []string{"string"}, Format: "", }, }, "value": { SchemaProps: spec.SchemaProps{ - Description: "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", + Description: "Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", Type: []string{"string"}, Format: "", }, @@ -14070,7 +15537,7 @@ func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common. Properties: map[string]spec.Schema{ "fieldRef": { SchemaProps: spec.SchemaProps{ - Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", + Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), }, }, @@ -14110,6 +15577,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c "name": { SchemaProps: spec.SchemaProps{ Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -14123,13 +15591,14 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, "command": { SchemaProps: spec.SchemaProps{ - Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -14137,13 +15606,14 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, "args": { SchemaProps: spec.SchemaProps{ - Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -14163,7 +15633,8 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ContainerPort"), }, }, }, @@ -14176,7 +15647,8 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), }, }, }, @@ -14195,7 +15667,8 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EnvVar"), }, }, }, @@ -14204,6 +15677,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c "resources": { SchemaProps: spec.SchemaProps{ Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), }, }, @@ -14220,7 +15694,8 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeMount"), }, }, }, @@ -14239,7 +15714,8 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), }, }, }, @@ -14292,7 +15768,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, "securityContext": { SchemaProps: spec.SchemaProps{ - Description: "SecurityContext is not allowed for ephemeral containers.", + Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", Ref: ref("k8s.io/api/core/v1.SecurityContext"), }, }, @@ -14343,6 +15819,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb "name": { SchemaProps: spec.SchemaProps{ Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -14356,13 +15833,14 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, "command": { SchemaProps: spec.SchemaProps{ - Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -14370,13 +15848,14 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, "args": { SchemaProps: spec.SchemaProps{ - Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -14396,7 +15875,8 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ContainerPort"), }, }, }, @@ -14409,7 +15889,8 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), }, }, }, @@ -14428,7 +15909,8 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EnvVar"), }, }, }, @@ -14437,6 +15919,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb "resources": { SchemaProps: spec.SchemaProps{ Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), }, }, @@ -14453,7 +15936,8 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeMount"), }, }, }, @@ -14472,7 +15956,8 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), }, }, }, @@ -14525,7 +16010,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, "securityContext": { SchemaProps: spec.SchemaProps{ - Description: "SecurityContext is not allowed for ephemeral containers.", + Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", Ref: ref("k8s.io/api/core/v1.SecurityContext"), }, }, @@ -14559,57 +16044,24 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb } } -func schema_k8sio_api_core_v1_EphemeralContainers(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_EphemeralVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "A list of ephemeral containers used with the Pod ephemeralcontainers subresource.", + Description: "Represents an ephemeral volume that is handled by a normal storage driver.", 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": { + "volumeClaimTemplate": { 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{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "ephemeralContainers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EphemeralContainer"), - }, - }, - }, + Description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimTemplate"), }, }, }, - Required: []string{"ephemeralContainers"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EphemeralContainer", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/core/v1.PersistentVolumeClaimTemplate"}, } } @@ -14617,7 +16069,7 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Event is a report of an event somewhere in the cluster.", + Description: "Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -14637,12 +16089,14 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "involvedObject": { SchemaProps: spec.SchemaProps{ Description: "The object that this event is about.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, @@ -14663,18 +16117,21 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "source": { SchemaProps: spec.SchemaProps{ Description: "The component reporting this event. Should be a short machine understandable string.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.EventSource"), }, }, "firstTimestamp": { SchemaProps: spec.SchemaProps{ Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "lastTimestamp": { SchemaProps: spec.SchemaProps{ Description: "The time at which the most recent occurrence of this event was recorded.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -14695,6 +16152,7 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "eventTime": { SchemaProps: spec.SchemaProps{ Description: "Time when this Event was first observed.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), }, }, @@ -14720,6 +16178,7 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "reportingComponent": { SchemaProps: spec.SchemaProps{ Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -14727,6 +16186,7 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "reportingInstance": { SchemaProps: spec.SchemaProps{ Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -14764,6 +16224,7 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -14774,7 +16235,8 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Event"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Event"), }, }, }, @@ -14806,16 +16268,10 @@ func schema_k8sio_api_core_v1_EventSeries(ref common.ReferenceCallback) common.O "lastObservedTime": { SchemaProps: spec.SchemaProps{ Description: "Time of the last occurrence observed", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), }, }, - "state": { - SchemaProps: spec.SchemaProps{ - Description: "State of this Series: Ongoing or Finished Deprecated. Planned removal for 1.18", - Type: []string{"string"}, - Format: "", - }, - }, }, }, }, @@ -14865,8 +16321,9 @@ func schema_k8sio_api_core_v1_ExecAction(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -14892,8 +16349,9 @@ func schema_k8sio_api_core_v1_FCVolumeSource(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -14927,8 +16385,9 @@ func schema_k8sio_api_core_v1_FCVolumeSource(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -14950,6 +16409,7 @@ func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCal "driver": { SchemaProps: spec.SchemaProps{ Description: "Driver is the name of the driver to use for this volume.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -14982,8 +16442,9 @@ func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCal Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -15008,6 +16469,7 @@ func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) com "driver": { SchemaProps: spec.SchemaProps{ Description: "Driver is the name of the driver to use for this volume.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15040,8 +16502,9 @@ func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) com Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -15093,6 +16556,7 @@ func schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref common.Reference "pdName": { SchemaProps: spec.SchemaProps{ Description: "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15135,6 +16599,7 @@ func schema_k8sio_api_core_v1_GitRepoVolumeSource(ref common.ReferenceCallback) "repository": { SchemaProps: spec.SchemaProps{ Description: "Repository URL", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15170,6 +16635,7 @@ func schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref common.Referen "endpoints": { SchemaProps: spec.SchemaProps{ Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15177,6 +16643,7 @@ func schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref common.Referen "path": { SchemaProps: spec.SchemaProps{ Description: "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15212,6 +16679,7 @@ func schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref common.ReferenceCallback "endpoints": { SchemaProps: spec.SchemaProps{ Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15219,6 +16687,7 @@ func schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref common.ReferenceCallback "path": { SchemaProps: spec.SchemaProps{ Description: "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15254,6 +16723,7 @@ func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common "port": { SchemaProps: spec.SchemaProps{ Description: "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, @@ -15278,7 +16748,8 @@ func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.HTTPHeader"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.HTTPHeader"), }, }, }, @@ -15303,6 +16774,7 @@ func schema_k8sio_api_core_v1_HTTPHeader(ref common.ReferenceCallback) common.Op "name": { SchemaProps: spec.SchemaProps{ Description: "The header field name", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15310,6 +16782,7 @@ func schema_k8sio_api_core_v1_HTTPHeader(ref common.ReferenceCallback) common.Op "value": { SchemaProps: spec.SchemaProps{ Description: "The header field value", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15375,8 +16848,9 @@ func schema_k8sio_api_core_v1_HostAlias(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -15398,6 +16872,7 @@ func schema_k8sio_api_core_v1_HostPathVolumeSource(ref common.ReferenceCallback) "path": { SchemaProps: spec.SchemaProps{ Description: "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15426,6 +16901,7 @@ func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCa "targetPortal": { SchemaProps: spec.SchemaProps{ Description: "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15433,6 +16909,7 @@ func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCa "iqn": { SchemaProps: spec.SchemaProps{ Description: "Target iSCSI Qualified Name.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15440,6 +16917,7 @@ func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCa "lun": { SchemaProps: spec.SchemaProps{ Description: "iSCSI Target Lun number.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -15472,8 +16950,9 @@ func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -15525,6 +17004,7 @@ func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) co "targetPortal": { SchemaProps: spec.SchemaProps{ Description: "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15532,6 +17012,7 @@ func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) co "iqn": { SchemaProps: spec.SchemaProps{ Description: "Target iSCSI Qualified Name.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15539,6 +17020,7 @@ func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) co "lun": { SchemaProps: spec.SchemaProps{ Description: "iSCSI Target Lun number.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -15571,8 +17053,9 @@ func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) co Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -15624,6 +17107,7 @@ func schema_k8sio_api_core_v1_KeyToPath(ref common.ReferenceCallback) common.Ope "key": { SchemaProps: spec.SchemaProps{ Description: "The key to project.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15631,13 +17115,14 @@ func schema_k8sio_api_core_v1_KeyToPath(ref common.ReferenceCallback) common.Ope "path": { SchemaProps: spec.SchemaProps{ Description: "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", + Default: "", Type: []string{"string"}, Format: "", }, }, "mode": { SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Description: "Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", Type: []string{"integer"}, Format: "int32", }, @@ -15700,12 +17185,14 @@ func schema_k8sio_api_core_v1_LimitRange(ref common.ReferenceCallback) common.Op "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.LimitRangeSpec"), }, }, @@ -15727,6 +17214,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo "type": { SchemaProps: spec.SchemaProps{ Description: "Type of resource that this limit applies to.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -15739,7 +17227,8 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -15753,7 +17242,8 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -15767,7 +17257,8 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -15781,7 +17272,8 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -15795,7 +17287,8 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -15834,17 +17327,19 @@ func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) commo "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Description: "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LimitRange"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.LimitRange"), }, }, }, @@ -15873,7 +17368,8 @@ func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LimitRangeItem"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.LimitRangeItem"), }, }, }, @@ -15912,6 +17408,7 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -15922,7 +17419,8 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, @@ -15958,9 +17456,30 @@ func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) Format: "", }, }, + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Ports is a list of records of service ports If used, every port defined in the service should have an entry in it", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PortStatus"), + }, + }, + }, + }, + }, }, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.PortStatus"}, } } @@ -15978,7 +17497,8 @@ func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LoadBalancerIngress"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.LoadBalancerIngress"), }, }, }, @@ -16008,6 +17528,11 @@ func schema_k8sio_api_core_v1_LocalObjectReference(ref common.ReferenceCallback) }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } @@ -16022,6 +17547,7 @@ func schema_k8sio_api_core_v1_LocalVolumeSource(ref common.ReferenceCallback) co "path": { SchemaProps: spec.SchemaProps{ Description: "The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).", + Default: "", Type: []string{"string"}, Format: "", }, @@ -16050,6 +17576,7 @@ func schema_k8sio_api_core_v1_NFSVolumeSource(ref common.ReferenceCallback) comm "server": { SchemaProps: spec.SchemaProps{ Description: "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Default: "", Type: []string{"string"}, Format: "", }, @@ -16057,6 +17584,7 @@ func schema_k8sio_api_core_v1_NFSVolumeSource(ref common.ReferenceCallback) comm "path": { SchemaProps: spec.SchemaProps{ Description: "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Default: "", Type: []string{"string"}, Format: "", }, @@ -16099,18 +17627,21 @@ func schema_k8sio_api_core_v1_Namespace(ref common.ReferenceCallback) common.Ope "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.NamespaceSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.NamespaceStatus"), }, }, @@ -16132,6 +17663,7 @@ func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) c "type": { SchemaProps: spec.SchemaProps{ Description: "Type of namespace controller condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -16139,13 +17671,15 @@ func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) c "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "reason": { @@ -16193,6 +17727,7 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -16203,7 +17738,8 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Namespace"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Namespace"), }, }, }, @@ -16232,8 +17768,9 @@ func schema_k8sio_api_core_v1_NamespaceSpec(ref common.ReferenceCallback) common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -16272,7 +17809,8 @@ func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NamespaceCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.NamespaceCondition"), }, }, }, @@ -16310,18 +17848,21 @@ func schema_k8sio_api_core_v1_Node(ref common.ReferenceCallback) common.OpenAPID "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.NodeSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.NodeStatus"), }, }, @@ -16343,6 +17884,7 @@ func schema_k8sio_api_core_v1_NodeAddress(ref common.ReferenceCallback) common.O "type": { SchemaProps: spec.SchemaProps{ Description: "Node address type, one of Hostname, ExternalIP or InternalIP.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -16350,6 +17892,7 @@ func schema_k8sio_api_core_v1_NodeAddress(ref common.ReferenceCallback) common.O "address": { SchemaProps: spec.SchemaProps{ Description: "The node address.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -16381,7 +17924,8 @@ func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PreferredSchedulingTerm"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PreferredSchedulingTerm"), }, }, }, @@ -16405,6 +17949,7 @@ func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common "type": { SchemaProps: spec.SchemaProps{ Description: "Type of node condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -16412,6 +17957,7 @@ func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -16419,12 +17965,14 @@ func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common "lastHeartbeatTime": { SchemaProps: spec.SchemaProps{ Description: "Last time we got an update on a given condition.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transit from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -16455,7 +18003,7 @@ func schema_k8sio_api_core_v1_NodeConfigSource(ref common.ReferenceCallback) com return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.", + Description: "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22", Type: []string{"object"}, Properties: map[string]spec.Schema{ "configMap": { @@ -16522,6 +18070,7 @@ func schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref common.ReferenceCallback) "kubeletEndpoint": { SchemaProps: spec.SchemaProps{ Description: "Endpoint on which Kubelet is listening.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.DaemonEndpoint"), }, }, @@ -16557,6 +18106,7 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -16567,7 +18117,8 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Node"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Node"), }, }, }, @@ -16620,7 +18171,7 @@ func schema_k8sio_api_core_v1_NodeResources(ref common.ReferenceCallback) common return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NodeResources is an object for conveying resource information about a node. see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.", + Description: "NodeResources is an object for conveying resource information about a node. see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "Capacity": { @@ -16631,7 +18182,8 @@ func schema_k8sio_api_core_v1_NodeResources(ref common.ReferenceCallback) common Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -16660,7 +18212,8 @@ func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), }, }, }, @@ -16669,6 +18222,11 @@ func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common. }, Required: []string{"nodeSelectorTerms"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, Dependencies: []string{ "k8s.io/api/core/v1.NodeSelectorTerm"}, @@ -16685,6 +18243,7 @@ func schema_k8sio_api_core_v1_NodeSelectorRequirement(ref common.ReferenceCallba "key": { SchemaProps: spec.SchemaProps{ Description: "The label key that the selector applies to.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -16692,6 +18251,7 @@ func schema_k8sio_api_core_v1_NodeSelectorRequirement(ref common.ReferenceCallba "operator": { SchemaProps: spec.SchemaProps{ Description: "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -16703,8 +18263,9 @@ func schema_k8sio_api_core_v1_NodeSelectorRequirement(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -16731,7 +18292,8 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), }, }, }, @@ -16744,7 +18306,8 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), }, }, }, @@ -16752,6 +18315,11 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, Dependencies: []string{ "k8s.io/api/core/v1.NodeSelectorRequirement"}, @@ -16784,8 +18352,9 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -16812,7 +18381,8 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Taint"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Taint"), }, }, }, @@ -16820,7 +18390,7 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open }, "configSource": { SchemaProps: spec.SchemaProps{ - Description: "If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field", + Description: "Deprecated. If specified, the source of the node's configuration. The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field. This field is deprecated as of 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration", Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), }, }, @@ -16854,7 +18424,8 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -16868,7 +18439,8 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -16894,7 +18466,8 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.NodeCondition"), }, }, }, @@ -16913,7 +18486,8 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeAddress"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.NodeAddress"), }, }, }, @@ -16922,12 +18496,14 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op "daemonEndpoints": { SchemaProps: spec.SchemaProps{ Description: "Endpoints of daemons running on the Node.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.NodeDaemonEndpoints"), }, }, "nodeInfo": { SchemaProps: spec.SchemaProps{ Description: "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), }, }, @@ -16938,7 +18514,8 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerImage"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ContainerImage"), }, }, }, @@ -16951,8 +18528,9 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -16965,7 +18543,8 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.AttachedVolume"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.AttachedVolume"), }, }, }, @@ -16995,13 +18574,15 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "machineID": { SchemaProps: spec.SchemaProps{ Description: "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", + Default: "", Type: []string{"string"}, Format: "", }, }, "systemUUID": { SchemaProps: spec.SchemaProps{ - Description: "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", + Description: "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17009,6 +18590,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "bootID": { SchemaProps: spec.SchemaProps{ Description: "Boot ID reported by the node.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17016,6 +18598,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "kernelVersion": { SchemaProps: spec.SchemaProps{ Description: "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17023,6 +18606,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "osImage": { SchemaProps: spec.SchemaProps{ Description: "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17030,6 +18614,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "containerRuntimeVersion": { SchemaProps: spec.SchemaProps{ Description: "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17037,6 +18622,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "kubeletVersion": { SchemaProps: spec.SchemaProps{ Description: "Kubelet Version reported by the node.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17044,6 +18630,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "kubeProxyVersion": { SchemaProps: spec.SchemaProps{ Description: "KubeProxy Version reported by the node.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17051,6 +18638,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "operatingSystem": { SchemaProps: spec.SchemaProps{ Description: "The Operating System reported by the node", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17058,6 +18646,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "architecture": { SchemaProps: spec.SchemaProps{ Description: "The Architecture reported by the node", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17086,6 +18675,7 @@ func schema_k8sio_api_core_v1_ObjectFieldSelector(ref common.ReferenceCallback) "fieldPath": { SchemaProps: spec.SchemaProps{ Description: "Path of the field to select in the specified API version.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17093,6 +18683,11 @@ func schema_k8sio_api_core_v1_ObjectFieldSelector(ref common.ReferenceCallback) }, Required: []string{"fieldPath"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } @@ -17155,6 +18750,11 @@ func schema_k8sio_api_core_v1_ObjectReference(ref common.ReferenceCallback) comm }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } @@ -17183,18 +18783,21 @@ func schema_k8sio_api_core_v1_PersistentVolume(ref common.ReferenceCallback) com "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PersistentVolumeStatus"), }, }, @@ -17230,18 +18833,21 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaim(ref common.ReferenceCallback "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimStatus"), }, }, @@ -17262,25 +18868,29 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.Referenc Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "status": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "Last time we probed the condition.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -17331,6 +18941,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -17341,7 +18952,8 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), }, }, }, @@ -17370,8 +18982,9 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -17386,6 +18999,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall "resources": { SchemaProps: spec.SchemaProps{ Description: "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), }, }, @@ -17412,7 +19026,13 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall }, "dataSource": { SchemaProps: spec.SchemaProps{ - Description: "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) * An existing PVC (PersistentVolumeClaim) * An existing custom resource/object that implements data population (Alpha) In order to use VolumeSnapshot object types, the appropriate feature gate must be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the specified data source is not supported, the volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change.", + Description: "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + "dataSourceRef": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While DataSource ignores disallowed values (dropping them), DataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n(Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.", Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), }, }, @@ -17445,8 +19065,9 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -17460,7 +19081,8 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -17479,7 +19101,8 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimCondition"), }, }, }, @@ -17493,6 +19116,36 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa } } +func schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + func schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -17503,6 +19156,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref common.Refer "claimName": { SchemaProps: spec.SchemaProps{ Description: "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Default: "", Type: []string{"string"}, Format: "", }, @@ -17545,6 +19199,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -17555,7 +19210,8 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolume"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PersistentVolume"), }, }, }, @@ -17732,7 +19388,8 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -17877,8 +19534,9 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -17911,8 +19569,9 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -17983,6 +19642,7 @@ func schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref common.Refere "pdID": { SchemaProps: spec.SchemaProps{ Description: "ID that identifies Photon Controller persistent disk", + Default: "", Type: []string{"string"}, Format: "", }, @@ -18025,18 +19685,21 @@ func schema_k8sio_api_core_v1_Pod(ref common.ReferenceCallback) common.OpenAPIDe "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodStatus"), }, }, @@ -18062,7 +19725,8 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), }, }, }, @@ -18075,7 +19739,8 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), }, }, }, @@ -18104,13 +19769,14 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm }, "namespaces": { SchemaProps: spec.SchemaProps{ - Description: "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"", + Description: "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\"", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -18119,10 +19785,17 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm "topologyKey": { SchemaProps: spec.SchemaProps{ Description: "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", + Default: "", Type: []string{"string"}, Format: "", }, }, + "namespaceSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, }, Required: []string{"topologyKey"}, }, @@ -18146,7 +19819,8 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), }, }, }, @@ -18159,7 +19833,8 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), }, }, }, @@ -18245,6 +19920,7 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. "type": { SchemaProps: spec.SchemaProps{ Description: "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + Default: "", Type: []string{"string"}, Format: "", }, @@ -18252,6 +19928,7 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + Default: "", Type: []string{"string"}, Format: "", }, @@ -18259,12 +19936,14 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "Last time we probed the condition.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -18305,8 +19984,9 @@ func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -18319,8 +19999,9 @@ func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -18333,7 +20014,8 @@ func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodDNSConfigOption"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PodDNSConfigOption"), }, }, }, @@ -18436,8 +20118,9 @@ func schema_k8sio_api_core_v1_PodExecOptions(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -18494,6 +20177,7 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -18504,7 +20188,8 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Pod"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Pod"), }, }, }, @@ -18638,8 +20323,9 @@ func schema_k8sio_api_core_v1_PodPortForwardOptions(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, @@ -18695,6 +20381,7 @@ func schema_k8sio_api_core_v1_PodReadinessGate(ref common.ReferenceCallback) com "conditionType": { SchemaProps: spec.SchemaProps{ Description: "ConditionType refers to a condition in the pod's condition list with matching type.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -18753,8 +20440,9 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Default: 0, + Type: []string{"integer"}, + Format: "int64", }, }, }, @@ -18774,7 +20462,8 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Sysctl"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Sysctl"), }, }, }, @@ -18782,16 +20471,22 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c }, "fsGroupChangePolicy": { SchemaProps: spec.SchemaProps{ - Description: "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified defaults to \"Always\".", + Description: "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used.", Type: []string{"string"}, Format: "", }, }, + "seccompProfile": { + SchemaProps: spec.SchemaProps{ + Description: "The seccomp options to use by the containers in this pod.", + Ref: ref("k8s.io/api/core/v1.SeccompProfile"), + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.Sysctl", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.Sysctl", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, } } @@ -18836,7 +20531,8 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Volume"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Volume"), }, }, }, @@ -18855,7 +20551,8 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Container"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Container"), }, }, }, @@ -18874,7 +20571,8 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Container"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Container"), }, }, }, @@ -18893,7 +20591,8 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EphemeralContainer"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EphemeralContainer"), }, }, }, @@ -18908,7 +20607,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "terminationGracePeriodSeconds": { SchemaProps: spec.SchemaProps{ - Description: "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", + Description: "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", Type: []string{"integer"}, Format: "int64", }, @@ -18928,6 +20627,11 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, }, "nodeSelector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", Type: []string{"object"}, @@ -18935,8 +20639,9 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -19017,7 +20722,8 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, }, @@ -19057,7 +20763,8 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Toleration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Toleration"), }, }, }, @@ -19076,7 +20783,8 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.HostAlias"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.HostAlias"), }, }, }, @@ -19104,12 +20812,13 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "readinessGates": { SchemaProps: spec.SchemaProps{ - Description: "If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md", + Description: "If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodReadinessGate"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PodReadinessGate"), }, }, }, @@ -19117,7 +20826,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "runtimeClassName": { SchemaProps: spec.SchemaProps{ - Description: "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is a beta feature as of Kubernetes v1.14.", + Description: "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class This is a beta feature as of Kubernetes v1.14.", Type: []string{"string"}, Format: "", }, @@ -19131,20 +20840,21 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "preemptionPolicy": { SchemaProps: spec.SchemaProps{ - Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", Type: []string{"string"}, Format: "", }, }, "overhead": { SchemaProps: spec.SchemaProps{ - Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.", + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -19163,17 +20873,25 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, }, SchemaProps: spec.SchemaProps{ - Description: "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. This field is only honored by clusters that enable the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", + Description: "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), }, }, }, }, }, + "setHostnameAsFQDN": { + SchemaProps: spec.SchemaProps{ + Description: "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"containers"}, }, @@ -19210,7 +20928,8 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PodCondition"), }, }, }, @@ -19264,7 +20983,8 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodIP"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PodIP"), }, }, }, @@ -19283,7 +21003,8 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ContainerStatus"), }, }, }, @@ -19296,7 +21017,8 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ContainerStatus"), }, }, }, @@ -19316,7 +21038,8 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ContainerStatus"), }, }, }, @@ -19354,12 +21077,14 @@ func schema_k8sio_api_core_v1_PodStatusResult(ref common.ReferenceCallback) comm "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodStatus"), }, }, @@ -19395,12 +21120,14 @@ func schema_k8sio_api_core_v1_PodTemplate(ref common.ReferenceCallback) common.O "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -19436,6 +21163,7 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -19446,7 +21174,8 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodTemplate"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PodTemplate"), }, }, }, @@ -19471,12 +21200,14 @@ func schema_k8sio_api_core_v1_PodTemplateSpec(ref common.ReferenceCallback) comm "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodSpec"), }, }, @@ -19488,6 +21219,42 @@ func schema_k8sio_api_core_v1_PodTemplateSpec(ref common.ReferenceCallback) comm } } +func schema_k8sio_api_core_v1_PortStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Port is the port number of the service port of which status is recorded here", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "Protocol is the protocol of the service port of which status is recorded here The supported values are: \"TCP\", \"UDP\", \"SCTP\"", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Description: "Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"port", "protocol"}, + }, + }, + } +} + func schema_k8sio_api_core_v1_PortworxVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -19498,6 +21265,7 @@ func schema_k8sio_api_core_v1_PortworxVolumeSource(ref common.ReferenceCallback) "volumeID": { SchemaProps: spec.SchemaProps{ Description: "VolumeID uniquely identifies a Portworx volume", + Default: "", Type: []string{"string"}, Format: "", }, @@ -19533,12 +21301,14 @@ func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) "podSignature": { SchemaProps: spec.SchemaProps{ Description: "The class of pods.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodSignature"), }, }, "evictionTime": { SchemaProps: spec.SchemaProps{ Description: "Time at which this entry was added to the list.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -19575,6 +21345,7 @@ func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallba "weight": { SchemaProps: spec.SchemaProps{ Description: "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -19582,6 +21353,7 @@ func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallba "preference": { SchemaProps: spec.SchemaProps{ Description: "A node selector term, associated with the corresponding weight.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), }, }, @@ -19654,6 +21426,13 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI Format: "int32", }, }, + "terminationGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.", + Type: []string{"integer"}, + Format: "int64", + }, + }, }, }, }, @@ -19676,7 +21455,8 @@ func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeProjection"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeProjection"), }, }, }, @@ -19684,13 +21464,12 @@ func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback }, "defaultMode": { SchemaProps: spec.SchemaProps{ - Description: "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Description: "Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"sources"}, }, }, Dependencies: []string{ @@ -19708,6 +21487,7 @@ func schema_k8sio_api_core_v1_QuobyteVolumeSource(ref common.ReferenceCallback) "registry": { SchemaProps: spec.SchemaProps{ Description: "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", + Default: "", Type: []string{"string"}, Format: "", }, @@ -19715,6 +21495,7 @@ func schema_k8sio_api_core_v1_QuobyteVolumeSource(ref common.ReferenceCallback) "volume": { SchemaProps: spec.SchemaProps{ Description: "Volume is a string that references an already created Quobyte volume by name.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -19768,8 +21549,9 @@ func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -19778,6 +21560,7 @@ func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCall "image": { SchemaProps: spec.SchemaProps{ Description: "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Default: "", Type: []string{"string"}, Format: "", }, @@ -19846,8 +21629,9 @@ func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) comm Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -19856,6 +21640,7 @@ func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) comm "image": { SchemaProps: spec.SchemaProps{ Description: "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Default: "", Type: []string{"string"}, Format: "", }, @@ -19934,12 +21719,14 @@ func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) comm "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "range": { SchemaProps: spec.SchemaProps{ Description: "Range is string that identifies the range represented by 'data'.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -19984,18 +21771,21 @@ func schema_k8sio_api_core_v1_ReplicationController(ref common.ReferenceCallback "metadata": { SchemaProps: spec.SchemaProps{ Description: "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ReplicationControllerSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ReplicationControllerStatus"), }, }, @@ -20017,6 +21807,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.Referenc "type": { SchemaProps: spec.SchemaProps{ Description: "Type of replication controller condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -20024,6 +21815,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.Referenc "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -20031,6 +21823,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.Referenc "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "The last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -20081,6 +21874,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -20091,7 +21885,8 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ReplicationController"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ReplicationController"), }, }, }, @@ -20128,6 +21923,11 @@ func schema_k8sio_api_core_v1_ReplicationControllerSpec(ref common.ReferenceCall }, }, "selector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", Type: []string{"object"}, @@ -20135,8 +21935,9 @@ func schema_k8sio_api_core_v1_ReplicationControllerSpec(ref common.ReferenceCall Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -20166,6 +21967,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCa "replicas": { SchemaProps: spec.SchemaProps{ Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -20211,7 +22013,8 @@ func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ReplicationControllerCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ReplicationControllerCondition"), }, }, }, @@ -20243,6 +22046,7 @@ func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback "resource": { SchemaProps: spec.SchemaProps{ Description: "Required: resource to select", + Default: "", Type: []string{"string"}, Format: "", }, @@ -20250,12 +22054,18 @@ func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback "divisor": { SchemaProps: spec.SchemaProps{ Description: "Specifies the output format of the exposed resources, defaults to \"1\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, Required: []string{"resource"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, Dependencies: []string{ "k8s.io/apimachinery/pkg/api/resource.Quantity"}, @@ -20286,18 +22096,21 @@ func schema_k8sio_api_core_v1_ResourceQuota(ref common.ReferenceCallback) common "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ResourceQuotaSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ResourceQuotaStatus"), }, }, @@ -20333,6 +22146,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -20343,7 +22157,8 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ResourceQuota"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ResourceQuota"), }, }, }, @@ -20373,7 +22188,8 @@ func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) co Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -20386,8 +22202,9 @@ func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) co Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -20422,7 +22239,8 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -20436,7 +22254,8 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -20459,13 +22278,14 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "limits": { SchemaProps: spec.SchemaProps{ - Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -20473,13 +22293,14 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) }, "requests": { SchemaProps: spec.SchemaProps{ - Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -20544,6 +22365,7 @@ func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.Reference "gateway": { SchemaProps: spec.SchemaProps{ Description: "The host address of the ScaleIO API Gateway.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -20551,6 +22373,7 @@ func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.Reference "system": { SchemaProps: spec.SchemaProps{ Description: "The name of the storage system as configured in ScaleIO.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -20629,6 +22452,7 @@ func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) "gateway": { SchemaProps: spec.SchemaProps{ Description: "The host address of the ScaleIO API Gateway.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -20636,6 +22460,7 @@ func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) "system": { SchemaProps: spec.SchemaProps{ Description: "The name of the storage system as configured in ScaleIO.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -20718,7 +22543,8 @@ func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ScopedResourceSelectorRequirement"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ScopedResourceSelectorRequirement"), }, }, }, @@ -20726,6 +22552,11 @@ func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, Dependencies: []string{ "k8s.io/api/core/v1.ScopedResourceSelectorRequirement"}, @@ -20742,6 +22573,7 @@ func schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref common.Refer "scopeName": { SchemaProps: spec.SchemaProps{ Description: "The name of the scope that the selector applies to.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -20749,6 +22581,7 @@ func schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref common.Refer "operator": { SchemaProps: spec.SchemaProps{ Description: "Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -20760,8 +22593,9 @@ func schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref common.Refer Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -20774,6 +22608,47 @@ func schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref common.Refer } } +func schema_k8sio_api_core_v1_SeccompProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "localhostProfile": { + SchemaProps: spec.SchemaProps{ + Description: "localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "type", + "fields-to-discriminateBy": map[string]interface{}{ + "localhostProfile": "LocalhostProfile", + }, + }, + }, + }, + }, + }, + } +} + func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -20798,12 +22673,13 @@ func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAP "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "immutable": { SchemaProps: spec.SchemaProps{ - Description: "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is an alpha field enabled by ImmutableEphemeralVolumes feature gate.", + Description: "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.", Type: []string{"boolean"}, Format: "", }, @@ -20825,14 +22701,15 @@ func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAP }, "stringData": { SchemaProps: spec.SchemaProps{ - Description: "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", + Description: "stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -20897,6 +22774,7 @@ func schema_k8sio_api_core_v1_SecretKeySelector(ref common.ReferenceCallback) co "key": { SchemaProps: spec.SchemaProps{ Description: "The key of the secret to select from. Must be a valid secret key.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -20911,6 +22789,11 @@ func schema_k8sio_api_core_v1_SecretKeySelector(ref common.ReferenceCallback) co }, Required: []string{"key"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } @@ -20939,6 +22822,7 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -20949,7 +22833,8 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Secret"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Secret"), }, }, }, @@ -20985,7 +22870,8 @@ func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) com Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.KeyToPath"), }, }, }, @@ -21029,6 +22915,11 @@ func schema_k8sio_api_core_v1_SecretReference(ref common.ReferenceCallback) comm }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } @@ -21054,7 +22945,8 @@ func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.KeyToPath"), }, }, }, @@ -21062,7 +22954,7 @@ func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) c }, "defaultMode": { SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Description: "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", Type: []string{"integer"}, Format: "int32", }, @@ -21156,11 +23048,17 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm Format: "", }, }, + "seccompProfile": { + SchemaProps: spec.SchemaProps{ + Description: "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.", + Ref: ref("k8s.io/api/core/v1.SeccompProfile"), + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Capabilities", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + "k8s.io/api/core/v1.Capabilities", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, } } @@ -21188,6 +23086,7 @@ func schema_k8sio_api_core_v1_SerializedReference(ref common.ReferenceCallback) "reference": { SchemaProps: spec.SchemaProps{ Description: "The reference to an object in the system.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, @@ -21223,18 +23122,21 @@ func schema_k8sio_api_core_v1_Service(ref common.ReferenceCallback) common.OpenA "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ServiceSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ServiceStatus"), }, }, @@ -21270,6 +23172,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, @@ -21286,7 +23189,8 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, }, @@ -21299,7 +23203,8 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, }, @@ -21344,6 +23249,7 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -21354,7 +23260,8 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ServiceAccount"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ServiceAccount"), }, }, }, @@ -21393,6 +23300,7 @@ func schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref common.Reference "path": { SchemaProps: spec.SchemaProps{ Description: "Path is the path relative to the mount point of the file to project the token into.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -21428,6 +23336,7 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -21438,7 +23347,8 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Service"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Service"), }, }, }, @@ -21470,13 +23380,14 @@ func schema_k8sio_api_core_v1_ServicePort(ref common.ReferenceCallback) common.O "protocol": { SchemaProps: spec.SchemaProps{ Description: "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.", + Default: "TCP", Type: []string{"string"}, Format: "", }, }, "appProtocol": { SchemaProps: spec.SchemaProps{ - Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. Field can be enabled with ServiceAppProtocol feature gate.", + Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", Type: []string{"string"}, Format: "", }, @@ -21484,6 +23395,7 @@ func schema_k8sio_api_core_v1_ServicePort(ref common.ReferenceCallback) common.O "port": { SchemaProps: spec.SchemaProps{ Description: "The port that will be exposed by this service.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -21491,12 +23403,13 @@ func schema_k8sio_api_core_v1_ServicePort(ref common.ReferenceCallback) common.O "targetPort": { SchemaProps: spec.SchemaProps{ Description: "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, "nodePort": { SchemaProps: spec.SchemaProps{ - Description: "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", + Description: "The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", Type: []string{"integer"}, Format: "int32", }, @@ -21569,13 +23482,19 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ServicePort"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ServicePort"), }, }, }, }, }, "selector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/", Type: []string{"object"}, @@ -21583,8 +23502,9 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -21592,14 +23512,34 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, "clusterIP": { SchemaProps: spec.SchemaProps{ - Description: "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Description: "clusterIP is the IP address of the service and is usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be blank) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", Type: []string{"string"}, Format: "", }, }, + "clusterIPs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value.\n\nUnless the \"IPv6DualStack\" feature gate is enabled, this field is limited to one value, which must be the same as the clusterIP field. If the feature gate is enabled, this field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, "type": { SchemaProps: spec.SchemaProps{ - Description: "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", + Description: "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \"ExternalName\" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", Type: []string{"string"}, Format: "", }, @@ -21611,8 +23551,9 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -21634,13 +23575,14 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, "loadBalancerSourceRanges": { SchemaProps: spec.SchemaProps{ - Description: "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/", + Description: "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -21648,7 +23590,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, "externalName": { SchemaProps: spec.SchemaProps{ - Description: "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.", + Description: "externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be \"ExternalName\".", Type: []string{"string"}, Format: "", }, @@ -21662,14 +23604,14 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, "healthCheckNodePort": { SchemaProps: spec.SchemaProps{ - Description: "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.", + Description: "healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type).", Type: []string{"integer"}, Format: "int32", }, }, "publishNotReadyAddresses": { SchemaProps: spec.SchemaProps{ - Description: "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery.", + Description: "publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a StatefulSet's Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered \"ready\" even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior.", Type: []string{"boolean"}, Format: "", }, @@ -21680,27 +23622,54 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O Ref: ref("k8s.io/api/core/v1.SessionAffinityConfig"), }, }, - "ipFamily": { - SchemaProps: spec.SchemaProps{ - Description: "ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which allocate external load-balancers should use the same IP family. Endpoints for this Service will be of this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment.", - Type: []string{"string"}, - Format: "", + "ipFamilies": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "topologyKeys": { SchemaProps: spec.SchemaProps{ - Description: "topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value \"*\" may be used to mean \"any topology\". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied.", + Description: "IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the \"IPv6DualStack\" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName.\n\nThis field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, + "ipFamilyPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the \"IPv6DualStack\" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.", + Type: []string{"string"}, + Format: "", + }, + }, + "allocateLoadBalancerNodePorts": { + SchemaProps: spec.SchemaProps{ + Description: "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type. This field is beta-level and is only honored by servers that enable the ServiceLBNodePortControl feature.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "loadBalancerClass": { + SchemaProps: spec.SchemaProps{ + Description: "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.", + Type: []string{"string"}, + Format: "", + }, + }, + "internalTrafficPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. \"Cluster\" routes internal traffic to a Service to all endpoints. \"Local\" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is \"Cluster\".", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, @@ -21719,14 +23688,39 @@ func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common "loadBalancer": { SchemaProps: spec.SchemaProps{ Description: "LoadBalancer contains the current status of the load-balancer, if one is present.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), }, }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Current service state", + 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.Condition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus"}, + "k8s.io/api/core/v1.LoadBalancerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, } } @@ -21859,6 +23853,7 @@ func schema_k8sio_api_core_v1_Sysctl(ref common.ReferenceCallback) common.OpenAP "name": { SchemaProps: spec.SchemaProps{ Description: "Name of a property to set", + Default: "", Type: []string{"string"}, Format: "", }, @@ -21866,6 +23861,7 @@ func schema_k8sio_api_core_v1_Sysctl(ref common.ReferenceCallback) common.OpenAP "value": { SchemaProps: spec.SchemaProps{ Description: "Value of a property to set", + Default: "", Type: []string{"string"}, Format: "", }, @@ -21887,6 +23883,7 @@ func schema_k8sio_api_core_v1_TCPSocketAction(ref common.ReferenceCallback) comm "port": { SchemaProps: spec.SchemaProps{ Description: "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, @@ -21916,6 +23913,7 @@ func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPI "key": { SchemaProps: spec.SchemaProps{ Description: "Required. The taint key to be applied to a node.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -21930,6 +23928,7 @@ func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPI "effect": { SchemaProps: spec.SchemaProps{ Description: "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22007,6 +24006,7 @@ func schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref common.Refere "key": { SchemaProps: spec.SchemaProps{ Description: "The label key that the selector applies to.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22018,8 +24018,9 @@ func schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -22046,7 +24047,8 @@ func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.TopologySelectorLabelRequirement"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.TopologySelectorLabelRequirement"), }, }, }, @@ -22054,6 +24056,11 @@ func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, Dependencies: []string{ "k8s.io/api/core/v1.TopologySelectorLabelRequirement"}, @@ -22069,7 +24076,8 @@ func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallb Properties: map[string]spec.Schema{ "maxSkew": { SchemaProps: spec.SchemaProps{ - Description: "MaxSkew describes the degree to which pods may be unevenly distributed. It's the maximum permitted difference between the number of matching pods in any two topology domains of a given topology type. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. It's a required field. Default value is 1 and 0 is not allowed.", + Description: "MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -22077,13 +24085,15 @@ func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallb "topologyKey": { SchemaProps: spec.SchemaProps{ Description: "TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.", + Default: "", Type: []string{"string"}, Format: "", }, }, "whenUnsatisfiable": { SchemaProps: spec.SchemaProps{ - Description: "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it - ScheduleAnyway tells the scheduler to still schedule it It's considered as \"Unsatisfiable\" if and only if placing incoming pod on any topology violates \"MaxSkew\". For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.", + Description: "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assigment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22120,6 +24130,7 @@ func schema_k8sio_api_core_v1_TypedLocalObjectReference(ref common.ReferenceCall "kind": { SchemaProps: spec.SchemaProps{ Description: "Kind is the type of resource being referenced", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22127,6 +24138,7 @@ func schema_k8sio_api_core_v1_TypedLocalObjectReference(ref common.ReferenceCall "name": { SchemaProps: spec.SchemaProps{ Description: "Name is the name of resource being referenced", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22134,6 +24146,11 @@ func schema_k8sio_api_core_v1_TypedLocalObjectReference(ref common.ReferenceCall }, Required: []string{"kind", "name"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } @@ -22148,6 +24165,7 @@ func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAP "name": { SchemaProps: spec.SchemaProps{ Description: "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22316,16 +24334,22 @@ func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAP }, "csi": { SchemaProps: spec.SchemaProps{ - Description: "CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).", + Description: "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), }, }, + "ephemeral": { + SchemaProps: spec.SchemaProps{ + Description: "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.\n\nThis is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled.", + Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), + }, + }, }, Required: []string{"name"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, } } @@ -22339,6 +24363,7 @@ func schema_k8sio_api_core_v1_VolumeDevice(ref common.ReferenceCallback) common. "name": { SchemaProps: spec.SchemaProps{ Description: "name must match the name of a persistentVolumeClaim in the pod", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22346,6 +24371,7 @@ func schema_k8sio_api_core_v1_VolumeDevice(ref common.ReferenceCallback) common. "devicePath": { SchemaProps: spec.SchemaProps{ Description: "devicePath is the path inside of the container that the device will be mapped to.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22367,6 +24393,7 @@ func schema_k8sio_api_core_v1_VolumeMount(ref common.ReferenceCallback) common.O "name": { SchemaProps: spec.SchemaProps{ Description: "This must match the Name of a Volume.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22381,6 +24408,7 @@ func schema_k8sio_api_core_v1_VolumeMount(ref common.ReferenceCallback) common.O "mountPath": { SchemaProps: spec.SchemaProps{ Description: "Path within the container at which the volume should be mounted. Must not contain ':'.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22644,15 +24672,21 @@ func schema_k8sio_api_core_v1_VolumeSource(ref common.ReferenceCallback) common. }, "csi": { SchemaProps: spec.SchemaProps{ - Description: "CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).", + Description: "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), }, }, + "ephemeral": { + SchemaProps: spec.SchemaProps{ + Description: "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.\n\nThis is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled.", + Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, } } @@ -22666,6 +24700,7 @@ func schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref common.Referenc "volumePath": { SchemaProps: spec.SchemaProps{ Description: "Path that identifies vSphere volume vmdk", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22708,6 +24743,7 @@ func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallba "weight": { SchemaProps: spec.SchemaProps{ Description: "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -22715,6 +24751,7 @@ func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallba "podAffinityTerm": { SchemaProps: spec.SchemaProps{ Description: "Required. A pod affinity term, associated with the corresponding weight.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), }, }, @@ -22755,13 +24792,20 @@ func schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref common.Reference Format: "", }, }, + "hostProcess": { + SchemaProps: spec.SchemaProps{ + Description: "HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, } } -func schema_k8sio_api_discovery_v1alpha1_Endpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_discovery_v1_Endpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -22780,8 +24824,9 @@ func schema_k8sio_api_discovery_v1alpha1_Endpoint(ref common.ReferenceCallback) Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -22790,12 +24835,13 @@ func schema_k8sio_api_discovery_v1alpha1_Endpoint(ref common.ReferenceCallback) "conditions": { SchemaProps: spec.SchemaProps{ Description: "conditions contains information about the current status of the endpoint.", - Ref: ref("k8s.io/api/discovery/v1alpha1.EndpointConditions"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/discovery/v1.EndpointConditions"), }, }, "hostname": { SchemaProps: spec.SchemaProps{ - Description: "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.", + Description: "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.", Type: []string{"string"}, Format: "", }, @@ -22806,31 +24852,52 @@ func schema_k8sio_api_discovery_v1alpha1_Endpoint(ref common.ReferenceCallback) Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, - "topology": { + "deprecatedTopology": { SchemaProps: spec.SchemaProps{ - Description: "topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node\n where the endpoint is located. This should match the corresponding\n node label.\n* topology.kubernetes.io/zone: the value indicates the zone where the\n endpoint is located. This should match the corresponding node label.\n* topology.kubernetes.io/region: the value indicates the region where the\n endpoint is located. This should match the corresponding node label.", + Description: "deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.", + Type: []string{"string"}, + Format: "", + }, + }, + "zone": { + SchemaProps: spec.SchemaProps{ + Description: "zone is the name of the Zone this endpoint exists in.", + Type: []string{"string"}, + Format: "", + }, + }, + "hints": { + SchemaProps: spec.SchemaProps{ + Description: "hints contains information associated with how an endpoint should be consumed.", + Ref: ref("k8s.io/api/discovery/v1.EndpointHints"), + }, + }, }, Required: []string{"addresses"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/discovery/v1alpha1.EndpointConditions"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/discovery/v1.EndpointConditions", "k8s.io/api/discovery/v1.EndpointHints"}, } } -func schema_k8sio_api_discovery_v1alpha1_EndpointConditions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_discovery_v1_EndpointConditions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -22839,7 +24906,21 @@ func schema_k8sio_api_discovery_v1alpha1_EndpointConditions(ref common.Reference Properties: map[string]spec.Schema{ "ready": { SchemaProps: spec.SchemaProps{ - Description: "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready.", + Description: "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be \"true\" for terminating endpoints.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "serving": { + SchemaProps: spec.SchemaProps{ + Description: "serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "terminating": { + SchemaProps: spec.SchemaProps{ + Description: "terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.", Type: []string{"boolean"}, Format: "", }, @@ -22850,7 +24931,41 @@ func schema_k8sio_api_discovery_v1alpha1_EndpointConditions(ref common.Reference } } -func schema_k8sio_api_discovery_v1alpha1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_discovery_v1_EndpointHints(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointHints provides hints describing how an endpoint should be consumed.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "forZones": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/discovery/v1.ForZone"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/discovery/v1.ForZone"}, + } +} + +func schema_k8sio_api_discovery_v1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -22880,18 +24995,23 @@ func schema_k8sio_api_discovery_v1alpha1_EndpointPort(ref common.ReferenceCallba }, "appProtocol": { SchemaProps: spec.SchemaProps{ - Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names. Default is empty string.", + Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", Type: []string{"string"}, Format: "", }, }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } -func schema_k8sio_api_discovery_v1alpha1_EndpointSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_discovery_v1_EndpointSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -22915,12 +25035,14 @@ func schema_k8sio_api_discovery_v1alpha1_EndpointSlice(ref common.ReferenceCallb "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "addressType": { SchemaProps: spec.SchemaProps{ Description: "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -22937,7 +25059,8 @@ func schema_k8sio_api_discovery_v1alpha1_EndpointSlice(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/discovery/v1alpha1.Endpoint"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/discovery/v1.Endpoint"), }, }, }, @@ -22955,7 +25078,8 @@ func schema_k8sio_api_discovery_v1alpha1_EndpointSlice(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/discovery/v1alpha1.EndpointPort"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/discovery/v1.EndpointPort"), }, }, }, @@ -22966,11 +25090,11 @@ func schema_k8sio_api_discovery_v1alpha1_EndpointSlice(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/discovery/v1alpha1.Endpoint", "k8s.io/api/discovery/v1alpha1.EndpointPort", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/discovery/v1.Endpoint", "k8s.io/api/discovery/v1.EndpointPort", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_discovery_v1alpha1_EndpointSliceList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_discovery_v1_EndpointSliceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -22994,22 +25118,19 @@ func schema_k8sio_api_discovery_v1alpha1_EndpointSliceList(ref common.ReferenceC "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", - }, - }, SchemaProps: spec.SchemaProps{ Description: "List of endpoint slices", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/discovery/v1alpha1.EndpointSlice"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/discovery/v1.EndpointSlice"), }, }, }, @@ -23020,7 +25141,29 @@ func schema_k8sio_api_discovery_v1alpha1_EndpointSliceList(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/discovery/v1alpha1.EndpointSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/discovery/v1.EndpointSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_discovery_v1_ForZone(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ForZone provides information about which zones should consume this endpoint.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name represents the name of the zone.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, } } @@ -23043,8 +25186,9 @@ func schema_k8sio_api_discovery_v1beta1_Endpoint(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -23053,12 +25197,13 @@ func schema_k8sio_api_discovery_v1beta1_Endpoint(ref common.ReferenceCallback) c "conditions": { SchemaProps: spec.SchemaProps{ Description: "conditions contains information about the current status of the endpoint.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/discovery/v1beta1.EndpointConditions"), }, }, "hostname": { SchemaProps: spec.SchemaProps{ - Description: "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.", + Description: "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.", Type: []string{"string"}, Format: "", }, @@ -23071,25 +25216,39 @@ func schema_k8sio_api_discovery_v1beta1_Endpoint(ref common.ReferenceCallback) c }, "topology": { SchemaProps: spec.SchemaProps{ - Description: "topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node\n where the endpoint is located. This should match the corresponding\n node label.\n* topology.kubernetes.io/zone: the value indicates the zone where the\n endpoint is located. This should match the corresponding node label.\n* topology.kubernetes.io/region: the value indicates the region where the\n endpoint is located. This should match the corresponding node label.", + Description: "topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node\n where the endpoint is located. This should match the corresponding\n node label.\n* topology.kubernetes.io/zone: the value indicates the zone where the\n endpoint is located. This should match the corresponding node label.\n* topology.kubernetes.io/region: the value indicates the region where the\n endpoint is located. This should match the corresponding node label.\nThis field is deprecated and will be removed in future api versions.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.", + Type: []string{"string"}, + Format: "", + }, + }, + "hints": { + SchemaProps: spec.SchemaProps{ + Description: "hints contains information associated with how an endpoint should be consumed.", + Ref: ref("k8s.io/api/discovery/v1beta1.EndpointHints"), + }, + }, }, Required: []string{"addresses"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/discovery/v1beta1.EndpointConditions"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/discovery/v1beta1.EndpointConditions", "k8s.io/api/discovery/v1beta1.EndpointHints"}, } } @@ -23102,7 +25261,21 @@ func schema_k8sio_api_discovery_v1beta1_EndpointConditions(ref common.ReferenceC Properties: map[string]spec.Schema{ "ready": { SchemaProps: spec.SchemaProps{ - Description: "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready.", + Description: "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be \"true\" for terminating endpoints.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "serving": { + SchemaProps: spec.SchemaProps{ + Description: "serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "terminating": { + SchemaProps: spec.SchemaProps{ + Description: "terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.", Type: []string{"boolean"}, Format: "", }, @@ -23113,6 +25286,40 @@ func schema_k8sio_api_discovery_v1beta1_EndpointConditions(ref common.ReferenceC } } +func schema_k8sio_api_discovery_v1beta1_EndpointHints(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointHints provides hints describing how an endpoint should be consumed.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "forZones": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/discovery/v1beta1.ForZone"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/discovery/v1beta1.ForZone"}, + } +} + func schema_k8sio_api_discovery_v1beta1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -23178,12 +25385,14 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref common.ReferenceCallba "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "addressType": { SchemaProps: spec.SchemaProps{ Description: "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -23200,7 +25409,8 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/discovery/v1beta1.Endpoint"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/discovery/v1beta1.Endpoint"), }, }, }, @@ -23218,7 +25428,8 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSlice(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/discovery/v1beta1.EndpointPort"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/discovery/v1beta1.EndpointPort"), }, }, }, @@ -23257,22 +25468,19 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref common.ReferenceCa "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", - }, - }, SchemaProps: spec.SchemaProps{ Description: "List of endpoint slices", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/discovery/v1beta1.EndpointSlice"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/discovery/v1beta1.EndpointSlice"), }, }, }, @@ -23287,11 +25495,248 @@ func schema_k8sio_api_discovery_v1beta1_EndpointSliceList(ref common.ReferenceCa } } +func schema_k8sio_api_discovery_v1beta1_ForZone(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ForZone provides information about which zones should consume this endpoint.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name represents the name of the zone.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_api_events_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", + 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. 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"), + }, + }, + "eventTime": { + SchemaProps: spec.SchemaProps{ + Description: "eventTime is the time when this Event was first observed. It is required.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "series": { + SchemaProps: spec.SchemaProps{ + Description: "series is data about the Event series this event represents or nil if it's a singleton Event.", + Ref: ref("k8s.io/api/events/v1.EventSeries"), + }, + }, + "reportingController": { + SchemaProps: spec.SchemaProps{ + Description: "reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.", + Type: []string{"string"}, + Format: "", + }, + }, + "reportingInstance": { + SchemaProps: spec.SchemaProps{ + Description: "reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.", + Type: []string{"string"}, + Format: "", + }, + }, + "action": { + SchemaProps: spec.SchemaProps{ + Description: "action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.", + Type: []string{"string"}, + Format: "", + }, + }, + "regarding": { + SchemaProps: spec.SchemaProps{ + Description: "regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "related": { + SchemaProps: spec.SchemaProps{ + Description: "related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "note": { + SchemaProps: spec.SchemaProps{ + Description: "note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.", + Type: []string{"string"}, + Format: "", + }, + }, + "deprecatedSource": { + SchemaProps: spec.SchemaProps{ + Description: "deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EventSource"), + }, + }, + "deprecatedFirstTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deprecatedLastTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deprecatedCount": { + SchemaProps: spec.SchemaProps{ + Description: "deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"eventTime"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/events/v1.EventSeries", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_events_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventList is a list of Event objects.", + 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 list metadata. 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 a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/events/v1.Event"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/events/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_events_v1_EventSeries(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in \"k8s.io/client-go/tools/events/event_broadcaster.go\" shows how this struct is updated on heartbeats and can guide customized reporter implementations.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { + SchemaProps: spec.SchemaProps{ + Description: "count is the number of occurrences in this series up to the last heartbeat time.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "lastObservedTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastObservedTime is the time when last Event from the series was seen before last heartbeat.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + }, + Required: []string{"count", "lastObservedTime"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + } +} + func schema_k8sio_api_events_v1beta1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.", + Description: "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -23310,96 +25755,103 @@ func schema_k8sio_api_events_v1beta1_Event(ref common.ReferenceCallback) common. }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, "eventTime": { SchemaProps: spec.SchemaProps{ - Description: "Required. Time when this Event was first observed.", + Description: "eventTime is the time when this Event was first observed. It is required.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), }, }, "series": { SchemaProps: spec.SchemaProps{ - Description: "Data about the Event series this event represents or nil if it's a singleton Event.", + Description: "series is data about the Event series this event represents or nil if it's a singleton Event.", Ref: ref("k8s.io/api/events/v1beta1.EventSeries"), }, }, "reportingController": { SchemaProps: spec.SchemaProps{ - Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", + Description: "reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.", Type: []string{"string"}, Format: "", }, }, "reportingInstance": { SchemaProps: spec.SchemaProps{ - Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", + Description: "reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.", Type: []string{"string"}, Format: "", }, }, "action": { SchemaProps: spec.SchemaProps{ - Description: "What action was taken/failed regarding to the regarding object.", + Description: "action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field can have at most 128 characters.", Type: []string{"string"}, Format: "", }, }, "reason": { SchemaProps: spec.SchemaProps{ - Description: "Why the action was taken.", + Description: "reason is why the action was taken. It is human-readable. This field can have at most 128 characters.", Type: []string{"string"}, Format: "", }, }, "regarding": { SchemaProps: spec.SchemaProps{ - Description: "The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", + Description: "regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, "related": { SchemaProps: spec.SchemaProps{ - Description: "Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", + Description: "related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, "note": { SchemaProps: spec.SchemaProps{ - Description: "Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", + Description: "note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", Type: []string{"string"}, Format: "", }, }, "type": { SchemaProps: spec.SchemaProps{ - Description: "Type of this event (Normal, Warning), new types could be added in the future.", + Description: "type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable.", Type: []string{"string"}, Format: "", }, }, "deprecatedSource": { SchemaProps: spec.SchemaProps{ - Description: "Deprecated field assuring backward compatibility with core.v1 Event type", + Description: "deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.EventSource"), }, }, "deprecatedFirstTimestamp": { SchemaProps: spec.SchemaProps{ - Description: "Deprecated field assuring backward compatibility with core.v1 Event type", + Description: "deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "deprecatedLastTimestamp": { SchemaProps: spec.SchemaProps{ - Description: "Deprecated field assuring backward compatibility with core.v1 Event type", + Description: "deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "deprecatedCount": { SchemaProps: spec.SchemaProps{ - Description: "Deprecated field assuring backward compatibility with core.v1 Event type", + Description: "deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.", Type: []string{"integer"}, Format: "int32", }, @@ -23437,17 +25889,19 @@ func schema_k8sio_api_events_v1beta1_EventList(ref common.ReferenceCallback) com "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. 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 a list of schema objects.", + Description: "items is a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/events/v1beta1.Event"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/events/v1beta1.Event"), }, }, }, @@ -23471,26 +25925,21 @@ func schema_k8sio_api_events_v1beta1_EventSeries(ref common.ReferenceCallback) c Properties: map[string]spec.Schema{ "count": { SchemaProps: spec.SchemaProps{ - Description: "Number of occurrences in this series up to the last heartbeat time", + Description: "count is the number of occurrences in this series up to the last heartbeat time.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, "lastObservedTime": { SchemaProps: spec.SchemaProps{ - Description: "Time when last Event from the series was seen before last heartbeat.", + Description: "lastObservedTime is the time when last Event from the series was seen before last heartbeat.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), }, }, - "state": { - SchemaProps: spec.SchemaProps{ - Description: "Information whether this series is ongoing or finished. Deprecated. Planned removal for 1.18", - Type: []string{"string"}, - Format: "", - }, - }, }, - Required: []string{"count", "lastObservedTime", "state"}, + Required: []string{"count", "lastObservedTime"}, }, }, Dependencies: []string{ @@ -23508,6 +25957,7 @@ func schema_k8sio_api_extensions_v1beta1_AllowedCSIDriver(ref common.ReferenceCa "name": { SchemaProps: spec.SchemaProps{ Description: "Name is the registered name of the CSI driver", + Default: "", Type: []string{"string"}, Format: "", }, @@ -23529,6 +25979,7 @@ func schema_k8sio_api_extensions_v1beta1_AllowedFlexVolume(ref common.ReferenceC "driver": { SchemaProps: spec.SchemaProps{ Description: "driver is the name of the Flexvolume driver.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -23591,18 +26042,21 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSet(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetStatus"), }, }, @@ -23624,6 +26078,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref common.Reference "type": { SchemaProps: spec.SchemaProps{ Description: "Type of DaemonSet condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -23631,6 +26086,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref common.Reference "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -23638,6 +26094,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetCondition(ref common.Reference "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -23688,6 +26145,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref common.ReferenceCallb "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. 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"), }, }, @@ -23698,7 +26156,8 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetList(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSet"), }, }, }, @@ -23729,12 +26188,14 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetSpec(ref common.ReferenceCallb "template": { SchemaProps: spec.SchemaProps{ Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, "updateStrategy": { SchemaProps: spec.SchemaProps{ Description: "An update strategy to replace existing DaemonSet pods with new pods.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy"), }, }, @@ -23778,6 +26239,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref common.ReferenceCal "currentNumberScheduled": { SchemaProps: spec.SchemaProps{ Description: "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -23785,6 +26247,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref common.ReferenceCal "numberMisscheduled": { SchemaProps: spec.SchemaProps{ Description: "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -23792,6 +26255,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref common.ReferenceCal "desiredNumberScheduled": { SchemaProps: spec.SchemaProps{ Description: "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -23799,6 +26263,7 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref common.ReferenceCal "numberReady": { SchemaProps: spec.SchemaProps{ Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -23851,7 +26316,8 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetStatus(ref common.ReferenceCal Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetCondition"), }, }, }, @@ -23870,7 +26336,8 @@ func schema_k8sio_api_extensions_v1beta1_DaemonSetUpdateStrategy(ref common.Refe return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "DaemonSetUpdateStrategy indicates the strategy that the DaemonSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ @@ -23917,18 +26384,21 @@ func schema_k8sio_api_extensions_v1beta1_Deployment(ref common.ReferenceCallback "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the Deployment.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the Deployment.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentStatus"), }, }, @@ -23950,6 +26420,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref common.Referenc "type": { SchemaProps: spec.SchemaProps{ Description: "Type of deployment condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -23957,6 +26428,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref common.Referenc "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -23964,12 +26436,14 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentCondition(ref common.Referenc "lastUpdateTime": { SchemaProps: spec.SchemaProps{ Description: "The last time this condition was updated.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -24020,6 +26494,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentList(ref common.ReferenceCall "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -24030,7 +26505,8 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentList(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.Deployment"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.Deployment"), }, }, }, @@ -24069,6 +26545,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref common.Reference "name": { SchemaProps: spec.SchemaProps{ Description: "Required: This must match the Name of a deployment.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -24081,8 +26558,9 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref common.Reference Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -24091,6 +26569,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentRollback(ref common.Reference "rollbackTo": { SchemaProps: spec.SchemaProps{ Description: "The config of this deployment rollback.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.RollbackConfig"), }, }, @@ -24126,6 +26605,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref common.ReferenceCall "template": { SchemaProps: spec.SchemaProps{ Description: "Template describes the pods that will be created.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -24137,6 +26617,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref common.ReferenceCall }, SchemaProps: spec.SchemaProps{ Description: "The deployment strategy to use to replace existing pods with new ones.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentStrategy"), }, }, @@ -24149,7 +26630,7 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentSpec(ref common.ReferenceCall }, "revisionHistoryLimit": { SchemaProps: spec.SchemaProps{ - Description: "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. This is set to the max value of int32 (i.e. 2147483647) by default, which means \"retaining all old RelicaSets\".", + Description: "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. This is set to the max value of int32 (i.e. 2147483647) by default, which means \"retaining all old ReplicaSets\".", Type: []string{"integer"}, Format: "int32", }, @@ -24245,7 +26726,8 @@ func schema_k8sio_api_extensions_v1beta1_DeploymentStatus(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentCondition"), }, }, }, @@ -24315,7 +26797,8 @@ func schema_k8sio_api_extensions_v1beta1_FSGroupStrategyOptions(ref common.Refer Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), }, }, }, @@ -24353,6 +26836,7 @@ func schema_k8sio_api_extensions_v1beta1_HTTPIngressPath(ref common.ReferenceCal "backend": { SchemaProps: spec.SchemaProps{ Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.IngressBackend"), }, }, @@ -24379,7 +26863,8 @@ func schema_k8sio_api_extensions_v1beta1_HTTPIngressRuleValue(ref common.Referen Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressPath"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressPath"), }, }, }, @@ -24404,6 +26889,7 @@ func schema_k8sio_api_extensions_v1beta1_HostPortRange(ref common.ReferenceCallb "min": { SchemaProps: spec.SchemaProps{ Description: "min is the start of the range, inclusive.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -24411,6 +26897,7 @@ func schema_k8sio_api_extensions_v1beta1_HostPortRange(ref common.ReferenceCallb "max": { SchemaProps: spec.SchemaProps{ Description: "max is the end of the range, inclusive.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -24432,6 +26919,7 @@ func schema_k8sio_api_extensions_v1beta1_IDRange(ref common.ReferenceCallback) c "min": { SchemaProps: spec.SchemaProps{ Description: "min is the start of the range, inclusive.", + Default: 0, Type: []string{"integer"}, Format: "int64", }, @@ -24439,6 +26927,7 @@ func schema_k8sio_api_extensions_v1beta1_IDRange(ref common.ReferenceCallback) c "max": { SchemaProps: spec.SchemaProps{ Description: "max is the end of the range, inclusive.", + Default: 0, Type: []string{"integer"}, Format: "int64", }, @@ -24460,6 +26949,7 @@ func schema_k8sio_api_extensions_v1beta1_IPBlock(ref common.ReferenceCallback) c "cidr": { SchemaProps: spec.SchemaProps{ Description: "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", + Default: "", Type: []string{"string"}, Format: "", }, @@ -24471,8 +26961,9 @@ func schema_k8sio_api_extensions_v1beta1_IPBlock(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -24509,18 +27000,21 @@ func schema_k8sio_api_extensions_v1beta1_Ingress(ref common.ReferenceCallback) c "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.IngressSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.IngressStatus"), }, }, @@ -24549,6 +27043,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressBackend(ref common.ReferenceCall "servicePort": { SchemaProps: spec.SchemaProps{ Description: "Specifies the port of the referenced service.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, @@ -24590,6 +27085,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressList(ref common.ReferenceCallbac "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, @@ -24600,7 +27096,8 @@ func schema_k8sio_api_extensions_v1beta1_IngressList(ref common.ReferenceCallbac Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.Ingress"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.Ingress"), }, }, }, @@ -24631,7 +27128,8 @@ func schema_k8sio_api_extensions_v1beta1_IngressRule(ref common.ReferenceCallbac }, "http": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"), + Description: "http is a list of http selectors pointing to backends. A path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. A backend defines the referenced service endpoint to which the traffic will be forwarded to.", + Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"), }, }, }, @@ -24651,7 +27149,8 @@ func schema_k8sio_api_extensions_v1beta1_IngressRuleValue(ref common.ReferenceCa Properties: map[string]spec.Schema{ "http": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"), + Description: "http is a list of http selectors pointing to backends. A path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. A backend defines the referenced service endpoint to which the traffic will be forwarded to.", + Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"), }, }, }, @@ -24689,7 +27188,8 @@ func schema_k8sio_api_extensions_v1beta1_IngressSpec(ref common.ReferenceCallbac Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IngressTLS"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.IngressTLS"), }, }, }, @@ -24702,7 +27202,8 @@ func schema_k8sio_api_extensions_v1beta1_IngressSpec(ref common.ReferenceCallbac Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IngressRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.IngressRule"), }, }, }, @@ -24726,6 +27227,7 @@ func schema_k8sio_api_extensions_v1beta1_IngressStatus(ref common.ReferenceCallb "loadBalancer": { SchemaProps: spec.SchemaProps{ Description: "LoadBalancer contains the current status of the load-balancer.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), }, }, @@ -24751,8 +27253,9 @@ func schema_k8sio_api_extensions_v1beta1_IngressTLS(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -24795,12 +27298,14 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicy(ref common.ReferenceCallb "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior for this NetworkPolicy.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicySpec"), }, }, @@ -24826,7 +27331,8 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref common.Refe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPort"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPort"), }, }, }, @@ -24839,7 +27345,8 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyEgressRule(ref common.Refe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPeer"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPeer"), }, }, }, @@ -24867,7 +27374,8 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref common.Ref Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPort"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPort"), }, }, }, @@ -24880,7 +27388,8 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyIngressRule(ref common.Ref Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPeer"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPeer"), }, }, }, @@ -24918,6 +27427,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref common.ReferenceC "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. 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"), }, }, @@ -24928,7 +27438,8 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyList(ref common.ReferenceC Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicy"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicy"), }, }, }, @@ -24992,10 +27503,17 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicyPort(ref common.ReferenceC }, "port": { SchemaProps: spec.SchemaProps{ - Description: "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", + Description: "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, + "endPort": { + SchemaProps: spec.SchemaProps{ + Description: "If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate \"NetworkPolicyEndPort\".", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, }, }, @@ -25014,6 +27532,7 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref common.ReferenceC "podSelector": { SchemaProps: spec.SchemaProps{ Description: "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, @@ -25024,7 +27543,8 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref common.ReferenceC Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule"), }, }, }, @@ -25037,7 +27557,8 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref common.ReferenceC Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule"), }, }, }, @@ -25045,13 +27566,14 @@ func schema_k8sio_api_extensions_v1beta1_NetworkPolicySpec(ref common.ReferenceC }, "policyTypes": { SchemaProps: spec.SchemaProps{ - Description: "List of rule types that the NetworkPolicy relates to. Valid options are \"Ingress\", \"Egress\", or \"Ingress,Egress\". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", + Description: "List of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -25090,12 +27612,14 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicy(ref common.ReferenceC "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines the policy enforced.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec"), }, }, @@ -25131,6 +27655,7 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicyList(ref common.Refere "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. 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"), }, }, @@ -25141,7 +27666,8 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicyList(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.PodSecurityPolicy"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.PodSecurityPolicy"), }, }, }, @@ -25177,8 +27703,9 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -25191,8 +27718,9 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -25205,8 +27733,9 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -25214,13 +27743,14 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere }, "volumes": { SchemaProps: spec.SchemaProps{ - Description: "volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", + Description: "volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -25240,7 +27770,8 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.HostPortRange"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.HostPortRange"), }, }, }, @@ -25263,12 +27794,14 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere "seLinux": { SchemaProps: spec.SchemaProps{ Description: "seLinux is the strategy that will dictate the allowable labels that may be set.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions"), }, }, "runAsUser": { SchemaProps: spec.SchemaProps{ Description: "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions"), }, }, @@ -25281,12 +27814,14 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere "supplementalGroups": { SchemaProps: spec.SchemaProps{ Description: "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions"), }, }, "fsGroup": { SchemaProps: spec.SchemaProps{ Description: "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions"), }, }, @@ -25313,12 +27848,13 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere }, "allowedHostPaths": { SchemaProps: spec.SchemaProps{ - Description: "allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.", + Description: "allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.AllowedHostPath"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.AllowedHostPath"), }, }, }, @@ -25326,12 +27862,13 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere }, "allowedFlexVolumes": { SchemaProps: spec.SchemaProps{ - Description: "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", + Description: "allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.AllowedFlexVolume"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.AllowedFlexVolume"), }, }, }, @@ -25339,12 +27876,13 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere }, "allowedCSIDrivers": { SchemaProps: spec.SchemaProps{ - Description: "AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes.", + Description: "AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.AllowedCSIDriver"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.AllowedCSIDriver"), }, }, }, @@ -25352,13 +27890,14 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere }, "allowedUnsafeSysctls": { SchemaProps: spec.SchemaProps{ - Description: "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", + Description: "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -25371,8 +27910,9 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -25380,13 +27920,14 @@ func schema_k8sio_api_extensions_v1beta1_PodSecurityPolicySpec(ref common.Refere }, "allowedProcMountTypes": { SchemaProps: spec.SchemaProps{ - Description: "AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", + Description: "AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -25431,18 +27972,21 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSet(ref common.ReferenceCallback "metadata": { SchemaProps: spec.SchemaProps{ Description: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetStatus"), }, }, @@ -25464,6 +28008,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref common.Referenc "type": { SchemaProps: spec.SchemaProps{ Description: "Type of replica set condition.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -25471,6 +28016,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref common.Referenc "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -25478,6 +28024,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetCondition(ref common.Referenc "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "The last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -25528,6 +28075,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref common.ReferenceCall "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -25538,7 +28086,8 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetList(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSet"), }, }, }, @@ -25583,6 +28132,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetSpec(ref common.ReferenceCall "template": { SchemaProps: spec.SchemaProps{ Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, @@ -25604,6 +28154,7 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref common.ReferenceCa "replicas": { SchemaProps: spec.SchemaProps{ Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -25649,7 +28200,8 @@ func schema_k8sio_api_extensions_v1beta1_ReplicaSetStatus(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetCondition"), }, }, }, @@ -25693,7 +28245,13 @@ func schema_k8sio_api_extensions_v1beta1_RollingUpdateDaemonSet(ref common.Refer Properties: map[string]spec.Schema{ "maxUnavailable": { SchemaProps: spec.SchemaProps{ - Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "maxSurge": { + SchemaProps: spec.SchemaProps{ + Description: "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate.", Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, @@ -25742,6 +28300,7 @@ func schema_k8sio_api_extensions_v1beta1_RunAsGroupStrategyOptions(ref common.Re "rule": { SchemaProps: spec.SchemaProps{ Description: "rule is the strategy that will dictate the allowable RunAsGroup values that may be set.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -25753,7 +28312,8 @@ func schema_k8sio_api_extensions_v1beta1_RunAsGroupStrategyOptions(ref common.Re Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), }, }, }, @@ -25778,6 +28338,7 @@ func schema_k8sio_api_extensions_v1beta1_RunAsUserStrategyOptions(ref common.Ref "rule": { SchemaProps: spec.SchemaProps{ Description: "rule is the strategy that will dictate the allowable RunAsUser values that may be set.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -25789,7 +28350,8 @@ func schema_k8sio_api_extensions_v1beta1_RunAsUserStrategyOptions(ref common.Ref Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), }, }, }, @@ -25813,13 +28375,14 @@ func schema_k8sio_api_extensions_v1beta1_RuntimeClassStrategyOptions(ref common. Properties: map[string]spec.Schema{ "allowedRuntimeClassNames": { SchemaProps: spec.SchemaProps{ - Description: "allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", + Description: "allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -25849,6 +28412,7 @@ func schema_k8sio_api_extensions_v1beta1_SELinuxStrategyOptions(ref common.Refer "rule": { SchemaProps: spec.SchemaProps{ Description: "rule is the strategy that will dictate the allowable labels that may be set.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -25892,18 +28456,21 @@ func schema_k8sio_api_extensions_v1beta1_Scale(ref common.ReferenceCallback) com "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object metadata; 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.ScaleSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/extensions/v1beta1.ScaleStatus"), }, }, @@ -25945,11 +28512,17 @@ func schema_k8sio_api_extensions_v1beta1_ScaleStatus(ref common.ReferenceCallbac "replicas": { SchemaProps: spec.SchemaProps{ Description: "actual number of observed instances of the scaled object.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, "selector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", Type: []string{"object"}, @@ -25957,8 +28530,9 @@ func schema_k8sio_api_extensions_v1beta1_ScaleStatus(ref common.ReferenceCallbac Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -25999,7 +28573,8 @@ func schema_k8sio_api_extensions_v1beta1_SupplementalGroupsStrategyOptions(ref c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), }, }, }, @@ -26023,6 +28598,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_FlowDistinguisherMethod(ref common.Re "type": { SchemaProps: spec.SchemaProps{ Description: "`type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -26057,19 +28633,22 @@ func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchema(ref common.ReferenceCallba }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Description: "`metadata` is the standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + Description: "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowSchemaSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + Description: "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowSchemaStatus"), }, }, @@ -26105,6 +28684,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaCondition(ref common.Refere "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -26153,23 +28733,20 @@ func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaList(ref common.ReferenceCa }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Description: "`metadata` is the standard list metadata. 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, SchemaProps: spec.SchemaProps{ Description: "`items` is a list of FlowSchemas.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowSchema"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowSchema"), }, }, }, @@ -26194,12 +28771,14 @@ func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaSpec(ref common.ReferenceCa "priorityLevelConfiguration": { SchemaProps: spec.SchemaProps{ Description: "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationReference"), }, }, "matchingPrecedence": { SchemaProps: spec.SchemaProps{ Description: "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -26222,7 +28801,8 @@ func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaSpec(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PolicyRulesWithSubjects"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PolicyRulesWithSubjects"), }, }, }, @@ -26259,7 +28839,8 @@ func schema_k8sio_api_flowcontrol_v1alpha1_FlowSchemaStatus(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowSchemaCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.FlowSchemaCondition"), }, }, }, @@ -26283,6 +28864,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_GroupSubject(ref common.ReferenceCall "name": { SchemaProps: spec.SchemaProps{ Description: "name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -26304,6 +28886,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_LimitResponse(ref common.ReferenceCal "type": { SchemaProps: spec.SchemaProps{ Description: "`type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -26345,6 +28928,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_LimitedPriorityLevelConfiguration(ref "assuredConcurrencyShares": { SchemaProps: spec.SchemaProps{ Description: "`assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level:\n\n ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )\n\nbigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -26352,6 +28936,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_LimitedPriorityLevelConfiguration(ref "limitResponse": { SchemaProps: spec.SchemaProps{ Description: "`limitResponse` indicates what to do with requests that can not be executed right now", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/flowcontrol/v1alpha1.LimitResponse"), }, }, @@ -26382,8 +28967,9 @@ func schema_k8sio_api_flowcontrol_v1alpha1_NonResourcePolicyRule(ref common.Refe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -26401,8 +28987,9 @@ func schema_k8sio_api_flowcontrol_v1alpha1_NonResourcePolicyRule(ref common.Refe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -26434,7 +29021,8 @@ func schema_k8sio_api_flowcontrol_v1alpha1_PolicyRulesWithSubjects(ref common.Re Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.Subject"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.Subject"), }, }, }, @@ -26452,7 +29040,8 @@ func schema_k8sio_api_flowcontrol_v1alpha1_PolicyRulesWithSubjects(ref common.Re Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.ResourcePolicyRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.ResourcePolicyRule"), }, }, }, @@ -26470,7 +29059,8 @@ func schema_k8sio_api_flowcontrol_v1alpha1_PolicyRulesWithSubjects(ref common.Re Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.NonResourcePolicyRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.NonResourcePolicyRule"), }, }, }, @@ -26508,19 +29098,22 @@ func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfiguration(ref common }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Description: "`metadata` is the standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + Description: "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + Description: "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationStatus"), }, }, @@ -26556,6 +29149,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationCondition(r "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -26604,23 +29198,20 @@ func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationList(ref co }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Description: "`metadata` is the standard object's metadata. 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, SchemaProps: spec.SchemaProps{ Description: "`items` is a list of request-priorities.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfiguration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfiguration"), }, }, }, @@ -26645,6 +29236,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationReference(r "name": { SchemaProps: spec.SchemaProps{ Description: "`name` is the name of the priority level configuration being referenced Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -26666,6 +29258,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationSpec(ref co "type": { SchemaProps: spec.SchemaProps{ Description: "`type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -26719,7 +29312,8 @@ func schema_k8sio_api_flowcontrol_v1alpha1_PriorityLevelConfigurationStatus(ref Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.PriorityLevelConfigurationCondition"), }, }, }, @@ -26743,6 +29337,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_QueuingConfiguration(ref common.Refer "queues": { SchemaProps: spec.SchemaProps{ Description: "`queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -26750,6 +29345,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_QueuingConfiguration(ref common.Refer "handSize": { SchemaProps: spec.SchemaProps{ Description: "`handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -26757,6 +29353,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_QueuingConfiguration(ref common.Refer "queueLengthLimit": { SchemaProps: spec.SchemaProps{ Description: "`queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -26786,8 +29383,9 @@ func schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref common.Referen Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -26805,8 +29403,9 @@ func schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref common.Referen Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -26824,8 +29423,9 @@ func schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref common.Referen Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -26850,8 +29450,9 @@ func schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref common.Referen Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -26874,6 +29475,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_ServiceAccountSubject(ref common.Refe "namespace": { SchemaProps: spec.SchemaProps{ Description: "`namespace` is the namespace of matching ServiceAccount objects. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -26881,6 +29483,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_ServiceAccountSubject(ref common.Refe "name": { SchemaProps: spec.SchemaProps{ Description: "`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -26901,24 +29504,28 @@ func schema_k8sio_api_flowcontrol_v1alpha1_Subject(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Required", + Description: "`kind` indicates which one of the other fields is non-empty. Required", + Default: "", Type: []string{"string"}, Format: "", }, }, "user": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.UserSubject"), + Description: "`user` matches based on username.", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.UserSubject"), }, }, "group": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.GroupSubject"), + Description: "`group` matches based on user group name.", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.GroupSubject"), }, }, "serviceAccount": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/flowcontrol/v1alpha1.ServiceAccountSubject"), + Description: "`serviceAccount` matches ServiceAccounts.", + Ref: ref("k8s.io/api/flowcontrol/v1alpha1.ServiceAccountSubject"), }, }, }, @@ -26954,6 +29561,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_UserSubject(ref common.ReferenceCallb "name": { SchemaProps: spec.SchemaProps{ Description: "`name` is the username that matches, or \"*\" to match all usernames. Required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -26965,11 +29573,33 @@ func schema_k8sio_api_flowcontrol_v1alpha1_UserSubject(ref common.ReferenceCallb } } -func schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_FlowDistinguisherMethod(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ImageReview checks if the set of images in a pod are allowed.", + Description: "FlowDistinguisherMethod specifies the method of a flow distinguisher.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "`type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type"}, + }, + }, + } +} + +func schema_k8sio_api_flowcontrol_v1beta1_FlowSchema(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -26988,88 +29618,71 @@ func schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref common.ReferenceCallb }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "`metadata` is the standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the pod being evaluated", - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec"), + Description: "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.FlowSchemaSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the backend and indicates whether the pod should be allowed.", - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus"), + Description: "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.FlowSchemaStatus"), }, }, }, - Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec", "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/flowcontrol/v1beta1.FlowSchemaSpec", "k8s.io/api/flowcontrol/v1beta1.FlowSchemaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ImageReviewContainerSpec is a description of a container within the pod creation request.", + Description: "FlowSchemaCondition describes conditions for a FlowSchema.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "image": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "This can be in the form image:tag or image@SHA:012345679abcdef.", + Description: "`type` is the type of the condition. Required.", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - } -} - -func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ImageReviewSpec is a description of the pod creation request.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "containers": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "Containers is a list of a subset of the information in each container of the Pod being created.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"), - }, - }, - }, + Description: "`status` is the status of the condition. Can be True, False, Unknown. Required.", + Type: []string{"string"}, + Format: "", }, }, - "annotations": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "Annotations is a list of key-value pairs extracted from the Pod's annotations. It only includes keys which match the pattern `*.image-policy.k8s.io/*`. It is up to each webhook backend to determine how to interpret these annotations, if at all.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "namespace": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace the pod is being created in.", + Description: "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "`message` is a human-readable message indicating details about last transition.", Type: []string{"string"}, Format: "", }, @@ -27078,198 +29691,141 @@ func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ImageReviewStatus is the result of the review for the pod creation request.", + Description: "FlowSchemaList is a list of FlowSchema objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "allowed": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Allowed indicates that all images were allowed to be run.", - Type: []string{"boolean"}, + 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: "", }, }, - "reason": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Reason should be empty unless Allowed is false in which case it may contain a short description of what is wrong. Kubernetes may truncate excessively long errors when displaying to the user.", + 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: "", }, }, - "auditAnnotations": { - SchemaProps: spec.SchemaProps{ - Description: "AuditAnnotations will be added to the attributes object of the admission controller request using 'AddAnnotation'. The keys should be prefix-less (i.e., the admission controller will add an appropriate prefix).", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"allowed"}, - }, - }, - } -} - -func schema_k8sio_api_networking_v1_IPBlock(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "cidr": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", - Type: []string{"string"}, - Format: "", + Description: "`metadata` is the standard list metadata. 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"), }, }, - "except": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range", + Description: "`items` is a list of FlowSchemas.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.FlowSchema"), }, }, }, }, }, }, - Required: []string{"cidr"}, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1beta1.FlowSchema", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicy describes what network traffic is allowed for a set of Pods", + Description: "FlowSchemaSpec describes how the FlowSchema's specification looks like.", 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": { + "priorityLevelConfiguration": { 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: "", + Description: "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationReference"), }, }, - "metadata": { + "matchingPrecedence": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "spec": { + "distinguisherMethod": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior for this NetworkPolicy.", - Ref: ref("k8s.io/api/networking/v1.NetworkPolicySpec"), + Description: "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.", + Ref: ref("k8s.io/api/flowcontrol/v1beta1.FlowDistinguisherMethod"), }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), - }, - }, + "rules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", }, }, - }, - "to": { SchemaProps: spec.SchemaProps{ - Description: "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", + Description: "`rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.PolicyRulesWithSubjects"), }, }, }, }, }, }, + Required: []string{"priorityLevelConfiguration"}, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, + "k8s.io/api/flowcontrol/v1beta1.FlowDistinguisherMethod", "k8s.io/api/flowcontrol/v1beta1.PolicyRulesWithSubjects", "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationReference"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_FlowSchemaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", + Description: "FlowSchemaStatus represents the current state of a FlowSchema.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), - }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", }, + "x-kubernetes-list-type": "map", }, }, - }, - "from": { SchemaProps: spec.SchemaProps{ - Description: "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", + Description: "`conditions` is a list of the current states of FlowSchema.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.FlowSchemaCondition"), }, }, }, @@ -27279,252 +29835,236 @@ func schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, + "k8s.io/api/flowcontrol/v1beta1.FlowSchemaCondition"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_GroupSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyList is a list of NetworkPolicy objects.", + Description: "GroupSubject holds detailed information for group-kind subject.", 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": { + "name": { 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", + Description: "name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicy"), - }, - }, - }, - }, - }, }, - Required: []string{"items"}, + Required: []string{"name"}, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_LimitResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed", + Description: "LimitResponse defines how to handle requests that can not be executed right now.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "podSelector": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "`type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "namespaceSelector": { + "queuing": { SchemaProps: spec.SchemaProps{ - Description: "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.", + Ref: ref("k8s.io/api/flowcontrol/v1beta1.QueuingConfiguration"), }, }, - "ipBlock": { - SchemaProps: spec.SchemaProps{ - Description: "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", - Ref: ref("k8s.io/api/networking/v1.IPBlock"), + }, + Required: []string{"type"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "type", + "fields-to-discriminateBy": map[string]interface{}{ + "queuing": "Queuing", + }, }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IPBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/flowcontrol/v1beta1.QueuingConfiguration"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicyPort(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_LimitedPriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyPort describes a port to allow traffic on", + Description: "LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:\n * How are requests for this priority level limited?\n * What should be done with requests that exceed the limit?", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "protocol": { + "assuredConcurrencyShares": { SchemaProps: spec.SchemaProps{ - Description: "The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", - Type: []string{"string"}, - Format: "", + Description: "`assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level:\n\n ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )\n\nbigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "port": { + "limitResponse": { SchemaProps: spec.SchemaProps{ - Description: "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Description: "`limitResponse` indicates what to do with requests that can not be executed right now", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.LimitResponse"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + "k8s.io/api/flowcontrol/v1beta1.LimitResponse"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_NonResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicySpec provides the specification of a NetworkPolicy", + Description: "NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "podSelector": { - SchemaProps: spec.SchemaProps{ - Description: "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + "verbs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, }, - }, - "ingress": { SchemaProps: spec.SchemaProps{ - Description: "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", + Description: "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs. If it is present, it must be the only entry. Required.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyIngressRule"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "egress": { - SchemaProps: spec.SchemaProps{ - Description: "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyEgressRule"), - }, - }, + "nonResourceURLs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", }, }, - }, - "policyTypes": { SchemaProps: spec.SchemaProps{ - Description: "List of rule types that the NetworkPolicy relates to. Valid options are \"Ingress\", \"Egress\", or \"Ingress,Egress\". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", + Description: "`nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:\n - \"/healthz\" is legal\n - \"/hea*\" is illegal\n - \"/hea\" is legal but matches nothing\n - \"/hea/*\" also matches nothing\n - \"/healthz/*\" matches all per-component health checks.\n\"*\" matches all non-resource urls. if it is present, it must be the only entry. Required.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"podSelector"}, + Required: []string{"verbs", "nonResourceURLs"}, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyEgressRule", "k8s.io/api/networking/v1.NetworkPolicyIngressRule", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_PolicyRulesWithSubjects(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", + Description: "PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. When unspecified, all paths from incoming requests are matched.", - Type: []string{"string"}, - Format: "", + "subjects": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "pathType": { SchemaProps: spec.SchemaProps{ - Description: "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types. Defaults to ImplementationSpecific.", - Type: []string{"string"}, - Format: "", + Description: "subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.Subject"), + }, + }, + }, }, }, - "backend": { + "resourceRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", - Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), + Description: "`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.ResourcePolicyRule"), + }, + }, + }, }, }, - }, - Required: []string{"backend"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressBackend"}, - } -} - -func schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "paths": { + "nonResourceRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "A collection of paths that map requests to backends.", + Description: "`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressPath"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.NonResourcePolicyRule"), }, }, }, }, }, }, - Required: []string{"paths"}, + Required: []string{"subjects"}, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.HTTPIngressPath"}, + "k8s.io/api/flowcontrol/v1beta1.NonResourcePolicyRule", "k8s.io/api/flowcontrol/v1beta1.ResourcePolicyRule", "k8s.io/api/flowcontrol/v1beta1.Subject"}, } } -func schema_k8sio_api_networking_v1beta1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", + Description: "PriorityLevelConfiguration represents the configuration of a priority level.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -27543,110 +30083,88 @@ func schema_k8sio_api_networking_v1beta1_Ingress(ref common.ReferenceCallback) c }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "`metadata` is the standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/networking/v1beta1.IngressSpec"), + Description: "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/networking/v1beta1.IngressStatus"), + Description: "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressSpec", "k8s.io/api/networking/v1beta1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationSpec", "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_networking_v1beta1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressBackend describes all endpoints for a given service and port.", + Description: "PriorityLevelConfigurationCondition defines the condition of priority level.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "serviceName": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the name of the referenced service.", + Description: "`type` is the type of the condition. Required.", Type: []string{"string"}, Format: "", }, }, - "servicePort": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the port of the referenced service.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Description: "`status` is the status of the condition. Can be True, False, Unknown. Required.", + Type: []string{"string"}, + Format: "", }, }, - "resource": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - } -} - -func schema_k8sio_api_networking_v1beta1_IngressClass(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "reason": { 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", + Description: "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "message": { 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", + Description: "`message` is a human-readable message indicating details about last transition.", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/networking/v1beta1.IngressClassSpec"), - }, - }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressClassList is a collection of IngressClasses.", + Description: "PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -27665,23 +30183,20 @@ func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCa }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata.", + Description: "`metadata` is the standard object's metadata. 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", - }, - }, SchemaProps: spec.SchemaProps{ - Description: "Items is the list of IngressClasses.", + Description: "`items` is a list of request-priorities.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.IngressClass"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfiguration"), }, }, }, @@ -27692,277 +30207,362 @@ func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressClassSpec provides information about the class of an Ingress.", + Description: "PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "controller": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + Description: "`name` is the name of the priority level configuration being referenced Required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "parameters": { - SchemaProps: spec.SchemaProps{ - Description: "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), - }, - }, }, + Required: []string{"name"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference"}, } } -func schema_k8sio_api_networking_v1beta1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressList is a collection of Ingress.", + Description: "PriorityLevelConfigurationSpec specifies the configuration of a priority level.", 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": { + "type": { 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", + Description: "`type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "limited": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.", + Ref: ref("k8s.io/api/flowcontrol/v1beta1.LimitedPriorityLevelConfiguration"), }, }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of Ingress.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.Ingress"), - }, - }, + }, + Required: []string{"type"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "type", + "fields-to-discriminateBy": map[string]interface{}{ + "limited": "Limited", }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/flowcontrol/v1beta1.LimitedPriorityLevelConfiguration"}, } } -func schema_k8sio_api_networking_v1beta1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_PriorityLevelConfigurationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + Description: "PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", - Type: []string{"string"}, - Format: "", + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, }, - }, - "http": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), + Description: "`conditions` is the current state of \"request-priority\".", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationCondition"), + }, + }, + }, }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, + "k8s.io/api/flowcontrol/v1beta1.PriorityLevelConfigurationCondition"}, } } -func schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_QueuingConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", + Description: "QueuingConfiguration holds the configuration parameters for queuing", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "http": { + "queues": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), + Description: "`queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "handSize": { + SchemaProps: spec.SchemaProps{ + Description: "`handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "queueLengthLimit": { + SchemaProps: spec.SchemaProps{ + Description: "`queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, } } -func schema_k8sio_api_networking_v1beta1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_ResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressSpec describes the Ingress the user wishes to exist.", + Description: "ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) least one member of namespaces matches the request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ingressClassName": { + "verbs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", - Type: []string{"string"}, - Format: "", + Description: "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs and, if present, must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "backend": { + "apiGroups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", - Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), + Description: "`apiGroups` is a list of matching API groups and may not be empty. \"*\" matches all API groups and, if present, must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "tls": { + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + Description: "`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.IngressTLS"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "rules": { + "clusterScope": { SchemaProps: spec.SchemaProps{ - Description: "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + Description: "`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "namespaces": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.IngressRule"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, + Required: []string{"verbs", "apiGroups", "resources"}, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressBackend", "k8s.io/api/networking/v1beta1.IngressRule", "k8s.io/api/networking/v1beta1.IngressTLS"}, } } -func schema_k8sio_api_networking_v1beta1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_ServiceAccountSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressStatus describe the current state of the Ingress.", + Description: "ServiceAccountSubject holds detailed information for service-account-kind subject.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "loadBalancer": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "LoadBalancer contains the current status of the load-balancer.", - Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + Description: "`namespace` is the namespace of matching ServiceAccount objects. Required.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"namespace", "name"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus"}, } } -func schema_k8sio_api_networking_v1beta1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressTLS describes the transport layer security associated with an Ingress.", + Description: "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "hosts": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "`kind` indicates which one of the other fields is non-empty. Required", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "secretName": { + "user": { SchemaProps: spec.SchemaProps{ - Description: "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", - Type: []string{"string"}, - Format: "", + Description: "`user` matches based on username.", + Ref: ref("k8s.io/api/flowcontrol/v1beta1.UserSubject"), + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "`group` matches based on user group name.", + Ref: ref("k8s.io/api/flowcontrol/v1beta1.GroupSubject"), + }, + }, + "serviceAccount": { + SchemaProps: spec.SchemaProps{ + Description: "`serviceAccount` matches ServiceAccounts.", + Ref: ref("k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject"), + }, + }, + }, + Required: []string{"kind"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "kind", + "fields-to-discriminateBy": map[string]interface{}{ + "group": "Group", + "serviceAccount": "ServiceAccount", + "user": "User", + }, }, }, }, }, }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1beta1.GroupSubject", "k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject", "k8s.io/api/flowcontrol/v1beta1.UserSubject"}, } } -func schema_k8sio_api_node_v1alpha1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_UserSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Overhead structure represents the resource overhead associated with running a pod.", + Description: "UserSubject holds detailed information for user-kind subject.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "podFixed": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "PodFixed represents the fixed resource overhead associated with running a pod.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, + Description: "`name` is the username that matches, or \"*\" to match all usernames. Required.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"name"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_node_v1alpha1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md", + Description: "ImageReview checks if the set of images in a pod are allowed.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -27981,14 +30581,23 @@ func schema_k8sio_api_node_v1alpha1_RuntimeClass(ref common.ReferenceCallback) c }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClassSpec"), + Description: "Spec holds information about the pod being evaluated", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the backend and indicates whether the pod should be allowed.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus"), }, }, }, @@ -27996,176 +30605,241 @@ func schema_k8sio_api_node_v1alpha1_RuntimeClass(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/node/v1alpha1.RuntimeClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec", "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClassList is a list of RuntimeClass objects.", + Description: "ImageReviewContainerSpec is a description of a container within the pod creation request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "image": { 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", + Description: "This can be in the form image:tag or image@SHA:012345679abcdef.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + }, + }, + }, + } +} + +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ImageReviewSpec is a description of the pod creation request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "containers": { 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", + Description: "Containers is a list of a subset of the information in each container of the Pod being created.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"), + }, + }, + }, + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is a list of key-value pairs extracted from the Pod's annotations. It only includes keys which match the pattern `*.image-policy.k8s.io/*`. It is up to each webhook backend to determine how to interpret these annotations, if at all.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace the pod is being created in.", Type: []string{"string"}, Format: "", }, }, - "metadata": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"}, + } +} + +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ImageReviewStatus is the result of the review for the pod creation request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "allowed": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Allowed indicates that all images were allowed to be run.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "items": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Reason should be empty unless Allowed is false in which case it may contain a short description of what is wrong. Kubernetes may truncate excessively long errors when displaying to the user.", + Type: []string{"string"}, + Format: "", + }, + }, + "auditAnnotations": { + SchemaProps: spec.SchemaProps{ + Description: "AuditAnnotations will be added to the attributes object of the admission controller request using 'AddAnnotation'. The keys should be prefix-less (i.e., the admission controller will add an appropriate prefix).", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClass"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"items"}, + Required: []string{"allowed"}, }, }, - Dependencies: []string{ - "k8s.io/api/node/v1alpha1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.", + Description: "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "runtimeHandler": { + "path": { SchemaProps: spec.SchemaProps{ - Description: "RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable.", + Description: "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".", Type: []string{"string"}, Format: "", }, }, - "overhead": { + "pathType": { SchemaProps: spec.SchemaProps{ - Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.", - Ref: ref("k8s.io/api/node/v1alpha1.Overhead"), + Description: "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types.", + Type: []string{"string"}, + Format: "", }, }, - "scheduling": { + "backend": { SchemaProps: spec.SchemaProps{ - Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", - Ref: ref("k8s.io/api/node/v1alpha1.Scheduling"), + Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressBackend"), }, }, }, - Required: []string{"runtimeHandler"}, + Required: []string{"pathType", "backend"}, }, }, Dependencies: []string{ - "k8s.io/api/node/v1alpha1.Overhead", "k8s.io/api/node/v1alpha1.Scheduling"}, + "k8s.io/api/networking/v1.IngressBackend"}, } } -func schema_k8sio_api_node_v1alpha1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Description: "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "nodeSelector": { - SchemaProps: spec.SchemaProps{ - Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "tolerations": { + "paths": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + Description: "A collection of paths that map requests to backends.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Toleration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.HTTPIngressPath"), }, }, }, }, }, }, + Required: []string{"paths"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Toleration"}, + "k8s.io/api/networking/v1.HTTPIngressPath"}, } } -func schema_k8sio_api_node_v1beta1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IPBlock(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Overhead structure represents the resource overhead associated with running a pod.", + Description: "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "podFixed": { + "cidr": { SchemaProps: spec.SchemaProps{ - Description: "PodFixed represents the fixed resource overhead associated with running a pod.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "except": { + SchemaProps: spec.SchemaProps{ + Description: "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, + Required: []string{"cidr"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_node_v1beta1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md", + Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -28184,53 +30858,75 @@ func schema_k8sio_api_node_v1beta1_RuntimeClass(ref common.ReferenceCallback) co }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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"), }, }, - "handler": { - SchemaProps: spec.SchemaProps{ - Description: "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must conform to the DNS Label (RFC 1123) requirements, and is immutable.", - Type: []string{"string"}, - Format: "", - }, - }, - "overhead": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.", - Ref: ref("k8s.io/api/node/v1beta1.Overhead"), + Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressSpec"), }, }, - "scheduling": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", - Ref: ref("k8s.io/api/node/v1beta1.Scheduling"), + Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressStatus"), }, }, }, - Required: []string{"handler"}, }, }, Dependencies: []string{ - "k8s.io/api/node/v1beta1.Overhead", "k8s.io/api/node/v1beta1.Scheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1.IngressSpec", "k8s.io/api/networking/v1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClassList is a list of RuntimeClass objects.", + Description: "IngressBackend describes all endpoints for a given service and port.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "service": { 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: "", + Description: "Service references a Service as a Backend. This is a mutually exclusive setting with \"Resource\".", + Ref: ref("k8s.io/api/networking/v1.IngressServiceBackend"), }, }, - "apiVersion": { + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\".", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/api/networking/v1.IngressServiceBackend"}, + } +} + +func schema_k8sio_api_networking_v1_IngressClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + 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"}, @@ -28239,154 +30935,161 @@ func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard object's metadata. 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"), }, }, - "items": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/node/v1beta1.RuntimeClass"), - }, - }, - }, + Description: "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressClassSpec"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/node/v1beta1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1.IngressClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_node_v1beta1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Description: "IngressClassList is a collection of IngressClasses.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "nodeSelector": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + 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: "", }, }, - "tolerations": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, + "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: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + Description: "Standard list 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 IngressClasses.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Toleration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressClass"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Toleration"}, + "k8s.io/api/networking/v1.IngressClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_policy_v1beta1_AllowedCSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.", + Description: "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is the type of resource being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, "name": { SchemaProps: spec.SchemaProps{ - Description: "Name is the registered name of the CSI driver", + Description: "Name is the name of resource being referenced.", + Default: "", Type: []string{"string"}, Format: "", }, }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_api_policy_v1beta1_AllowedFlexVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "driver": { + "scope": { SchemaProps: spec.SchemaProps{ - Description: "driver is the name of the Flexvolume driver.", + Description: "Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\". Field can be enabled with IngressClassNamespacedParams feature gate.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"driver"}, + Required: []string{"kind", "name"}, }, }, } } -func schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", + Description: "IngressClassSpec provides information about the class of an Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "pathPrefix": { + "controller": { SchemaProps: spec.SchemaProps{ - Description: "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", + Description: "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", Type: []string{"string"}, Format: "", }, }, - "readOnly": { + "parameters": { SchemaProps: spec.SchemaProps{ - Description: "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.", - Type: []string{"boolean"}, - Format: "", + Description: "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", + Ref: ref("k8s.io/api/networking/v1.IngressClassParametersReference"), }, }, }, }, }, + Dependencies: []string{ + "k8s.io/api/networking/v1.IngressClassParametersReference"}, } } -func schema_k8sio_api_policy_v1beta1_Eviction(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", + Description: "IngressList is a collection of Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -28405,311 +31108,245 @@ func schema_k8sio_api_policy_v1beta1_Eviction(ref common.ReferenceCallback) comm }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta describes the pod that is being evicted.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "deleteOptions": { - SchemaProps: spec.SchemaProps{ - Description: "DeleteOptions may be provided", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_policy_v1beta1_FSGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "rule": { - SchemaProps: spec.SchemaProps{ - Description: "rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", - Type: []string{"string"}, - Format: "", + Description: "Standard object's metadata. 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"), }, }, - "ranges": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.", + Description: "Items is the list of Ingress.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.Ingress"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.IDRange"}, + "k8s.io/api/networking/v1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_policy_v1beta1_HostPortRange(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + Description: "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "min": { + "host": { SchemaProps: spec.SchemaProps{ - Description: "min is the start of the range, inclusive.", - Type: []string{"integer"}, - Format: "int32", + Description: "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + Type: []string{"string"}, + Format: "", }, }, - "max": { + "http": { SchemaProps: spec.SchemaProps{ - Description: "max is the end of the range, inclusive.", - Type: []string{"integer"}, - Format: "int32", + Ref: ref("k8s.io/api/networking/v1.HTTPIngressRuleValue"), }, }, }, - Required: []string{"min", "max"}, }, }, + Dependencies: []string{ + "k8s.io/api/networking/v1.HTTPIngressRuleValue"}, } } -func schema_k8sio_api_policy_v1beta1_IDRange(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IDRange provides a min/max of an allowed range of IDs.", + Description: "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "min": { - SchemaProps: spec.SchemaProps{ - Description: "min is the start of the range, inclusive.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "max": { + "http": { SchemaProps: spec.SchemaProps{ - Description: "max is the end of the range, inclusive.", - Type: []string{"integer"}, - Format: "int64", + Ref: ref("k8s.io/api/networking/v1.HTTPIngressRuleValue"), }, }, }, - Required: []string{"min", "max"}, }, }, + Dependencies: []string{ + "k8s.io/api/networking/v1.HTTPIngressRuleValue"}, } } -func schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressServiceBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", + Description: "IngressServiceBackend references a Kubernetes Service as a Backend.", 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": { + "name": { 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", + Description: "Name is the referenced service. The service must exist in the same namespace as the Ingress object.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the PodDisruptionBudget.", - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec"), - }, - }, - "status": { + "port": { SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the PodDisruptionBudget.", - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus"), + Description: "Port of the referenced service. A port name or port number is required for a IngressServiceBackend.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.ServiceBackendPort"), }, }, }, + Required: []string{"name"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1.ServiceBackendPort"}, } } -func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", + Description: "IngressSpec describes the Ingress the user wishes to exist.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "ingressClassName": { 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", + Description: "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "defaultBackend": { 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: "", + Description: "DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.", + Ref: ref("k8s.io/api/networking/v1.IngressBackend"), }, }, - "metadata": { + "tls": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressTLS"), + }, + }, + }, }, }, - "items": { + "rules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudget"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressRule"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1.IngressBackend", "k8s.io/api/networking/v1.IngressRule", "k8s.io/api/networking/v1.IngressTLS"}, } } -func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", + Description: "IngressStatus describe the current state of the Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "minAvailable": { - SchemaProps: spec.SchemaProps{ - Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Label query over pods whose evictions are managed by the disruption budget.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "maxUnavailable": { + "loadBalancer": { SchemaProps: spec.SchemaProps{ - Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Description: "LoadBalancer contains the current status of the load-balancer.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + "k8s.io/api/core/v1.LoadBalancerStatus"}, } } -func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + Description: "IngressTLS describes the transport layer security associated with an Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", - Type: []string{"integer"}, - Format: "int64", + "hosts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "disruptedPods": { SchemaProps: spec.SchemaProps{ - Description: "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "disruptionsAllowed": { - SchemaProps: spec.SchemaProps{ - Description: "Number of pod disruptions that are currently allowed.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentHealthy": { - SchemaProps: spec.SchemaProps{ - Description: "current number of healthy pods", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "desiredHealthy": { - SchemaProps: spec.SchemaProps{ - Description: "minimum desired number of healthy pods", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "expectedPods": { + "secretName": { SchemaProps: spec.SchemaProps{ - Description: "total number of pods counted by this disruption budget", - Type: []string{"integer"}, - Format: "int32", + Description: "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"disruptionsAllowed", "currentHealthy", "desiredHealthy", "expectedPods"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", + Description: "NetworkPolicy describes what network traffic is allowed for a set of Pods", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -28729,527 +31366,395 @@ func schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref common.ReferenceCallb "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "spec defines the policy enforced.", - Ref: ref("k8s.io/api/policy/v1beta1.PodSecurityPolicySpec"), + Description: "Specification of the desired behavior for this NetworkPolicy.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicySpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodSecurityPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1.NetworkPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_policy_v1beta1_PodSecurityPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodSecurityPolicyList is a list of PodSecurityPolicy objects.", + Description: "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", 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": { + "ports": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), + }, + }, + }, }, }, - "items": { + "to": { SchemaProps: spec.SchemaProps{ - Description: "items is a list of schema objects.", + Description: "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.PodSecurityPolicy"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodSecurityPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, } } -func schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodSecurityPolicySpec defines the policy enforced.", + Description: "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "privileged": { - SchemaProps: spec.SchemaProps{ - Description: "privileged determines if a pod can request to be run as privileged.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "defaultAddCapabilities": { + "ports": { SchemaProps: spec.SchemaProps{ - Description: "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", + Description: "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), }, }, }, }, }, - "requiredDropCapabilities": { + "from": { SchemaProps: spec.SchemaProps{ - Description: "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", + Description: "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), }, }, }, }, }, - "allowedCapabilities": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, + } +} + +func schema_k8sio_api_networking_v1_NetworkPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkPolicyList is a list of NetworkPolicy objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + 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: "", }, }, - "volumes": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + 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: "", }, }, - "hostNetwork": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", - Type: []string{"boolean"}, - Format: "", + Description: "Standard list metadata. 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"), }, }, - "hostPorts": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "hostPorts determines which host port ranges are allowed to be exposed.", + Description: "Items is a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.HostPortRange"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicy"), }, }, }, }, }, - "hostPID": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.NetworkPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podSelector": { SchemaProps: spec.SchemaProps{ - Description: "hostPID determines if the policy allows the use of HostPID in the pod spec.", - Type: []string{"boolean"}, - Format: "", + Description: "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "hostIPC": { + "namespaceSelector": { SchemaProps: spec.SchemaProps{ - Description: "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", - Type: []string{"boolean"}, - Format: "", + Description: "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "seLinux": { + "ipBlock": { SchemaProps: spec.SchemaProps{ - Description: "seLinux is the strategy that will dictate the allowable labels that may be set.", - Ref: ref("k8s.io/api/policy/v1beta1.SELinuxStrategyOptions"), - }, - }, - "runAsUser": { - SchemaProps: spec.SchemaProps{ - Description: "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", - Ref: ref("k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions"), - }, - }, - "runAsGroup": { - SchemaProps: spec.SchemaProps{ - Description: "RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled.", - Ref: ref("k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions"), - }, - }, - "supplementalGroups": { - SchemaProps: spec.SchemaProps{ - Description: "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", - Ref: ref("k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions"), - }, - }, - "fsGroup": { - SchemaProps: spec.SchemaProps{ - Description: "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", - Ref: ref("k8s.io/api/policy/v1beta1.FSGroupStrategyOptions"), - }, - }, - "readOnlyRootFilesystem": { - SchemaProps: spec.SchemaProps{ - Description: "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "defaultAllowPrivilegeEscalation": { - SchemaProps: spec.SchemaProps{ - Description: "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "allowPrivilegeEscalation": { - SchemaProps: spec.SchemaProps{ - Description: "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "allowedHostPaths": { - SchemaProps: spec.SchemaProps{ - Description: "allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.AllowedHostPath"), - }, - }, - }, - }, - }, - "allowedFlexVolumes": { - SchemaProps: spec.SchemaProps{ - Description: "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.AllowedFlexVolume"), - }, - }, - }, - }, - }, - "allowedCSIDrivers": { - SchemaProps: spec.SchemaProps{ - Description: "AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is an alpha field, and is only honored if the API server enables the CSIInlineVolume feature gate.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.AllowedCSIDriver"), - }, - }, - }, - }, - }, - "allowedUnsafeSysctls": { - SchemaProps: spec.SchemaProps{ - Description: "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "forbiddenSysctls": { - SchemaProps: spec.SchemaProps{ - Description: "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "allowedProcMountTypes": { - SchemaProps: spec.SchemaProps{ - Description: "AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "runtimeClass": { - SchemaProps: spec.SchemaProps{ - Description: "runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.", - Ref: ref("k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions"), + Description: "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", + Ref: ref("k8s.io/api/networking/v1.IPBlock"), }, }, }, - Required: []string{"seLinux", "runAsUser", "supplementalGroups", "fsGroup"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.AllowedCSIDriver", "k8s.io/api/policy/v1beta1.AllowedFlexVolume", "k8s.io/api/policy/v1beta1.AllowedHostPath", "k8s.io/api/policy/v1beta1.FSGroupStrategyOptions", "k8s.io/api/policy/v1beta1.HostPortRange", "k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions", "k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions", "k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions", "k8s.io/api/policy/v1beta1.SELinuxStrategyOptions", "k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions"}, + "k8s.io/api/networking/v1.IPBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_policy_v1beta1_RunAsGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicyPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.", + Description: "NetworkPolicyPort describes a port to allow traffic on", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "rule": { + "protocol": { SchemaProps: spec.SchemaProps{ - Description: "rule is the strategy that will dictate the allowable RunAsGroup values that may be set.", + Description: "The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", Type: []string{"string"}, Format: "", }, }, - "ranges": { + "port": { SchemaProps: spec.SchemaProps{ - Description: "ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), - }, - }, - }, + Description: "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "endPort": { + SchemaProps: spec.SchemaProps{ + Description: "If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate \"NetworkPolicyEndPort\".", + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"rule"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.IDRange"}, + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, } } -func schema_k8sio_api_policy_v1beta1_RunAsUserStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.", + Description: "NetworkPolicySpec provides the specification of a NetworkPolicy", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "rule": { + "podSelector": { SchemaProps: spec.SchemaProps{ - Description: "rule is the strategy that will dictate the allowable RunAsUser values that may be set.", - Type: []string{"string"}, - Format: "", + Description: "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "ranges": { + "ingress": { SchemaProps: spec.SchemaProps{ - Description: "ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.", + Description: "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyIngressRule"), }, }, }, }, }, - }, - Required: []string{"rule"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/policy/v1beta1.IDRange"}, - } -} - -func schema_k8sio_api_policy_v1beta1_RuntimeClassStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "allowedRuntimeClassNames": { + "egress": { SchemaProps: spec.SchemaProps{ - Description: "allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", + Description: "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyEgressRule"), }, }, }, }, }, - "defaultRuntimeClassName": { + "policyTypes": { SchemaProps: spec.SchemaProps{ - Description: "defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.", - Type: []string{"string"}, - Format: "", + Description: "List of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"allowedRuntimeClassNames"}, + Required: []string{"podSelector"}, }, }, + Dependencies: []string{ + "k8s.io/api/networking/v1.NetworkPolicyEgressRule", "k8s.io/api/networking/v1.NetworkPolicyIngressRule", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_policy_v1beta1_SELinuxStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_ServiceBackendPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.", + Description: "ServiceBackendPort is the service port being referenced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "rule": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "rule is the strategy that will dictate the allowable labels that may be set.", + Description: "Name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", Type: []string{"string"}, Format: "", }, }, - "seLinuxOptions": { + "number": { SchemaProps: spec.SchemaProps{ - Description: "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + Description: "Number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \"Name\".", + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"rule"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.SELinuxOptions"}, } } -func schema_k8sio_api_policy_v1beta1_SupplementalGroupsStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + Description: "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "rule": { + "path": { SchemaProps: spec.SchemaProps{ - Description: "rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", + Description: "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".", Type: []string{"string"}, Format: "", }, }, - "ranges": { + "pathType": { SchemaProps: spec.SchemaProps{ - Description: "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), - }, - }, - }, + Description: "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types. Defaults to ImplementationSpecific.", + Type: []string{"string"}, + Format: "", + }, + }, + "backend": { + SchemaProps: spec.SchemaProps{ + Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), }, }, }, + Required: []string{"backend"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.IDRange"}, + "k8s.io/api/networking/v1beta1.IngressBackend"}, } } -func schema_k8sio_api_rbac_v1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + Description: "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "clusterRoleSelectors": { + "paths": { SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + Description: "A collection of paths that map requests to backends.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressPath"), }, }, }, }, }, }, + Required: []string{"paths"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/networking/v1beta1.HTTPIngressPath"}, } } -func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -29268,97 +31773,73 @@ func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.O }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "Standard object's metadata. 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"), }, }, - "rules": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this ClusterRole", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), - }, - }, - }, + Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressSpec"), }, }, - "aggregationRule": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1.AggregationRule"), + Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.AggregationRule", "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1beta1.IngressSpec", "k8s.io/api/networking/v1beta1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + Description: "IngressBackend describes all endpoints for a given service and port.", 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": { + "serviceName": { 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", + Description: "Specifies the name of the referenced service.", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subjects": { + "servicePort": { SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.Subject"), - }, - }, - }, + Description: "Specifies the port of the referenced service.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, - "roleRef": { + "resource": { SchemaProps: spec.SchemaProps{ - Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1.RoleRef"), + Description: "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), }, }, }, - Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, } } -func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings", + Description: "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -29377,37 +31858,31 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallbac }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard object's metadata. 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"), }, }, - "items": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.ClusterRoleBinding"), - }, - }, - }, + Description: "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressClassSpec"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1beta1.IngressClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleList is a collection of ClusterRoles", + Description: "IngressClassList is a collection of IngressClasses.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -29426,18 +31901,20 @@ func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) comm }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "Standard list metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoles", + Description: "Items is the list of IngressClasses.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.ClusterRole"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressClass"), }, }, }, @@ -29448,147 +31925,94 @@ func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1beta1.IngressClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Description: "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "verbs": { + "apiGroup": { SchemaProps: spec.SchemaProps{ - Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + Type: []string{"string"}, + Format: "", }, }, - "apiGroups": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Kind is the type of resource being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "resources": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Name is the name of resource being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "resourceNames": { + "scope": { SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\". Field can be enabled with IngressClassNamespacedParams feature gate.", + Type: []string{"string"}, + Format: "", }, }, - "nonResourceURLs": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"verbs"}, + Required: []string{"kind", "name"}, }, }, } } -func schema_k8sio_api_rbac_v1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + Description: "IngressClassSpec provides information about the class of an Ingress.", 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": { + "controller": { 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", + Description: "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "rules": { + "parameters": { SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this Role", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), - }, - }, - }, + Description: "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", + Ref: ref("k8s.io/api/networking/v1beta1.IngressClassParametersReference"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1beta1.IngressClassParametersReference"}, } } -func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + Description: "IngressList is a collection of Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -29607,228 +32031,211 @@ func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.O }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, - "subjects": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", + Description: "Items is the list of Ingress.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.Subject"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.Ingress"), }, }, }, }, }, - "roleRef": { - SchemaProps: spec.SchemaProps{ - Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1.RoleRef"), - }, - }, }, - Required: []string{"roleRef"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1beta1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBindingList is a collection of RoleBindings", + Description: "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", 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": { + "host": { 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", + Description: "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "http": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), }, }, - "items": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "http": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of RoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.RoleBinding"), - }, - }, - }, + Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, } } -func schema_k8sio_api_rbac_v1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleList is a collection of Roles", + Description: "IngressSpec describes the Ingress the user wishes to exist.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "ingressClassName": { 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", + Description: "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "backend": { 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: "", + Description: "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", + Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), }, }, - "metadata": { + "tls": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressTLS"), + }, + }, + }, }, }, - "items": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of Roles", + Description: "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.Role"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressRule"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1beta1.IngressBackend", "k8s.io/api/networking/v1beta1.IngressRule", "k8s.io/api/networking/v1beta1.IngressTLS"}, } } -func schema_k8sio_api_rbac_v1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleRef contains information that points to the role being used", + Description: "IngressStatus describe the current state of the Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { + "loadBalancer": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced", - Type: []string{"string"}, - Format: "", + Description: "LoadBalancer contains the current status of the load-balancer.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), }, }, }, - Required: []string{"apiGroup", "kind", "name"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.LoadBalancerStatus"}, } } -func schema_k8sio_api_rbac_v1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + Description: "IngressTLS describes the transport layer security associated with an Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", - }, - }, - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { + "hosts": { SchemaProps: spec.SchemaProps{ - Description: "Name of the object being referenced.", - Type: []string{"string"}, - Format: "", + Description: "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "namespace": { + "secretName": { SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + Description: "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"kind", "name"}, }, }, } } -func schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + Description: "Overhead structure represents the resource overhead associated with running a pod.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "clusterRoleSelectors": { + "podFixed": { SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "PodFixed represents the fixed resource overhead associated with running a pod.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -29838,15 +32245,15 @@ func schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20.", + Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -29865,42 +32272,45 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref common.ReferenceCallback) co }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "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"), }, }, - "rules": { + "handler": { SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this ClusterRole", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), - }, - }, - }, + Description: "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "aggregationRule": { + "overhead": { SchemaProps: spec.SchemaProps{ - Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1alpha1.AggregationRule"), + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/\nThis field is in beta starting v1.18 and is only honored by servers that enable the PodOverhead feature.", + Ref: ref("k8s.io/api/node/v1.Overhead"), + }, + }, + "scheduling": { + SchemaProps: spec.SchemaProps{ + Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", + Ref: ref("k8s.io/api/node/v1.Scheduling"), }, }, }, + Required: []string{"handler"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.AggregationRule", "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/node/v1.Overhead", "k8s.io/api/node/v1.Scheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.20.", + Description: "RuntimeClassList is a list of RuntimeClass objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -29919,43 +32329,124 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallb }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard list metadata. 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"), }, }, - "subjects": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", + Description: "Items is a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/node/v1.RuntimeClass"), }, }, }, }, }, - "roleRef": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/node/v1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_node_v1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), + Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tolerations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, }, }, }, - Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/core/v1.Toleration"}, } } -func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1alpha1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Overhead structure represents the resource overhead associated with running a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podFixed": { + SchemaProps: spec.SchemaProps{ + Description: "PodFixed represents the fixed resource overhead associated with running a pod.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_node_v1alpha1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.20.", + Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -29974,37 +32465,32 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceC }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "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"), }, }, - "items": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRoleBinding"), - }, - }, - }, + Description: "Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClassSpec"), }, }, }, - Required: []string{"items"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/node/v1alpha1.RuntimeClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20.", + Description: "RuntimeClassList is a list of RuntimeClass objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -30023,18 +32509,20 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "Standard list metadata. 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 a list of ClusterRoles", + Description: "Items is a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRole"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClass"), }, }, }, @@ -30045,129 +32533,118 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/node/v1alpha1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Description: "RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "verbs": { + "runtimeHandler": { SchemaProps: spec.SchemaProps{ - Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "apiGroups": { + "overhead": { SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", + Ref: ref("k8s.io/api/node/v1alpha1.Overhead"), }, }, - "resources": { + "scheduling": { SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", + Ref: ref("k8s.io/api/node/v1alpha1.Scheduling"), }, }, - "resourceNames": { + }, + Required: []string{"runtimeHandler"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/node/v1alpha1.Overhead", "k8s.io/api/node/v1alpha1.Scheduling"}, + } +} + +func schema_k8sio_api_node_v1alpha1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "nonResourceURLs": { + "tolerations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Toleration"), }, }, }, }, }, }, - Required: []string{"verbs"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.Toleration"}, } } -func schema_k8sio_api_rbac_v1alpha1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1beta1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.20.", + Description: "Overhead structure represents the resource overhead associated with running a pod.", 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "rules": { + "podFixed": { SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this Role", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "PodFixed represents the fixed resource overhead associated with running a pod.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -30177,15 +32654,15 @@ func schema_k8sio_api_rbac_v1alpha1_Role(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1beta1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20.", + Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -30204,43 +32681,45 @@ func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) co }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "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"), }, }, - "subjects": { + "handler": { SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), - }, - }, - }, + Description: "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "roleRef": { + "overhead": { SchemaProps: spec.SchemaProps{ - Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", + Ref: ref("k8s.io/api/node/v1beta1.Overhead"), + }, + }, + "scheduling": { + SchemaProps: spec.SchemaProps{ + Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", + Ref: ref("k8s.io/api/node/v1beta1.Scheduling"), }, }, }, - Required: []string{"roleRef"}, + Required: []string{"handler"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/node/v1beta1.Overhead", "k8s.io/api/node/v1beta1.Scheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20.", + Description: "RuntimeClassList is a list of RuntimeClass objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -30259,18 +32738,20 @@ func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "Standard list metadata. 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 a list of RoleBindings", + Description: "Items is a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleBinding"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/node/v1beta1.RuntimeClass"), }, }, }, @@ -30281,169 +32762,112 @@ func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/node/v1beta1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1alpha1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1beta1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20.", + Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", 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: "", + "nodeSelector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, }, - }, - "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: "", + Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + "tolerations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of Roles", + Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.Role"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Toleration"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/core/v1.Toleration"}, } } -func schema_k8sio_api_rbac_v1alpha1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1_Eviction(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleRef contains information that points to the role being used", + Description: "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiGroup": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced", + 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: "", }, }, - "kind": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced", + 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: "", }, }, - "name": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced", - Type: []string{"string"}, - Format: "", + Description: "ObjectMeta describes the pod that is being evicted.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - }, - Required: []string{"apiGroup", "kind", "name"}, - }, - }, - } -} - -func schema_k8sio_api_rbac_v1alpha1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the object being referenced.", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"kind", "name"}, - }, - }, - } -} - -func schema_k8sio_api_rbac_v1beta1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "clusterRoleSelectors": { + "deleteOptions": { SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - }, + Description: "DeleteOptions may be provided", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1_PodDisruptionBudget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20.", + Description: "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -30462,42 +32886,38 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) com }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "Standard object's metadata. 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"), }, }, - "rules": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this ClusterRole", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), - }, - }, - }, + Description: "Specification of the desired behavior of the PodDisruptionBudget.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudgetSpec"), }, }, - "aggregationRule": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1beta1.AggregationRule"), + Description: "Most recently observed status of the PodDisruptionBudget.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudgetStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.AggregationRule", "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/policy/v1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.20.", + Description: "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -30516,328 +32936,242 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallba }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, - "subjects": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", + Description: "Items is a list of PodDisruptionBudgets", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudget"), }, }, }, }, }, - "roleRef": { - SchemaProps: spec.SchemaProps{ - Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), - }, - }, }, - Required: []string{"roleRef"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/policy/v1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.20.", + Description: "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "minAvailable": { 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: "", + Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, - "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: "", + "selector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "replace", + }, }, - }, - "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "items": { + "maxUnavailable": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRoleBinding"), - }, - }, - }, + Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, } } -func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20.", + Description: "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", 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": { + "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", + Type: []string{"integer"}, + Format: "int64", }, }, - "items": { + "disruptedPods": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoles", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRole"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, }, }, }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_rbac_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "verbs": { + "disruptionsAllowed": { SchemaProps: spec.SchemaProps{ - Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Number of pod disruptions that are currently allowed.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "apiGroups": { + "currentHealthy": { SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "current number of healthy pods", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "resources": { + "desiredHealthy": { SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "minimum desired number of healthy pods", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "resourceNames": { + "expectedPods": { SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, + Description: "total number of pods counted by this disruption budget", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", }, }, - }, - "nonResourceURLs": { SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + Description: "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), }, }, }, }, }, }, - Required: []string{"verbs"}, + Required: []string{"disruptionsAllowed", "currentHealthy", "desiredHealthy", "expectedPods"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_AllowedCSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.20.", + Description: "AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "name": { 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", + Description: "Name is the registered name of the CSI driver", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_api_policy_v1beta1_AllowedFlexVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { 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", + Description: "driver is the name of the Flexvolume driver.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this Role", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), - }, - }, - }, - }, - }, }, + Required: []string{"driver"}, }, }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20.", + Description: "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "pathPrefix": { 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", + Description: "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "readOnly": { 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"}, + Description: "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.", + Type: []string{"boolean"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subjects": { - SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), - }, - }, - }, - }, - }, - "roleRef": { - SchemaProps: spec.SchemaProps{ - Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), - }, - }, }, - Required: []string{"roleRef"}, }, }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_Eviction(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20.", + Description: "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -30856,163 +33190,126 @@ func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "ObjectMeta describes the pod that is being evicted.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "deleteOptions": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of RoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.RoleBinding"), - }, - }, - }, + Description: "DeleteOptions may be provided", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_FSGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleList is a collection of Roles Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20.", + Description: "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", 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": { + "rule": { 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", + Description: "rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { + "ranges": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of Roles", + Description: "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.Role"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/policy/v1beta1.IDRange"}, } } -func schema_k8sio_api_rbac_v1beta1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_HostPortRange(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleRef contains information that points to the role being used", + Description: "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { + "min": { SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced", - Type: []string{"string"}, - Format: "", + Description: "min is the start of the range, inclusive.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "name": { + "max": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced", - Type: []string{"string"}, - Format: "", + Description: "max is the end of the range, inclusive.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"apiGroup", "kind", "name"}, + Required: []string{"min", "max"}, }, }, } } -func schema_k8sio_api_rbac_v1beta1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_IDRange(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + Description: "IDRange provides a min/max of an allowed range of IDs.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", - }, - }, - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { + "min": { SchemaProps: spec.SchemaProps{ - Description: "Name of the object being referenced.", - Type: []string{"string"}, - Format: "", + Description: "min is the start of the range, inclusive.", + Default: 0, + Type: []string{"integer"}, + Format: "int64", }, }, - "namespace": { + "max": { SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", + Description: "max is the end of the range, inclusive.", + Default: 0, + Type: []string{"integer"}, + Format: "int64", }, }, }, - Required: []string{"kind", "name"}, + Required: []string{"min", "max"}, }, }, } } -func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + Description: "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -31032,51 +33329,37 @@ func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "globalDefault": { - SchemaProps: spec.SchemaProps{ - Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "description": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - Type: []string{"string"}, - Format: "", + Description: "Specification of the desired behavior of the PodDisruptionBudget.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec"), }, }, - "preemptionPolicy": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", - Type: []string{"string"}, - Format: "", + Description: "Most recently observed status of the PodDisruptionBudget.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus"), }, }, }, - Required: []string{"value"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityClassList is a collection of priority classes.", + Description: "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -31095,18 +33378,20 @@ func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallba }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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 PriorityClasses", + Description: "items list individual PodDisruptionBudget objects", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/scheduling/v1.PriorityClass"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudget"), }, }, }, @@ -31117,128 +33402,147 @@ func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/scheduling/v1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/policy/v1beta1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + Description: "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", 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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "value": { + "minAvailable": { SchemaProps: spec.SchemaProps{ - Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", - Type: []string{"integer"}, - Format: "int32", + Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, - "globalDefault": { - SchemaProps: spec.SchemaProps{ - Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", - Type: []string{"boolean"}, - Format: "", + "selector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "replace", + }, }, - }, - "description": { SchemaProps: spec.SchemaProps{ - Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - Type: []string{"string"}, - Format: "", + Description: "Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "preemptionPolicy": { + "maxUnavailable": { SchemaProps: spec.SchemaProps{ - Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", - Type: []string{"string"}, - Format: "", + Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, }, - Required: []string{"value"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, } } -func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityClassList is a collection of priority classes.", + Description: "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "observedGeneration": { 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: "", + Description: "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", + Type: []string{"integer"}, + Format: "int64", }, }, - "apiVersion": { + "disruptedPods": { 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: "", + Description: "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, }, }, - "metadata": { + "disruptionsAllowed": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Number of pod disruptions that are currently allowed.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "items": { + "currentHealthy": { SchemaProps: spec.SchemaProps{ - Description: "items is the list of PriorityClasses", + Description: "current number of healthy pods", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "desiredHealthy": { + SchemaProps: spec.SchemaProps{ + Description: "minimum desired number of healthy pods", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "expectedPods": { + SchemaProps: spec.SchemaProps{ + Description: "total number of pods counted by this disruption budget", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/scheduling/v1alpha1.PriorityClass"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), }, }, }, }, }, }, - Required: []string{"items"}, + Required: []string{"disruptionsAllowed", "currentHealthy", "desiredHealthy", "expectedPods"}, }, }, Dependencies: []string{ - "k8s.io/api/scheduling/v1alpha1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + Description: "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -31258,51 +33562,30 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallb "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), }, }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "globalDefault": { - SchemaProps: spec.SchemaProps{ - Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - Type: []string{"string"}, - Format: "", - }, - }, - "preemptionPolicy": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", - Type: []string{"string"}, - Format: "", + Description: "spec defines the policy enforced.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.PodSecurityPolicySpec"), }, }, }, - Required: []string{"value"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/policy/v1beta1.PodSecurityPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodSecurityPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityClassList is a collection of priority classes.", + Description: "PodSecurityPolicyList is a list of PodSecurityPolicy objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -31321,18 +33604,20 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceC }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard list metadata. 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 PriorityClasses", + Description: "items is a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/scheduling/v1beta1.PriorityClass"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.PodSecurityPolicy"), }, }, }, @@ -31343,405 +33628,488 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/scheduling/v1beta1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/policy/v1beta1.PodSecurityPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_settings_v1alpha1_PodPreset(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodPreset is a policy resource that defines additional runtime requirements for a Pod.", + Description: "PodSecurityPolicySpec defines the policy enforced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "privileged": { 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"}, + Description: "privileged determines if a pod can request to be run as privileged.", + Type: []string{"boolean"}, Format: "", }, }, - "apiVersion": { + "defaultAddCapabilities": { 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"}, + Description: "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "requiredDropCapabilities": { + SchemaProps: spec.SchemaProps{ + Description: "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allowedCapabilities": { + SchemaProps: spec.SchemaProps{ + Description: "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumes": { + SchemaProps: spec.SchemaProps{ + Description: "volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "hostNetwork": { + SchemaProps: spec.SchemaProps{ + Description: "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", + Type: []string{"boolean"}, Format: "", }, }, - "metadata": { + "hostPorts": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "hostPorts determines which host port ranges are allowed to be exposed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.HostPortRange"), + }, + }, + }, }, }, - "spec": { + "hostPID": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/settings/v1alpha1.PodPresetSpec"), + Description: "hostPID determines if the policy allows the use of HostPID in the pod spec.", + Type: []string{"boolean"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/settings/v1alpha1.PodPresetSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_settings_v1alpha1_PodPresetList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodPresetList is a list of PodPreset objects.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "hostIPC": { 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"}, + Description: "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", + Type: []string{"boolean"}, Format: "", }, }, - "apiVersion": { + "seLinux": { 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"}, + Description: "seLinux is the strategy that will dictate the allowable labels that may be set.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.SELinuxStrategyOptions"), + }, + }, + "runAsUser": { + SchemaProps: spec.SchemaProps{ + Description: "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions"), + }, + }, + "runAsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled.", + Ref: ref("k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions"), + }, + }, + "supplementalGroups": { + SchemaProps: spec.SchemaProps{ + Description: "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions"), + }, + }, + "fsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.FSGroupStrategyOptions"), + }, + }, + "readOnlyRootFilesystem": { + SchemaProps: spec.SchemaProps{ + Description: "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", + Type: []string{"boolean"}, Format: "", }, }, - "metadata": { + "defaultAllowPrivilegeEscalation": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", + Type: []string{"boolean"}, + Format: "", }, }, - "items": { + "allowPrivilegeEscalation": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", + Description: "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowedHostPaths": { + SchemaProps: spec.SchemaProps{ + Description: "allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/settings/v1alpha1.PodPreset"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.AllowedHostPath"), }, }, }, }, }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/settings/v1alpha1.PodPreset", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_settings_v1alpha1_PodPresetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodPresetSpec is a description of a pod preset.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "selector": { + "allowedFlexVolumes": { SchemaProps: spec.SchemaProps{ - Description: "Selector is a label query over a set of resources, in this case pods. Required.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.AllowedFlexVolume"), + }, + }, + }, }, }, - "env": { + "allowedCSIDrivers": { SchemaProps: spec.SchemaProps{ - Description: "Env defines the collection of EnvVar to inject into containers.", + Description: "AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.AllowedCSIDriver"), }, }, }, }, }, - "envFrom": { + "allowedUnsafeSysctls": { SchemaProps: spec.SchemaProps{ - Description: "EnvFrom defines the collection of EnvFromSource to inject into containers.", + Description: "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "volumes": { + "forbiddenSysctls": { SchemaProps: spec.SchemaProps{ - Description: "Volumes defines the collection of Volume to inject into the pod.", + Description: "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Volume"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "volumeMounts": { + "allowedProcMountTypes": { SchemaProps: spec.SchemaProps{ - Description: "VolumeMounts defines the collection of VolumeMount to inject into containers.", + Description: "AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, + "runtimeClass": { + SchemaProps: spec.SchemaProps{ + Description: "runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.", + Ref: ref("k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions"), + }, + }, }, + Required: []string{"seLinux", "runAsUser", "supplementalGroups", "fsGroup"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/policy/v1beta1.AllowedCSIDriver", "k8s.io/api/policy/v1beta1.AllowedFlexVolume", "k8s.io/api/policy/v1beta1.AllowedHostPath", "k8s.io/api/policy/v1beta1.FSGroupStrategyOptions", "k8s.io/api/policy/v1beta1.HostPortRange", "k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions", "k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions", "k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions", "k8s.io/api/policy/v1beta1.SELinuxStrategyOptions", "k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions"}, } } -func schema_k8sio_api_storage_v1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_RunAsGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", + Description: "RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.", 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": { + "rule": { 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", + Description: "rule is the strategy that will dictate the allowable RunAsGroup values that may be set.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { + "ranges": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the CSI Driver.", - Ref: ref("k8s.io/api/storage/v1.CSIDriverSpec"), + Description: "ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + }, + }, + }, }, }, }, - Required: []string{"spec"}, + Required: []string{"rule"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/policy/v1beta1.IDRange"}, } } -func schema_k8sio_api_storage_v1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_RunAsUserStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIDriverList is a collection of CSIDriver objects.", + Description: "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.", 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": { + "rule": { 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", + Description: "rule is the strategy that will dictate the allowable RunAsUser values that may be set.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { + "ranges": { SchemaProps: spec.SchemaProps{ - Description: "items is the list of CSIDriver", + Description: "ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1.CSIDriver"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), }, }, }, }, }, }, - Required: []string{"items"}, + Required: []string{"rule"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/policy/v1beta1.IDRange"}, } } -func schema_k8sio_api_storage_v1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_RuntimeClassStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIDriverSpec is the specification of a CSIDriver.", + Description: "RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "attachRequired": { - SchemaProps: spec.SchemaProps{ - Description: "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "podInfoOnMount": { - SchemaProps: spec.SchemaProps{ - Description: "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" iff the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "volumeLifecycleModes": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", - }, - }, + "allowedRuntimeClassNames": { SchemaProps: spec.SchemaProps{ - Description: "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.", + Description: "allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, + "defaultRuntimeClassName": { + SchemaProps: spec.SchemaProps{ + Description: "defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.", + Type: []string{"string"}, + Format: "", + }, + }, }, + Required: []string{"allowedRuntimeClassNames"}, }, }, } } -func schema_k8sio_api_storage_v1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_SELinuxStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", + Description: "SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.", 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": { + "rule": { 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", + Description: "rule is the strategy that will dictate the allowable labels that may be set.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "metadata.name must be the Kubernetes node name.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { + "seLinuxOptions": { SchemaProps: spec.SchemaProps{ - Description: "spec is the specification of CSINode", - Ref: ref("k8s.io/api/storage/v1.CSINodeSpec"), + Description: "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", + Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), }, }, }, - Required: []string{"spec"}, + Required: []string{"rule"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/core/v1.SELinuxOptions"}, } } -func schema_k8sio_api_storage_v1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_SupplementalGroupsStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINodeDriver holds information about the specification of one CSI driver installed on a node", + Description: "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.", - Type: []string{"string"}, - Format: "", - }, - }, - "nodeID": { + "rule": { SchemaProps: spec.SchemaProps{ - Description: "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.", + Description: "rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", Type: []string{"string"}, Format: "", }, }, - "topologyKeys": { + "ranges": { SchemaProps: spec.SchemaProps{ - Description: "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.", + Description: "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), }, }, }, }, }, - "allocatable": { - SchemaProps: spec.SchemaProps{ - Description: "allocatable represents the volume resources of a node that are available for scheduling. This field is beta.", - Ref: ref("k8s.io/api/storage/v1.VolumeNodeResources"), - }, - }, }, - Required: []string{"name", "nodeID"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeNodeResources"}, + "k8s.io/api/policy/v1beta1.IDRange"}, } } -func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINodeList is a collection of CSINode objects.", + Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusterRoleSelectors": { + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + 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.LabelSelector"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -31760,72 +34128,102 @@ func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) commo }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "items is the list of CSINode", + Description: "Rules holds all the PolicyRules for this ClusterRole", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1.CSINode"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), }, }, }, }, }, + "aggregationRule": { + SchemaProps: spec.SchemaProps{ + Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + Ref: ref("k8s.io/api/rbac/v1.AggregationRule"), + }, + }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1.AggregationRule", "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", + Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "drivers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, + "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: "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.", + 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.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "subjects": { + SchemaProps: spec.SchemaProps{ + Description: "Subjects holds references to the objects the role applies to.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1.CSINodeDriver"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1.Subject"), }, }, }, }, }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1.RoleRef"), + }, + }, }, - Required: []string{"drivers"}, + Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSINodeDriver"}, + "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -31844,94 +34242,179 @@ func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) comm }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "provisioner": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Provisioner indicates the type of the provisioner.", + Description: "Items is a list of ClusterRoleBindings", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1.ClusterRoleBinding"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleList is a collection of ClusterRoles", + 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: "", }, }, - "parameters": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + 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.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1.ClusterRole"), }, }, }, }, }, - "reclaimPolicy": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { SchemaProps: spec.SchemaProps{ - Description: "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", - Type: []string{"string"}, - Format: "", + Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. '*' represents all verbs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "mountOptions": { + "apiGroups": { SchemaProps: spec.SchemaProps{ - Description: "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "allowVolumeExpansion": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "AllowVolumeExpansion shows whether the storage class allow volume expand", - Type: []string{"boolean"}, - Format: "", + Description: "Resources is a list of resources this rule applies to. '*' represents all resources.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "volumeBindingMode": { + "resourceNames": { SchemaProps: spec.SchemaProps{ - Description: "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.", - Type: []string{"string"}, - Format: "", + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "allowedTopologies": { + "nonResourceURLs": { SchemaProps: spec.SchemaProps{ - Description: "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.", + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.TopologySelectorTerm"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"provisioner"}, + Required: []string{"verbs"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.TopologySelectorTerm", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StorageClassList is a collection of storage classes.", + Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -31950,37 +34433,38 @@ func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of StorageClasses", + Description: "Rules holds all the PolicyRules for this Role", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1.StorageClass"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -31999,36 +34483,46 @@ func schema_k8sio_api_storage_v1_VolumeAttachment(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "spec": { + "subjects": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", - Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSpec"), + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1.Subject"), + }, + }, + }, }, }, - "status": { + "roleRef": { SchemaProps: spec.SchemaProps{ - Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentStatus"), + Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1.RoleRef"), }, }, }, - Required: []string{"spec"}, + Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeAttachmentSpec", "k8s.io/api/storage/v1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", + Description: "RoleBindingList is a collection of RoleBindings", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32047,18 +34541,20 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallba }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's 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 VolumeAttachments", + Description: "Items is a list of RoleBindings", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1.VolumeAttachment"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1.RoleBinding"), }, }, }, @@ -32069,177 +34565,243 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Description: "RoleList is a collection of Roles", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "persistentVolumeName": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Name of the persistent volume to attach.", + 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: "", }, }, - "inlineVolumeSpec": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + 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.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of Roles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1.Role"), + }, + }, + }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec"}, + "k8s.io/api/rbac/v1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + Description: "RoleRef contains information that points to the role being used", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "attacher": { + "apiGroup": { SchemaProps: spec.SchemaProps{ - Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + Description: "APIGroup is the group for the resource being referenced", + Default: "", Type: []string{"string"}, Format: "", }, }, - "source": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Source represents the volume that should be attached.", - Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSource"), + Description: "Kind is the type of resource being referenced", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "nodeName": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "The node that the volume should be attached to.", + Description: "Name is the name of resource being referenced", + Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"attacher", "source", "nodeName"}, + Required: []string{"apiGroup", "kind", "name"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, }, }, - Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeAttachmentSource"}, } } -func schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "attached": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Type: []string{"boolean"}, + Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "attachmentMetadata": { + "apiGroup": { SchemaProps: spec.SchemaProps{ - Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", + Type: []string{"string"}, + Format: "", }, }, - "attachError": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1.VolumeError"), + Description: "Name of the object being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "detachError": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1.VolumeError"), + Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"attached"}, + Required: []string{"kind", "name"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, }, }, - Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeError"}, } } -func schema_k8sio_api_storage_v1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeError captures an error encountered during a volume operation.", + Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "time": { - SchemaProps: spec.SchemaProps{ - Description: "Time the error was encountered.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "message": { + "clusterRoleSelectors": { SchemaProps: spec.SchemaProps{ - Description: "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.", - Type: []string{"string"}, - Format: "", + Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + 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.LabelSelector"), + }, + }, + }, }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_storage_v1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeNodeResources is a set of resource limits for scheduling of volumes.", + Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "count": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is not specified, then the supported number of volumes on this node is unbounded.", - Type: []string{"integer"}, - Format: "int32", + 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.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this ClusterRole", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), + }, + }, + }, + }, + }, + "aggregationRule": { + SchemaProps: spec.SchemaProps{ + Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + Ref: ref("k8s.io/api/rbac/v1alpha1.AggregationRule"), }, }, }, }, }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.AggregationRule", "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32258,36 +34820,46 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref common.ReferenceCall }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "spec": { + "subjects": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec"), + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + }, + }, + }, }, }, - "status": { + "roleRef": { SchemaProps: spec.SchemaProps{ - Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus"), + Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), }, }, }, - Required: []string{"spec"}, + Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec", "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", + Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32306,18 +34878,20 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.Reference }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's 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 VolumeAttachments", + Description: "Items is a list of ClusterRoleBindings", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachment"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRoleBinding"), }, }, }, @@ -32328,157 +34902,205 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Description: "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "persistentVolumeName": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Name of the persistent volume to attach.", + 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: "", }, }, - "inlineVolumeSpec": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + 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: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec"}, - } -} - -func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "attacher": { - SchemaProps: spec.SchemaProps{ - Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", - Type: []string{"string"}, - Format: "", - }, - }, - "source": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Source represents the volume that should be attached.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"), + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "nodeName": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "The node that the volume should be attached to.", - Type: []string{"string"}, - Format: "", + Description: "Items is a list of ClusterRoles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRole"), + }, + }, + }, }, }, }, - Required: []string{"attacher", "source", "nodeName"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"}, + "k8s.io/api/rbac/v1alpha1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "attached": { + "verbs": { SchemaProps: spec.SchemaProps{ - Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Type: []string{"boolean"}, - Format: "", + Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. '*' represents all verbs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "attachmentMetadata": { + "apiGroups": { SchemaProps: spec.SchemaProps{ - Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "attachError": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), + Description: "Resources is a list of resources this rule applies to. '*' represents all resources.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "detachError": { + "resourceNames": { SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"attached"}, + Required: []string{"verbs"}, }, }, - Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeError"}, } } -func schema_k8sio_api_storage_v1alpha1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeError captures an error encountered during a volume operation.", + Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "time": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Time the error was encountered.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + 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: "", }, }, - "message": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.", + 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.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this Role", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", + Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32497,30 +35119,46 @@ func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) co }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "spec": { + "subjects": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the CSI Driver.", - Ref: ref("k8s.io/api/storage/v1beta1.CSIDriverSpec"), + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), }, }, }, - Required: []string{"spec"}, + Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIDriverList is a collection of CSIDriver objects.", + Description: "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32539,18 +35177,20 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's 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 CSIDriver", + Description: "Items is a list of RoleBindings", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1beta1.CSIDriver"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.RoleBinding"), }, }, }, @@ -32561,148 +35201,233 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1alpha1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIDriverSpec is the specification of a CSIDriver.", + Description: "RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "attachRequired": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.", - Type: []string{"boolean"}, + 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: "", }, }, - "podInfoOnMount": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" iff the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.", - Type: []string{"boolean"}, + 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: "", }, }, - "volumeLifecycleModes": { + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { SchemaProps: spec.SchemaProps{ - Description: "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.", + Description: "Items is a list of Roles", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.Role"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. See the release notes for more information. CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", + Description: "RoleRef contains information that points to the role being used", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the group for the resource being referenced", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, "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", + Description: "Kind is the type of resource being referenced", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of resource being referenced", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"apiGroup", "kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_rbac_v1alpha1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + Default: "", 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", + Description: "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "metadata.name must be the Kubernetes node name.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Name of the object being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "spec": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "spec is the specification of CSINode", - Ref: ref("k8s.io/api/storage/v1beta1.CSINodeSpec"), + Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_rbac_v1beta1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusterRoleSelectors": { + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + 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.LabelSelector"), + }, + }, + }, }, }, }, - Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINodeDriver holds information about the specification of one CSI driver installed on a node", + Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.", + 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: "", }, }, - "nodeID": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.", + 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: "", }, }, - "topologyKeys": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.", + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this ClusterRole", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), }, }, }, }, }, - "allocatable": { + "aggregationRule": { SchemaProps: spec.SchemaProps{ - Description: "allocatable represents the volume resources of a node that are available for scheduling.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeNodeResources"), + Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + Ref: ref("k8s.io/api/rbac/v1beta1.AggregationRule"), }, }, }, - Required: []string{"name", "nodeID"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeNodeResources"}, + "k8s.io/api/rbac/v1beta1.AggregationRule", "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINodeList is a collection of CSINode objects.", + Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32721,72 +35446,97 @@ func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "subjects": { SchemaProps: spec.SchemaProps{ - Description: "items is the list of CSINode", + Description: "Subjects holds references to the objects the role applies to.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1beta1.CSINode"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), }, }, }, }, }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), + }, + }, }, - Required: []string{"items"}, + Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", + Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "drivers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, + "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: "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.", + 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.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoleBindings", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1beta1.CSINodeDriver"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRoleBinding"), }, }, }, }, }, }, - Required: []string{"drivers"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSINodeDriver"}, + "k8s.io/api/rbac/v1beta1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + Description: "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32805,94 +35555,128 @@ func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "provisioner": { - SchemaProps: spec.SchemaProps{ - Description: "Provisioner indicates the type of the provisioner.", - Type: []string{"string"}, - Format: "", + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "parameters": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "Items is a list of ClusterRoles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRole"), }, }, }, }, }, - "reclaimPolicy": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1beta1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { SchemaProps: spec.SchemaProps{ - Description: "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", - Type: []string{"string"}, - Format: "", + Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. '*' represents all verbs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "mountOptions": { + "apiGroups": { SchemaProps: spec.SchemaProps{ - Description: "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "allowVolumeExpansion": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "AllowVolumeExpansion shows whether the storage class allow volume expand", - Type: []string{"boolean"}, - Format: "", + Description: "Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "volumeBindingMode": { + "resourceNames": { SchemaProps: spec.SchemaProps{ - Description: "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.", - Type: []string{"string"}, - Format: "", + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "allowedTopologies": { + "nonResourceURLs": { SchemaProps: spec.SchemaProps{ - Description: "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.", + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.TopologySelectorTerm"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"provisioner"}, + Required: []string{"verbs"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.TopologySelectorTerm", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StorageClassList is a collection of storage classes.", + Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32911,37 +35695,38 @@ func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallb }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of StorageClasses", + Description: "Rules holds all the PolicyRules for this Role", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1beta1.StorageClass"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32960,36 +35745,46 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallb }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "spec": { + "subjects": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSpec"), + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), + }, + }, + }, }, }, - "status": { + "roleRef": { SchemaProps: spec.SchemaProps{ - Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentStatus"), + Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), }, }, }, - Required: []string{"spec"}, + Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeAttachmentSpec", "k8s.io/api/storage/v1beta1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", + Description: "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -33008,18 +35803,20 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceC }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's 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 VolumeAttachments", + Description: "Items is a list of RoleBindings", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachment"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.RoleBinding"), }, }, }, @@ -33030,262 +35827,331 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1beta1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Description: "RoleList is a collection of Roles Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "persistentVolumeName": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Name of the persistent volume to attach.", + 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: "", }, }, - "inlineVolumeSpec": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + 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.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of Roles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.Role"), + }, + }, + }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec"}, + "k8s.io/api/rbac/v1beta1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + Description: "RoleRef contains information that points to the role being used", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "attacher": { + "apiGroup": { SchemaProps: spec.SchemaProps{ - Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + Description: "APIGroup is the group for the resource being referenced", + Default: "", Type: []string{"string"}, Format: "", }, }, - "source": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Source represents the volume that should be attached.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSource"), + Description: "Kind is the type of resource being referenced", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "nodeName": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "The node that the volume should be attached to.", + Description: "Name is the name of resource being referenced", + Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"attacher", "source", "nodeName"}, + Required: []string{"apiGroup", "kind", "name"}, }, }, - Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeAttachmentSource"}, } } -func schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "attached": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Type: []string{"boolean"}, + Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "attachmentMetadata": { + "apiGroup": { SchemaProps: spec.SchemaProps{ - Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", + Type: []string{"string"}, + Format: "", }, }, - "attachError": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + Description: "Name of the object being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "detachError": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"attached"}, + Required: []string{"kind", "name"}, }, }, - Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeError"}, } } -func schema_k8sio_api_storage_v1beta1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeError captures an error encountered during a volume operation.", + Description: "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "time": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Time the error was encountered.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + 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: "", }, }, - "message": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.", + 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: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeNodeResources is a set of resource limits for scheduling of volumes.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "count": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is nil, then the supported number of volumes on this node is unbounded.", + Description: "Standard object's metadata. 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"), + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, + "globalDefault": { + SchemaProps: spec.SchemaProps{ + Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + Type: []string{"string"}, + Format: "", + }, + }, + "preemptionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + Type: []string{"string"}, + Format: "", + }, + }, }, + Required: []string{"value"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConversionRequest describes the conversion request parameters.", + Description: "PriorityClassList is a collection of priority classes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "uid": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are otherwise identical (parallel requests, etc). The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", + 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: "", }, }, - "desiredAPIVersion": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "desiredAPIVersion is the version to convert given objects to. e.g. \"myapi.example.com/v1\"", + 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: "", }, }, - "objects": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "objects is the list of custom resource objects to be converted.", + Description: "Standard list metadata 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 PriorityClasses", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/scheduling/v1.PriorityClass"), }, }, }, }, }, }, - Required: []string{"uid", "desiredAPIVersion", "objects"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/api/scheduling/v1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConversionResponse describes a conversion response.", + Description: "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "uid": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "uid is an identifier for the individual request/response. This should be copied over from the corresponding `request.uid`.", + 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: "", }, }, - "convertedObjects": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, + 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: "", }, }, - "result": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + Description: "Standard object's metadata. 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"), + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "globalDefault": { + SchemaProps: spec.SchemaProps{ + Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + Type: []string{"string"}, + Format: "", + }, + }, + "preemptionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"uid", "convertedObjects", "result"}, + Required: []string{"value"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConversionReview describes a conversion request/response.", + Description: "PriorityClassList is a collection of priority classes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -33302,116 +36168,107 @@ func schema_pkg_apis_apiextensions_v1_ConversionReview(ref common.ReferenceCallb Format: "", }, }, - "request": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "request describes the attributes for the conversion request.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest"), + Description: "Standard list metadata 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"), }, }, - "response": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "response describes the attributes for the conversion response.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"), + Description: "items is the list of PriorityClasses", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/scheduling/v1alpha1.PriorityClass"), + }, + }, + }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"}, + "k8s.io/api/scheduling/v1alpha1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceColumnDefinition specifies a column for server side printing.", + Description: "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is a human readable name for the column.", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + 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: "", }, }, - "format": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + 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: "", }, }, - "description": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "description is a human readable description of this column.", - Type: []string{"string"}, - Format: "", + Description: "Standard object's metadata. 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"), }, }, - "priority": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.", + Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "jsonPath": { + "globalDefault": { SchemaProps: spec.SchemaProps{ - Description: "jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", - Type: []string{"string"}, + Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + Type: []string{"boolean"}, Format: "", }, }, - }, - Required: []string{"name", "type", "jsonPath"}, - }, - }, - } -} - -func schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CustomResourceConversion describes how to convert different versions of a CR.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "strategy": { + "description": { SchemaProps: spec.SchemaProps{ - Description: "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.", + Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", Type: []string{"string"}, Format: "", }, }, - "webhook": { + "preemptionPolicy": { SchemaProps: spec.SchemaProps{ - Description: "webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"), + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"strategy"}, + Required: []string{"value"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.", + Description: "PriorityClassList is a collection of priority classes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -33430,85 +36287,83 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.Refere }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "spec describes how the user wants the resources to appear", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec"), + Description: "Standard list metadata 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"), }, }, - "status": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "status indicates the actual state of the CustomResourceDefinition", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus"), + Description: "items is the list of PriorityClasses", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/scheduling/v1beta1.PriorityClass"), + }, + }, + }, }, }, }, - Required: []string{"spec"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/scheduling/v1beta1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionCondition contains details for the current condition of this pod.", + Description: "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of the condition. Types include Established, NamesAccepted and Terminating.", + 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: "", }, }, - "status": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "status is the status of the condition. Can be True, False, Unknown.", + 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: "", }, }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "lastTransitionTime last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "reason is a unique, one-word, CamelCase reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", + Description: "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. 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"), }, }, - "message": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "message is a human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", + Description: "Specification of the CSI Driver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.CSIDriverSpec"), }, }, }, - Required: []string{"type", "status"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/storage/v1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", + Description: "CSIDriverList is a collection of CSIDriver objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -33527,17 +36382,20 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.Re }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard list metadata 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 list individual CustomResourceDefinition objects", + Description: "items is the list of CSIDriver", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.CSIDriver"), }, }, }, @@ -33548,962 +36406,1305 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/storage/v1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", + Description: "CSIDriverSpec is the specification of a CSIDriver.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "plural": { + "attachRequired": { SchemaProps: spec.SchemaProps{ - Description: "plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.", - Type: []string{"string"}, + Description: "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable.", + Type: []string{"boolean"}, Format: "", }, }, - "singular": { + "podInfoOnMount": { SchemaProps: spec.SchemaProps{ - Description: "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.", - Type: []string{"string"}, + Description: "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable.", + Type: []string{"boolean"}, Format: "", }, }, - "shortNames": { + "volumeLifecycleModes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.", + Description: "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.\n\nThis field is immutable.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "kind": { + "storageCapacity": { SchemaProps: spec.SchemaProps{ - Description: "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.", - Type: []string{"string"}, + Description: "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field is immutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.", + Type: []string{"boolean"}, Format: "", }, }, - "listKind": { + "fsGroupPolicy": { SchemaProps: spec.SchemaProps{ - Description: "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".", + Description: "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is beta, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.\n\nThis field is immutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", Type: []string{"string"}, Format: "", }, }, - "categories": { + "tokenRequests": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.", + Description: "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\": {\n \"token\": ,\n \"expirationTimestamp\": ,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.TokenRequest"), }, }, }, }, }, + "requiresRepublish": { + SchemaProps: spec.SchemaProps{ + Description: "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, - Required: []string{"plural", "kind"}, }, }, + Dependencies: []string{ + "k8s.io/api/storage/v1.TokenRequest"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionSpec describes how a user wants their resource to appear", + Description: "CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "group": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).", + 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: "", }, }, - "names": { - SchemaProps: spec.SchemaProps{ - Description: "names specify the resource and kind names for the custom resource.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), - }, - }, - "scope": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`.", + 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: "", }, }, - "versions": { - SchemaProps: spec.SchemaProps{ - Description: "versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"), - }, - }, - }, - }, - }, - "conversion": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "conversion defines conversion settings for the CRD.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion"), + Description: "metadata.name must be the Kubernetes node name.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "preserveUnknownFields": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", - Type: []string{"boolean"}, - Format: "", + Description: "spec is the specification of CSINode", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.CSINodeSpec"), }, }, }, - Required: []string{"group", "names", "scope", "versions"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"}, + "k8s.io/api/storage/v1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", + Description: "CSINodeDriver holds information about the specification of one CSI driver installed on a node", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "conditions": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "conditions indicate state for particular aspects of a CustomResourceDefinition", + Description: "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeID": { + SchemaProps: spec.SchemaProps{ + Description: "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "topologyKeys": { + SchemaProps: spec.SchemaProps{ + Description: "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "acceptedNames": { + "allocatable": { SchemaProps: spec.SchemaProps{ - Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), + Description: "allocatable represents the volume resources of a node that are available for scheduling. This field is beta.", + Ref: ref("k8s.io/api/storage/v1.VolumeNodeResources"), }, }, - "storedVersions": { + }, + Required: []string{"name", "nodeID"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.VolumeNodeResources"}, + } +} + +func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSINodeList is a collection of CSINode objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.", + 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 list metadata 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 CSINode", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.CSINode"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"}, + "k8s.io/api/storage/v1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionVersion describes a version for CRD.", + Description: "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "drivers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.", + Description: "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.CSINodeDriver"), + }, + }, + }, + }, + }, + }, + Required: []string{"drivers"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.CSINodeDriver"}, + } +} + +func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + 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: "", }, }, - "served": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "served is a flag enabling/disabling this version from being served via REST APIs", - Type: []string{"boolean"}, + 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: "", }, }, - "storage": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.", - Type: []string{"boolean"}, + Description: "Standard object's metadata. 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"), + }, + }, + "provisioner": { + SchemaProps: spec.SchemaProps{ + Description: "Provisioner indicates the type of the provisioner.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "schema": { + "parameters": { SchemaProps: spec.SchemaProps{ - Description: "schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"), + Description: "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "subresources": { + "reclaimPolicy": { SchemaProps: spec.SchemaProps{ - Description: "subresources specify what subresources this version of the defined custom resource have.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources"), + Description: "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", + Type: []string{"string"}, + Format: "", }, }, - "additionalPrinterColumns": { + "mountOptions": { SchemaProps: spec.SchemaProps{ - Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.", + Description: "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allowVolumeExpansion": { + SchemaProps: spec.SchemaProps{ + Description: "AllowVolumeExpansion shows whether the storage class allow volume expand", + Type: []string{"boolean"}, + Format: "", + }, + }, + "volumeBindingMode": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.", + Type: []string{"string"}, + Format: "", + }, + }, + "allowedTopologies": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.TopologySelectorTerm"), }, }, }, }, }, }, - Required: []string{"name", "served", "storage"}, + Required: []string{"provisioner"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"}, + "k8s.io/api/core/v1.TopologySelectorTerm", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", + Description: "StorageClassList is a collection of storage classes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "specReplicasPath": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.", + 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: "", }, }, - "statusReplicasPath": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.", + 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: "", }, }, - "labelSelectorPath": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.", - Type: []string{"string"}, - Format: "", + Description: "Standard list metadata 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 StorageClasses", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.StorageClass"), + }, + }, + }, }, }, }, - Required: []string{"specReplicasPath", "statusReplicasPath"}, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/api/storage/v1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_TokenRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", + Description: "TokenRequest contains parameters of a service account token.", Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "audience": { + SchemaProps: spec.SchemaProps{ + Description: "Audience is the intended audience of the token in \"TokenRequestSpec\". It will default to the audiences of kube apiserver.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "expirationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "ExpirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\".", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"audience"}, }, }, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "status": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"), + 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: "", }, }, - "scale": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale"), + 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 metadata. 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"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentStatus"), }, }, }, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"}, + "k8s.io/api/storage/v1.VolumeAttachmentSpec", "k8s.io/api/storage/v1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceValidation is a list of validation methods for CustomResources.", + Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "openAPIV3Schema": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + 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 list metadata 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 VolumeAttachments", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.VolumeAttachment"), + }, + }, + }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"}, + "k8s.io/api/storage/v1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExternalDocumentation allows referencing an external resource for extended documentation.", + Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "description": { + "persistentVolumeName": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Name of the persistent volume to attach.", + Type: []string{"string"}, + Format: "", }, }, - "url": { + "inlineVolumeSpec": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), }, }, }, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeSpec"}, } } -func schema_pkg_apis_apiextensions_v1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", - Type: v1.JSON{}.OpenAPISchemaType(), - Format: v1.JSON{}.OpenAPISchemaFormat(), + Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attacher": { + SchemaProps: spec.SchemaProps{ + Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source represents the volume that should be attached.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSource"), + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "The node that the volume should be attached to.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"attacher", "source", "nodeName"}, }, }, + Dependencies: []string{ + "k8s.io/api/storage/v1.VolumeAttachmentSource"}, } } -func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", + Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "id": { + "attached": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "$schema": { + "attachmentMetadata": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "$ref": { + "attachError": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1.VolumeError"), }, }, - "description": { + "detachError": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1.VolumeError"), }, }, - "type": { + }, + Required: []string{"attached"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1.VolumeError"}, + } +} + +func schema_k8sio_api_storage_v1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeError captures an error encountered during a volume operation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "time": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Time the error was encountered.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "format": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + Description: "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.", Type: []string{"string"}, Format: "", }, }, - "title": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "default": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_storage_v1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeNodeResources is a set of resource limits for scheduling of volumes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { SchemaProps: spec.SchemaProps{ - Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + Description: "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is not specified, then the supported number of volumes on this node is unbounded.", + Type: []string{"integer"}, + Format: "int32", }, }, - "maximum": { + }, + }, + }, + } +} + +func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", + 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: "", }, }, - "exclusiveMaximum": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + 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: "", }, }, - "minimum": { + "metadata": { SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", + Description: "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore 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"), }, }, - "exclusiveMinimum": { + "nodeTopology": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "maxLength": { + "storageClassName": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "minLength": { + "capacity": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "pattern": { + "maximumVolumeSize": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "maxItems": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "minItems": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "uniqueItems": { - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, - "multipleOf": { - SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", - }, - }, - "enum": { + }, + Required: []string{"storageClassName"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), - }, - }, - }, + 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: "", }, }, - "maxProperties": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + 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: "", }, }, - "minProperties": { + "metadata": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Standard list metadata 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"), }, }, - "required": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, + "items": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", }, + "x-kubernetes-list-type": "map", }, }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray"), - }, - }, - "allOf": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "Items is the list of CSIStorageCapacity objects.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1alpha1.CSIStorageCapacity"), }, }, }, }, }, - "oneOf": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1alpha1.CSIStorageCapacity", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), - }, - }, - }, + 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: "", }, }, - "anyOf": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), - }, - }, - }, + 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: "", }, }, - "not": { + "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Description: "Standard object metadata. 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"), }, }, - "properties": { + "spec": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), - }, - }, - }, + Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec"), }, }, - "additionalProperties": { + "status": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus"), }, }, - "patternProperties": { + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec", "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), - }, - }, - }, + 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: "", }, }, - "dependencies": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"), - }, - }, - }, + 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: "", }, }, - "additionalItems": { + "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + Description: "Standard list metadata 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"), }, }, - "definitions": { + "items": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "Items is the list of VolumeAttachments", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachment"), }, }, }, }, }, - "externalDocs": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1alpha1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "persistentVolumeName": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation"), + Description: "Name of the persistent volume to attach.", + Type: []string{"string"}, + Format: "", }, }, - "example": { + "inlineVolumeSpec": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), }, }, - "nullable": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeSpec"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attacher": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "x-kubernetes-preserve-unknown-fields": { + "source": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", - Type: []string{"boolean"}, - Format: "", + Description: "Source represents the volume that should be attached.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"), }, }, - "x-kubernetes-embedded-resource": { + "nodeName": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", - Type: []string{"boolean"}, + Description: "The node that the volume should be attached to.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "x-kubernetes-int-or-string": { + }, + Required: []string{"attacher", "source", "nodeName"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attached": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", + Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Default: false, Type: []string{"boolean"}, Format: "", }, }, - "x-kubernetes-list-map-keys": { + "attachmentMetadata": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "x-kubernetes-list-type": { + "attachError": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", - Type: []string{"string"}, - Format: "", + Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), }, }, - "x-kubernetes-map-type": { + "detachError": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", - Type: []string{"string"}, - Format: "", + Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), }, }, }, + Required: []string{"attached"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"}, - } -} - -func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", - Type: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), - Format: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), - }, - }, - } -} - -func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", - Type: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), - Format: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), - }, - }, + "k8s.io/api/storage/v1alpha1.VolumeError"}, } } -func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1alpha1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", - Type: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), - Format: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), + Description: "VolumeError captures an error encountered during a volume operation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "time": { + SchemaProps: spec.SchemaProps{ + Description: "Time the error was encountered.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_apiextensions_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Description: "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namespace": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "namespace is the namespace of the service. Required", + 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: "", }, }, - "name": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "name is the name of the service. Required", + 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: "", }, }, - "path": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "path is an optional URL path at which the webhook will be contacted.", - Type: []string{"string"}, - Format: "", + Description: "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. 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"), }, }, - "port": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", - Type: []string{"integer"}, - Format: "int32", + Description: "Specification of the CSI Driver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.CSIDriverSpec"), }, }, }, - Required: []string{"namespace", "name"}, + Required: []string{"spec"}, }, }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + Description: "CSIDriverList is a collection of CSIDriver objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "url": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + 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: "", }, }, - "service": { - SchemaProps: spec.SchemaProps{ - Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"), - }, - }, - "caBundle": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + 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: "byte", + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"}, - } -} - -func schema_pkg_apis_apiextensions_v1_WebhookConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "WebhookConversion describes how to call a conversion webhook", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "clientConfig": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"), + Description: "Standard list metadata 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"), }, }, - "conversionReviewVersions": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.", + Description: "items is the list of CSIDriver", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.CSIDriver"), }, }, }, }, }, }, - Required: []string{"conversionReviewVersions"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"}, + "k8s.io/api/storage/v1beta1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConversionRequest describes the conversion request parameters.", + Description: "CSIDriverSpec is the specification of a CSIDriver.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "uid": { + "attachRequired": { SchemaProps: spec.SchemaProps{ - Description: "uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are otherwise identical (parallel requests, etc). The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", - Type: []string{"string"}, + Description: "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable.", + Type: []string{"boolean"}, Format: "", }, }, - "desiredAPIVersion": { + "podInfoOnMount": { SchemaProps: spec.SchemaProps{ - Description: "desiredAPIVersion is the version to convert given objects to. e.g. \"myapi.example.com/v1\"", - Type: []string{"string"}, + Description: "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable.", + Type: []string{"boolean"}, Format: "", }, }, - "objects": { + "volumeLifecycleModes": { SchemaProps: spec.SchemaProps{ - Description: "objects is the list of custom resource objects to be converted.", + Description: "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.\n\nThis field is immutable.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - }, - Required: []string{"uid", "desiredAPIVersion", "objects"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConversionResponse describes a conversion response.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "uid": { + "storageCapacity": { SchemaProps: spec.SchemaProps{ - Description: "uid is an identifier for the individual request/response. This should be copied over from the corresponding `request.uid`.", + Description: "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field is immutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "fsGroupPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is beta, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.\n\nThis field is immutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", Type: []string{"string"}, Format: "", }, }, - "convertedObjects": { + "tokenRequests": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.", + Description: "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\": {\n \"token\": ,\n \"expirationTimestamp\": ,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.TokenRequest"), }, }, }, }, }, - "result": { + "requiresRepublish": { SchemaProps: spec.SchemaProps{ - Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + Description: "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.", + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"uid", "convertedObjects", "result"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/api/storage/v1beta1.TokenRequest"}, } } -func schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConversionReview describes a conversion request/response.", + Description: "DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. See the release notes for more information. CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -34520,227 +37721,237 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref common.Reference Format: "", }, }, - "request": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "request describes the attributes for the conversion request.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest"), + Description: "metadata.name must be the Kubernetes node name.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "response": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "response describes the attributes for the conversion response.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"), + Description: "spec is the specification of CSINode", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.CSINodeSpec"), }, }, }, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"}, + "k8s.io/api/storage/v1beta1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceColumnDefinition specifies a column for server side printing.", + Description: "CSINodeDriver holds information about the specification of one CSI driver installed on a node", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "name is a human readable name for the column.", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", - Type: []string{"string"}, - Format: "", - }, - }, - "format": { - SchemaProps: spec.SchemaProps{ - Description: "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Description: "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "description": { + "nodeID": { SchemaProps: spec.SchemaProps{ - Description: "description is a human readable description of this column.", + Description: "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "priority": { + "topologyKeys": { SchemaProps: spec.SchemaProps{ - Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.", - Type: []string{"integer"}, - Format: "int32", + Description: "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "JSONPath": { + "allocatable": { SchemaProps: spec.SchemaProps{ - Description: "JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", - Type: []string{"string"}, - Format: "", + Description: "allocatable represents the volume resources of a node that are available for scheduling.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeNodeResources"), }, }, }, - Required: []string{"name", "type", "JSONPath"}, + Required: []string{"name", "nodeID"}, }, }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.VolumeNodeResources"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceConversion describes how to convert different versions of a CR.", + Description: "CSINodeList is a collection of CSINode objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "strategy": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.", + 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: "", }, }, - "webhookClientConfig": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Required when `strategy` is set to `Webhook`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"), + 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: "", }, }, - "conversionReviewVersions": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Defaults to `[\"v1beta1\"]`.", + Description: "Standard list metadata 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 CSINode", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.CSINode"), }, }, }, }, }, }, - Required: []string{"strategy"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"}, + "k8s.io/api/storage/v1beta1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. Deprecated in v1.16, planned for removal in v1.19. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead.", + Description: "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", 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{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "spec describes how the user wants the resources to appear", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec"), + "drivers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, }, - }, - "status": { SchemaProps: spec.SchemaProps{ - Description: "status indicates the actual state of the CustomResourceDefinition", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus"), + Description: "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.CSINodeDriver"), + }, + }, + }, }, }, }, - Required: []string{"spec"}, + Required: []string{"drivers"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/storage/v1beta1.CSINodeDriver"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionCondition contains details for the current condition of this pod.", + Description: "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of the condition. Types include Established, NamesAccepted and Terminating.", + 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: "", }, }, - "status": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "status is the status of the condition. Can be True, False, Unknown.", + 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: "", }, }, - "lastTransitionTime": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "lastTransitionTime last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore 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"), }, }, - "reason": { + "nodeTopology": { SchemaProps: spec.SchemaProps{ - Description: "reason is a unique, one-word, CamelCase reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", + Description: "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "message": { + "storageClassName": { SchemaProps: spec.SchemaProps{ - Description: "message is a human-readable message indicating details about last transition.", + Description: "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", + Default: "", Type: []string{"string"}, Format: "", }, }, + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "maximumVolumeSize": { + SchemaProps: spec.SchemaProps{ + Description: "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, }, - Required: []string{"type", "status"}, + Required: []string{"storageClassName"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", + Description: "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -34759,17 +37970,28 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref comm }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard list metadata 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "items list individual CustomResourceDefinition objects", + Description: "Items is the list of CSIStorageCapacity objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.CSIStorageCapacity"), }, }, }, @@ -34780,743 +38002,3735 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref comm }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/storage/v1beta1.CSIStorageCapacity", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", + Description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "plural": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.", + 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: "", }, }, - "singular": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.", + 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: "", }, }, - "shortNames": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.", + Description: "Standard object's metadata. 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"), + }, + }, + "provisioner": { + SchemaProps: spec.SchemaProps{ + Description: "Provisioner indicates the type of the provisioner.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "parameters": { + SchemaProps: spec.SchemaProps{ + Description: "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "reclaimPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", + Type: []string{"string"}, + Format: "", + }, + }, + "mountOptions": { + SchemaProps: spec.SchemaProps{ + Description: "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "kind": { + "allowVolumeExpansion": { SchemaProps: spec.SchemaProps{ - Description: "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.", - Type: []string{"string"}, + Description: "AllowVolumeExpansion shows whether the storage class allow volume expand", + Type: []string{"boolean"}, Format: "", }, }, - "listKind": { + "volumeBindingMode": { SchemaProps: spec.SchemaProps{ - Description: "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".", + Description: "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.", Type: []string{"string"}, Format: "", }, }, - "categories": { + "allowedTopologies": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.", + Description: "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.TopologySelectorTerm"), }, }, }, }, }, }, - Required: []string{"plural", "kind"}, + Required: []string{"provisioner"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.TopologySelectorTerm", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionSpec describes how a user wants their resource to appear", + Description: "StorageClassList is a collection of storage classes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Description: "group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "version is the API version of the defined custom resource. The custom resources are served under `/apis///...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.", + 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: "", }, }, - "names": { - SchemaProps: spec.SchemaProps{ - Description: "names specify the resource and kind names for the custom resource.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), - }, - }, - "scope": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.", + 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: "", }, }, - "validation": { - SchemaProps: spec.SchemaProps{ - Description: "validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), - }, - }, - "subresources": { - SchemaProps: spec.SchemaProps{ - Description: "subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), - }, - }, - "versions": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion"), - }, - }, - }, + Description: "Standard list metadata 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"), }, }, - "additionalPrinterColumns": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", + Description: "Items is the list of StorageClasses", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.StorageClass"), }, }, }, }, }, - "conversion": { - SchemaProps: spec.SchemaProps{ - Description: "conversion defines conversion settings for the CRD.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion"), - }, - }, - "preserveUnknownFields": { - SchemaProps: spec.SchemaProps{ - Description: "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", - Type: []string{"boolean"}, - Format: "", - }, - }, }, - Required: []string{"group", "names", "scope"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"}, + "k8s.io/api/storage/v1beta1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_TokenRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", + Description: "TokenRequest contains parameters of a service account token.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "conditions indicate state for particular aspects of a CustomResourceDefinition", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition"), - }, - }, - }, - }, - }, - "acceptedNames": { + "audience": { SchemaProps: spec.SchemaProps{ - Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + Description: "Audience is the intended audience of the token in \"TokenRequestSpec\". It will default to the audiences of kube apiserver.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "storedVersions": { + "expirationSeconds": { SchemaProps: spec.SchemaProps{ - Description: "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "ExpirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\"", + Type: []string{"integer"}, + Format: "int64", }, }, }, + Required: []string{"audience"}, }, }, - Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionVersion describes a version for CRD.", + Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.", + 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: "", }, }, - "served": { - SchemaProps: spec.SchemaProps{ - Description: "served is a flag enabling/disabling this version from being served via REST APIs", - Type: []string{"boolean"}, - Format: "", - }, - }, - "storage": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.", - Type: []string{"boolean"}, + 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: "", }, }, - "schema": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + Description: "Standard object metadata. 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"), }, }, - "subresources": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSpec"), }, }, - "additionalPrinterColumns": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), - }, - }, - }, + Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentStatus"), }, }, }, - Required: []string{"name", "served", "storage"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"}, + "k8s.io/api/storage/v1beta1.VolumeAttachmentSpec", "k8s.io/api/storage/v1beta1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", + Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "specReplicasPath": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.", + 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: "", }, }, - "statusReplicasPath": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.", + 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: "", }, }, - "labelSelectorPath": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.", - Type: []string{"string"}, - Format: "", + Description: "Standard list metadata 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 VolumeAttachments", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachment"), + }, + }, + }, }, }, }, - Required: []string{"specReplicasPath", "statusReplicasPath"}, - }, - }, - } -} - -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", - Type: []string{"object"}, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "status": { + "persistentVolumeName": { SchemaProps: spec.SchemaProps{ - Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"), + Description: "Name of the persistent volume to attach.", + Type: []string{"string"}, + Format: "", }, }, - "scale": { + "inlineVolumeSpec": { SchemaProps: spec.SchemaProps{ - Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale"), + Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"}, + "k8s.io/api/core/v1.PersistentVolumeSpec"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceValidation is a list of validation methods for CustomResources.", + Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "openAPIV3Schema": { + "attacher": { SchemaProps: spec.SchemaProps{ - Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source represents the volume that should be attached.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSource"), + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "The node that the volume should be attached to.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"attacher", "source", "nodeName"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"}, + "k8s.io/api/storage/v1beta1.VolumeAttachmentSource"}, } } -func schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExternalDocumentation allows referencing an external resource for extended documentation.", + Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "description": { + "attached": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "url": { + "attachmentMetadata": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "attachError": { + SchemaProps: spec.SchemaProps{ + Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + }, + }, + "detachError": { + SchemaProps: spec.SchemaProps{ + Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + }, + }, + }, + Required: []string{"attached"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.VolumeError"}, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeError captures an error encountered during a volume operation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "time": { + SchemaProps: spec.SchemaProps{ + Description: "Time the error was encountered.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeNodeResources is a set of resource limits for scheduling of volumes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { + SchemaProps: spec.SchemaProps{ + Description: "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is nil, then the supported number of volumes on this node is unbounded.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionRequest describes the conversion request parameters.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are otherwise identical (parallel requests, etc). The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "desiredAPIVersion": { + SchemaProps: spec.SchemaProps{ + Description: "desiredAPIVersion is the version to convert given objects to. e.g. \"myapi.example.com/v1\"", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "objects": { + SchemaProps: spec.SchemaProps{ + Description: "objects is the list of custom resource objects to be converted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + }, + Required: []string{"uid", "desiredAPIVersion", "objects"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionResponse describes a conversion response.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "uid is an identifier for the individual request/response. This should be copied over from the corresponding `request.uid`.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "convertedObjects": { + SchemaProps: spec.SchemaProps{ + Description: "convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + "result": { + SchemaProps: spec.SchemaProps{ + Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + }, + Required: []string{"uid", "convertedObjects", "result"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_apiextensions_v1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionReview describes a conversion request/response.", + 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: "", + }, + }, + "request": { + SchemaProps: spec.SchemaProps{ + Description: "request describes the attributes for the conversion request.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest"), + }, + }, + "response": { + SchemaProps: spec.SchemaProps{ + Description: "response describes the attributes for the conversion response.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceColumnDefinition specifies a column for server side printing.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is a human readable name for the column.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is a human readable description of this column.", + Type: []string{"string"}, + Format: "", + }, + }, + "priority": { + SchemaProps: spec.SchemaProps{ + Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "jsonPath": { + SchemaProps: spec.SchemaProps{ + Description: "jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "type", "jsonPath"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceConversion describes how to convert different versions of a CR.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "strategy": { + SchemaProps: spec.SchemaProps{ + Description: "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "webhook": { + SchemaProps: spec.SchemaProps{ + Description: "webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"), + }, + }, + }, + Required: []string{"strategy"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.", + 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 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"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec describes how the user wants the resources to appear", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status indicates the actual state of the CustomResourceDefinition", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionCondition contains details for the current condition of this pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of the condition. Types include Established, NamesAccepted and Terminating.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the status of the condition. Can be True, False, Unknown.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason is a unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message is a human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", + 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 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 list individual CustomResourceDefinition objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "plural": { + SchemaProps: spec.SchemaProps{ + Description: "plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "singular": { + SchemaProps: spec.SchemaProps{ + Description: "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.", + Type: []string{"string"}, + Format: "", + }, + }, + "shortNames": { + SchemaProps: spec.SchemaProps{ + Description: "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "listKind": { + SchemaProps: spec.SchemaProps{ + Description: "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".", + Type: []string{"string"}, + Format: "", + }, + }, + "categories": { + SchemaProps: spec.SchemaProps{ + Description: "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"plural", "kind"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionSpec describes how a user wants their resource to appear", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "names": { + SchemaProps: spec.SchemaProps{ + Description: "names specify the resource and kind names for the custom resource.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"), + }, + }, + }, + }, + }, + "conversion": { + SchemaProps: spec.SchemaProps{ + Description: "conversion defines conversion settings for the CRD.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion"), + }, + }, + "preserveUnknownFields": { + SchemaProps: spec.SchemaProps{ + Description: "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"group", "names", "scope", "versions"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "conditions indicate state for particular aspects of a CustomResourceDefinition", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition"), + }, + }, + }, + }, + }, + "acceptedNames": { + SchemaProps: spec.SchemaProps{ + Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), + }, + }, + "storedVersions": { + SchemaProps: spec.SchemaProps{ + Description: "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionVersion describes a version for CRD.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "served": { + SchemaProps: spec.SchemaProps{ + Description: "served is a flag enabling/disabling this version from being served via REST APIs", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "deprecated": { + SchemaProps: spec.SchemaProps{ + Description: "deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "deprecationWarning": { + SchemaProps: spec.SchemaProps{ + Description: "deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.", + Type: []string{"string"}, + Format: "", + }, + }, + "schema": { + SchemaProps: spec.SchemaProps{ + Description: "schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"), + }, + }, + "subresources": { + SchemaProps: spec.SchemaProps{ + Description: "subresources specify what subresources this version of the defined custom resource have.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources"), + }, + }, + "additionalPrinterColumns": { + SchemaProps: spec.SchemaProps{ + Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "served", "storage"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "specReplicasPath": { + SchemaProps: spec.SchemaProps{ + Description: "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "statusReplicasPath": { + SchemaProps: spec.SchemaProps{ + Description: "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "labelSelectorPath": { + SchemaProps: spec.SchemaProps{ + Description: "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"specReplicasPath", "statusReplicasPath"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"), + }, + }, + "scale": { + SchemaProps: spec.SchemaProps{ + Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"}, + } +} + +func schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceValidation is a list of validation methods for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "openAPIV3Schema": { + SchemaProps: spec.SchemaProps{ + Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"}, + } +} + +func schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalDocumentation allows referencing an external resource for extended documentation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "url": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", + Type: v1.JSON{}.OpenAPISchemaType(), + Format: v1.JSON{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "$schema": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "$ref": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + Type: []string{"string"}, + Format: "", + }, + }, + "title": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "default": { + SchemaProps: spec.SchemaProps{ + Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + }, + }, + "maximum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "exclusiveMaximum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "minimum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "exclusiveMinimum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "maxLength": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minLength": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "pattern": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "maxItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "uniqueItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "multipleOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "enum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + }, + }, + }, + }, + }, + "maxProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "required": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray"), + }, + }, + "allOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "oneOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "anyOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "not": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + "properties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "additionalProperties": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + }, + }, + "patternProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "dependencies": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"), + }, + }, + }, + }, + }, + "additionalItems": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + }, + }, + "definitions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "externalDocs": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation"), + }, + }, + "example": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + }, + }, + "nullable": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-preserve-unknown-fields": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-embedded-resource": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-int-or-string": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-list-map-keys": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "x-kubernetes-list-type": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", + Type: []string{"string"}, + Format: "", + }, + }, + "x-kubernetes-map-type": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"}, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", + Type: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), + Format: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", + Type: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), + Format: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", + Type: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), + Format: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "namespace is the namespace of the service. Required", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the service. Required", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "path is an optional URL path at which the webhook will be contacted.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + Type: []string{"string"}, + Format: "", + }, + }, + "service": { + SchemaProps: spec.SchemaProps{ + Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"), + }, + }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Description: "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"}, + } +} + +func schema_pkg_apis_apiextensions_v1_WebhookConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookConversion describes how to call a conversion webhook", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clientConfig": { + SchemaProps: spec.SchemaProps{ + Description: "clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"), + }, + }, + "conversionReviewVersions": { + SchemaProps: spec.SchemaProps{ + Description: "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"conversionReviewVersions"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionRequest describes the conversion request parameters.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are otherwise identical (parallel requests, etc). The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "desiredAPIVersion": { + SchemaProps: spec.SchemaProps{ + Description: "desiredAPIVersion is the version to convert given objects to. e.g. \"myapi.example.com/v1\"", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "objects": { + SchemaProps: spec.SchemaProps{ + Description: "objects is the list of custom resource objects to be converted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + }, + Required: []string{"uid", "desiredAPIVersion", "objects"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionResponse describes a conversion response.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "uid is an identifier for the individual request/response. This should be copied over from the corresponding `request.uid`.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "convertedObjects": { + SchemaProps: spec.SchemaProps{ + Description: "convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + "result": { + SchemaProps: spec.SchemaProps{ + Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + }, + Required: []string{"uid", "convertedObjects", "result"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionReview describes a conversion request/response.", + 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: "", + }, + }, + "request": { + SchemaProps: spec.SchemaProps{ + Description: "request describes the attributes for the conversion request.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest"), + }, + }, + "response": { + SchemaProps: spec.SchemaProps{ + Description: "response describes the attributes for the conversion response.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceColumnDefinition specifies a column for server side printing.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is a human readable name for the column.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is a human readable description of this column.", + Type: []string{"string"}, + Format: "", + }, + }, + "priority": { + SchemaProps: spec.SchemaProps{ + Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "JSONPath": { + SchemaProps: spec.SchemaProps{ + Description: "JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "type", "JSONPath"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceConversion describes how to convert different versions of a CR.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "strategy": { + SchemaProps: spec.SchemaProps{ + Description: "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "webhookClientConfig": { + SchemaProps: spec.SchemaProps{ + Description: "webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Required when `strategy` is set to `Webhook`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"), + }, + }, + "conversionReviewVersions": { + SchemaProps: spec.SchemaProps{ + Description: "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Defaults to `[\"v1beta1\"]`.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"strategy"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead.", + 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 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"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec describes how the user wants the resources to appear", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status indicates the actual state of the CustomResourceDefinition", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionCondition contains details for the current condition of this pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is the type of the condition. Types include Established, NamesAccepted and Terminating.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the status of the condition. Can be True, False, Unknown.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason is a unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message is a human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", + 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 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 list individual CustomResourceDefinition objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "plural": { + SchemaProps: spec.SchemaProps{ + Description: "plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "singular": { + SchemaProps: spec.SchemaProps{ + Description: "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.", + Type: []string{"string"}, + Format: "", + }, + }, + "shortNames": { + SchemaProps: spec.SchemaProps{ + Description: "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "listKind": { + SchemaProps: spec.SchemaProps{ + Description: "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".", + Type: []string{"string"}, + Format: "", + }, + }, + "categories": { + SchemaProps: spec.SchemaProps{ + Description: "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"plural", "kind"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionSpec describes how a user wants their resource to appear", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "version is the API version of the defined custom resource. The custom resources are served under `/apis///...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.", + Type: []string{"string"}, + Format: "", + }, + }, + "names": { + SchemaProps: spec.SchemaProps{ + Description: "names specify the resource and kind names for the custom resource.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "validation": { + SchemaProps: spec.SchemaProps{ + Description: "validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + }, + }, + "subresources": { + SchemaProps: spec.SchemaProps{ + Description: "subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion"), + }, + }, + }, + }, + }, + "additionalPrinterColumns": { + SchemaProps: spec.SchemaProps{ + Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + }, + }, + }, + }, + }, + "conversion": { + SchemaProps: spec.SchemaProps{ + Description: "conversion defines conversion settings for the CRD.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion"), + }, + }, + "preserveUnknownFields": { + SchemaProps: spec.SchemaProps{ + Description: "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"group", "names", "scope"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "conditions indicate state for particular aspects of a CustomResourceDefinition", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition"), + }, + }, + }, + }, + }, + "acceptedNames": { + SchemaProps: spec.SchemaProps{ + Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + }, + }, + "storedVersions": { + SchemaProps: spec.SchemaProps{ + Description: "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinitionVersion describes a version for CRD.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "served": { + SchemaProps: spec.SchemaProps{ + Description: "served is a flag enabling/disabling this version from being served via REST APIs", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "deprecated": { + SchemaProps: spec.SchemaProps{ + Description: "deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "deprecationWarning": { + SchemaProps: spec.SchemaProps{ + Description: "deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.", + Type: []string{"string"}, + Format: "", + }, + }, + "schema": { + SchemaProps: spec.SchemaProps{ + Description: "schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + }, + }, + "subresources": { + SchemaProps: spec.SchemaProps{ + Description: "subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + }, + }, + "additionalPrinterColumns": { + SchemaProps: spec.SchemaProps{ + Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "served", "storage"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "specReplicasPath": { + SchemaProps: spec.SchemaProps{ + Description: "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "statusReplicasPath": { + SchemaProps: spec.SchemaProps{ + Description: "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "labelSelectorPath": { + SchemaProps: spec.SchemaProps{ + Description: "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"specReplicasPath", "statusReplicasPath"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"), + }, + }, + "scale": { + SchemaProps: spec.SchemaProps{ + Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceValidation is a list of validation methods for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "openAPIV3Schema": { + SchemaProps: spec.SchemaProps{ + Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalDocumentation allows referencing an external resource for extended documentation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "url": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", + Type: v1beta1.JSON{}.OpenAPISchemaType(), + Format: v1beta1.JSON{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "$schema": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "$ref": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + Type: []string{"string"}, + Format: "", + }, + }, + "title": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "default": { + SchemaProps: spec.SchemaProps{ + Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + }, + }, + "maximum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "exclusiveMaximum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "minimum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "exclusiveMinimum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "maxLength": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minLength": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "pattern": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "maxItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "uniqueItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "multipleOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "enum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + }, + }, + }, + }, + }, + "maxProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "required": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray"), + }, + }, + "allOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "oneOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "anyOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "not": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + "properties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "additionalProperties": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + }, + }, + "patternProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "dependencies": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"), + }, + }, + }, + }, + }, + "additionalItems": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + }, + }, + "definitions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "externalDocs": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation"), + }, + }, + "example": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + }, + }, + "nullable": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-preserve-unknown-fields": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-embedded-resource": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-int-or-string": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-list-map-keys": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "x-kubernetes-list-type": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", + Type: []string{"string"}, + Format: "", + }, + }, + "x-kubernetes-map-type": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"}, } } -func schema_pkg_apis_apiextensions_v1beta1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", - Type: v1beta1.JSON{}.OpenAPISchemaType(), - Format: v1beta1.JSON{}.OpenAPISchemaFormat(), + Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", + Type: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), + Format: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), }, }, } } -func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", + Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", + Type: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), + Format: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", + Type: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), + Format: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "id": { + "namespace": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "namespace is the namespace of the service. Required", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "$schema": { + "name": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "name is the name of the service. Required", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "$ref": { + "path": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "path is an optional URL path at which the webhook will be contacted.", + Type: []string{"string"}, + Format: "", }, }, - "description": { + "port": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", + Type: []string{"integer"}, + Format: "int32", }, }, - "type": { + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + Type: []string{"string"}, + Format: "", }, }, - "format": { + "service": { SchemaProps: spec.SchemaProps{ - Description: "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"), + }, + }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Description: "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"}, + } +} + +func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + Type: resource.Quantity{}.OpenAPISchemaType(), + Format: resource.Quantity{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_apimachinery_pkg_api_resource_int64Amount(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "value": { + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int64", + }, + }, + "scale": { + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"value", "scale"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIGroup contains the name, the supported versions, and the preferred version of a group.", + 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: "", }, }, - "title": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + 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: "", }, }, - "default": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + Description: "name is the name of the group.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "maximum": { + "versions": { SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", + Description: "versions are the versions supported in this group.", + 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.GroupVersionForDiscovery"), + }, + }, + }, }, }, - "exclusiveMaximum": { + "preferredVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), }, }, - "minimum": { + "serverAddressByClientCIDRs": { SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", + Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + 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.ServerAddressByClientCIDR"), + }, + }, + }, }, }, - "exclusiveMinimum": { + }, + Required: []string{"name", "versions"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + } +} + +func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + 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: "", }, }, - "maxLength": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + 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: "", }, }, - "minLength": { + "groups": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "groups is a list of APIGroup.", + 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.APIGroup"), + }, + }, + }, }, }, - "pattern": { + }, + Required: []string{"groups"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, + } +} + +func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIResource specifies the name of a resource and whether it is namespaced.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "name is the plural name of the resource.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "maxItems": { + "singularName": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "minItems": { + "namespaced": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "namespaced indicates if a resource is namespaced or not.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "uniqueItems": { + "group": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + Type: []string{"string"}, + Format: "", }, }, - "multipleOf": { + "version": { SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", + Description: "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + Type: []string{"string"}, + Format: "", }, }, - "enum": { + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "maxProperties": { + "shortNames": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + 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: "", + }, + }, + }, }, }, - "minProperties": { + "categories": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "required": { + "storageVersionHash": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "singularName", "namespaced", "kind", "verbs"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + 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: "", + }, + }, + "groupVersion": { + SchemaProps: spec.SchemaProps{ + Description: "groupVersion is the group and version this APIResourceList is for.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "resources contains the name of the resources and if they are namespaced.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), }, }, }, }, }, - "items": { + }, + Required: []string{"groupVersion", "resources"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, + } +} + +func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray"), + 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: "", }, }, - "allOf": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + 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: "", + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions are the api versions that are available.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "oneOf": { + "serverAddressByClientCIDRs": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), }, }, }, }, }, - "anyOf": { + }, + Required: []string{"versions", "serverAddressByClientCIDRs"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + } +} + +func schema_pkg_apis_meta_v1_ApplyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ApplyOptions may be provided when applying an API object. FieldManager is required for apply requests. ApplyOptions is equivalent to PatchOptions. It is provided as a convenience with documentation that speaks specifically to how the options fields relate to apply.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + 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: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "not": { + "force": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "properties": { + "fieldManager": { + SchemaProps: spec.SchemaProps{ + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"force", "fieldManager"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Condition contains details for one aspect of the current state of this API Resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type of condition in CamelCase or in foo.example.com/CamelCase.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status of the condition, one of True, False, Unknown.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), - }, - }, - }, + Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "additionalProperties": { + "reason": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + Description: "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "patternProperties": { + "message": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), - }, - }, - }, + Description: "message is a human readable message indicating details about the transition. This may be an empty string.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "dependencies": { + }, + Required: []string{"type", "status", "lastTransitionTime", "reason", "message"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CreateOptions may be provided when creating an API object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"), - }, - }, - }, + 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: "", }, }, - "additionalItems": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + 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: "", }, }, - "definitions": { + "dryRun": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "externalDocs": { + "fieldManager": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation"), + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + Type: []string{"string"}, + Format: "", }, }, - "example": { + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeleteOptions may be provided when deleting an API object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + 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: "", }, }, - "nullable": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + 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: "", }, }, - "x-kubernetes-preserve-unknown-fields": { + "gracePeriodSeconds": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", - Type: []string{"boolean"}, - Format: "", + Description: "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + Type: []string{"integer"}, + Format: "int64", }, }, - "x-kubernetes-embedded-resource": { + "preconditions": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", + Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + }, + }, + "orphanDependents": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", Type: []string{"boolean"}, Format: "", }, }, - "x-kubernetes-int-or-string": { + "propagationPolicy": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", - Type: []string{"boolean"}, + Description: "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + Type: []string{"string"}, Format: "", }, }, - "x-kubernetes-list-map-keys": { + "dryRun": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "x-kubernetes-list-type": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, + } +} + +func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", + Type: metav1.Duration{}.OpenAPISchemaType(), + Format: metav1.Duration{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_FieldsV1(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GetOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GetOptions is the standard query options to the standard REST get call.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", + 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: "", }, }, - "x-kubernetes-map-type": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", + 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: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", Type: []string{"string"}, Format: "", }, @@ -35524,591 +41738,743 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, }, }, - Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"}, } } -func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_GroupKind(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", - Type: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), - Format: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), + Description: "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "kind"}, }, }, } } -func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", - Type: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), - Format: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), + Description: "GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "resource"}, }, }, } } -func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_GroupVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", - Type: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), - Format: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), + Description: "GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "version"}, }, }, } } -func schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Description: "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namespace": { + "groupVersion": { SchemaProps: spec.SchemaProps{ - Description: "namespace is the namespace of the service. Required", + Description: "groupVersion specifies the API group and version in the form \"group/version\"", + Default: "", Type: []string{"string"}, Format: "", }, }, - "name": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "name is the name of the service. Required", + Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "path": { + }, + Required: []string{"groupVersion", "version"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupVersionKind(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { SchemaProps: spec.SchemaProps{ - Description: "path is an optional URL path at which the webhook will be contacted.", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "port": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", - Type: []string{"integer"}, - Format: "int32", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"namespace", "name"}, + Required: []string{"group", "version", "kind"}, }, }, } } -func schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_GroupVersionResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + Description: "GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "url": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "service": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "caBundle": { + "resource": { SchemaProps: spec.SchemaProps{ - Description: "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", - Type: []string{"string"}, - Format: "byte", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"group", "version", "resource"}, }, }, - Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"}, } } -func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", - Type: resource.Quantity{}.OpenAPISchemaType(), - Format: resource.Quantity{}.OpenAPISchemaFormat(), + Description: "InternalEvent makes watch.Event versioned", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Type": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "Object": { + SchemaProps: spec.SchemaProps{ + Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), + }, + }, + }, + Required: []string{"Type", "Object"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.Object"}, } } -func schema_apimachinery_pkg_api_resource_int64Amount(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", + Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "value": { + "matchLabels": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "scale": { + "matchExpressions": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + 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.LabelSelectorRequirement"), + }, + }, + }, }, }, }, - Required: []string{"value", "scale"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, } } -func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIGroup contains the name, the supported versions, and the preferred version of a group.", + Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", 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: "", + "key": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "key", + "x-kubernetes-patch-strategy": "merge", + }, }, - }, - "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", + Description: "key is the label key that the selector applies to.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "name": { + "operator": { SchemaProps: spec.SchemaProps{ - Description: "name is the name of the group.", + Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "versions": { + "values": { SchemaProps: spec.SchemaProps{ - Description: "versions are the versions supported in this group.", + Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "preferredVersion": { + }, + Required: []string{"key", "operator"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "List holds a list of objects, which may not be known by the server.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + 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: "", }, }, - "serverAddressByClientCIDRs": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of objects", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, }, }, }, - Required: []string{"name", "versions"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + Description: "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "selfLink": { 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", + Description: "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "resourceVersion": { 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", + Description: "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", Type: []string{"string"}, Format: "", }, }, - "groups": { + "continue": { SchemaProps: spec.SchemaProps{ - Description: "groups is a list of APIGroup.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), - }, - }, - }, + Description: "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", + Type: []string{"string"}, + Format: "", + }, + }, + "remainingItemCount": { + SchemaProps: spec.SchemaProps{ + Description: "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", + Type: []string{"integer"}, + Format: "int64", }, }, }, - Required: []string{"groups"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, } } -func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIResource specifies the name of a resource and whether it is namespaced.", + Description: "ListOptions is the query options to a standard REST list call.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "name is the plural name of the resource.", + 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: "", }, }, - "singularName": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + 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: "", }, }, - "namespaced": { + "labelSelector": { SchemaProps: spec.SchemaProps{ - Description: "namespaced indicates if a resource is namespaced or not.", - Type: []string{"boolean"}, + Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + Type: []string{"string"}, Format: "", }, }, - "group": { + "fieldSelector": { SchemaProps: spec.SchemaProps{ - Description: "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + Description: "A selector to restrict the list of returned objects by their fields. Defaults to everything.", Type: []string{"string"}, Format: "", }, }, - "version": { + "watch": { SchemaProps: spec.SchemaProps{ - Description: "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", - Type: []string{"string"}, + Description: "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + Type: []string{"boolean"}, Format: "", }, }, - "kind": { + "allowWatchBookmarks": { SchemaProps: spec.SchemaProps{ - Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", Type: []string{"string"}, Format: "", }, }, - "verbs": { + "resourceVersionMatch": { SchemaProps: spec.SchemaProps{ - Description: "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + Type: []string{"string"}, + Format: "", }, }, - "shortNames": { + "timeoutSeconds": { 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{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + Type: []string{"integer"}, + Format: "int64", }, }, - "categories": { + "limit": { SchemaProps: spec.SchemaProps{ - Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + Type: []string{"integer"}, + Format: "int64", }, }, - "storageVersionHash": { + "continue": { SchemaProps: spec.SchemaProps{ - Description: "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", + Description: "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"name", "singularName", "namespaced", "kind", "verbs"}, }, }, } } -func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + Description: "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "manager": { 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", + Description: "Manager is an identifier of the workflow managing these fields.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "operation": { 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", + Description: "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", Type: []string{"string"}, Format: "", }, }, - "groupVersion": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "groupVersion is the group and version this APIResourceList is for.", + Description: "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", Type: []string{"string"}, Format: "", }, }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "resources contains the name of the resources and if they are namespaced.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), - }, - }, - }, - }, - }, - }, - Required: []string{"groupVersion", "resources"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, - } -} - -func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "time": { 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: "", + Description: "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "apiVersion": { + "fieldsType": { 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", + Description: "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", Type: []string{"string"}, Format: "", }, }, - "versions": { + "fieldsV1": { SchemaProps: spec.SchemaProps{ - Description: "versions are the api versions that are available.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), }, }, - "serverAddressByClientCIDRs": { + "subresource": { SchemaProps: spec.SchemaProps{ - Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), - }, - }, - }, + Description: "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"versions", "serverAddressByClientCIDRs"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_MicroTime(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CreateOptions may be provided when creating an API object.", + Description: "MicroTime is version of Time with microsecond level precision.", + Type: metav1.MicroTime{}.OpenAPISchemaType(), + Format: metav1.MicroTime{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "name": { 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", + Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "generateName": { 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", + Description: "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", Type: []string{"string"}, Format: "", }, }, - "dryRun": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + Type: []string{"string"}, + Format: "", }, }, - "fieldManager": { + "selfLink": { SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeleteOptions may be provided when deleting an API object.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "uid": { 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", + Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "resourceVersion": { 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", + Description: "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", Type: []string{"string"}, Format: "", }, }, - "gracePeriodSeconds": { + "generation": { SchemaProps: spec.SchemaProps{ - Description: "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + Description: "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", Type: []string{"integer"}, Format: "int64", }, }, - "preconditions": { + "creationTimestamp": { SchemaProps: spec.SchemaProps{ - Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. 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.Time"), }, }, - "orphanDependents": { + "deletionTimestamp": { SchemaProps: spec.SchemaProps{ - Description: "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - Type: []string{"boolean"}, - Format: "", + Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "propagationPolicy": { + "deletionGracePeriodSeconds": { SchemaProps: spec.SchemaProps{ - Description: "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + Description: "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "ownerReferences": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + 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.OwnerReference"), + }, + }, + }, + }, + }, + "finalizers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "clusterName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", Type: []string{"string"}, Format: "", }, }, - "dryRun": { + "managedFields": { SchemaProps: spec.SchemaProps{ - Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Description: "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), }, }, }, @@ -36118,80 +42484,80 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, - } -} - -func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", - Type: metav1.Duration{}.OpenAPISchemaType(), - Format: metav1.Duration{}.OpenAPISchemaFormat(), - }, - }, + "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_meta_v1_ExportOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExportOptions is the query options to the standard REST get call. Deprecated. Planned for removal in 1.18.", + Description: "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API version of the referent.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, "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", + Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "name": { 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", + Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Default: "", Type: []string{"string"}, Format: "", }, }, - "export": { + "controller": { SchemaProps: spec.SchemaProps{ - Description: "Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18.", + Description: "If true, this reference points to the managing controller.", Type: []string{"boolean"}, Format: "", }, }, - "exact": { + "blockOwnerDeletion": { SchemaProps: spec.SchemaProps{ - Description: "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18.", + Description: "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", Type: []string{"boolean"}, Format: "", }, }, }, - Required: []string{"export", "exact"}, + Required: []string{"apiVersion", "kind", "name", "uid"}, }, - }, - } -} - -func schema_pkg_apis_meta_v1_FieldsV1(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", - Type: []string{"object"}, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, }, }, } } -func schema_pkg_apis_meta_v1_GetOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GetOptions is the standard query options to the standard REST get call.", + Description: "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36208,313 +42574,230 @@ func schema_pkg_apis_meta_v1_GetOptions(ref common.ReferenceCallback) common.Ope Format: "", }, }, - "resourceVersion": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - Type: []string{"string"}, - Format: "", + Description: "Standard object's metadata. 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"), }, }, }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_meta_v1_GroupKind(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", + Description: "PartialObjectMetadataList contains a list of objects containing only their metadata", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "group": { + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + 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: "", }, }, - "kind": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + 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: "", }, }, - }, - Required: []string{"group", "kind"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { + "metadata": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "resource": { + "items": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "items contains each of the included items.", + 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.PartialObjectMetadata"), + }, + }, + }, }, }, }, - Required: []string{"group", "resource"}, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, } } -func schema_pkg_apis_meta_v1_GroupVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_Patch(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.", + Description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version"}, }, }, } } -func schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", + Description: "PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "groupVersion": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "groupVersion specifies the API group and version in the form \"group/version\"", + 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: "", }, }, - "version": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", + 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: "", }, }, - }, - Required: []string{"groupVersion", "version"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GroupVersionKind(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version", "kind"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GroupVersionResource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { + "dryRun": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "version": { + "force": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + Type: []string{"boolean"}, + Format: "", }, }, - "resource": { + "fieldManager": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"group", "version", "resource"}, }, }, } } -func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_Preconditions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "InternalEvent makes watch.Event versioned", + Description: "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "Type": { + "uid": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Specifies the target UID.", + Type: []string{"string"}, + Format: "", }, }, - "Object": { + "resourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), + Description: "Specifies the target ResourceVersion", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"Type", "Object"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Object"}, } } -func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_RootPaths(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + Description: "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "matchLabels": { - SchemaProps: spec.SchemaProps{ - Description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "matchExpressions": { + "paths": { SchemaProps: spec.SchemaProps{ - Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + Description: "paths are the paths available at root.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, + Required: []string{"paths"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, } } -func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + Description: "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "key": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "key", - "x-kubernetes-patch-strategy": "merge", - }, - }, + "clientCIDR": { SchemaProps: spec.SchemaProps{ - Description: "key is the label key that the selector applies to.", + Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "operator": { + "serverAddress": { SchemaProps: spec.SchemaProps{ - Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "values": { - SchemaProps: spec.SchemaProps{ - Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, }, - Required: []string{"key", "operator"}, + Required: []string{"clientCIDR", "serverAddress"}, }, }, } } -func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "List holds a list of objects, which may not be known by the server.", + Description: "Status is a return value for calls that don't return other objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36534,489 +42817,551 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "items": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "List of objects", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, + Description: "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Type: []string{"string"}, + Format: "", }, }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "selfLink": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Description: "A human-readable description of the status of this operation.", Type: []string{"string"}, Format: "", }, }, - "resourceVersion": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + Description: "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", Type: []string{"string"}, Format: "", }, }, - "continue": { + "details": { SchemaProps: spec.SchemaProps{ - Description: "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", - Type: []string{"string"}, - Format: "", + Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), }, }, - "remainingItemCount": { + "code": { SchemaProps: spec.SchemaProps{ - Description: "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", + Description: "Suggested HTTP return code for this status, 0 if not set.", Type: []string{"integer"}, - Format: "int64", + Format: "int32", }, }, }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, } } -func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_StatusCause(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ListOptions is the query options to a standard REST list call.", + Description: "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "reason": { 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", + Description: "A machine-readable description of the cause of the error. If this value is empty there is no information available.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "message": { 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", + Description: "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", Type: []string{"string"}, Format: "", }, }, - "labelSelector": { + "field": { SchemaProps: spec.SchemaProps{ - Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + Description: "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", Type: []string{"string"}, Format: "", }, }, - "fieldSelector": { + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Description: "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + Description: "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", Type: []string{"string"}, Format: "", }, }, - "watch": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - Type: []string{"boolean"}, + Description: "The group attribute of the resource associated with the status StatusReason.", + Type: []string{"string"}, Format: "", }, }, - "allowWatchBookmarks": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", - Type: []string{"boolean"}, + Description: "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, Format: "", }, }, - "resourceVersion": { + "uid": { SchemaProps: spec.SchemaProps{ - Description: "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + Description: "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", Type: []string{"string"}, Format: "", }, }, - "timeoutSeconds": { + "causes": { SchemaProps: spec.SchemaProps{ - Description: "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - Type: []string{"integer"}, - Format: "int64", + Description: "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + 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.StatusCause"), + }, + }, + }, }, }, - "limit": { + "retryAfterSeconds": { SchemaProps: spec.SchemaProps{ - Description: "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + Description: "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", Type: []string{"integer"}, - Format: "int64", - }, - }, - "continue": { - SchemaProps: spec.SchemaProps{ - Description: "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - Type: []string{"string"}, - Format: "", + Format: "int32", }, }, }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, } } -func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", + Description: "Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "manager": { - SchemaProps: spec.SchemaProps{ - Description: "Manager is an identifier of the workflow managing these fields.", - Type: []string{"string"}, - Format: "", - }, - }, - "operation": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", + 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 version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", + 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: "", }, }, - "time": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "fieldsType": { + "columnDefinitions": { SchemaProps: spec.SchemaProps{ - Description: "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", - Type: []string{"string"}, - Format: "", + Description: "columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.", + 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.TableColumnDefinition"), + }, + }, + }, }, }, - "fieldsV1": { + "rows": { SchemaProps: spec.SchemaProps{ - Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), + Description: "rows is the list of items in the table.", + 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.TableRow"), + }, + }, + }, }, }, }, + Required: []string{"columnDefinitions", "rows"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_pkg_apis_meta_v1_MicroTime(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MicroTime is version of Time with microsecond level precision.", - Type: metav1.MicroTime{}.OpenAPISchemaType(), - Format: metav1.MicroTime{}.OpenAPISchemaFormat(), - }, - }, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, } } -func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + Description: "TableColumnDefinition contains information about a column returned in the Table.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Description: "name is a human readable name for the column.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "generateName": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", + Description: "type is an OpenAPI type definition for this column, such as number, integer, string, or array. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "namespace": { + "format": { SchemaProps: spec.SchemaProps{ - Description: "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + Description: "format is an optional OpenAPI type modifier for this column. A format modifies the type and imposes additional rules, like date or time formatting for a string. The 'name' format is applied to the primary identifier column which has type 'string' to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "selfLink": { + "description": { SchemaProps: spec.SchemaProps{ - Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Description: "description is a human readable description of this column.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "uid": { + "priority": { SchemaProps: spec.SchemaProps{ - Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - Type: []string{"string"}, - Format: "", + Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "resourceVersion": { + }, + Required: []string{"name", "type", "format", "description", "priority"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_TableOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableOptions are used when a Table is requested by the caller.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + 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: "", }, }, - "generation": { - SchemaProps: spec.SchemaProps{ - Description: "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "creationTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "deletionTimestamp": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + 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: "", }, }, - "deletionGracePeriodSeconds": { + "includeObject": { SchemaProps: spec.SchemaProps{ - Description: "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", - Type: []string{"integer"}, - Format: "int64", + Description: "includeObject decides whether to include each object along with its columnar information. Specifying \"None\" will return no object, specifying \"Object\" will return the full object contents, and specifying \"Metadata\" (the default) will return the object's metadata in the PartialObjectMetadata kind in version v1beta1 of the meta.k8s.io API group.", + Type: []string{"string"}, + Format: "", }, }, - "labels": { + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableRow is an individual row in a table.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cells": { SchemaProps: spec.SchemaProps{ - Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "cells will be as wide as the column definitions array and may contain strings, numbers (float64 or int64), booleans, simple maps, lists, or null. See the type field of the column definition for a more detailed description.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, + Type: []string{"object"}, Format: "", }, }, }, }, }, - "annotations": { + "conditions": { SchemaProps: spec.SchemaProps{ - Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "conditions describe additional status of a row that are relevant for a human user. These conditions apply to the row, not to the object, and will be specific to table output. The only defined condition type is 'Completed', for a row that indicates a resource that has run to completion and can be given less visual priority.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), }, }, }, }, }, - "ownerReferences": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "uid", - "x-kubernetes-patch-strategy": "merge", - }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, + }, + }, + Required: []string{"cells"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_meta_v1_TableRowCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableRowCondition allows a row to be marked with additional information.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { SchemaProps: spec.SchemaProps{ - Description: "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), - }, - }, - }, + Description: "Type of row condition. The only defined value is 'Completed' indicating that the object this row represents has reached a completed state and may be given less visual priority than other rows. Clients are not required to honor any conditions but should be consistent where possible about handling the conditions.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "finalizers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-strategy": "merge", - }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Default: "", + Type: []string{"string"}, + Format: "", }, + }, + "reason": { SchemaProps: spec.SchemaProps{ - Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "(brief) machine readable reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", }, }, - "clusterName": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", + Description: "Human readable message indicating details about last transition.", Type: []string{"string"}, Format: "", }, }, - "managedFields": { + }, + Required: []string{"type", "status"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Time(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + Type: metav1.Time{}.OpenAPISchemaType(), + Format: metav1.Time{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Timestamp(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "seconds": { SchemaProps: spec.SchemaProps{ - Description: "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), - }, - }, - }, + Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", + Default: 0, + Type: []string{"integer"}, + Format: "int64", + }, + }, + "nanos": { + SchemaProps: spec.SchemaProps{ + Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, + Required: []string{"seconds", "nanos"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", + Description: "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiVersion": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "API version of the referent.", + 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: "", }, }, - "kind": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + 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: "", }, }, - "name": { + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + 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: "", }, }, - "uid": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + 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: "", }, }, - "controller": { + "dryRun": { SchemaProps: spec.SchemaProps{ - Description: "If true, this reference points to the managing controller.", - Type: []string{"boolean"}, - Format: "", + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "blockOwnerDeletion": { + "fieldManager": { SchemaProps: spec.SchemaProps{ - Description: "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", - Type: []string{"boolean"}, + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"apiVersion", "kind", "name", "uid"}, }, }, } } -func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.", + Description: "Event represents a single event to a watched resource.", 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": { + "type": { 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: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "metadata": { + "object": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, + Required: []string{"type", "object"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PartialObjectMetadataList contains a list of objects containing only their metadata", + Description: "PartialObjectMetadataList contains a list of objects containing only their metadata.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -37036,6 +43381,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -37046,7 +43392,8 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), }, }, }, @@ -37061,602 +43408,922 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb } } -func schema_pkg_apis_meta_v1_Patch(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + Description: "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", Type: []string{"object"}, }, }, } } -func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.", + Description: "TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this: type MyAwesomeAPIObject struct {\n runtime.TypeMeta `json:\",inline\"`\n ... // other fields\n} func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind\n\nTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, "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: "", + Type: []string{"string"}, + Format: "", }, }, + }, + }, + }, + } +} + +func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ "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: "", + Type: []string{"string"}, + Format: "", }, }, - "dryRun": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Type: []string{"string"}, + Format: "", }, }, - "force": { + "Raw": { SchemaProps: spec.SchemaProps{ - Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - Type: []string{"boolean"}, + Description: "Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.", + Type: []string{"string"}, + Format: "byte", + }, + }, + "ContentEncoding": { + SchemaProps: spec.SchemaProps{ + Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "fieldManager": { + "ContentType": { SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", + Default: "", Type: []string{"string"}, Format: "", }, }, }, + Required: []string{"Raw", "ContentEncoding", "ContentType"}, }, }, } } -func schema_pkg_apis_meta_v1_Preconditions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_pkg_util_intstr_IntOrString(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + Description: "IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.", + Type: intstr.IntOrString{}.OpenAPISchemaType(), + Format: intstr.IntOrString{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_k8sio_apimachinery_pkg_version_Info(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Info contains versioning information. how we'll want to distribute that information.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "uid": { + "major": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the target UID.", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "resourceVersion": { + "minor": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the target ResourceVersion", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "gitVersion": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "gitCommit": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "gitTreeState": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "buildDate": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "goVersion": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "compiler": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "platform": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, }, }, } } -func schema_pkg_apis_meta_v1_RootPaths(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", + Description: "Event captures all the information that can be included in an API audit log.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "paths": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "paths are the paths available at root.", + 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: "", + }, + }, + "level": { + SchemaProps: spec.SchemaProps{ + Description: "AuditLevel at which event was generated", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "auditID": { + SchemaProps: spec.SchemaProps{ + Description: "Unique audit ID, generated for each request.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "stage": { + SchemaProps: spec.SchemaProps{ + Description: "Stage of the request handling when this event instance was generated.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "requestURI": { + SchemaProps: spec.SchemaProps{ + Description: "RequestURI is the request URI as sent by the client to a server.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "verb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "Authenticated user information.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "impersonatedUser": { + SchemaProps: spec.SchemaProps{ + Description: "Impersonated user information.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "sourceIPs": { + SchemaProps: spec.SchemaProps{ + Description: "Source IPs, from where the request originated and intermediate proxies.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "userAgent": { + SchemaProps: spec.SchemaProps{ + Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", + Type: []string{"string"}, + Format: "", + }, + }, + "objectRef": { + SchemaProps: spec.SchemaProps{ + Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"), + }, + }, + "responseStatus": { + SchemaProps: spec.SchemaProps{ + Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + "requestObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "responseObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "requestReceivedTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached the apiserver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "stageTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached current audit stage.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"paths"}, + Required: []string{"level", "auditID", "stage", "requestURI", "verb", "user"}, }, }, + Dependencies: []string{ + "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"}, } } -func schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + Description: "EventList is a list of audit Events.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "clientCIDR": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", + 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: "", }, }, - "serverAddress": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + 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{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Event"), + }, + }, + }, + }, + }, }, - Required: []string{"clientCIDR", "serverAddress"}, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Event"}, } } -func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Status is a return value for calls that don't return other objects.", + Description: "GroupResources represents resource kinds in an API group.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "group": { 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", + Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "resources": { 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: "", + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "metadata": { + "resourceNames": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "status": { + }, + }, + }, + } +} + +func schema_pkg_apis_audit_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resource": { SchemaProps: spec.SchemaProps{ - Description: "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "message": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the status of this operation.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the name of the API group that contains the referred object. The empty string represents the core API group.", Type: []string{"string"}, Format: "", }, }, - "reason": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + Description: "APIVersion is the version of the API group that contains the referred object.", Type: []string{"string"}, Format: "", }, }, - "details": { + "resourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), + Type: []string{"string"}, + Format: "", }, }, - "code": { + "subresource": { SchemaProps: spec.SchemaProps{ - Description: "Suggested HTTP return code for this status, 0 if not set.", - Type: []string{"integer"}, - Format: "int32", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, } } -func schema_pkg_apis_meta_v1_StatusCause(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + Description: "Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "reason": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "A machine-readable description of the cause of the error. If this value is empty there is no information available.", + 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: "", }, }, - "message": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + 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: "", }, }, - "field": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", - Type: []string{"string"}, - Format: "", + Description: "ObjectMeta is included for interoperability with API infrastructure.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"), + }, + }, + }, + }, + }, + "omitStages": { + SchemaProps: spec.SchemaProps{ + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, + Required: []string{"rules"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"}, } } -func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + Description: "PolicyList is a list of audit Policies.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "The group attribute of the resource associated with the status StatusReason.", + 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: "", }, }, - "kind": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + 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: "", }, }, - "uid": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "causes": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", - Type: []string{"array"}, + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Policy"), }, }, }, }, }, - "retryAfterSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", - Type: []string{"integer"}, - Format: "int32", - }, - }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Policy"}, } } -func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.", + Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "level": { 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", + Description: "The Level that requests matching this rule are recorded at.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "users": { 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: "", + Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "metadata": { + "userGroups": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "columnDefinitions": { + "verbs": { SchemaProps: spec.SchemaProps{ - Description: "columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.", + Description: "The verbs that match this rule. An empty list implies every verb.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "rows": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "rows is the list of items in the table.", + Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"), + }, + }, + }, + }, + }, + "namespaces": { + SchemaProps: spec.SchemaProps{ + Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "omitStages": { + SchemaProps: spec.SchemaProps{ + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"columnDefinitions", "rows"}, + Required: []string{"level"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, + "k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"}, } } -func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TableColumnDefinition contains information about a column returned in the Table.", + Description: "DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for more information. Event captures all the information that can be included in an API audit log.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "name is a human readable name for the column.", + 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: "", }, }, - "type": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "type is an OpenAPI type definition for this column, such as number, integer, string, or array. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + 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: "", }, }, - "format": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "format is an optional OpenAPI type modifier for this column. A format modifies the type and imposes additional rules, like date or time formatting for a string. The 'name' format is applied to the primary identifier column which has type 'string' to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", - Type: []string{"string"}, - Format: "", + Description: "ObjectMeta is included for interoperability with API infrastructure.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "description": { + "level": { SchemaProps: spec.SchemaProps{ - Description: "description is a human readable description of this column.", + Description: "AuditLevel at which event was generated", + Default: "", Type: []string{"string"}, Format: "", }, }, - "priority": { + "timestamp": { SchemaProps: spec.SchemaProps{ - Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.", - Type: []string{"integer"}, - Format: "int32", + Description: "Time the request reached the apiserver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - }, - Required: []string{"name", "type", "format", "description", "priority"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_TableOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TableOptions are used when a Table is requested by the caller.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "auditID": { 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", + Description: "Unique audit ID, generated for each request.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "stage": { 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", + Description: "Stage of the request handling when this event instance was generated.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "includeObject": { + "requestURI": { SchemaProps: spec.SchemaProps{ - Description: "includeObject decides whether to include each object along with its columnar information. Specifying \"None\" will return no object, specifying \"Object\" will return the full object contents, and specifying \"Metadata\" (the default) will return the object's metadata in the PartialObjectMetadata kind in version v1beta1 of the meta.k8s.io API group.", + Description: "RequestURI is the request URI as sent by the client to a server.", + Default: "", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TableRow is an individual row in a table.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "cells": { + "verb": { SchemaProps: spec.SchemaProps{ - Description: "cells will be as wide as the column definitions array and may contain strings, numbers (float64 or int64), booleans, simple maps, lists, or null. See the type field of the column definition for a more detailed description.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Format: "", - }, - }, - }, + Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "conditions": { + "user": { SchemaProps: spec.SchemaProps{ - Description: "conditions describe additional status of a row that are relevant for a human user. These conditions apply to the row, not to the object, and will be specific to table output. The only defined condition type is 'Completed', for a row that indicates a resource that has run to completion and can be given less visual priority.", + Description: "Authenticated user information.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "impersonatedUser": { + SchemaProps: spec.SchemaProps{ + Description: "Impersonated user information.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "sourceIPs": { + SchemaProps: spec.SchemaProps{ + Description: "Source IPs, from where the request originated and intermediate proxies.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "object": { + "userAgent": { SchemaProps: spec.SchemaProps{ - Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", + Type: []string{"string"}, + Format: "", }, }, - }, - Required: []string{"cells"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_pkg_apis_meta_v1_TableRowCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TableRowCondition allows a row to be marked with additional information.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { + "objectRef": { SchemaProps: spec.SchemaProps{ - Description: "Type of row condition. The only defined value is 'Completed' indicating that the object this row represents has reached a completed state and may be given less visual priority than other rows. Clients are not required to honor any conditions but should be consistent where possible about handling the conditions.", - Type: []string{"string"}, - Format: "", + Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference"), }, }, - "status": { + "responseStatus": { SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", + Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), }, }, - "reason": { + "requestObject": { SchemaProps: spec.SchemaProps{ - Description: "(brief) machine readable reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", + Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), }, }, - "message": { + "responseObject": { SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", + Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), }, }, - }, - Required: []string{"type", "status"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_Time(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", - Type: metav1.Time{}.OpenAPISchemaType(), - Format: metav1.Time{}.OpenAPISchemaFormat(), - }, - }, - } -} - -func schema_pkg_apis_meta_v1_Timestamp(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "seconds": { + "requestReceivedTimestamp": { SchemaProps: spec.SchemaProps{ - Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", - Type: []string{"integer"}, - Format: "int64", + Description: "Time the request reached the apiserver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), }, }, - "nanos": { + "stageTimestamp": { SchemaProps: spec.SchemaProps{ - Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", - Type: []string{"integer"}, - Format: "int32", + Description: "Time the request reached current audit stage.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"seconds", "nanos"}, + Required: []string{"level", "timestamp", "auditID", "stage", "requestURI", "verb", "user"}, }, }, + Dependencies: []string{ + "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference"}, } } -func schema_pkg_apis_meta_v1_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", + Description: "EventList is a list of audit Events.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -37673,52 +44340,76 @@ func schema_pkg_apis_meta_v1_TypeMeta(ref common.ReferenceCallback) common.OpenA Format: "", }, }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event"), + }, + }, + }, + }, + }, }, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event"}, } } -func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.", + Description: "GroupResources represents resource kinds in an API group.", 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": { + "group": { 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", + Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", Type: []string{"string"}, Format: "", }, }, - "dryRun": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "fieldManager": { + "resourceNames": { SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - Type: []string{"string"}, - Format: "", + Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, @@ -37727,39 +44418,66 @@ func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common. } } -func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Event represents a single event to a watched resource.", + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "resource": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, - "object": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "subresource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"type", "object"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PartialObjectMetadataList contains a list of objects containing only their metadata.", + Description: "DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for more information. Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -37778,200 +44496,231 @@ func schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref common.Reference }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "ObjectMeta is included for interoperability with API infrastructure.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "items contains each of the included items.", + Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule"), }, }, }, }, }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, - } -} - -func schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", - Type: []string{"object"}, - }, - }, - } -} - -func schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this: type MyAwesomeAPIObject struct {\n runtime.TypeMeta `json:\",inline\"`\n ... // other fields\n} func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind\n\nTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { + "omitStages": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, + Required: []string{"rules"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule"}, } } -func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.", + Description: "PolicyList is a list of audit Policies.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + 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: "", }, }, - "Raw": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.", + 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: "byte", + Format: "", }, }, - "ContentEncoding": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "ContentType": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", - Type: []string{"string"}, - Format: "", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy"), + }, + }, + }, }, }, }, - Required: []string{"Raw", "ContentEncoding", "ContentType"}, - }, - }, - } -} - -func schema_apimachinery_pkg_util_intstr_IntOrString(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.", - Type: intstr.IntOrString{}.OpenAPISchemaType(), - Format: intstr.IntOrString{}.OpenAPISchemaFormat(), + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy"}, } } -func schema_k8sio_apimachinery_pkg_version_Info(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Info contains versioning information. how we'll want to distribute that information.", + Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "major": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "minor": { + "level": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The Level that requests matching this rule are recorded at.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "gitVersion": { + "users": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "gitCommit": { + "userGroups": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "gitTreeState": { + "verbs": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The verbs that match this rule. An empty list implies every verb.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "buildDate": { + "resources": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources"), + }, + }, + }, }, }, - "goVersion": { + "namespaces": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "compiler": { + "nonResourceURLs": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "platform": { + "omitStages": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, + Required: []string{"level"}, }, }, + Dependencies: []string{ + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources"}, } } -func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Event captures all the information that can be included in an API audit log.", + Description: "DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for more information. Event captures all the information that can be included in an API audit log.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -37988,16 +44737,32 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI Format: "", }, }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "ObjectMeta is included for interoperability with API infrastructure. DEPRECATED: Use StageTimestamp which supports micro second instead of ObjectMeta.CreateTimestamp and the rest of the object is not used", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, "level": { SchemaProps: spec.SchemaProps{ Description: "AuditLevel at which event was generated", + Default: "", Type: []string{"string"}, Format: "", }, }, + "timestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached the apiserver. DEPRECATED: Use RequestReceivedTimestamp which supports micro second instead.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, "auditID": { SchemaProps: spec.SchemaProps{ Description: "Unique audit ID, generated for each request.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -38005,6 +44770,7 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI "stage": { SchemaProps: spec.SchemaProps{ Description: "Stage of the request handling when this event instance was generated.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -38012,6 +44778,7 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI "requestURI": { SchemaProps: spec.SchemaProps{ Description: "RequestURI is the request URI as sent by the client to a server.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -38019,6 +44786,7 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI "verb": { SchemaProps: spec.SchemaProps{ Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -38026,6 +44794,7 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI "user": { SchemaProps: spec.SchemaProps{ Description: "Authenticated user information.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/authentication/v1.UserInfo"), }, }, @@ -38042,8 +44811,9 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -38059,7 +44829,7 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI "objectRef": { SchemaProps: spec.SchemaProps{ Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"), + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference"), }, }, "responseStatus": { @@ -38083,12 +44853,14 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI "requestReceivedTimestamp": { SchemaProps: spec.SchemaProps{ Description: "Time the request reached the apiserver.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), }, }, "stageTimestamp": { SchemaProps: spec.SchemaProps{ Description: "Time the request reached current audit stage.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), }, }, @@ -38100,23 +44872,24 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"level", "auditID", "stage", "requestURI", "verb", "user"}, + Required: []string{"level", "timestamp", "auditID", "stage", "requestURI", "verb", "user"}, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"}, + "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference"}, } } -func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38139,7 +44912,8 @@ func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.Ope }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { @@ -38148,7 +44922,8 @@ func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Event"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.Event"), }, }, }, @@ -38159,11 +44934,11 @@ func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Event"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.Event"}, } } -func schema_pkg_apis_audit_v1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38184,8 +44959,9 @@ func schema_pkg_apis_audit_v1_GroupResources(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -38198,8 +44974,9 @@ func schema_pkg_apis_audit_v1_GroupResources(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -38211,7 +44988,7 @@ func schema_pkg_apis_audit_v1_GroupResources(ref common.ReferenceCallback) commo } } -func schema_pkg_apis_audit_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38274,11 +45051,11 @@ func schema_pkg_apis_audit_v1_ObjectReference(ref common.ReferenceCallback) comm } } -func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", + Description: "DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for more information. Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -38298,6 +45075,7 @@ func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAP "metadata": { SchemaProps: spec.SchemaProps{ Description: "ObjectMeta is included for interoperability with API infrastructure.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, @@ -38308,7 +45086,8 @@ func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAP Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule"), }, }, }, @@ -38321,8 +45100,9 @@ func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAP Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -38333,11 +45113,11 @@ func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule"}, } } -func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38360,7 +45140,8 @@ func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.Op }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { @@ -38369,7 +45150,8 @@ func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Policy"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy"), }, }, }, @@ -38380,11 +45162,11 @@ func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Policy"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy"}, } } -func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38394,6 +45176,7 @@ func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.Op "level": { SchemaProps: spec.SchemaProps{ Description: "The Level that requests matching this rule are recorded at.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -38405,8 +45188,9 @@ func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -38419,8 +45203,9 @@ func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -38433,8 +45218,9 @@ func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -38447,7 +45233,8 @@ func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources"), }, }, }, @@ -38460,8 +45247,9 @@ func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -38474,8 +45262,9 @@ func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -38488,27 +45277,425 @@ func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"level"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources"}, + } +} + +func schema_pkg_apis_clientauthentication_v1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to.\n\nTo ensure that this struct contains everything someone would need to communicate with a kubernetes cluster (just like they would via a kubeconfig), the fields should shadow \"k8s.io/client-go/tools/clientcmd/api/v1\".Cluster, with the exception of CertificateAuthority, since CA data will always be passed to the plugin as bytes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "server": { + SchemaProps: spec.SchemaProps{ + Description: "Server is the address of the kubernetes cluster (https://hostname:port).", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "tls-server-name": { + SchemaProps: spec.SchemaProps{ + Description: "TLSServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "insecure-skip-tls-verify": { + SchemaProps: spec.SchemaProps{ + Description: "InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "certificate-authority-data": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "CAData contains PEM-encoded certificate authority certificates. If empty, system roots should be used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + "proxy-url": { + SchemaProps: spec.SchemaProps{ + Description: "ProxyURL is the URL to the proxy to be used for all requests to this cluster.", + Type: []string{"string"}, + Format: "", + }, + }, + "config": { + SchemaProps: spec.SchemaProps{ + Description: "Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.\n\nThis data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:\n\nclusters: - name: my-cluster\n cluster:\n ...\n extensions:\n - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config\n extension:\n audience: 06e3fbd18de8 # arbitrary config\n\nIn some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need to be stored directly in the kubeconfig.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"server"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_clientauthentication_v1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", + 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: "", + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information passed to the plugin by the transport.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus"}, + } +} + +func schema_pkg_apis_clientauthentication_v1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentialSpec holds request and runtime specific information provided by the transport.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cluster": { + SchemaProps: spec.SchemaProps{ + Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., ExecConfig.ProvideClusterInfo).", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster"), + }, + }, + "interactive": { + SchemaProps: spec.SchemaProps{ + Description: "Interactive declares whether stdin has been passed to this exec plugin.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"interactive"}, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster"}, + } +} + +func schema_pkg_apis_clientauthentication_v1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "expirationTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "token": { + SchemaProps: spec.SchemaProps{ + Description: "Token is a bearer token used by the client for request authentication.", + Type: []string{"string"}, + Format: "", + }, + }, + "clientCertificateData": { + SchemaProps: spec.SchemaProps{ + Description: "PEM-encoded client TLS certificates (including intermediates, if any).", + Type: []string{"string"}, + Format: "", + }, + }, + "clientKeyData": { + SchemaProps: spec.SchemaProps{ + Description: "PEM-encoded private key for the above certificate.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", + 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: "", + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information passed to the plugin by the transport. This contains request and runtime specific information, such as if the session is interactive.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus"}, + } +} + +func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentialSpec holds request and runtime specific information provided by the transport.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "response": { + SchemaProps: spec.SchemaProps{ + Description: "Response is populated when the transport encounters HTTP status codes, such as 401, suggesting previous credentials were invalid.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response"), + }, + }, + "interactive": { + SchemaProps: spec.SchemaProps{ + Description: "Interactive is true when the transport detects the command is being called from an interactive prompt.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response"}, + } +} + +func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "expirationTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "token": { + SchemaProps: spec.SchemaProps{ + Description: "Token is a bearer token used by the client for request authentication.", + Type: []string{"string"}, + Format: "", + }, + }, + "clientCertificateData": { + SchemaProps: spec.SchemaProps{ + Description: "PEM-encoded client TLS certificates (including intermediates, if any).", + Type: []string{"string"}, + Format: "", + }, + }, + "clientKeyData": { + SchemaProps: spec.SchemaProps{ + Description: "PEM-encoded private key for the above certificate.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_clientauthentication_v1alpha1_Response(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Response defines metadata about a failed request, including HTTP status code and response headers.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "header": { + SchemaProps: spec.SchemaProps{ + Description: "Header holds HTTP headers returned by the server.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, }, }, + "code": { + SchemaProps: spec.SchemaProps{ + Description: "Code is the HTTP status code returned by the server.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_clientauthentication_v1beta1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to.\n\nTo ensure that this struct contains everything someone would need to communicate with a kubernetes cluster (just like they would via a kubeconfig), the fields should shadow \"k8s.io/client-go/tools/clientcmd/api/v1\".Cluster, with the exception of CertificateAuthority, since CA data will always be passed to the plugin as bytes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "server": { + SchemaProps: spec.SchemaProps{ + Description: "Server is the address of the kubernetes cluster (https://hostname:port).", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "tls-server-name": { + SchemaProps: spec.SchemaProps{ + Description: "TLSServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "insecure-skip-tls-verify": { + SchemaProps: spec.SchemaProps{ + Description: "InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "certificate-authority-data": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "CAData contains PEM-encoded certificate authority certificates. If empty, system roots should be used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + "proxy-url": { + SchemaProps: spec.SchemaProps{ + Description: "ProxyURL is the URL to the proxy to be used for all requests to this cluster.", + Type: []string{"string"}, + Format: "", + }, + }, + "config": { + SchemaProps: spec.SchemaProps{ + Description: "Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.\n\nThis data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:\n\nclusters: - name: my-cluster\n cluster:\n ...\n extensions:\n - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config\n extension:\n audience: 06e3fbd18de8 # arbitrary config\n\nIn some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need to be stored directly in the kubeconfig.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, }, - Required: []string{"level"}, + Required: []string{"server"}, }, }, Dependencies: []string{ - "k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"}, + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_pkg_apis_audit_v1alpha1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Event captures all the information that can be included in an API audit log.", + Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -38525,152 +45712,104 @@ func schema_pkg_apis_audit_v1alpha1_Event(ref common.ReferenceCallback) common.O Format: "", }, }, - "metadata": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is included for interoperability with API infrastructure.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Spec holds information passed to the plugin by the transport.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec"), }, }, - "level": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "AuditLevel at which event was generated", - Type: []string{"string"}, - Format: "", + Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"), }, }, - "timestamp": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"}, + } +} + +func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentialSpec holds request and runtime specific information provided by the transport.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cluster": { SchemaProps: spec.SchemaProps{ - Description: "Time the request reached the apiserver.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., ExecConfig.ProvideClusterInfo).", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster"), }, }, - "auditID": { + "interactive": { SchemaProps: spec.SchemaProps{ - Description: "Unique audit ID, generated for each request.", - Type: []string{"string"}, + Description: "Interactive declares whether stdin has been passed to this exec plugin.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "stage": { + }, + Required: []string{"interactive"}, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster"}, + } +} + +func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "expirationTimestamp": { SchemaProps: spec.SchemaProps{ - Description: "Stage of the request handling when this event instance was generated.", - Type: []string{"string"}, - Format: "", + Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "requestURI": { + "token": { SchemaProps: spec.SchemaProps{ - Description: "RequestURI is the request URI as sent by the client to a server.", + Description: "Token is a bearer token used by the client for request authentication.", Type: []string{"string"}, Format: "", }, }, - "verb": { + "clientCertificateData": { SchemaProps: spec.SchemaProps{ - Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", + Description: "PEM-encoded client TLS certificates (including intermediates, if any).", Type: []string{"string"}, Format: "", }, }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "Authenticated user information.", - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), - }, - }, - "impersonatedUser": { - SchemaProps: spec.SchemaProps{ - Description: "Impersonated user information.", - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), - }, - }, - "sourceIPs": { - SchemaProps: spec.SchemaProps{ - Description: "Source IPs, from where the request originated and intermediate proxies.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "userAgent": { + "clientKeyData": { SchemaProps: spec.SchemaProps{ - Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", + Description: "PEM-encoded private key for the above certificate.", Type: []string{"string"}, Format: "", }, }, - "objectRef": { - SchemaProps: spec.SchemaProps{ - Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference"), - }, - }, - "responseStatus": { - SchemaProps: spec.SchemaProps{ - Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), - }, - }, - "requestObject": { - SchemaProps: spec.SchemaProps{ - Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), - }, - }, - "responseObject": { - SchemaProps: spec.SchemaProps{ - Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), - }, - }, - "requestReceivedTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "Time the request reached the apiserver.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "stageTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "Time the request reached current audit stage.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "annotations": { - SchemaProps: spec.SchemaProps{ - Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, }, - Required: []string{"level", "timestamp", "auditID", "stage", "requestURI", "verb", "user"}, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_audit_v1alpha1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EventList is a list of audit Events.", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ @@ -38686,203 +45825,312 @@ func schema_pkg_apis_audit_v1alpha1_EventList(ref common.ReferenceCallback) comm Format: "", }, }, - "metadata": { + "Generic": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Generic holds configuration for a generic controller-manager", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), }, }, - "items": { + "KubeCloudShared": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event"), - }, - }, - }, + Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration"), + }, + }, + "ServiceController": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration"), + }, + }, + "NodeStatusUpdateFrequency": { + SchemaProps: spec.SchemaProps{ + Description: "NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"items"}, + Required: []string{"Generic", "KubeCloudShared", "ServiceController", "NodeStatusUpdateFrequency"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration", "k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"}, } } -func schema_pkg_apis_audit_v1alpha1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_cloud_provider_config_v1alpha1_CloudProviderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupResources represents resource kinds in an API group.", + Description: "CloudProviderConfiguration contains basically elements about cloud provider.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "group": { + "Name": { SchemaProps: spec.SchemaProps{ - Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", + Description: "Name is the provider for cloud services.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resourceNames": { + "CloudConfigFile": { SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "cloudConfigFile is the path to the cloud provider configuration file.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"Name", "CloudConfigFile"}, }, }, } } -func schema_pkg_apis_audit_v1alpha1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Description: "KubeCloudSharedConfiguration contains elements shared by both kube-controller manager and cloud-controller manager, but not genericconfig.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "resource": { + "CloudProvider": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "CloudProviderConfiguration holds configuration for CloudProvider related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration"), }, }, - "namespace": { + "ExternalCloudVolumePlugin": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "externalCloudVolumePlugin specifies the plugin to use when cloudProvider is \"external\". It is currently used by the in repo cloud providers to handle node and volume control in the KCM.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "name": { + "UseServiceAccountCredentials": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "useServiceAccountCredentials indicates whether controllers should be run with individual service account credentials.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "uid": { + "AllowUntaggedCloud": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "run with untagged cloud instances", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "apiVersion": { + "RouteReconciliationPeriod": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "routeReconciliationPeriod is the period for reconciling routes created for Nodes by cloud provider..", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "resourceVersion": { + "NodeMonitorPeriod": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "nodeMonitorPeriod is the period for syncing NodeStatus in NodeController.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "subresource": { + "ClusterName": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "clusterName is the instance prefix for the cluster.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ClusterCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "clusterCIDR is CIDR Range for Pods in cluster.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "AllocateNodeCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "AllocateNodeCIDRs enables CIDRs for Pods to be allocated and, if ConfigureCloudRoutes is true, to be set on the cloud provider.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "CIDRAllocatorType": { + SchemaProps: spec.SchemaProps{ + Description: "CIDRAllocatorType determines what kind of pod CIDR allocator will be used.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ConfigureCloudRoutes": { + SchemaProps: spec.SchemaProps{ + Description: "configureCloudRoutes enables CIDRs allocated with allocateNodeCIDRs to be configured on the cloud provider.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "NodeSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "nodeSyncPeriod is the period for syncing nodes from cloudprovider. Longer periods will result in fewer calls to cloud provider, but may delay addition of new nodes to cluster.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, + Required: []string{"CloudProvider", "ExternalCloudVolumePlugin", "UseServiceAccountCredentials", "AllowUntaggedCloud", "RouteReconciliationPeriod", "NodeMonitorPeriod", "ClusterName", "ClusterCIDR", "AllocateNodeCIDRs", "CIDRAllocatorType", "ConfigureCloudRoutes", "NodeSyncPeriod"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration"}, } } -func schema_pkg_apis_audit_v1alpha1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_controller_manager_config_v1alpha1_ControllerLeaderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", + Description: "ControllerLeaderConfiguration provides the configuration for a migrating leader lock.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "name": { 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", + Description: "Name is the name of the controller being migrated E.g. service-controller, route-controller, cloud-node-controller, etc", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "component": { 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", + Description: "Component is the name of the component in which the controller should be running. E.g. kube-controller-manager, cloud-controller-manager, etc Or '*' meaning the controller can be run under any component that participates in the migration", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { + }, + Required: []string{"name", "component"}, + }, + }, + } +} + +func schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GenericControllerManagerConfiguration holds configuration for a generic controller-manager.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Port": { SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is included for interoperability with API infrastructure.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "port is the port that the controller-manager's http service runs on.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "rules": { + "Address": { SchemaProps: spec.SchemaProps{ - Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule"), - }, - }, - }, + Description: "address is the IP address to serve on (set to 0.0.0.0 for all interfaces).", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "omitStages": { + "MinResyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", + Description: "minResyncPeriod is the resync period in reflectors; will be random between minResyncPeriod and 2*minResyncPeriod.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "ClientConnection": { + SchemaProps: spec.SchemaProps{ + Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + }, + }, + "ControllerStartInterval": { + SchemaProps: spec.SchemaProps{ + Description: "How long to wait between starting controller managers", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "LeaderElection": { + SchemaProps: spec.SchemaProps{ + Description: "leaderElection defines the configuration of leader election client.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"), + }, + }, + "Controllers": { + SchemaProps: spec.SchemaProps{ + Description: "Controllers is the list of controllers to enable or disable '*' means \"all enabled by default controllers\" 'foo' means \"enable 'foo'\" '-foo' means \"disable 'foo'\" first item for a particular name wins", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, + "Debugging": { + SchemaProps: spec.SchemaProps{ + Description: "DebuggingConfiguration holds configuration for Debugging related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/component-base/config/v1alpha1.DebuggingConfiguration"), + }, + }, + "LeaderMigrationEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "LeaderMigrationEnabled indicates whether Leader Migration should be enabled for the controller manager.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "LeaderMigration": { + SchemaProps: spec.SchemaProps{ + Description: "LeaderMigration holds the configuration for Leader Migration.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration"), + }, + }, }, - Required: []string{"rules"}, + Required: []string{"Port", "Address", "MinResyncPeriod", "ClientConnection", "ControllerStartInterval", "LeaderElection", "Controllers", "Debugging", "LeaderMigrationEnabled", "LeaderMigration"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.DebuggingConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration"}, } } -func schema_pkg_apis_audit_v1alpha1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_controller_manager_config_v1alpha1_LeaderMigrationConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyList is a list of audit Policies.", + Description: "LeaderMigrationConfiguration provides versioned configuration for all migrating leader locks.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -38899,157 +46147,80 @@ func schema_pkg_apis_audit_v1alpha1_PolicyList(ref common.ReferenceCallback) com Format: "", }, }, - "metadata": { + "leaderName": { + SchemaProps: spec.SchemaProps{ + Description: "LeaderName is the name of the leader election resource that protects the migration E.g. 1-20-KCM-to-1-21-CCM", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceLock": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "ResourceLock indicates the resource object type that will be used to lock Should be \"leases\" or \"endpoints\"", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "items": { + "controllerLeaders": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "ControllerLeaders contains a list of migrating leader lock configurations", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration"), }, }, }, }, }, }, - Required: []string{"items"}, + Required: []string{"leaderName", "resourceLock", "controllerLeaders"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy"}, + "k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration"}, } } -func schema_pkg_apis_audit_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_controller_manager_config_v1beta1_ControllerLeaderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", + Description: "ControllerLeaderConfiguration provides the configuration for a migrating leader lock.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "level": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "The Level that requests matching this rule are recorded at.", + Description: "Name is the name of the controller being migrated E.g. service-controller, route-controller, cloud-node-controller, etc", + Default: "", Type: []string{"string"}, Format: "", }, }, - "users": { - SchemaProps: spec.SchemaProps{ - Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "userGroups": { - SchemaProps: spec.SchemaProps{ - Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "The verbs that match this rule. An empty list implies every verb.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources"), - }, - }, - }, - }, - }, - "namespaces": { - SchemaProps: spec.SchemaProps{ - Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "nonResourceURLs": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "omitStages": { + "component": { SchemaProps: spec.SchemaProps{ - Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Component is the name of the component in which the controller should be running. E.g. kube-controller-manager, cloud-controller-manager, etc Or '*' meaning the controller can be run under any component that participates in the migration", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"level"}, + Required: []string{"name", "component"}, }, }, - Dependencies: []string{ - "k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources"}, } } -func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_controller_manager_config_v1beta1_LeaderMigrationConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Event captures all the information that can be included in an API audit log.", + Description: "LeaderMigrationConfiguration provides versioned configuration for all migrating leader locks.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -39066,151 +46237,158 @@ func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.Op Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is included for interoperability with API infrastructure. DEPRECATED: Use StageTimestamp which supports micro second instead of ObjectMeta.CreateTimestamp and the rest of the object is not used", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "level": { + "leaderName": { SchemaProps: spec.SchemaProps{ - Description: "AuditLevel at which event was generated", + Description: "LeaderName is the name of the leader election resource that protects the migration E.g. 1-20-KCM-to-1-21-CCM", + Default: "", Type: []string{"string"}, Format: "", }, }, - "timestamp": { - SchemaProps: spec.SchemaProps{ - Description: "Time the request reached the apiserver. DEPRECATED: Use RequestReceivedTimestamp which supports micro second instead.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "auditID": { + "resourceLock": { SchemaProps: spec.SchemaProps{ - Description: "Unique audit ID, generated for each request.", + Description: "ResourceLock indicates the resource object type that will be used to lock Should be \"leases\" or \"endpoints\"", + Default: "", Type: []string{"string"}, Format: "", }, }, - "stage": { + "controllerLeaders": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Stage of the request handling when this event instance was generated.", - Type: []string{"string"}, - Format: "", + Description: "ControllerLeaders contains a list of migrating leader lock configurations", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration"), + }, + }, + }, }, }, - "requestURI": { + }, + Required: []string{"leaderName", "resourceLock", "controllerLeaders"}, + }, + }, + Dependencies: []string{ + "k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration"}, + } +} + +func schema_pkg_apis_apiregistration_v1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "RequestURI is the request URI as sent by the client to a server.", + 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: "", }, }, - "verb": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", + 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: "", }, }, - "user": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Authenticated user information.", - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + Description: "Standard object's metadata. 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"), }, }, - "impersonatedUser": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Impersonated user information.", - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + Description: "Spec contains information for locating and communicating with a server", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec"), }, }, - "sourceIPs": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "Source IPs, from where the request originated and intermediate proxies.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Status contains derived information about an API server", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"), }, }, - "userAgent": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"}, + } +} + +func schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceCondition describes the state of an APIService at a particular point", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { SchemaProps: spec.SchemaProps{ - Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", + Description: "Type is the type of the condition.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "objectRef": { - SchemaProps: spec.SchemaProps{ - Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference"), - }, - }, - "responseStatus": { - SchemaProps: spec.SchemaProps{ - Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), - }, - }, - "requestObject": { - SchemaProps: spec.SchemaProps{ - Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), - }, - }, - "responseObject": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + Description: "Status is the status of the condition. Can be True, False, Unknown.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "requestReceivedTimestamp": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "Time the request reached the apiserver.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "stageTimestamp": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "Time the request reached current audit stage.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Description: "Unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", }, }, - "annotations": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"level", "timestamp", "auditID", "stage", "requestURI", "verb", "user"}, + Required: []string{"type", "status"}, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_audit_v1beta1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EventList is a list of audit Events.", + Description: "APIServiceList is a list of APIService objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -39229,16 +46407,20 @@ func schema_pkg_apis_audit_v1beta1_EventList(ref common.ReferenceCallback) commo }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard list metadata 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{ - Type: []string{"array"}, + Description: "Items is the list of APIService", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.Event"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"), }, }, }, @@ -39249,47 +46431,107 @@ func schema_pkg_apis_audit_v1beta1_EventList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.Event"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"}, } } -func schema_pkg_apis_audit_v1beta1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupResources represents resource kinds in an API group.", + Description: "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "service": { + SchemaProps: spec.SchemaProps{ + Description: "Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"), + }, + }, "group": { SchemaProps: spec.SchemaProps{ - Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", + Description: "Group is the API group name this server hosts", Type: []string{"string"}, Format: "", }, }, - "resources": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, + Description: "Version is the API version this server hosts. For example, \"v1\"", + Type: []string{"string"}, + Format: "", + }, + }, + "insecureSkipTLSVerify": { + SchemaProps: spec.SchemaProps{ + Description: "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "caBundle": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", }, }, + SchemaProps: spec.SchemaProps{ + Description: "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", + }, }, - "resourceNames": { + "groupPriorityMinimum": { SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", + Description: "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "versionPriority": { + SchemaProps: spec.SchemaProps{ + Description: "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"groupPriorityMinimum", "versionPriority"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"}, + } +} + +func schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceStatus contains derived information about an API server", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Current service state of apiService.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"), }, }, }, @@ -39298,140 +46540,153 @@ func schema_pkg_apis_audit_v1beta1_GroupResources(ref common.ReferenceCallback) }, }, }, + Dependencies: []string{ + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"}, } } -func schema_pkg_apis_audit_v1beta1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "resource": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, "namespace": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Namespace is the namespace of the service", + Type: []string{"string"}, + Format: "", }, }, "name": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Name is the name of the service", + Type: []string{"string"}, + Format: "", }, }, - "uid": { + "port": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + Type: []string{"integer"}, + Format: "int32", }, }, - "apiGroup": { + }, + }, + }, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the name of the API group that contains the referred object. The empty string represents the core API group.", + 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 is the version of the API group that contains the referred object.", + 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: "", }, }, - "resourceVersion": { + "metadata": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Standard object's metadata. 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"), }, }, - "subresource": { + "spec": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Spec contains information for locating and communicating with a server", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status contains derived information about an API server", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"), }, }, }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"}, } } -func schema_pkg_apis_audit_v1beta1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", + Description: "APIServiceCondition describes the state of an APIService at a particular point", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "type": { 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", + Description: "Type is the type of the condition.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "status": { 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", + Description: "Status is the status of the condition. Can be True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is included for interoperability with API infrastructure.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "rules": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule"), - }, - }, - }, + Description: "Unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", }, }, - "omitStages": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"rules"}, + Required: []string{"type", "status"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_audit_v1beta1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyList is a list of audit Policies.", + Description: "APIServiceList is a list of APIService objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -39450,16 +46705,20 @@ func schema_pkg_apis_audit_v1beta1_PolicyList(ref common.ReferenceCallback) comm }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard list metadata 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{ - Type: []string{"array"}, + Description: "Items is the list of APIService", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"), }, }, }, @@ -39470,478 +46729,672 @@ func schema_pkg_apis_audit_v1beta1_PolicyList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"}, } } -func schema_pkg_apis_audit_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", + Description: "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "level": { + "service": { SchemaProps: spec.SchemaProps{ - Description: "The Level that requests matching this rule are recorded at.", + Description: "Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"), + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group is the API group name this server hosts", Type: []string{"string"}, Format: "", }, }, - "users": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Version is the API version this server hosts. For example, \"v1\"", + Type: []string{"string"}, + Format: "", }, }, - "userGroups": { + "insecureSkipTLSVerify": { SchemaProps: spec.SchemaProps{ - Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", + Type: []string{"boolean"}, + Format: "", }, }, - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "The verbs that match this rule. An empty list implies every verb.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, + "caBundle": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", }, }, - }, - "resources": { SchemaProps: spec.SchemaProps{ - Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources"), - }, - }, - }, + Description: "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", }, }, - "namespaces": { + "groupPriorityMinimum": { SchemaProps: spec.SchemaProps{ - Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "nonResourceURLs": { + "versionPriority": { SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, + Description: "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"groupPriorityMinimum", "versionPriority"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"}, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceStatus contains derived information about an API server", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", }, }, - }, - "omitStages": { SchemaProps: spec.SchemaProps{ - Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", + Description: "Current service state of apiService.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"), }, }, }, }, }, }, - Required: []string{"level"}, }, }, Dependencies: []string{ - "k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources"}, + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"}, } } -func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "namespace": { 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", + Description: "Namespace is the namespace of the service", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "name": { 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", + Description: "Name is the name of the service", Type: []string{"string"}, Format: "", }, }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information passed to the plugin by the transport. This contains request and runtime specific information, such as if the session is interactive.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec"), - }, - }, - "status": { + "port": { SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus"), + Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + Type: []string{"integer"}, + Format: "int32", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus"}, } } -func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredenitalSpec holds request and runtime specific information provided by the transport.", + Description: "AttachDetachControllerConfiguration contains elements describing AttachDetachController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "response": { + "DisableAttachDetachReconcilerSync": { SchemaProps: spec.SchemaProps{ - Description: "Response is populated when the transport encounters HTTP status codes, such as 401, suggesting previous credentials were invalid.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response"), + Description: "Reconciler runs a periodic loop to reconcile the desired state of the with the actual state of the world by triggering attach detach operations. This flag enables or disables reconcile. Is false by default, and thus enabled.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "interactive": { + "ReconcilerSyncLoopPeriod": { SchemaProps: spec.SchemaProps{ - Description: "Interactive is true when the transport detects the command is being called from an interactive prompt.", - Type: []string{"boolean"}, - Format: "", + Description: "ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop wait between successive executions. Is set to 5 sec by default.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, + Required: []string{"DisableAttachDetachReconcilerSync", "ReconcilerSyncLoopPeriod"}, }, }, Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", + Description: "CSRSigningConfiguration holds information about a particular CSR signer", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "expirationTimestamp": { + "CertFile": { SchemaProps: spec.SchemaProps{ - Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "certFile is the filename containing a PEM-encoded X509 CA certificate used to issue certificates", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "token": { + "KeyFile": { SchemaProps: spec.SchemaProps{ - Description: "Token is a bearer token used by the client for request authentication.", + Description: "keyFile is the filename containing a PEM-encoded RSA or ECDSA private key used to issue certificates", + Default: "", Type: []string{"string"}, Format: "", }, }, - "clientCertificateData": { + }, + Required: []string{"CertFile", "KeyFile"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSRSigningControllerConfiguration contains elements describing CSRSigningController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ClusterSigningCertFile": { SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded client TLS certificates (including intermediates, if any).", + Description: "clusterSigningCertFile is the filename containing a PEM-encoded X509 CA certificate used to issue cluster-scoped certificates", + Default: "", Type: []string{"string"}, Format: "", }, }, - "clientKeyData": { + "ClusterSigningKeyFile": { SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded private key for the above certificate.", + Description: "clusterSigningCertFile is the filename containing a PEM-encoded RSA or ECDSA private key used to issue cluster-scoped certificates", + Default: "", Type: []string{"string"}, Format: "", }, }, + "KubeletServingSignerConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "kubeletServingSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kubelet-serving signer", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + }, + }, + "KubeletClientSignerConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "kubeletClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client-kubelet", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + }, + }, + "KubeAPIServerClientSignerConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "kubeAPIServerClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + }, + }, + "LegacyUnknownSignerConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "legacyUnknownSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/legacy-unknown", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + }, + }, + "ClusterSigningDuration": { + SchemaProps: spec.SchemaProps{ + Description: "clusterSigningDuration is the max length of duration signed certificates will be given. Individual CSRs may request shorter certs by setting spec.expirationSeconds.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, }, + Required: []string{"ClusterSigningCertFile", "ClusterSigningKeyFile", "KubeletServingSignerConfiguration", "KubeletClientSignerConfiguration", "KubeAPIServerClientSignerConfiguration", "LegacyUnknownSignerConfiguration", "ClusterSigningDuration"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"}, } } -func schema_pkg_apis_clientauthentication_v1alpha1_Response(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_CronJobControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Response defines metadata about a failed request, including HTTP status code and response headers.", + Description: "CronJobControllerConfiguration contains elements describing CrongJob2Controller.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "header": { + "ConcurrentCronJobSyncs": { SchemaProps: spec.SchemaProps{ - Description: "Header holds HTTP headers returned by the server.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, + Description: "concurrentCronJobSyncs is the number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "code": { + }, + Required: []string{"ConcurrentCronJobSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetControllerConfiguration contains elements describing DaemonSetController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentDaemonSetSyncs": { SchemaProps: spec.SchemaProps{ - Description: "Code is the HTTP status code returned by the server.", + Description: "concurrentDaemonSetSyncs is the number of daemonset objects that are allowed to sync concurrently. Larger number = more responsive daemonset, but more CPU (and network) load.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, + Required: []string{"ConcurrentDaemonSetSyncs"}, }, }, } } -func schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredentials is used by exec-based plugins to communicate credentials to HTTP transports.", + Description: "DeploymentControllerConfiguration contains elements describing DeploymentController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "ConcurrentDeploymentSyncs": { 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: "", + Description: "concurrentDeploymentSyncs is the number of deployment objects that are allowed to sync concurrently. Larger number = more responsive deployments, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "apiVersion": { + "DeploymentControllerSyncPeriod": { 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: "", + Description: "deploymentControllerSyncPeriod is the period for syncing the deployments.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "spec": { + }, + Required: []string{"ConcurrentDeploymentSyncs", "DeploymentControllerSyncPeriod"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeprecatedControllerConfiguration contains elements be deprecated.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "DeletingPodsQPS": { SchemaProps: spec.SchemaProps{ - Description: "Spec holds information passed to the plugin by the transport. This contains request and runtime specific information, such as if the session is interactive.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec"), + Description: "DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in case of node failure.", + Default: 0, + Type: []string{"number"}, + Format: "float", }, }, - "status": { + "DeletingPodsBurst": { SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"), + Description: "DEPRECATED: deletingPodsBurst is the number of nodes on which pods are bursty deleted in case of node failure. For more details look into RateLimiter.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "RegisterRetryCount": { + SchemaProps: spec.SchemaProps{ + Description: "registerRetryCount is the number of retries for initial node registration. Retry interval equals node-sync-period.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, + Required: []string{"DeletingPodsQPS", "DeletingPodsBurst", "RegisterRetryCount"}, }, }, - Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"}, } } -func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredenitalSpec holds request and runtime specific information provided by the transport.", + Description: "EndpointControllerConfiguration contains elements describing EndpointController.", Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentEndpointSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentEndpointSyncs is the number of endpoint syncing operations that will be done concurrently. Larger number = faster endpoint updating, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "EndpointUpdatesBatchPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"ConcurrentEndpointSyncs", "EndpointUpdatesBatchPeriod"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", + Description: "EndpointSliceControllerConfiguration contains elements describing EndpointSliceController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "expirationTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "token": { + "ConcurrentServiceEndpointSyncs": { SchemaProps: spec.SchemaProps{ - Description: "Token is a bearer token used by the client for request authentication.", - Type: []string{"string"}, - Format: "", + Description: "concurrentServiceEndpointSyncs is the number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "clientCertificateData": { + "MaxEndpointsPerSlice": { SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded client TLS certificates (including intermediates, if any).", - Type: []string{"string"}, - Format: "", + Description: "maxEndpointsPerSlice is the maximum number of endpoints that will be added to an EndpointSlice. More endpoints per slice will result in fewer and larger endpoint slices, but larger resources.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "clientKeyData": { + "EndpointUpdatesBatchPeriod": { SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded private key for the above certificate.", - Type: []string{"string"}, - Format: "", + Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, + Required: []string{"ConcurrentServiceEndpointSyncs", "MaxEndpointsPerSlice", "EndpointUpdatesBatchPeriod"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_pkg_apis_apiregistration_v1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroringControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + Description: "EndpointSliceMirroringControllerConfiguration contains elements describing EndpointSliceMirroringController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "MirroringConcurrentServiceEndpointSyncs": { 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: "", + Description: "mirroringConcurrentServiceEndpointSyncs is the number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "apiVersion": { + "MirroringMaxEndpointsPerSubset": { 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: "", + Description: "mirroringMaxEndpointsPerSubset is the maximum number of endpoints that will be mirrored to an EndpointSlice for an EndpointSubset.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "metadata": { + "MirroringEndpointUpdatesBatchPeriod": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "mirroringEndpointUpdatesBatchPeriod can be used to batch EndpointSlice updates. All updates triggered by EndpointSlice changes will be delayed by up to 'mirroringEndpointUpdatesBatchPeriod'. If other addresses in the same Endpoints resource change in that period, they will be batched to a single EndpointSlice update. Default 0 value means that each Endpoints update triggers an EndpointSlice update.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "spec": { + }, + Required: []string{"MirroringConcurrentServiceEndpointSyncs", "MirroringMaxEndpointsPerSubset", "MirroringEndpointUpdatesBatchPeriod"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "EnableGarbageCollector": { SchemaProps: spec.SchemaProps{ - Description: "Spec contains information for locating and communicating with a server", - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec"), + Description: "enables the generic garbage collector. MUST be synced with the corresponding flag of the kube-apiserver. WARNING: the generic garbage collector is an alpha feature.", + Type: []string{"boolean"}, + Format: "", }, }, - "status": { + "ConcurrentGCSyncs": { SchemaProps: spec.SchemaProps{ - Description: "Status contains derived information about an API server", - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"), + Description: "concurrentGCSyncs is the number of garbage collector workers that are allowed to sync concurrently.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "GCIgnoredResources": { + SchemaProps: spec.SchemaProps{ + Description: "gcIgnoredResources is the list of GroupResources that garbage collection should ignore.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"), + }, + }, + }, }, }, }, + Required: []string{"EnableGarbageCollector", "ConcurrentGCSyncs", "GCIgnoredResources"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"}, + "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"}, } } -func schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceCondition describes the state of an APIService at a particular point", + Description: "GroupResource describes an group resource.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "Group": { SchemaProps: spec.SchemaProps{ - Description: "Type is the type of the condition.", + Description: "group is the group portion of the GroupResource.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "status": { + "Resource": { SchemaProps: spec.SchemaProps{ - Description: "Status is the status of the condition. Can be True, False, Unknown.", + Description: "resource is the resource portion of the GroupResource.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "lastTransitionTime": { + }, + Required: []string{"Group", "Resource"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HPAControllerConfiguration contains elements describing HPAController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "HorizontalPodAutoscalerSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "HorizontalPodAutoscalerSyncPeriod is the period for syncing the number of pods in horizontal pod autoscaler.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "reason": { + "HorizontalPodAutoscalerUpscaleForbiddenWindow": { SchemaProps: spec.SchemaProps{ - Description: "Unique, one-word, CamelCase reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", + Description: "HorizontalPodAutoscalerUpscaleForbiddenWindow is a period after which next upscale allowed.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "message": { + "HorizontalPodAutoscalerDownscaleStabilizationWindow": { SchemaProps: spec.SchemaProps{ - Description: "Human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", + Description: "HorizontalPodAutoscalerDowncaleStabilizationWindow is a period for which autoscaler will look backwards and not scale down below any recommendation it made during that period.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerDownscaleForbiddenWindow": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerDownscaleForbiddenWindow is a period after which next downscale allowed.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerTolerance": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerTolerance is the tolerance for when resource usage suggests upscaling/downscaling", + Default: 0, + Type: []string{"number"}, + Format: "double", + }, + }, + "HorizontalPodAutoscalerCPUInitializationPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerCPUInitializationPeriod is the period after pod start when CPU samples might be skipped.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerInitialReadinessDelay": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerInitialReadinessDelay is period after pod start during which readiness changes are treated as readiness being set for the first time. The only effect of this is that HPA will disregard CPU samples from unready pods that had last readiness change during that period.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"type", "status"}, + Required: []string{"HorizontalPodAutoscalerSyncPeriod", "HorizontalPodAutoscalerUpscaleForbiddenWindow", "HorizontalPodAutoscalerDownscaleStabilizationWindow", "HorizontalPodAutoscalerDownscaleForbiddenWindow", "HorizontalPodAutoscalerTolerance", "HorizontalPodAutoscalerCPUInitializationPeriod", "HorizontalPodAutoscalerInitialReadinessDelay"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_pkg_apis_apiregistration_v1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceList is a list of APIService objects.", + Description: "JobControllerConfiguration contains elements describing JobController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentJobSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentJobSyncs is the number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"ConcurrentJobSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeControllerManagerConfiguration contains elements describing kube-controller manager.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -39958,497 +47411,570 @@ func schema_pkg_apis_apiregistration_v1_APIServiceList(ref common.ReferenceCallb Format: "", }, }, - "metadata": { + "Generic": { + SchemaProps: spec.SchemaProps{ + Description: "Generic holds configuration for a generic controller-manager", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), + }, + }, + "KubeCloudShared": { + SchemaProps: spec.SchemaProps{ + Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration"), + }, + }, + "AttachDetachController": { + SchemaProps: spec.SchemaProps{ + Description: "AttachDetachControllerConfiguration holds configuration for AttachDetachController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration"), + }, + }, + "CSRSigningController": { + SchemaProps: spec.SchemaProps{ + Description: "CSRSigningControllerConfiguration holds configuration for CSRSigningController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration"), + }, + }, + "DaemonSetController": { + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetControllerConfiguration holds configuration for DaemonSetController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration"), + }, + }, + "DeploymentController": { + SchemaProps: spec.SchemaProps{ + Description: "DeploymentControllerConfiguration holds configuration for DeploymentController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration"), + }, + }, + "StatefulSetController": { + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetControllerConfiguration holds configuration for StatefulSetController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration"), + }, + }, + "DeprecatedController": { + SchemaProps: spec.SchemaProps{ + Description: "DeprecatedControllerConfiguration holds configuration for some deprecated features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration"), + }, + }, + "EndpointController": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointControllerConfiguration holds configuration for EndpointController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration"), + }, + }, + "EndpointSliceController": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointSliceControllerConfiguration holds configuration for EndpointSliceController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration"), + }, + }, + "EndpointSliceMirroringController": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointSliceMirroringControllerConfiguration holds configuration for EndpointSliceMirroringController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration"), + }, + }, + "GarbageCollectorController": { + SchemaProps: spec.SchemaProps{ + Description: "GarbageCollectorControllerConfiguration holds configuration for GarbageCollectorController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration"), + }, + }, + "HPAController": { + SchemaProps: spec.SchemaProps{ + Description: "HPAControllerConfiguration holds configuration for HPAController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration"), + }, + }, + "JobController": { + SchemaProps: spec.SchemaProps{ + Description: "JobControllerConfiguration holds configuration for JobController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration"), + }, + }, + "CronJobController": { + SchemaProps: spec.SchemaProps{ + Description: "CronJobControllerConfiguration holds configuration for CronJobController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration"), + }, + }, + "NamespaceController": { + SchemaProps: spec.SchemaProps{ + Description: "NamespaceControllerConfiguration holds configuration for NamespaceController related features. NamespaceControllerConfiguration holds configuration for NamespaceController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration"), + }, + }, + "NodeIPAMController": { + SchemaProps: spec.SchemaProps{ + Description: "NodeIPAMControllerConfiguration holds configuration for NodeIPAMController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration"), + }, + }, + "NodeLifecycleController": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "NodeLifecycleControllerConfiguration holds configuration for NodeLifecycleController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration"), }, }, - "items": { + "PersistentVolumeBinderController": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"), - }, - }, - }, + Description: "PersistentVolumeBinderControllerConfiguration holds configuration for PersistentVolumeBinderController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration"), }, }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"}, - } -} - -func schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "service": { + "PodGCController": { SchemaProps: spec.SchemaProps{ - Description: "Service is a reference to the service for this API server. It must communicate on port 443 If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"), + Description: "PodGCControllerConfiguration holds configuration for PodGCController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration"), }, }, - "group": { + "ReplicaSetController": { SchemaProps: spec.SchemaProps{ - Description: "Group is the API group name this server hosts", - Type: []string{"string"}, - Format: "", + Description: "ReplicaSetControllerConfiguration holds configuration for ReplicaSet related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration"), }, }, - "version": { + "ReplicationController": { SchemaProps: spec.SchemaProps{ - Description: "Version is the API version this server hosts. For example, \"v1\"", - Type: []string{"string"}, - Format: "", + Description: "ReplicationControllerConfiguration holds configuration for ReplicationController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration"), }, }, - "insecureSkipTLSVerify": { + "ResourceQuotaController": { SchemaProps: spec.SchemaProps{ - Description: "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", - Type: []string{"boolean"}, - Format: "", + Description: "ResourceQuotaControllerConfiguration holds configuration for ResourceQuotaController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration"), }, }, - "caBundle": { + "SAController": { SchemaProps: spec.SchemaProps{ - Description: "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", - Type: []string{"string"}, - Format: "byte", + Description: "SAControllerConfiguration holds configuration for ServiceAccountController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration"), }, }, - "groupPriorityMinimum": { + "ServiceController": { SchemaProps: spec.SchemaProps{ - Description: "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", - Type: []string{"integer"}, - Format: "int32", + Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration"), }, }, - "versionPriority": { + "TTLAfterFinishedController": { SchemaProps: spec.SchemaProps{ - Description: "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", - Type: []string{"integer"}, - Format: "int32", + Description: "TTLAfterFinishedControllerConfiguration holds configuration for TTLAfterFinishedController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"), }, }, }, - Required: []string{"groupPriorityMinimum", "versionPriority"}, + Required: []string{"Generic", "KubeCloudShared", "AttachDetachController", "CSRSigningController", "DaemonSetController", "DeploymentController", "StatefulSetController", "DeprecatedController", "EndpointController", "EndpointSliceController", "EndpointSliceMirroringController", "GarbageCollectorController", "HPAController", "JobController", "CronJobController", "NamespaceController", "NodeIPAMController", "NodeLifecycleController", "PersistentVolumeBinderController", "PodGCController", "ReplicaSetController", "ReplicationController", "ResourceQuotaController", "SAController", "ServiceController", "TTLAfterFinishedController"}, }, }, Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"}, + "k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration", "k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"}, } } -func schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceStatus contains derived information about an API server", + Description: "NamespaceControllerConfiguration contains elements describing NamespaceController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, + "NamespaceSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "namespaceSyncPeriod is the period for syncing namespace life-cycle updates.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, + }, + "ConcurrentNamespaceSyncs": { SchemaProps: spec.SchemaProps{ - Description: "Current service state of apiService.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"), - }, - }, - }, + Description: "concurrentNamespaceSyncs is the number of namespace objects that are allowed to sync concurrently.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, + Required: []string{"NamespaceSyncPeriod", "ConcurrentNamespaceSyncs"}, }, }, Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_pkg_apis_apiregistration_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Description: "NodeIPAMControllerConfiguration contains elements describing NodeIpamController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namespace": { + "ServiceCIDR": { SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace of the service", + Description: "serviceCIDR is CIDR Range for Services in cluster.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "name": { + "SecondaryServiceCIDR": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the service", + Description: "secondaryServiceCIDR is CIDR Range for Services in cluster. This is used in dual stack clusters. SecondaryServiceCIDR must be of different IP family than ServiceCIDR", + Default: "", Type: []string{"string"}, Format: "", }, }, - "port": { + "NodeCIDRMaskSize": { SchemaProps: spec.SchemaProps{ - Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + Description: "NodeCIDRMaskSize is the mask size for node cidr in cluster.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "NodeCIDRMaskSizeIPv4": { + SchemaProps: spec.SchemaProps{ + Description: "NodeCIDRMaskSizeIPv4 is the mask size for node cidr in dual-stack cluster.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "NodeCIDRMaskSizeIPv6": { + SchemaProps: spec.SchemaProps{ + Description: "NodeCIDRMaskSizeIPv6 is the mask size for node cidr in dual-stack cluster.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, + Required: []string{"ServiceCIDR", "SecondaryServiceCIDR", "NodeCIDRMaskSize", "NodeCIDRMaskSizeIPv4", "NodeCIDRMaskSizeIPv6"}, }, }, } } -func schema_pkg_apis_apiregistration_v1beta1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + Description: "NodeLifecycleControllerConfiguration contains elements describing NodeLifecycleController.", 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": { + "EnableTaintManager": { 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"}, + Description: "If set to true enables NoExecute Taints and will evict all not-tolerating Pod running on Nodes tainted with this kind of Taints.", + Type: []string{"boolean"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { + "NodeEvictionRate": { SchemaProps: spec.SchemaProps{ - Description: "Spec contains information for locating and communicating with a server", - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec"), + Description: "nodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is healthy", + Default: 0, + Type: []string{"number"}, + Format: "float", }, }, - "status": { + "SecondaryNodeEvictionRate": { SchemaProps: spec.SchemaProps{ - Description: "Status contains derived information about an API server", - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"), + Description: "secondaryNodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy", + Default: 0, + Type: []string{"number"}, + Format: "float", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"}, - } -} - -func schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIServiceCondition describes the state of an APIService at a particular point", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { + "NodeStartupGracePeriod": { SchemaProps: spec.SchemaProps{ - Description: "Type is the type of the condition.", - Type: []string{"string"}, - Format: "", + Description: "nodeStartupGracePeriod is the amount of time which we allow starting a node to be unresponsive before marking it unhealthy.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "status": { + "NodeMonitorGracePeriod": { SchemaProps: spec.SchemaProps{ - Description: "Status is the status of the condition. Can be True, False, Unknown.", - Type: []string{"string"}, - Format: "", + Description: "nodeMontiorGracePeriod is the amount of time which we allow a running node to be unresponsive before marking it unhealthy. Must be N times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "lastTransitionTime": { + "PodEvictionTimeout": { SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "podEvictionTimeout is the grace period for deleting pods on failed nodes.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "reason": { + "LargeClusterSizeThreshold": { SchemaProps: spec.SchemaProps{ - Description: "Unique, one-word, CamelCase reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", + Description: "secondaryNodeEvictionRate is implicitly overridden to 0 for clusters smaller than or equal to largeClusterSizeThreshold", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "message": { + "UnhealthyZoneThreshold": { SchemaProps: spec.SchemaProps{ - Description: "Human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", + Description: "Zone is treated as unhealthy in nodeEvictionRate and secondaryNodeEvictionRate when at least unhealthyZoneThreshold (no less than 3) of Nodes in the zone are NotReady", + Default: 0, + Type: []string{"number"}, + Format: "float", }, }, }, - Required: []string{"type", "status"}, + Required: []string{"EnableTaintManager", "NodeEvictionRate", "SecondaryNodeEvictionRate", "NodeStartupGracePeriod", "NodeMonitorGracePeriod", "PodEvictionTimeout", "LargeClusterSizeThreshold", "UnhealthyZoneThreshold"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceList is a list of APIService objects.", + Description: "PersistentVolumeBinderControllerConfiguration contains elements describing PersistentVolumeBinderController.", 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": { + "PVClaimBinderSyncPeriod": { 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: "", + Description: "pvClaimBinderSyncPeriod is the period for syncing persistent volumes and persistent volume claims.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "metadata": { + "VolumeConfiguration": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "volumeConfiguration holds configuration for volume related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"), }, }, - "items": { + "VolumeHostCIDRDenylist": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "VolumeHostCIDRDenylist is a list of CIDRs that should not be reachable by the controller from plugins.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, + "VolumeHostAllowLocalLoopback": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeHostAllowLocalLoopback indicates if local loopback hosts (127.0.0.1, etc) should be allowed from plugins.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, - Required: []string{"items"}, + Required: []string{"PVClaimBinderSyncPeriod", "VolumeConfiguration", "VolumeHostCIDRDenylist", "VolumeHostAllowLocalLoopback"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"}, } } -func schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", + Description: "PersistentVolumeRecyclerConfiguration contains elements describing persistent volume plugins.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "service": { + "MaximumRetry": { SchemaProps: spec.SchemaProps{ - Description: "Service is a reference to the service for this API server. It must communicate on port 443 If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"), + Description: "maximumRetry is number of retries the PV recycler will execute on failure to recycle PV.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "group": { + "MinimumTimeoutNFS": { SchemaProps: spec.SchemaProps{ - Description: "Group is the API group name this server hosts", - Type: []string{"string"}, - Format: "", + Description: "minimumTimeoutNFS is the minimum ActiveDeadlineSeconds to use for an NFS Recycler pod.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "version": { + "PodTemplateFilePathNFS": { SchemaProps: spec.SchemaProps{ - Description: "Version is the API version this server hosts. For example, \"v1\"", + Description: "podTemplateFilePathNFS is the file path to a pod definition used as a template for NFS persistent volume recycling", + Default: "", Type: []string{"string"}, Format: "", }, }, - "insecureSkipTLSVerify": { + "IncrementTimeoutNFS": { SchemaProps: spec.SchemaProps{ - Description: "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", - Type: []string{"boolean"}, - Format: "", + Description: "incrementTimeoutNFS is the increment of time added per Gi to ActiveDeadlineSeconds for an NFS scrubber pod.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "caBundle": { + "PodTemplateFilePathHostPath": { SchemaProps: spec.SchemaProps{ - Description: "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", + Description: "podTemplateFilePathHostPath is the file path to a pod definition used as a template for HostPath persistent volume recycling. This is for development and testing only and will not work in a multi-node cluster.", + Default: "", Type: []string{"string"}, - Format: "byte", + Format: "", }, }, - "groupPriorityMinimum": { + "MinimumTimeoutHostPath": { SchemaProps: spec.SchemaProps{ - Description: "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", + Description: "minimumTimeoutHostPath is the minimum ActiveDeadlineSeconds to use for a HostPath Recycler pod. This is for development and testing only and will not work in a multi-node cluster.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "versionPriority": { + "IncrementTimeoutHostPath": { SchemaProps: spec.SchemaProps{ - Description: "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Description: "incrementTimeoutHostPath is the increment of time added per Gi to ActiveDeadlineSeconds for a HostPath scrubber pod. This is for development and testing only and will not work in a multi-node cluster.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"groupPriorityMinimum", "versionPriority"}, + Required: []string{"MaximumRetry", "MinimumTimeoutNFS", "PodTemplateFilePathNFS", "IncrementTimeoutNFS", "PodTemplateFilePathHostPath", "MinimumTimeoutHostPath", "IncrementTimeoutHostPath"}, }, }, - Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"}, } } -func schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceStatus contains derived information about an API server", + Description: "PodGCControllerConfiguration contains elements describing PodGCController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, + "TerminatedPodGCThreshold": { SchemaProps: spec.SchemaProps{ - Description: "Current service state of apiService.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"), - }, - }, - }, + Description: "terminatedPodGCThreshold is the number of terminated pods that can exist before the terminated pod garbage collector starts deleting terminated pods. If <= 0, the terminated pod garbage collector is disabled.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, + Required: []string{"TerminatedPodGCThreshold"}, }, }, - Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"}, } } -func schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Description: "ReplicaSetControllerConfiguration contains elements describing ReplicaSetController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace of the service", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the service", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { + "ConcurrentRSSyncs": { SchemaProps: spec.SchemaProps{ - Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + Description: "concurrentRSSyncs is the number of replica sets that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, + Required: []string{"ConcurrentRSSyncs"}, }, }, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AttachDetachControllerConfiguration contains elements describing AttachDetachController.", + Description: "ReplicationControllerConfiguration contains elements describing ReplicationController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "DisableAttachDetachReconcilerSync": { - SchemaProps: spec.SchemaProps{ - Description: "Reconciler runs a periodic loop to reconcile the desired state of the with the actual state of the world by triggering attach detach operations. This flag enables or disables reconcile. Is false by default, and thus enabled.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "ReconcilerSyncLoopPeriod": { + "ConcurrentRCSyncs": { SchemaProps: spec.SchemaProps{ - Description: "ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop wait between successive executions. Is set to 5 sec by default.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "concurrentRCSyncs is the number of replication controllers that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"DisableAttachDetachReconcilerSync", "ReconcilerSyncLoopPeriod"}, + Required: []string{"ConcurrentRCSyncs"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSRSigningControllerConfiguration contains elements describing CSRSigningController.", + Description: "ResourceQuotaControllerConfiguration contains elements describing ResourceQuotaController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ClusterSigningCertFile": { - SchemaProps: spec.SchemaProps{ - Description: "clusterSigningCertFile is the filename containing a PEM-encoded X509 CA certificate used to issue cluster-scoped certificates", - Type: []string{"string"}, - Format: "", - }, - }, - "ClusterSigningKeyFile": { + "ResourceQuotaSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "clusterSigningCertFile is the filename containing a PEM-encoded RSA or ECDSA private key used to issue cluster-scoped certificates", - Type: []string{"string"}, - Format: "", + Description: "resourceQuotaSyncPeriod is the period for syncing quota usage status in the system.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "ClusterSigningDuration": { + "ConcurrentResourceQuotaSyncs": { SchemaProps: spec.SchemaProps{ - Description: "clusterSigningDuration is the length of duration signed certificates will be given.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "concurrentResourceQuotaSyncs is the number of resource quotas that are allowed to sync concurrently. Larger number = more responsive quota management, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"ClusterSigningCertFile", "ClusterSigningKeyFile", "ClusterSigningDuration"}, + Required: []string{"ResourceQuotaSyncPeriod", "ConcurrentResourceQuotaSyncs"}, }, }, Dependencies: []string{ @@ -40456,388 +47982,418 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerCo } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_CloudProviderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CloudProviderConfiguration contains basically elements about cloud provider.", + Description: "SAControllerConfiguration contains elements describing ServiceAccountController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "Name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the provider for cloud services.", - Type: []string{"string"}, - Format: "", - }, - }, - "CloudConfigFile": { + "ServiceAccountKeyFile": { SchemaProps: spec.SchemaProps{ - Description: "cloudConfigFile is the path to the cloud provider configuration file.", + Description: "serviceAccountKeyFile is the filename containing a PEM-encoded private RSA key used to sign service account tokens.", + Default: "", Type: []string{"string"}, Format: "", }, }, - }, - Required: []string{"Name", "CloudConfigFile"}, - }, - }, - } -} - -func schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetControllerConfiguration contains elements describing DaemonSetController.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ConcurrentDaemonSetSyncs": { - SchemaProps: spec.SchemaProps{ - Description: "concurrentDaemonSetSyncs is the number of daemonset objects that are allowed to sync concurrently. Larger number = more responsive daemonset, but more CPU (and network) load.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"ConcurrentDaemonSetSyncs"}, - }, - }, - } -} - -func schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentControllerConfiguration contains elements describing DeploymentController.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ConcurrentDeploymentSyncs": { + "ConcurrentSATokenSyncs": { SchemaProps: spec.SchemaProps{ - Description: "concurrentDeploymentSyncs is the number of deployment objects that are allowed to sync concurrently. Larger number = more responsive deployments, but more CPU (and network) load.", + Description: "concurrentSATokenSyncs is the number of service account token syncing operations that will be done concurrently.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "DeploymentControllerSyncPeriod": { + "RootCAFile": { SchemaProps: spec.SchemaProps{ - Description: "deploymentControllerSyncPeriod is the period for syncing the deployments.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"ConcurrentDeploymentSyncs", "DeploymentControllerSyncPeriod"}, + Required: []string{"ServiceAccountKeyFile", "ConcurrentSATokenSyncs", "RootCAFile"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DeprecatedControllerConfiguration contains elements be deprecated.", + Description: "StatefulSetControllerConfiguration contains elements describing StatefulSetController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "DeletingPodsQPS": { - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in case of node failure.", - Type: []string{"number"}, - Format: "float", - }, - }, - "DeletingPodsBurst": { - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED: deletingPodsBurst is the number of nodes on which pods are bursty deleted in case of node failure. For more details look into RateLimiter.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "RegisterRetryCount": { + "ConcurrentStatefulSetSyncs": { SchemaProps: spec.SchemaProps{ - Description: "registerRetryCount is the number of retries for initial node registration. Retry interval equals node-sync-period.", + Description: "concurrentStatefulSetSyncs is the number of statefulset objects that are allowed to sync concurrently. Larger number = more responsive statefulsets, but more CPU (and network) load.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"DeletingPodsQPS", "DeletingPodsBurst", "RegisterRetryCount"}, + Required: []string{"ConcurrentStatefulSetSyncs"}, }, }, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EndpointControllerConfiguration contains elements describing EndpointController.", + Description: "TTLAfterFinishedControllerConfiguration contains elements describing TTLAfterFinishedController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentEndpointSyncs": { - SchemaProps: spec.SchemaProps{ - Description: "concurrentEndpointSyncs is the number of endpoint syncing operations that will be done concurrently. Larger number = faster endpoint updating, but more CPU (and network) load.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "EndpointUpdatesBatchPeriod": { - SchemaProps: spec.SchemaProps{ - Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + "ConcurrentTTLSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentTTLSyncs is the number of TTL-after-finished collector workers that are allowed to sync concurrently.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"ConcurrentEndpointSyncs", "EndpointUpdatesBatchPeriod"}, + Required: []string{"ConcurrentTTLSyncs"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EndpointSliceControllerConfiguration contains elements describing EndpointSliceController.", + Description: "VolumeConfiguration contains *all* enumerated flags meant to configure all volume plugins. From this config, the controller-manager binary will create many instances of volume.VolumeConfig, each containing only the configuration needed for that plugin which are then passed to the appropriate plugin. The ControllerManager binary is the only part of the code which knows what plugins are supported and which flags correspond to each plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentServiceEndpointSyncs": { + "EnableHostPathProvisioning": { SchemaProps: spec.SchemaProps{ - Description: "concurrentServiceEndpointSyncs is the number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load.", - Type: []string{"integer"}, - Format: "int32", + Description: "enableHostPathProvisioning enables HostPath PV provisioning when running without a cloud provider. This allows testing and development of provisioning features. HostPath provisioning is not supported in any way, won't work in a multi-node cluster, and should not be used for anything other than testing or development.", + Type: []string{"boolean"}, + Format: "", }, }, - "MaxEndpointsPerSlice": { + "EnableDynamicProvisioning": { SchemaProps: spec.SchemaProps{ - Description: "maxEndpointsPerSlice is the maximum number of endpoints that will be added to an EndpointSlice. More endpoints per slice will result in fewer and larger endpoint slices, but larger resources.", - Type: []string{"integer"}, - Format: "int32", + Description: "enableDynamicProvisioning enables the provisioning of volumes when running within an environment that supports dynamic provisioning. Defaults to true.", + Type: []string{"boolean"}, + Format: "", }, }, - "EndpointUpdatesBatchPeriod": { + "PersistentVolumeRecyclerConfiguration": { SchemaProps: spec.SchemaProps{ - Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "persistentVolumeRecyclerConfiguration holds configuration for persistent volume plugins.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"), + }, + }, + "FlexVolumePluginDir": { + SchemaProps: spec.SchemaProps{ + Description: "volumePluginDir is the full path of the directory in which the flex volume plugin should search for additional third party volume plugins", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"ConcurrentServiceEndpointSyncs", "MaxEndpointsPerSlice", "EndpointUpdatesBatchPeriod"}, + Required: []string{"EnableHostPathProvisioning", "EnableDynamicProvisioning", "PersistentVolumeRecyclerConfiguration", "FlexVolumePluginDir"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController.", + Description: "KubeProxyConfiguration contains everything necessary to configure the Kubernetes proxy server.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "EnableGarbageCollector": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "enables the generic garbage collector. MUST be synced with the corresponding flag of the kube-apiserver. WARNING: the generic garbage collector is an alpha feature.", - Type: []string{"boolean"}, + 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: "", }, }, - "ConcurrentGCSyncs": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "concurrentGCSyncs is the number of garbage collector workers that are allowed to sync concurrently.", - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - "GCIgnoredResources": { + "featureGates": { SchemaProps: spec.SchemaProps{ - Description: "gcIgnoredResources is the list of GroupResources that garbage collection should ignore.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "featureGates is a map of feature names to bools that enable or disable alpha/experimental features.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"), + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, }, }, }, - }, - Required: []string{"EnableGarbageCollector", "ConcurrentGCSyncs", "GCIgnoredResources"}, - }, - }, - Dependencies: []string{ - "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"}, - } -} - -func schema_k8sio_kube_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GenericControllerManagerConfiguration holds configuration for a generic controller-manager.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "Port": { + "bindAddress": { SchemaProps: spec.SchemaProps{ - Description: "port is the port that the controller-manager's http service runs on.", - Type: []string{"integer"}, - Format: "int32", + Description: "bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0 for all interfaces)", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "Address": { + "healthzBindAddress": { SchemaProps: spec.SchemaProps{ - Description: "address is the IP address to serve on (set to 0.0.0.0 for all interfaces).", + Description: "healthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10256", + Default: "", Type: []string{"string"}, Format: "", }, }, - "MinResyncPeriod": { + "metricsBindAddress": { SchemaProps: spec.SchemaProps{ - Description: "minResyncPeriod is the resync period in reflectors; will be random between minResyncPeriod and 2*minResyncPeriod.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "metricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces)", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "ClientConnection": { + "bindAddressHardFail": { SchemaProps: spec.SchemaProps{ - Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Description: "bindAddressHardFail, if true, kube-proxy will treat failure to bind to a port as fatal and exit", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "enableProfiling": { + SchemaProps: spec.SchemaProps{ + Description: "enableProfiling enables profiling via web interface on /debug/pprof handler. Profiling handlers will be handled by metrics server.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "clusterCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "clusterCIDR is the CIDR range of the pods in the cluster. It is used to bridge traffic coming from outside of the cluster. If not provided, no off-cluster bridging will be performed.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "hostnameOverride": { + SchemaProps: spec.SchemaProps{ + Description: "hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "clientConnection": { + SchemaProps: spec.SchemaProps{ + Description: "clientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), }, }, - "ControllerStartInterval": { + "iptables": { SchemaProps: spec.SchemaProps{ - Description: "How long to wait between starting controller managers", + Description: "iptables contains iptables-related configuration options.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration"), + }, + }, + "ipvs": { + SchemaProps: spec.SchemaProps{ + Description: "ipvs contains ipvs-related configuration options.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration"), + }, + }, + "oomScoreAdj": { + SchemaProps: spec.SchemaProps{ + Description: "oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "mode specifies which proxy mode to use.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "portRange": { + SchemaProps: spec.SchemaProps{ + Description: "portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "udpIdleTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxyMode=userspace.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "LeaderElection": { + "conntrack": { SchemaProps: spec.SchemaProps{ - Description: "leaderElection defines the configuration of leader election client.", - Ref: ref("k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"), + Description: "conntrack contains conntrack-related configuration options.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration"), }, }, - "Controllers": { + "configSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "Controllers is the list of controllers to enable or disable '*' means \"all enabled by default controllers\" 'foo' means \"enable 'foo'\" '-foo' means \"disable 'foo'\" first item for a particular name wins", + Description: "configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater than 0.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "nodePortAddresses": { + SchemaProps: spec.SchemaProps{ + Description: "nodePortAddresses is the --nodeport-addresses value for kube-proxy process. Values must be valid IP blocks. These values are as a parameter to select the interfaces where nodeport works. In case someone would like to expose a service on localhost for local visit and some other interfaces for particular purpose, a list of IP blocks would do that. If set it to \"127.0.0.0/8\", kube-proxy will only select the loopback interface for NodePort. If set it to a non-zero IP block, kube-proxy will filter that down to just the IPs that applied to the node. An empty string slice is meant to select all network interfaces.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "Debugging": { + "winkernel": { SchemaProps: spec.SchemaProps{ - Description: "DebuggingConfiguration holds configuration for Debugging related features.", - Ref: ref("k8s.io/component-base/config/v1alpha1.DebuggingConfiguration"), + Description: "winkernel contains winkernel-related configuration options.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"), }, }, - }, - Required: []string{"Port", "Address", "MinResyncPeriod", "ClientConnection", "ControllerStartInterval", "LeaderElection", "Controllers", "Debugging"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.DebuggingConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"}, - } -} - -func schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupResource describes an group resource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "Group": { + "showHiddenMetricsForVersion": { SchemaProps: spec.SchemaProps{ - Description: "group is the group portion of the GroupResource.", + Description: "ShowHiddenMetricsForVersion is the version for which you want to show hidden metrics.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "Resource": { + "detectLocalMode": { SchemaProps: spec.SchemaProps{ - Description: "resource is the resource portion of the GroupResource.", + Description: "DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR", + Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"Group", "Resource"}, + Required: []string{"bindAddress", "healthzBindAddress", "metricsBindAddress", "bindAddressHardFail", "enableProfiling", "clusterCIDR", "hostnameOverride", "clientConnection", "iptables", "ipvs", "oomScoreAdj", "mode", "portRange", "udpIdleTimeout", "conntrack", "configSyncPeriod", "nodePortAddresses", "winkernel", "showHiddenMetricsForVersion", "detectLocalMode"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HPAControllerConfiguration contains elements describing HPAController.", + Description: "KubeProxyConntrackConfiguration contains conntrack settings for the Kubernetes proxy server.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "HorizontalPodAutoscalerSyncPeriod": { + "maxPerCore": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerSyncPeriod is the period for syncing the number of pods in horizontal pod autoscaler.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "maxPerCore is the maximum number of NAT connections to track per CPU core (0 to leave the limit as-is and ignore min).", + Type: []string{"integer"}, + Format: "int32", }, }, - "HorizontalPodAutoscalerUpscaleForbiddenWindow": { + "min": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerUpscaleForbiddenWindow is a period after which next upscale allowed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "min is the minimum value of connect-tracking records to allocate, regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is).", + Type: []string{"integer"}, + Format: "int32", }, }, - "HorizontalPodAutoscalerDownscaleStabilizationWindow": { + "tcpEstablishedTimeout": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerDowncaleStabilizationWindow is a period for which autoscaler will look backwards and not scale down below any recommendation it made during that period.", + Description: "tcpEstablishedTimeout is how long an idle TCP connection will be kept open (e.g. '2s'). Must be greater than 0 to set.", Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "HorizontalPodAutoscalerDownscaleForbiddenWindow": { + "tcpCloseWaitTimeout": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerDownscaleForbiddenWindow is a period after which next downscale allowed.", + Description: "tcpCloseWaitTimeout is how long an idle conntrack entry in CLOSE_WAIT state will remain in the conntrack table. (e.g. '60s'). Must be greater than 0 to set.", Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "HorizontalPodAutoscalerTolerance": { + }, + Required: []string{"maxPerCore", "min", "tcpEstablishedTimeout", "tcpCloseWaitTimeout"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeProxyIPTablesConfiguration contains iptables-related configuration details for the Kubernetes proxy server.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "masqueradeBit": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerTolerance is the tolerance for when resource usage suggests upscaling/downscaling", - Type: []string{"number"}, - Format: "double", + Description: "masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using the pure iptables proxy mode. Values must be within the range [0, 31].", + Type: []string{"integer"}, + Format: "int32", }, }, - "HorizontalPodAutoscalerUseRESTClients": { + "masqueradeAll": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerUseRESTClients causes the HPA controller to use REST clients through the kube-aggregator when enabled, instead of using the legacy metrics client through the API server proxy.", + Description: "masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.", + Default: false, Type: []string{"boolean"}, Format: "", }, }, - "HorizontalPodAutoscalerCPUInitializationPeriod": { + "syncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerCPUInitializationPeriod is the period after pod start when CPU samples might be skipped.", + Description: "syncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "HorizontalPodAutoscalerInitialReadinessDelay": { + "minSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerInitialReadinessDelay is period after pod start during which readiness changes are treated as readiness being set for the first time. The only effect of this is that HPA will disregard CPU samples from unready pods that had last readiness change during that period.", + Description: "minSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m').", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"HorizontalPodAutoscalerSyncPeriod", "HorizontalPodAutoscalerUpscaleForbiddenWindow", "HorizontalPodAutoscalerDownscaleStabilizationWindow", "HorizontalPodAutoscalerDownscaleForbiddenWindow", "HorizontalPodAutoscalerTolerance", "HorizontalPodAutoscalerUseRESTClients", "HorizontalPodAutoscalerCPUInitializationPeriod", "HorizontalPodAutoscalerInitialReadinessDelay"}, + Required: []string{"masqueradeBit", "masqueradeAll", "syncPeriod", "minSyncPeriod"}, }, }, Dependencies: []string{ @@ -40845,773 +48401,927 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfigura } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JobControllerConfiguration contains elements describing JobController.", + Description: "KubeProxyIPVSConfiguration contains ipvs-related configuration details for the Kubernetes proxy server.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentJobSyncs": { + "syncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "concurrentJobSyncs is the number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load.", - Type: []string{"integer"}, - Format: "int32", + Description: "syncPeriod is the period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - }, - Required: []string{"ConcurrentJobSyncs"}, - }, - }, - } -} - -func schema_k8sio_kube_controller_manager_config_v1alpha1_KubeCloudSharedConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "KubeCloudSharedConfiguration contains elements shared by both kube-controller manager and cloud-controller manager, but not genericconfig.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "CloudProvider": { + "minSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "CloudProviderConfiguration holds configuration for CloudProvider related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CloudProviderConfiguration"), + Description: "minSyncPeriod is the minimum period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m').", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "ExternalCloudVolumePlugin": { + "scheduler": { SchemaProps: spec.SchemaProps{ - Description: "externalCloudVolumePlugin specifies the plugin to use when cloudProvider is \"external\". It is currently used by the in repo cloud providers to handle node and volume control in the KCM.", + Description: "ipvs scheduler", + Default: "", Type: []string{"string"}, Format: "", }, }, - "UseServiceAccountCredentials": { + "excludeCIDRs": { SchemaProps: spec.SchemaProps{ - Description: "useServiceAccountCredentials indicates whether controllers should be run with individual service account credentials.", - Type: []string{"boolean"}, - Format: "", + Description: "excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch when cleaning up ipvs services.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "AllowUntaggedCloud": { + "strictARP": { SchemaProps: spec.SchemaProps{ - Description: "run with untagged cloud instances", + Description: "strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries from kube-ipvs0 interface", + Default: false, Type: []string{"boolean"}, Format: "", }, }, - "RouteReconciliationPeriod": { + "tcpTimeout": { SchemaProps: spec.SchemaProps{ - Description: "routeReconciliationPeriod is the period for reconciling routes created for Nodes by cloud provider..", + Description: "tcpTimeout is the timeout value used for idle IPVS TCP sessions. The default value is 0, which preserves the current timeout value on the system.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "NodeMonitorPeriod": { + "tcpFinTimeout": { SchemaProps: spec.SchemaProps{ - Description: "nodeMonitorPeriod is the period for syncing NodeStatus in NodeController.", + Description: "tcpFinTimeout is the timeout value used for IPVS TCP sessions after receiving a FIN. The default value is 0, which preserves the current timeout value on the system.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "ClusterName": { + "udpTimeout": { SchemaProps: spec.SchemaProps{ - Description: "clusterName is the instance prefix for the cluster.", - Type: []string{"string"}, - Format: "", + Description: "udpTimeout is the timeout value used for IPVS UDP packets. The default value is 0, which preserves the current timeout value on the system.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "ClusterCIDR": { + }, + Required: []string{"syncPeriod", "minSyncPeriod", "scheduler", "excludeCIDRs", "strictARP", "tcpTimeout", "tcpFinTimeout", "udpTimeout"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeProxyWinkernelConfiguration contains Windows/HNS settings for the Kubernetes proxy server.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "networkName": { SchemaProps: spec.SchemaProps{ - Description: "clusterCIDR is CIDR Range for Pods in cluster.", + Description: "networkName is the name of the network kube-proxy will use to create endpoints and policies", + Default: "", Type: []string{"string"}, Format: "", }, }, - "AllocateNodeCIDRs": { - SchemaProps: spec.SchemaProps{ - Description: "AllocateNodeCIDRs enables CIDRs for Pods to be allocated and, if ConfigureCloudRoutes is true, to be set on the cloud provider.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "CIDRAllocatorType": { + "sourceVip": { SchemaProps: spec.SchemaProps{ - Description: "CIDRAllocatorType determines what kind of pod CIDR allocator will be used.", + Description: "sourceVip is the IP address of the source VIP endoint used for NAT when loadbalancing", + Default: "", Type: []string{"string"}, Format: "", }, }, - "ConfigureCloudRoutes": { + "enableDSR": { SchemaProps: spec.SchemaProps{ - Description: "configureCloudRoutes enables CIDRs allocated with allocateNodeCIDRs to be configured on the cloud provider.", + Description: "enableDSR tells kube-proxy whether HNS policies should be created with DSR", + Default: false, Type: []string{"boolean"}, Format: "", }, }, - "NodeSyncPeriod": { - SchemaProps: spec.SchemaProps{ - Description: "nodeSyncPeriod is the period for syncing nodes from cloudprovider. Longer periods will result in fewer calls to cloud provider, but may delay addition of new nodes to cluster.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, }, - Required: []string{"CloudProvider", "ExternalCloudVolumePlugin", "UseServiceAccountCredentials", "AllowUntaggedCloud", "RouteReconciliationPeriod", "NodeMonitorPeriod", "ClusterName", "ClusterCIDR", "AllocateNodeCIDRs", "CIDRAllocatorType", "ConfigureCloudRoutes", "NodeSyncPeriod"}, + Required: []string{"networkName", "sourceVip", "enableDSR"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.CloudProviderConfiguration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_ExtenderManagedResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeControllerManagerConfiguration contains elements describing kube-controller manager.", + Description: "ExtenderManagedResource describes the arguments of extended resources managed by an extender.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "name": { 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", + Description: "Name is the extended resource name.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "ignoredByScheduler": { 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"}, + Description: "IgnoredByScheduler indicates whether kube-scheduler should ignore this resource when applying predicates.", + Type: []string{"boolean"}, Format: "", }, }, - "Generic": { - SchemaProps: spec.SchemaProps{ - Description: "Generic holds configuration for a generic controller-manager", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), - }, - }, - "KubeCloudShared": { - SchemaProps: spec.SchemaProps{ - Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.KubeCloudSharedConfiguration"), - }, - }, - "AttachDetachController": { - SchemaProps: spec.SchemaProps{ - Description: "AttachDetachControllerConfiguration holds configuration for AttachDetachController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration"), - }, - }, - "CSRSigningController": { - SchemaProps: spec.SchemaProps{ - Description: "CSRSigningControllerConfiguration holds configuration for CSRSigningController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration"), - }, - }, - "DaemonSetController": { - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetControllerConfiguration holds configuration for DaemonSetController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration"), - }, - }, - "DeploymentController": { - SchemaProps: spec.SchemaProps{ - Description: "DeploymentControllerConfiguration holds configuration for DeploymentController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration"), - }, - }, - "StatefulSetController": { - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetControllerConfiguration holds configuration for StatefulSetController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration"), - }, - }, - "DeprecatedController": { - SchemaProps: spec.SchemaProps{ - Description: "DeprecatedControllerConfiguration holds configuration for some deprecated features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration"), - }, - }, - "EndpointController": { - SchemaProps: spec.SchemaProps{ - Description: "EndpointControllerConfiguration holds configuration for EndpointController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration"), - }, - }, - "EndpointSliceController": { - SchemaProps: spec.SchemaProps{ - Description: "EndpointSliceControllerConfiguration holds configuration for EndpointSliceController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration"), - }, - }, - "GarbageCollectorController": { - SchemaProps: spec.SchemaProps{ - Description: "GarbageCollectorControllerConfiguration holds configuration for GarbageCollectorController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration"), - }, - }, - "HPAController": { - SchemaProps: spec.SchemaProps{ - Description: "HPAControllerConfiguration holds configuration for HPAController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration"), - }, - }, - "JobController": { - SchemaProps: spec.SchemaProps{ - Description: "JobControllerConfiguration holds configuration for JobController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration"), - }, - }, - "NamespaceController": { - SchemaProps: spec.SchemaProps{ - Description: "NamespaceControllerConfiguration holds configuration for NamespaceController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration"), - }, - }, - "NodeIPAMController": { + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1_ExtenderTLSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExtenderTLSConfig contains settings to enable TLS with extender", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "insecure": { SchemaProps: spec.SchemaProps{ - Description: "NodeIPAMControllerConfiguration holds configuration for NodeIPAMController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration"), + Description: "Server should be accessed without verifying the TLS certificate. For testing only.", + Type: []string{"boolean"}, + Format: "", }, }, - "NodeLifecycleController": { + "serverName": { SchemaProps: spec.SchemaProps{ - Description: "NodeLifecycleControllerConfiguration holds configuration for NodeLifecycleController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration"), + Description: "ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", + Type: []string{"string"}, + Format: "", }, }, - "PersistentVolumeBinderController": { + "certFile": { SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeBinderControllerConfiguration holds configuration for PersistentVolumeBinderController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration"), + Description: "Server requires TLS client certificate authentication", + Type: []string{"string"}, + Format: "", }, }, - "PodGCController": { + "keyFile": { SchemaProps: spec.SchemaProps{ - Description: "PodGCControllerConfiguration holds configuration for PodGCController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration"), + Description: "Server requires TLS client certificate authentication", + Type: []string{"string"}, + Format: "", }, }, - "ReplicaSetController": { + "caFile": { SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetControllerConfiguration holds configuration for ReplicaSet related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration"), + Description: "Trusted root certificates for server", + Type: []string{"string"}, + Format: "", }, }, - "ReplicationController": { + "certData": { SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerConfiguration holds configuration for ReplicationController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration"), + Description: "CertData holds PEM-encoded bytes (typically read from a client certificate file). CertData takes precedence over CertFile", + Type: []string{"string"}, + Format: "byte", }, }, - "ResourceQuotaController": { + "keyData": { SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaControllerConfiguration holds configuration for ResourceQuotaController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration"), + Description: "KeyData holds PEM-encoded bytes (typically read from a client certificate key file). KeyData takes precedence over KeyFile", + Type: []string{"string"}, + Format: "byte", }, }, - "SAController": { + "caData": { SchemaProps: spec.SchemaProps{ - Description: "SAControllerConfiguration holds configuration for ServiceAccountController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration"), + Description: "CAData holds PEM-encoded bytes (typically read from a root certificates bundle). CAData takes precedence over CAFile", + Type: []string{"string"}, + Format: "byte", }, }, - "ServiceController": { + }, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1_LabelPreference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LabelPreference holds the parameters that are used to configure the corresponding priority function", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "label": { SchemaProps: spec.SchemaProps{ - Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ServiceControllerConfiguration"), + Description: "Used to identify node \"groups\"", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "TTLAfterFinishedController": { + "presence": { SchemaProps: spec.SchemaProps{ - Description: "TTLAfterFinishedControllerConfiguration holds configuration for TTLAfterFinishedController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"), + Description: "This is a boolean flag If true, higher priority is given to nodes that have the label If false, higher priority is given to nodes that do not have the label", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"Generic", "KubeCloudShared", "AttachDetachController", "CSRSigningController", "DaemonSetController", "DeploymentController", "StatefulSetController", "DeprecatedController", "EndpointController", "EndpointSliceController", "GarbageCollectorController", "HPAController", "JobController", "NamespaceController", "NodeIPAMController", "NodeLifecycleController", "PersistentVolumeBinderController", "PodGCController", "ReplicaSetController", "ReplicationController", "ResourceQuotaController", "SAController", "ServiceController", "TTLAfterFinishedController"}, + Required: []string{"label", "presence"}, }, }, - Dependencies: []string{ - "k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.GenericControllerManagerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ServiceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_LabelsPresence(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NamespaceControllerConfiguration contains elements describing NamespaceController.", + Description: "LabelsPresence holds the parameters that are used to configure the corresponding predicate in scheduler policy configuration.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "NamespaceSyncPeriod": { + "labels": { SchemaProps: spec.SchemaProps{ - Description: "namespaceSyncPeriod is the period for syncing namespace life-cycle updates.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "The list of labels that identify node \"groups\" All of the labels should be either present (or absent) for the node to be considered a fit for hosting the pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "ConcurrentNamespaceSyncs": { + "presence": { SchemaProps: spec.SchemaProps{ - Description: "concurrentNamespaceSyncs is the number of namespace objects that are allowed to sync concurrently.", - Type: []string{"integer"}, - Format: "int32", + Description: "The boolean flag that indicates whether the labels should be present or absent from the node", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"NamespaceSyncPeriod", "ConcurrentNamespaceSyncs"}, + Required: []string{"labels", "presence"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_LegacyExtender(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NodeIPAMControllerConfiguration contains elements describing NodeIpamController.", + Description: "LegacyExtender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, it is assumed that the extender chose not to provide that extension.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ServiceCIDR": { + "urlPrefix": { SchemaProps: spec.SchemaProps{ - Description: "serviceCIDR is CIDR Range for Services in cluster.", + Description: "URLPrefix at which the extender is available", + Default: "", Type: []string{"string"}, Format: "", }, }, - "SecondaryServiceCIDR": { + "filterVerb": { SchemaProps: spec.SchemaProps{ - Description: "secondaryServiceCIDR is CIDR Range for Services in cluster. This is used in dual stack clusters. SecondaryServiceCIDR must be of different IP family than ServiceCIDR", + Description: "Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.", Type: []string{"string"}, Format: "", }, }, - "NodeCIDRMaskSize": { + "preemptVerb": { SchemaProps: spec.SchemaProps{ - Description: "NodeCIDRMaskSize is the mask size for node cidr in cluster.", - Type: []string{"integer"}, - Format: "int32", + Description: "Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.", + Type: []string{"string"}, + Format: "", }, }, - "NodeCIDRMaskSizeIPv4": { + "prioritizeVerb": { SchemaProps: spec.SchemaProps{ - Description: "NodeCIDRMaskSizeIPv4 is the mask size for node cidr in dual-stack cluster.", + Description: "Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.", + Type: []string{"string"}, + Format: "", + }, + }, + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "The numeric multiplier for the node scores that the prioritize call generates. The weight should be a positive integer", Type: []string{"integer"}, - Format: "int32", + Format: "int64", }, }, - "NodeCIDRMaskSizeIPv6": { + "bindVerb": { SchemaProps: spec.SchemaProps{ - Description: "NodeCIDRMaskSizeIPv6 is the mask size for node cidr in dual-stack cluster.", + Description: "Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender can implement this function.", + Type: []string{"string"}, + Format: "", + }, + }, + "enableHttps": { + SchemaProps: spec.SchemaProps{ + Description: "EnableHTTPS specifies whether https should be used to communicate with the extender", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tlsConfig": { + SchemaProps: spec.SchemaProps{ + Description: "TLSConfig specifies the transport layer security config", + Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"), + }, + }, + "httpTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.", Type: []string{"integer"}, - Format: "int32", + Format: "int64", + }, + }, + "nodeCacheCapable": { + SchemaProps: spec.SchemaProps{ + Description: "NodeCacheCapable specifies that the extender is capable of caching node information, so the scheduler should only send minimal information about the eligible nodes assuming that the extender already cached full details of all nodes in the cluster", + Type: []string{"boolean"}, + Format: "", + }, + }, + "managedResources": { + SchemaProps: spec.SchemaProps{ + Description: "ManagedResources is a list of extended resources that are managed by this extender. - A pod will be sent to the extender on the Filter, Prioritize and Bind\n (if the extender is the binder) phases iff the pod requests at least\n one of the extended resources in this list. If empty or unspecified,\n all pods will be sent to this extender.\n- If IgnoredByScheduler is set to true for a resource, kube-scheduler\n will skip checking the resource in predicates.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderManagedResource"), + }, + }, + }, + }, + }, + "ignorable": { + SchemaProps: spec.SchemaProps{ + Description: "Ignorable specifies if the extender is ignorable, i.e. scheduling should not fail when the extender returns an error or is not reachable.", + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"ServiceCIDR", "SecondaryServiceCIDR", "NodeCIDRMaskSize", "NodeCIDRMaskSizeIPv4", "NodeCIDRMaskSizeIPv6"}, + Required: []string{"urlPrefix"}, }, }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NodeLifecycleControllerConfiguration contains elements describing NodeLifecycleController.", + Description: "Policy describes a struct for a policy resource used in api.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "EnableTaintManager": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "If set to true enables NoExecute Taints and will evict all not-tolerating Pod running on Nodes tainted with this kind of Taints.", - Type: []string{"boolean"}, + 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: "", }, }, - "NodeEvictionRate": { - SchemaProps: spec.SchemaProps{ - Description: "nodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is healthy", - Type: []string{"number"}, - Format: "float", - }, - }, - "SecondaryNodeEvictionRate": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "secondaryNodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy", - Type: []string{"number"}, - Format: "float", + 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: "", }, }, - "NodeStartupGracePeriod": { + "predicates": { SchemaProps: spec.SchemaProps{ - Description: "nodeStartupGracePeriod is the amount of time which we allow starting a node to be unresponsive before marking it unhealthy.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "Holds the information to configure the fit predicate functions", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1.PredicatePolicy"), + }, + }, + }, }, }, - "NodeMonitorGracePeriod": { + "priorities": { SchemaProps: spec.SchemaProps{ - Description: "nodeMontiorGracePeriod is the amount of time which we allow a running node to be unresponsive before marking it unhealthy. Must be N times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "Holds the information to configure the priority functions", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1.PriorityPolicy"), + }, + }, + }, }, }, - "PodEvictionTimeout": { + "extenders": { SchemaProps: spec.SchemaProps{ - Description: "podEvictionTimeout is the grace period for deleting pods on failed nodes.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "Holds the information to communicate with the extender(s)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1.LegacyExtender"), + }, + }, + }, }, }, - "LargeClusterSizeThreshold": { + "hardPodAffinitySymmetricWeight": { SchemaProps: spec.SchemaProps{ - Description: "secondaryNodeEvictionRate is implicitly overridden to 0 for clusters smaller than or equal to largeClusterSizeThreshold", + Description: "RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding to every RequiredDuringScheduling affinity rule. HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 1-100.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "UnhealthyZoneThreshold": { + "alwaysCheckAllPredicates": { SchemaProps: spec.SchemaProps{ - Description: "Zone is treated as unhealthy in nodeEvictionRate and secondaryNodeEvictionRate when at least unhealthyZoneThreshold (no less than 3) of Nodes in the zone are NotReady", - Type: []string{"number"}, - Format: "float", + Description: "When AlwaysCheckAllPredicates is set to true, scheduler checks all the configured predicates even after one or more of them fails. When the flag is set to false, scheduler skips checking the rest of the predicates after it finds one predicate that failed.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"EnableTaintManager", "NodeEvictionRate", "SecondaryNodeEvictionRate", "NodeStartupGracePeriod", "NodeMonitorGracePeriod", "PodEvictionTimeout", "LargeClusterSizeThreshold", "UnhealthyZoneThreshold"}, + Required: []string{"predicates", "priorities", "extenders", "hardPodAffinitySymmetricWeight", "alwaysCheckAllPredicates"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/kube-scheduler/config/v1.LegacyExtender", "k8s.io/kube-scheduler/config/v1.PredicatePolicy", "k8s.io/kube-scheduler/config/v1.PriorityPolicy"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_PredicateArgument(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeBinderControllerConfiguration contains elements describing PersistentVolumeBinderController.", + Description: "PredicateArgument represents the arguments to configure predicate functions in scheduler policy configuration. Only one of its members may be specified", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "PVClaimBinderSyncPeriod": { + "serviceAffinity": { SchemaProps: spec.SchemaProps{ - Description: "pvClaimBinderSyncPeriod is the period for syncing persistent volumes and persistent volume claims.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "The predicate that provides affinity for pods belonging to a service It uses a label to identify nodes that belong to the same \"group\"", + Ref: ref("k8s.io/kube-scheduler/config/v1.ServiceAffinity"), }, }, - "VolumeConfiguration": { + "labelsPresence": { SchemaProps: spec.SchemaProps{ - Description: "volumeConfiguration holds configuration for volume related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"), + Description: "The predicate that checks whether a particular node has a certain label defined or not, regardless of value", + Ref: ref("k8s.io/kube-scheduler/config/v1.LabelsPresence"), }, }, }, - Required: []string{"PVClaimBinderSyncPeriod", "VolumeConfiguration"}, + Required: []string{"serviceAffinity", "labelsPresence"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"}, + "k8s.io/kube-scheduler/config/v1.LabelsPresence", "k8s.io/kube-scheduler/config/v1.ServiceAffinity"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_PredicatePolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeRecyclerConfiguration contains elements describing persistent volume plugins.", + Description: "PredicatePolicy describes a struct of a predicate policy.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "MaximumRetry": { - SchemaProps: spec.SchemaProps{ - Description: "maximumRetry is number of retries the PV recycler will execute on failure to recycle PV.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "MinimumTimeoutNFS": { - SchemaProps: spec.SchemaProps{ - Description: "minimumTimeoutNFS is the minimum ActiveDeadlineSeconds to use for an NFS Recycler pod.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "PodTemplateFilePathNFS": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "podTemplateFilePathNFS is the file path to a pod definition used as a template for NFS persistent volume recycling", + Description: "Identifier of the predicate policy For a custom predicate, the name can be user-defined For the Kubernetes provided predicates, the name is the identifier of the pre-defined predicate", + Default: "", Type: []string{"string"}, Format: "", }, }, - "IncrementTimeoutNFS": { + "argument": { SchemaProps: spec.SchemaProps{ - Description: "incrementTimeoutNFS is the increment of time added per Gi to ActiveDeadlineSeconds for an NFS scrubber pod.", - Type: []string{"integer"}, - Format: "int32", + Description: "Holds the parameters to configure the given predicate", + Ref: ref("k8s.io/kube-scheduler/config/v1.PredicateArgument"), }, }, - "PodTemplateFilePathHostPath": { + }, + Required: []string{"name", "argument"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.PredicateArgument"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1_PriorityArgument(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PriorityArgument represents the arguments to configure priority functions in scheduler policy configuration. Only one of its members may be specified", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "serviceAntiAffinity": { SchemaProps: spec.SchemaProps{ - Description: "podTemplateFilePathHostPath is the file path to a pod definition used as a template for HostPath persistent volume recycling. This is for development and testing only and will not work in a multi-node cluster.", - Type: []string{"string"}, - Format: "", + Description: "The priority function that ensures a good spread (anti-affinity) for pods belonging to a service It uses a label to identify nodes that belong to the same \"group\"", + Ref: ref("k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity"), }, }, - "MinimumTimeoutHostPath": { + "labelPreference": { SchemaProps: spec.SchemaProps{ - Description: "minimumTimeoutHostPath is the minimum ActiveDeadlineSeconds to use for a HostPath Recycler pod. This is for development and testing only and will not work in a multi-node cluster.", - Type: []string{"integer"}, - Format: "int32", + Description: "The priority function that checks whether a particular node has a certain label defined or not, regardless of value", + Ref: ref("k8s.io/kube-scheduler/config/v1.LabelPreference"), }, }, - "IncrementTimeoutHostPath": { + "requestedToCapacityRatioArguments": { SchemaProps: spec.SchemaProps{ - Description: "incrementTimeoutHostPath is the increment of time added per Gi to ActiveDeadlineSeconds for a HostPath scrubber pod. This is for development and testing only and will not work in a multi-node cluster.", - Type: []string{"integer"}, - Format: "int32", + Description: "The RequestedToCapacityRatio priority function is parametrized with function shape.", + Ref: ref("k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments"), }, }, }, - Required: []string{"MaximumRetry", "MinimumTimeoutNFS", "PodTemplateFilePathNFS", "IncrementTimeoutNFS", "PodTemplateFilePathHostPath", "MinimumTimeoutHostPath", "IncrementTimeoutHostPath"}, + Required: []string{"serviceAntiAffinity", "labelPreference", "requestedToCapacityRatioArguments"}, }, }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.LabelPreference", "k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments", "k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_PriorityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodGCControllerConfiguration contains elements describing PodGCController.", + Description: "PriorityPolicy describes a struct of a priority policy.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "TerminatedPodGCThreshold": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "terminatedPodGCThreshold is the number of terminated pods that can exist before the terminated pod garbage collector starts deleting terminated pods. If <= 0, the terminated pod garbage collector is disabled.", + Description: "Identifier of the priority policy For a custom priority, the name can be user-defined For the Kubernetes provided priority functions, the name is the identifier of the pre-defined priority function", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "The numeric multiplier for the node scores that the priority function generates The weight should be non-zero and can be a positive or a negative integer", + Default: 0, Type: []string{"integer"}, - Format: "int32", + Format: "int64", + }, + }, + "argument": { + SchemaProps: spec.SchemaProps{ + Description: "Holds the parameters to configure the given priority function", + Ref: ref("k8s.io/kube-scheduler/config/v1.PriorityArgument"), }, }, }, - Required: []string{"TerminatedPodGCThreshold"}, + Required: []string{"name", "weight", "argument"}, }, }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.PriorityArgument"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioArguments(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetControllerConfiguration contains elements describing ReplicaSetController.", + Description: "RequestedToCapacityRatioArguments holds arguments specific to RequestedToCapacityRatio priority function.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentRSSyncs": { + "shape": { SchemaProps: spec.SchemaProps{ - Description: "concurrentRSSyncs is the number of replica sets that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.", - Type: []string{"integer"}, - Format: "int32", + Description: "Array of point defining priority function shape.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"), + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1.ResourceSpec"), + }, + }, + }, }, }, }, - Required: []string{"ConcurrentRSSyncs"}, + Required: []string{"shape"}, }, }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1.ResourceSpec", "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerConfiguration contains elements describing ReplicationController.", + Description: "ResourceSpec represents single resource and weight for bin packing of priority RequestedToCapacityRatioArguments.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentRCSyncs": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "concurrentRCSyncs is the number of replication controllers that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.", + Description: "Name of the resource to be managed by RequestedToCapacityRatio function.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "Weight of the resource.", Type: []string{"integer"}, - Format: "int32", + Format: "int64", }, }, }, - Required: []string{"ConcurrentRCSyncs"}, + Required: []string{"name"}, }, }, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_ServiceAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaControllerConfiguration contains elements describing ResourceQuotaController.", + Description: "ServiceAffinity holds the parameters that are used to configure the corresponding predicate in scheduler policy configuration.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ResourceQuotaSyncPeriod": { - SchemaProps: spec.SchemaProps{ - Description: "resourceQuotaSyncPeriod is the period for syncing quota usage status in the system.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "ConcurrentResourceQuotaSyncs": { + "labels": { SchemaProps: spec.SchemaProps{ - Description: "concurrentResourceQuotaSyncs is the number of resource quotas that are allowed to sync concurrently. Larger number = more responsive quota management, but more CPU (and network) load.", - Type: []string{"integer"}, - Format: "int32", + Description: "The list of labels that identify node \"groups\" All of the labels should match for the node to be considered a fit for hosting the pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"ResourceQuotaSyncPeriod", "ConcurrentResourceQuotaSyncs"}, + Required: []string{"labels"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_ServiceAntiAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SAControllerConfiguration contains elements describing ServiceAccountController.", + Description: "ServiceAntiAffinity holds the parameters that are used to configure the corresponding priority function", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ServiceAccountKeyFile": { - SchemaProps: spec.SchemaProps{ - Description: "serviceAccountKeyFile is the filename containing a PEM-encoded private RSA key used to sign service account tokens.", - Type: []string{"string"}, - Format: "", - }, - }, - "ConcurrentSATokenSyncs": { - SchemaProps: spec.SchemaProps{ - Description: "concurrentSATokenSyncs is the number of service account token syncing operations that will be done concurrently.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "RootCAFile": { + "label": { SchemaProps: spec.SchemaProps{ - Description: "rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.", + Description: "Used to identify node \"groups\"", + Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"ServiceAccountKeyFile", "ConcurrentSATokenSyncs", "RootCAFile"}, + Required: []string{"label"}, }, }, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_ServiceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceControllerConfiguration contains elements describing ServiceController.", + Description: "UtilizationShapePoint represents single point of priority function shape.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentServiceSyncs": { + "utilization": { + SchemaProps: spec.SchemaProps{ + Description: "Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "score": { SchemaProps: spec.SchemaProps{ - Description: "concurrentServiceSyncs is the number of services that are allowed to sync concurrently. Larger number = more responsive service management, but more CPU (and network) load.", + Description: "Score assigned to given utilization (y axis). Valid values are 0 to 10.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"ConcurrentServiceSyncs"}, + Required: []string{"utilization", "score"}, }, }, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_DefaultPreemptionArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StatefulSetControllerConfiguration contains elements describing StatefulSetController.", + Description: "DefaultPreemptionArgs holds arguments used to configure the DefaultPreemption plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentStatefulSetSyncs": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "concurrentStatefulSetSyncs is the number of statefulset objects that are allowed to sync concurrently. Larger number = more responsive statefulsets, but more CPU (and network) load.", + 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: "", + }, + }, + "minCandidateNodesPercentage": { + SchemaProps: spec.SchemaProps{ + Description: "MinCandidateNodesPercentage is the minimum number of candidates to shortlist when dry running preemption as a percentage of number of nodes. Must be in the range [0, 100]. Defaults to 10% of the cluster size if unspecified.", Type: []string{"integer"}, Format: "int32", }, }, - }, - Required: []string{"ConcurrentStatefulSetSyncs"}, - }, - }, - } -} - -func schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TTLAfterFinishedControllerConfiguration contains elements describing TTLAfterFinishedController.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ConcurrentTTLSyncs": { + "minCandidateNodesAbsolute": { SchemaProps: spec.SchemaProps{ - Description: "concurrentTTLSyncs is the number of TTL-after-finished collector workers that are allowed to sync concurrently.", + Description: "MinCandidateNodesAbsolute is the absolute minimum number of candidates to shortlist. The likely number of candidates enumerated for dry running preemption is given by the formula: numCandidates = max(numNodes * minCandidateNodesPercentage, minCandidateNodesAbsolute) We say \"likely\" because there are other factors such as PDB violations that play a role in the number of candidates shortlisted. Must be at least 0 nodes. Defaults to 100 nodes if unspecified.", Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"ConcurrentTTLSyncs"}, }, }, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_Extender(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeConfiguration contains *all* enumerated flags meant to configure all volume plugins. From this config, the controller-manager binary will create many instances of volume.VolumeConfig, each containing only the configuration needed for that plugin which are then passed to the appropriate plugin. The ControllerManager binary is the only part of the code which knows what plugins are supported and which flags correspond to each plugin.", + Description: "Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, it is assumed that the extender chose not to provide that extension.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "EnableHostPathProvisioning": { + "urlPrefix": { SchemaProps: spec.SchemaProps{ - Description: "enableHostPathProvisioning enables HostPath PV provisioning when running without a cloud provider. This allows testing and development of provisioning features. HostPath provisioning is not supported in any way, won't work in a multi-node cluster, and should not be used for anything other than testing or development.", + Description: "URLPrefix at which the extender is available", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "filterVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.", + Type: []string{"string"}, + Format: "", + }, + }, + "preemptVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.", + Type: []string{"string"}, + Format: "", + }, + }, + "prioritizeVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.", + Type: []string{"string"}, + Format: "", + }, + }, + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "The numeric multiplier for the node scores that the prioritize call generates. The weight should be a positive integer", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "bindVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender can implement this function.", + Type: []string{"string"}, + Format: "", + }, + }, + "enableHTTPS": { + SchemaProps: spec.SchemaProps{ + Description: "EnableHTTPS specifies whether https should be used to communicate with the extender", Type: []string{"boolean"}, Format: "", }, }, - "EnableDynamicProvisioning": { + "tlsConfig": { SchemaProps: spec.SchemaProps{ - Description: "enableDynamicProvisioning enables the provisioning of volumes when running within an environment that supports dynamic provisioning. Defaults to true.", + Description: "TLSConfig specifies the transport layer security config", + Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"), + }, + }, + "httpTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "nodeCacheCapable": { + SchemaProps: spec.SchemaProps{ + Description: "NodeCacheCapable specifies that the extender is capable of caching node information, so the scheduler should only send minimal information about the eligible nodes assuming that the extender already cached full details of all nodes in the cluster", Type: []string{"boolean"}, Format: "", }, }, - "PersistentVolumeRecyclerConfiguration": { + "managedResources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "persistentVolumeRecyclerConfiguration holds configuration for persistent volume plugins.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"), + Description: "ManagedResources is a list of extended resources that are managed by this extender. - A pod will be sent to the extender on the Filter, Prioritize and Bind\n (if the extender is the binder) phases iff the pod requests at least\n one of the extended resources in this list. If empty or unspecified,\n all pods will be sent to this extender.\n- If IgnoredByScheduler is set to true for a resource, kube-scheduler\n will skip checking the resource in predicates.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderManagedResource"), + }, + }, + }, }, }, - "FlexVolumePluginDir": { + "ignorable": { SchemaProps: spec.SchemaProps{ - Description: "volumePluginDir is the full path of the directory in which the flex volume plugin should search for additional third party volume plugins", - Type: []string{"string"}, + Description: "Ignorable specifies if the extender is ignorable, i.e. scheduling should not fail when the extender returns an error or is not reachable.", + Type: []string{"boolean"}, Format: "", }, }, }, - Required: []string{"EnableHostPathProvisioning", "EnableDynamicProvisioning", "PersistentVolumeRecyclerConfiguration", "FlexVolumePluginDir"}, + Required: []string{"urlPrefix"}, }, }, Dependencies: []string{ - "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"}, } } -func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_InterPodAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeProxyConfiguration contains everything necessary to configure the Kubernetes proxy server.", + Description: "InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -41628,626 +49338,831 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.R Format: "", }, }, - "featureGates": { + "hardPodAffinityWeight": { SchemaProps: spec.SchemaProps{ - Description: "featureGates is a map of feature names to bools that enable or disable alpha/experimental features.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, - }, + Description: "HardPodAffinityWeight is the scoring weight for existing pods with a matching hard affinity to the incoming pod.", + Type: []string{"integer"}, + Format: "int32", }, }, - "bindAddress": { + }, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeSchedulerConfiguration configures a scheduler", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0 for all interfaces)", + 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: "", }, }, - "healthzBindAddress": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "healthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10256", + 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: "", }, }, - "metricsBindAddress": { + "parallelism": { SchemaProps: spec.SchemaProps{ - Description: "metricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces)", - Type: []string{"string"}, - Format: "", + Description: "Parallelism defines the amount of parallelism in algorithms for scheduling a Pods. Must be greater than 0. Defaults to 16", + Type: []string{"integer"}, + Format: "int32", }, }, - "enableProfiling": { + "leaderElection": { SchemaProps: spec.SchemaProps{ - Description: "enableProfiling enables profiling via web interface on /debug/pprof handler. Profiling handlers will be handled by metrics server.", - Type: []string{"boolean"}, - Format: "", + Description: "LeaderElection defines the configuration of leader election client.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"), }, }, - "clusterCIDR": { + "clientConnection": { SchemaProps: spec.SchemaProps{ - Description: "clusterCIDR is the CIDR range of the pods in the cluster. It is used to bridge traffic coming from outside of the cluster. If not provided, no off-cluster bridging will be performed.", + Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + }, + }, + "healthzBindAddress": { + SchemaProps: spec.SchemaProps{ + Description: "HealthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10251", Type: []string{"string"}, Format: "", }, }, - "hostnameOverride": { + "metricsBindAddress": { SchemaProps: spec.SchemaProps{ - Description: "hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.", + Description: "MetricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 0.0.0.0:10251.", Type: []string{"string"}, Format: "", }, }, - "clientConnection": { + "enableProfiling": { SchemaProps: spec.SchemaProps{ - Description: "clientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", - Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + Description: "enableProfiling enables profiling via web interface host:port/debug/pprof/", + Type: []string{"boolean"}, + Format: "", }, }, - "iptables": { + "enableContentionProfiling": { SchemaProps: spec.SchemaProps{ - Description: "iptables contains iptables-related configuration options.", - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration"), + Description: "enableContentionProfiling enables lock contention profiling, if enableProfiling is true.", + Type: []string{"boolean"}, + Format: "", }, }, - "ipvs": { + "percentageOfNodesToScore": { SchemaProps: spec.SchemaProps{ - Description: "ipvs contains ipvs-related configuration options.", - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration"), + Description: "PercentageOfNodesToScore is the percentage of all nodes that once found feasible for running a pod, the scheduler stops its search for more feasible nodes in the cluster. This helps improve scheduler's performance. Scheduler always tries to find at least \"minFeasibleNodesToFind\" feasible nodes no matter what the value of this flag is. Example: if the cluster size is 500 nodes and the value of this flag is 30, then scheduler stops finding further feasible nodes once it finds 150 feasible ones. When the value is 0, default percentage (5%--50% based on the size of the cluster) of the nodes will be scored.", + Type: []string{"integer"}, + Format: "int32", }, }, - "oomScoreAdj": { + "podInitialBackoffSeconds": { SchemaProps: spec.SchemaProps{ - Description: "oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]", + Description: "PodInitialBackoffSeconds is the initial backoff for unschedulable pods. If specified, it must be greater than 0. If this value is null, the default value (1s) will be used.", Type: []string{"integer"}, - Format: "int32", + Format: "int64", }, }, - "mode": { + "podMaxBackoffSeconds": { SchemaProps: spec.SchemaProps{ - Description: "mode specifies which proxy mode to use.", - Type: []string{"string"}, - Format: "", + Description: "PodMaxBackoffSeconds is the max backoff for unschedulable pods. If specified, it must be greater than podInitialBackoffSeconds. If this value is null, the default value (10s) will be used.", + Type: []string{"integer"}, + Format: "int64", }, }, - "portRange": { + "profiles": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "schedulerName", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.", - Type: []string{"string"}, - Format: "", + Description: "Profiles are scheduling profiles that kube-scheduler supports. Pods can choose to be scheduled under a particular profile by setting its associated scheduler name. Pods that don't specify any scheduler name are scheduled with the \"default-scheduler\" profile, if present here.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.KubeSchedulerProfile"), + }, + }, + }, }, }, - "udpIdleTimeout": { + "extenders": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxyMode=userspace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "Extenders are the list of scheduler extenders, each holding the values of how to communicate with the extender. These extenders are shared by all scheduler profiles.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.Extender"), + }, + }, + }, }, }, - "conntrack": { + }, + Required: []string{"leaderElection", "clientConnection"}, + }, + }, + Dependencies: []string{ + "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1beta1.Extender", "k8s.io/kube-scheduler/config/v1beta1.KubeSchedulerProfile"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeSchedulerProfile is a scheduling profile.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "schedulerName": { SchemaProps: spec.SchemaProps{ - Description: "conntrack contains conntrack-related configuration options.", - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration"), + Description: "SchedulerName is the name of the scheduler associated to this profile. If SchedulerName matches with the pod's \"spec.schedulerName\", then the pod is scheduled with this profile.", + Type: []string{"string"}, + Format: "", }, }, - "configSyncPeriod": { + "plugins": { SchemaProps: spec.SchemaProps{ - Description: "configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater than 0.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and PluginConfig must be specified for all profiles.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.Plugins"), }, }, - "nodePortAddresses": { + "pluginConfig": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "nodePortAddresses is the --nodeport-addresses value for kube-proxy process. Values must be valid IP blocks. These values are as a parameter to select the interfaces where nodeport works. In case someone would like to expose a service on localhost for local visit and some other interfaces for particular purpose, a list of IP blocks would do that. If set it to \"127.0.0.0/8\", kube-proxy will only select the loopback interface for NodePort. If set it to a non-zero IP block, kube-proxy will filter that down to just the IPs that applied to the node. An empty string slice is meant to select all network interfaces.", + Description: "PluginConfig is an optional set of custom plugin arguments for each plugin. Omitting config args for a plugin is equivalent to using the default config for that plugin.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginConfig"), }, }, }, }, }, - "winkernel": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1beta1.PluginConfig", "k8s.io/kube-scheduler/config/v1beta1.Plugins"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta1_NodeAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeAffinityArgs holds arguments to configure the NodeAffinity plugin.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "winkernel contains winkernel-related configuration options.", - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"), + 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: "", }, }, - "showHiddenMetricsForVersion": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "ShowHiddenMetricsForVersion is the version for which you want to show hidden metrics.", + 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: "", }, }, - "detectLocalMode": { + "addedAffinity": { SchemaProps: spec.SchemaProps{ - Description: "DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR", - Type: []string{"string"}, - Format: "", + Description: "AddedAffinity is applied to all Pods additionally to the NodeAffinity specified in the PodSpec. That is, Nodes need to satisfy AddedAffinity AND .spec.NodeAffinity. AddedAffinity is empty by default (all Nodes match). When AddedAffinity is used, some Pods with affinity requirements that match a specific Node (such as Daemonset Pods) might remain unschedulable.", + Ref: ref("k8s.io/api/core/v1.NodeAffinity"), }, }, }, - Required: []string{"bindAddress", "healthzBindAddress", "metricsBindAddress", "enableProfiling", "clusterCIDR", "hostnameOverride", "clientConnection", "iptables", "ipvs", "oomScoreAdj", "mode", "portRange", "udpIdleTimeout", "conntrack", "configSyncPeriod", "nodePortAddresses", "winkernel", "showHiddenMetricsForVersion", "detectLocalMode"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"}, + "k8s.io/api/core/v1.NodeAffinity"}, } } -func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_NodeLabelArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeProxyConntrackConfiguration contains conntrack settings for the Kubernetes proxy server.", + Description: "NodeLabelArgs holds arguments used to configure the NodeLabel plugin.\n\nThis plugin has been deprecated and is only configurable through the scheduler policy API and the v1beta1 component config API. It is recommended to use the NodeAffinity plugin instead.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "maxPerCore": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "maxPerCore is the maximum number of NAT connections to track per CPU core (0 to leave the limit as-is and ignore min).", - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - "min": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "min is the minimum value of connect-tracking records to allocate, regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is).", - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - "tcpEstablishedTimeout": { + "presentLabels": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "tcpEstablishedTimeout is how long an idle TCP connection will be kept open (e.g. '2s'). Must be greater than 0 to set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "PresentLabels should be present for the node to be considered a fit for hosting the pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "tcpCloseWaitTimeout": { + "absentLabels": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "tcpCloseWaitTimeout is how long an idle conntrack entry in CLOSE_WAIT state will remain in the conntrack table. (e.g. '60s'). Must be greater than 0 to set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "AbsentLabels should be absent for the node to be considered a fit for hosting the pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "presentLabelsPreference": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Nodes that have labels in the list will get a higher score.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "absentLabelsPreference": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Nodes that don't have labels in the list will get a higher score.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"maxPerCore", "min", "tcpEstablishedTimeout", "tcpCloseWaitTimeout"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesBalancedAllocationArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeProxyIPTablesConfiguration contains iptables-related configuration details for the Kubernetes proxy server.", + Description: "NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResourcesBalancedAllocation plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "masqueradeBit": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using the pure iptables proxy mode. Values must be within the range [0, 31].", - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - "masqueradeAll": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.", - Type: []string{"boolean"}, + 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: "", }, }, - "syncPeriod": { - SchemaProps: spec.SchemaProps{ - Description: "syncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, }, - }, - "minSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "minSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m').", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "Resources to be managed, the default is \"cpu\" and \"memory\" if not specified.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"), + }, + }, + }, }, }, }, - Required: []string{"masqueradeBit", "masqueradeAll", "syncPeriod", "minSyncPeriod"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"}, } } -func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesFitArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeProxyIPVSConfiguration contains ipvs-related configuration details for the Kubernetes proxy server.", + Description: "NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "syncPeriod": { - SchemaProps: spec.SchemaProps{ - Description: "syncPeriod is the period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "minSyncPeriod": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "minSyncPeriod is the minimum period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m').", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + 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: "", }, }, - "scheduler": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "ipvs scheduler", + 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: "", }, }, - "excludeCIDRs": { + "ignoredResources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch when cleaning up ipvs services.", + Description: "IgnoredResources is the list of resources that NodeResources fit filter should ignore. This doesn't apply to scoring.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "strictARP": { - SchemaProps: spec.SchemaProps{ - Description: "strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries from kube-ipvs0 interface", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tcpTimeout": { - SchemaProps: spec.SchemaProps{ - Description: "tcpTimeout is the timeout value used for idle IPVS TCP sessions. The default value is 0, which preserves the current timeout value on the system.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + "ignoredResourceGroups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "tcpFinTimeout": { SchemaProps: spec.SchemaProps{ - Description: "tcpFinTimeout is the timeout value used for IPVS TCP sessions after receiving a FIN. The default value is 0, which preserves the current timeout value on the system.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. e.g. if group is [\"example.com\"], it will ignore all resource names that begin with \"example.com\", such as \"example.com/aaa\" and \"example.com/bbb\". A resource group name can't contain '/'. This doesn't apply to scoring.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "udpTimeout": { + "scoringStrategy": { SchemaProps: spec.SchemaProps{ - Description: "udpTimeout is the timeout value used for IPVS UDP packets. The default value is 0, which preserves the current timeout value on the system.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "ScoringStrategy selects the node resource scoring strategy. The default strategy is LeastAllocated with an equal \"cpu\" and \"memory\" weight.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ScoringStrategy"), }, }, }, - Required: []string{"syncPeriod", "minSyncPeriod", "scheduler", "excludeCIDRs", "strictARP", "tcpTimeout", "tcpFinTimeout", "udpTimeout"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/kube-scheduler/config/v1beta1.ScoringStrategy"}, } } -func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesLeastAllocatedArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeProxyWinkernelConfiguration contains Windows/HNS settings for the Kubernetes proxy server.", + Description: "NodeResourcesLeastAllocatedArgs holds arguments used to configure NodeResourcesLeastAllocated plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "networkName": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "networkName is the name of the network kube-proxy will use to create endpoints and policies", + 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: "", }, }, - "sourceVip": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "sourceVip is the IP address of the source VIP endoint used for NAT when loadbalancing", + 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: "", }, }, - "enableDSR": { - SchemaProps: spec.SchemaProps{ - Description: "enableDSR tells kube-proxy whether HNS policies should be created with DSR", - Type: []string{"boolean"}, - Format: "", + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Resources to be managed, if no resource is provided, default resource set with both the weight of \"cpu\" and \"memory\" set to \"1\" will be applied. Resource with \"0\" weight will not accountable for the final score.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"), + }, + }, + }, }, }, }, - Required: []string{"networkName", "sourceVip", "enableDSR"}, }, }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"}, } } -func schema_k8sio_kube_scheduler_config_v1_Extender(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesMostAllocatedArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, it is assumed that the extender chose not to provide that extension.", + Description: "NodeResourcesMostAllocatedArgs holds arguments used to configure NodeResourcesMostAllocated plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "urlPrefix": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "URLPrefix at which the extender is available", + 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: "", }, }, - "filterVerb": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.", + 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: "", }, }, - "preemptVerb": { + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.", - Type: []string{"string"}, - Format: "", + Description: "Resources to be managed, if no resource is provided, default resource set with both the weight of \"cpu\" and \"memory\" set to \"1\" will be applied. Resource with \"0\" weight will not accountable for the final score.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"), + }, + }, + }, }, }, - "prioritizeVerb": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta1_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Description: "Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.", + Description: "Name defines the name of plugin", + Default: "", Type: []string{"string"}, Format: "", }, }, "weight": { SchemaProps: spec.SchemaProps{ - Description: "The numeric multiplier for the node scores that the prioritize call generates. The weight should be a positive integer", + Description: "Weight defines the weight of plugin, only used for Score plugins.", Type: []string{"integer"}, - Format: "int64", + Format: "int32", }, }, - "bindVerb": { + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta1_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. It is up to the plugin to process these Args.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Description: "Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender can implement this function.", + Description: "Name defines the name of plugin being configured", + Default: "", Type: []string{"string"}, Format: "", }, }, - "enableHttps": { + "args": { SchemaProps: spec.SchemaProps{ - Description: "EnableHTTPS specifies whether https should be used to communicate with the extender", - Type: []string{"boolean"}, - Format: "", + Description: "Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, - "tlsConfig": { - SchemaProps: spec.SchemaProps{ - Description: "TLSConfig specifies the transport layer security config", - Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"), + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta1_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PluginSet specifies enabled and disabled plugins for an extension point. If an array is empty, missing, or nil, default plugins at that extension point will be used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "httpTimeout": { SchemaProps: spec.SchemaProps{ - Description: "HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.", - Type: []string{"integer"}, - Format: "int64", + Description: "Enabled specifies plugins that should be enabled in addition to default plugins. These are called after default plugins and in the same order specified here.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.Plugin"), + }, + }, + }, }, }, - "nodeCacheCapable": { - SchemaProps: spec.SchemaProps{ - Description: "NodeCacheCapable specifies that the extender is capable of caching node information, so the scheduler should only send minimal information about the eligible nodes assuming that the extender already cached full details of all nodes in the cluster", - Type: []string{"boolean"}, - Format: "", + "disabled": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, }, - }, - "managedResources": { SchemaProps: spec.SchemaProps{ - Description: "ManagedResources is a list of extended resources that are managed by this extender. - A pod will be sent to the extender on the Filter, Prioritize and Bind\n (if the extender is the binder) phases iff the pod requests at least\n one of the extended resources in this list. If empty or unspecified,\n all pods will be sent to this extender.\n- If IgnoredByScheduler is set to true for a resource, kube-scheduler\n will skip checking the resource in predicates.", + Description: "Disabled specifies default plugins that should be disabled. When all default plugins need to be disabled, an array containing only one \"*\" should be provided.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderManagedResource"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.Plugin"), }, }, }, }, }, - "ignorable": { - SchemaProps: spec.SchemaProps{ - Description: "Ignorable specifies if the extender is ignorable, i.e. scheduling should not fail when the extender returns an error or is not reachable.", - Type: []string{"boolean"}, - Format: "", - }, - }, }, - Required: []string{"urlPrefix"}, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"}, + "k8s.io/kube-scheduler/config/v1beta1.Plugin"}, } } -func schema_k8sio_kube_scheduler_config_v1_ExtenderManagedResource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExtenderManagedResource describes the arguments of extended resources managed by an extender.", + Description: "Plugins include multiple extension points. When specified, the list of plugins for a particular extension point are the only ones enabled. If an extension point is omitted from the config, then the default set of plugins is used for that extension point. Enabled plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "queueSort": { SchemaProps: spec.SchemaProps{ - Description: "Name is the extended resource name.", - Type: []string{"string"}, - Format: "", + Description: "QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), }, }, - "ignoredByScheduler": { + "preFilter": { SchemaProps: spec.SchemaProps{ - Description: "IgnoredByScheduler indicates whether kube-scheduler should ignore this resource when applying predicates.", - Type: []string{"boolean"}, - Format: "", + Description: "PreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), }, }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_kube_scheduler_config_v1_ExtenderTLSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExtenderTLSConfig contains settings to enable TLS with extender", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "insecure": { + "filter": { SchemaProps: spec.SchemaProps{ - Description: "Server should be accessed without verifying the TLS certificate. For testing only.", - Type: []string{"boolean"}, - Format: "", + Description: "Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), }, }, - "serverName": { + "postFilter": { SchemaProps: spec.SchemaProps{ - Description: "ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", - Type: []string{"string"}, - Format: "", + Description: "PostFilter is a list of plugins that are invoked after filtering phase, no matter whether filtering succeeds or not.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), }, }, - "certFile": { + "preScore": { SchemaProps: spec.SchemaProps{ - Description: "Server requires TLS client certificate authentication", - Type: []string{"string"}, - Format: "", + Description: "PreScore is a list of plugins that are invoked before scoring.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), }, }, - "keyFile": { + "score": { SchemaProps: spec.SchemaProps{ - Description: "Server requires TLS client certificate authentication", - Type: []string{"string"}, - Format: "", + Description: "Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), }, }, - "caFile": { + "reserve": { SchemaProps: spec.SchemaProps{ - Description: "Trusted root certificates for server", - Type: []string{"string"}, - Format: "", + Description: "Reserve is a list of plugins invoked when reserving/unreserving resources after a node is assigned to run the pod.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), }, }, - "certData": { + "permit": { SchemaProps: spec.SchemaProps{ - Description: "CertData holds PEM-encoded bytes (typically read from a client certificate file). CertData takes precedence over CertFile", - Type: []string{"string"}, - Format: "byte", + Description: "Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), }, }, - "keyData": { + "preBind": { SchemaProps: spec.SchemaProps{ - Description: "KeyData holds PEM-encoded bytes (typically read from a client certificate key file). KeyData takes precedence over KeyFile", - Type: []string{"string"}, - Format: "byte", + Description: "PreBind is a list of plugins that should be invoked before a pod is bound.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), }, }, - "caData": { + "bind": { SchemaProps: spec.SchemaProps{ - Description: "CAData holds PEM-encoded bytes (typically read from a root certificates bundle). CAData takes precedence over CAFile", - Type: []string{"string"}, - Format: "byte", + Description: "Bind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework. The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + }, + }, + "postBind": { + SchemaProps: spec.SchemaProps{ + Description: "PostBind is a list of plugins that should be invoked after a pod is successfully bound.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), }, }, }, }, }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1beta1.PluginSet"}, } } -func schema_k8sio_kube_scheduler_config_v1_LabelPreference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_PodTopologySpreadArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LabelPreference holds the parameters that are used to configure the corresponding priority function", + Description: "PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "label": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Used to identify node \"groups\"", + 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: "", }, }, - "presence": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "This is a boolean flag If true, higher priority is given to nodes that have the label If false, higher priority is given to nodes that do not have the label", - Type: []string{"boolean"}, + 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: "", }, }, - }, - Required: []string{"label", "presence"}, - }, - }, - } -} - -func schema_k8sio_kube_scheduler_config_v1_LabelsPresence(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LabelsPresence holds the parameters that are used to configure the corresponding predicate in scheduler policy configuration.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "labels": { + "defaultConstraints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "The list of labels that identify node \"groups\" All of the labels should be either present (or absent) for the node to be considered a fit for hosting the pod", + Description: "DefaultConstraints defines topology spread constraints to be applied to Pods that don't define any in `pod.spec.topologySpreadConstraints`. `.defaultConstraints[*].labelSelectors` must be empty, as they are deduced from the Pod's membership to Services, ReplicationControllers, ReplicaSets or StatefulSets. When not empty, .defaultingType must be \"List\".", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), }, }, }, }, }, - "presence": { + "defaultingType": { SchemaProps: spec.SchemaProps{ - Description: "The boolean flag that indicates whether the labels should be present or absent from the node", - Type: []string{"boolean"}, + Description: "DefaultingType determines how .defaultConstraints are deduced. Can be one of \"System\" or \"List\".\n\n- \"System\": Use kubernetes defined constraints that spread Pods among\n Nodes and Zones.\n- \"List\": Use constraints defined in .defaultConstraints.\n\nDefaults to \"List\" if feature gate DefaultPodTopologySpread is disabled and to \"System\" if enabled.", + Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"labels", "presence"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.TopologySpreadConstraint"}, } } -func schema_k8sio_kube_scheduler_config_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_RequestedToCapacityRatioArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Policy describes a struct for a policy resource used in api.", + Description: "RequestedToCapacityRatioArgs holds arguments used to configure RequestedToCapacityRatio plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -42264,342 +50179,506 @@ func schema_k8sio_kube_scheduler_config_v1_Policy(ref common.ReferenceCallback) Format: "", }, }, - "predicates": { + "shape": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Holds the information to configure the fit predicate functions", + Description: "Points defining priority function shape", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1.PredicatePolicy"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"), }, }, }, }, }, - "priorities": { + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Holds the information to configure the priority functions", + Description: "Resources to be managed", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1.PriorityPolicy"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"), }, }, }, }, }, - "extenders": { + }, + Required: []string{"shape"}, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec", "k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta1_RequestedToCapacityRatioParam(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "shape": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Holds the information to communicate with the extender(s)", + Description: "Shape is a list of points defining the scoring function shape.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1.Extender"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"), }, }, }, }, }, - "hardPodAffinitySymmetricWeight": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta1_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceSpec represents a single resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Description: "RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding to every RequiredDuringScheduling affinity rule. HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 1-100.", - Type: []string{"integer"}, - Format: "int32", + Description: "Name of the resource.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "alwaysCheckAllPredicates": { + "weight": { SchemaProps: spec.SchemaProps{ - Description: "When AlwaysCheckAllPredicates is set to true, scheduler checks all the configured predicates even after one or more of them fails. When the flag is set to false, scheduler skips checking the rest of the predicates after it finds one predicate that failed.", - Type: []string{"boolean"}, - Format: "", + Description: "Weight of the resource.", + Type: []string{"integer"}, + Format: "int64", }, }, }, - Required: []string{"predicates", "priorities", "extenders", "hardPodAffinitySymmetricWeight", "alwaysCheckAllPredicates"}, + Required: []string{"name"}, }, }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.Extender", "k8s.io/kube-scheduler/config/v1.PredicatePolicy", "k8s.io/kube-scheduler/config/v1.PriorityPolicy"}, } } -func schema_k8sio_kube_scheduler_config_v1_PredicateArgument(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_ScoringStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PredicateArgument represents the arguments to configure predicate functions in scheduler policy configuration. Only one of its members may be specified", + Description: "ScoringStrategy define ScoringStrategyType for node resource plugin", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "serviceAffinity": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "The predicate that provides affinity for pods belonging to a service It uses a label to identify nodes that belong to the same \"group\"", - Ref: ref("k8s.io/kube-scheduler/config/v1.ServiceAffinity"), + Description: "Type selects which strategy to run.", + Type: []string{"string"}, + Format: "", }, }, - "labelsPresence": { + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "The predicate that checks whether a particular node has a certain label defined or not, regardless of value", - Ref: ref("k8s.io/kube-scheduler/config/v1.LabelsPresence"), + Description: "Resources to consider when scoring. The default resource set includes \"cpu\" and \"memory\" with an equal weight. Allowed weights go from 1 to 100. Weight defaults to 1 if not specified or explicitly set to 0.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"), + }, + }, + }, + }, + }, + "requestedToCapacityRatio": { + SchemaProps: spec.SchemaProps{ + Description: "Arguments specific to RequestedToCapacityRatio strategy.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.RequestedToCapacityRatioParam"), }, }, }, - Required: []string{"serviceAffinity", "labelsPresence"}, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.LabelsPresence", "k8s.io/kube-scheduler/config/v1.ServiceAffinity"}, + "k8s.io/kube-scheduler/config/v1beta1.RequestedToCapacityRatioParam", "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"}, } } -func schema_k8sio_kube_scheduler_config_v1_PredicatePolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_ServiceAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PredicatePolicy describes a struct of a predicate policy.", + Description: "ServiceAffinityArgs holds arguments used to configure the ServiceAffinity plugin.\n\nThis plugin has been deprecated and is only configurable through the scheduler policy API and the v1beta1 component config API. It is recommended to use the InterPodAffinity plugin instead.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Identifier of the predicate policy For a custom predicate, the name can be user-defined For the Kubernetes provided predicates, the name is the identifier of the pre-defined predicate", + 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: "", }, }, - "argument": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Holds the parameters to configure the given predicate", - Ref: ref("k8s.io/kube-scheduler/config/v1.PredicateArgument"), + 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: "", + }, + }, + "affinityLabels": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "AffinityLabels are homogeneous for pods that are scheduled to a node. (i.e. it returns true IFF this pod can be added to this node such that all other pods in the same service are running on nodes with the exact same values for Labels).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "antiAffinityLabelsPreference": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "AntiAffinityLabelsPreference are the labels to consider for service anti affinity scoring.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"name", "argument"}, }, }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.PredicateArgument"}, } } -func schema_k8sio_kube_scheduler_config_v1_PriorityArgument(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityArgument represents the arguments to configure priority functions in scheduler policy configuration. Only one of its members may be specified", + Description: "UtilizationShapePoint represents single point of priority function shape.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "serviceAntiAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "The priority function that ensures a good spread (anti-affinity) for pods belonging to a service It uses a label to identify nodes that belong to the same \"group\"", - Ref: ref("k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity"), - }, - }, - "labelPreference": { + "utilization": { SchemaProps: spec.SchemaProps{ - Description: "The priority function that checks whether a particular node has a certain label defined or not, regardless of value", - Ref: ref("k8s.io/kube-scheduler/config/v1.LabelPreference"), + Description: "Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "requestedToCapacityRatioArguments": { + "score": { SchemaProps: spec.SchemaProps{ - Description: "The RequestedToCapacityRatio priority function is parametrized with function shape.", - Ref: ref("k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments"), + Description: "Score assigned to given utilization (y axis). Valid values are 0 to 10.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"serviceAntiAffinity", "labelPreference", "requestedToCapacityRatioArguments"}, + Required: []string{"utilization", "score"}, }, }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.LabelPreference", "k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments", "k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity"}, } } -func schema_k8sio_kube_scheduler_config_v1_PriorityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta1_VolumeBindingArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityPolicy describes a struct of a priority policy.", + Description: "VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Identifier of the priority policy For a custom priority, the name can be user-defined For the Kubernetes provided priority functions, the name is the identifier of the pre-defined priority function", + 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: "", }, }, - "weight": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "The numeric multiplier for the node scores that the priority function generates The weight should be non-zero and can be a positive or a negative integer", + 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: "", + }, + }, + "bindTimeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "BindTimeoutSeconds is the timeout in seconds in volume binding operation. Value must be non-negative integer. The value zero indicates no waiting. If this value is nil, the default value (600) will be used.", Type: []string{"integer"}, Format: "int64", }, }, - "argument": { + "shape": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Holds the parameters to configure the given priority function", - Ref: ref("k8s.io/kube-scheduler/config/v1.PriorityArgument"), + Description: "Shape specifies the points defining the score function shape, which is used to score nodes based on the utilization of statically provisioned PVs. The utilization is calculated by dividing the total requested storage of the pod by the total capacity of feasible PVs on each node. Each point contains utilization (ranges from 0 to 100) and its associated score (ranges from 0 to 10). You can turn the priority by specifying different scores for different utilization numbers. The default shape points are: 1) 0 for 0 utilization 2) 10 for 100 utilization All points must be sorted in increasing order by utilization.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"), + }, + }, + }, }, }, }, - Required: []string{"name", "weight", "argument"}, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.PriorityArgument"}, + "k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"}, } } -func schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioArguments(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_DefaultPreemptionArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RequestedToCapacityRatioArguments holds arguments specific to RequestedToCapacityRatio priority function.", + Description: "DefaultPreemptionArgs holds arguments used to configure the DefaultPreemption plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "shape": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Array of point defining priority function shape.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"), - }, - }, - }, + 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: "", }, }, - "resources": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1.ResourceSpec"), - }, - }, - }, + 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: "", + }, + }, + "minCandidateNodesPercentage": { + SchemaProps: spec.SchemaProps{ + Description: "MinCandidateNodesPercentage is the minimum number of candidates to shortlist when dry running preemption as a percentage of number of nodes. Must be in the range [0, 100]. Defaults to 10% of the cluster size if unspecified.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "minCandidateNodesAbsolute": { + SchemaProps: spec.SchemaProps{ + Description: "MinCandidateNodesAbsolute is the absolute minimum number of candidates to shortlist. The likely number of candidates enumerated for dry running preemption is given by the formula: numCandidates = max(numNodes * minCandidateNodesPercentage, minCandidateNodesAbsolute) We say \"likely\" because there are other factors such as PDB violations that play a role in the number of candidates shortlisted. Must be at least 0 nodes. Defaults to 100 nodes if unspecified.", + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"shape"}, }, }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.ResourceSpec", "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"}, } } -func schema_k8sio_kube_scheduler_config_v1_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_Extender(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceSpec represents single resource and weight for bin packing of priority RequestedToCapacityRatioArguments.", + Description: "Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, it is assumed that the extender chose not to provide that extension.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "urlPrefix": { SchemaProps: spec.SchemaProps{ - Description: "Name of the resource to be managed by RequestedToCapacityRatio function.", + Description: "URLPrefix at which the extender is available", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "filterVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.", + Type: []string{"string"}, + Format: "", + }, + }, + "preemptVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.", + Type: []string{"string"}, + Format: "", + }, + }, + "prioritizeVerb": { + SchemaProps: spec.SchemaProps{ + Description: "Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.", Type: []string{"string"}, Format: "", }, }, "weight": { SchemaProps: spec.SchemaProps{ - Description: "Weight of the resource.", + Description: "The numeric multiplier for the node scores that the prioritize call generates. The weight should be a positive integer", Type: []string{"integer"}, Format: "int64", }, }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_kube_scheduler_config_v1_ServiceAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceAffinity holds the parameters that are used to configure the corresponding predicate in scheduler policy configuration.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "labels": { + "bindVerb": { SchemaProps: spec.SchemaProps{ - Description: "The list of labels that identify node \"groups\" All of the labels should match for the node to be considered a fit for hosting the pod", + Description: "Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender can implement this function.", + Type: []string{"string"}, + Format: "", + }, + }, + "enableHTTPS": { + SchemaProps: spec.SchemaProps{ + Description: "EnableHTTPS specifies whether https should be used to communicate with the extender", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tlsConfig": { + SchemaProps: spec.SchemaProps{ + Description: "TLSConfig specifies the transport layer security config", + Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"), + }, + }, + "httpTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "nodeCacheCapable": { + SchemaProps: spec.SchemaProps{ + Description: "NodeCacheCapable specifies that the extender is capable of caching node information, so the scheduler should only send minimal information about the eligible nodes assuming that the extender already cached full details of all nodes in the cluster", + Type: []string{"boolean"}, + Format: "", + }, + }, + "managedResources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ManagedResources is a list of extended resources that are managed by this extender. - A pod will be sent to the extender on the Filter, Prioritize and Bind\n (if the extender is the binder) phases iff the pod requests at least\n one of the extended resources in this list. If empty or unspecified,\n all pods will be sent to this extender.\n- If IgnoredByScheduler is set to true for a resource, kube-scheduler\n will skip checking the resource in predicates.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderManagedResource"), }, }, }, }, }, + "ignorable": { + SchemaProps: spec.SchemaProps{ + Description: "Ignorable specifies if the extender is ignorable, i.e. scheduling should not fail when the extender returns an error or is not reachable.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, - Required: []string{"labels"}, + Required: []string{"urlPrefix"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"}, } } -func schema_k8sio_kube_scheduler_config_v1_ServiceAntiAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_InterPodAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceAntiAffinity holds the parameters that are used to configure the corresponding priority function", + Description: "InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "label": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Used to identify node \"groups\"", + 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: "", }, }, - }, - Required: []string{"label"}, - }, - }, - } -} - -func schema_k8sio_kube_scheduler_config_v1_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "UtilizationShapePoint represents single point of priority function shape.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "utilization": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.", - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - "score": { + "hardPodAffinityWeight": { SchemaProps: spec.SchemaProps{ - Description: "Score assigned to given utilization (y axis). Valid values are 0 to 10.", + Description: "HardPodAffinityWeight is the scoring weight for existing pods with a matching hard affinity to the incoming pod.", Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"utilization", "score"}, }, }, } } -func schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -42620,22 +50699,9 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerConfiguration(ref Format: "", }, }, - "schedulerName": { - SchemaProps: spec.SchemaProps{ - Description: "SchedulerName is name of the scheduler, used to select which pods will be processed by this scheduler, based on pod's \"spec.SchedulerName\".", - Type: []string{"string"}, - Format: "", - }, - }, - "algorithmSource": { - SchemaProps: spec.SchemaProps{ - Description: "AlgorithmSource specifies the scheduler algorithm source.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.SchedulerAlgorithmSource"), - }, - }, - "hardPodAffinitySymmetricWeight": { + "parallelism": { SchemaProps: spec.SchemaProps{ - Description: "RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding to every RequiredDuringScheduling affinity rule. HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100.", + Description: "Parallelism defines the amount of parallelism in algorithms for scheduling a Pods. Must be greater than 0. Defaults to 16", Type: []string{"integer"}, Format: "int32", }, @@ -42643,12 +50709,14 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerConfiguration(ref "leaderElection": { SchemaProps: spec.SchemaProps{ Description: "LeaderElection defines the configuration of leader election client.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.KubeSchedulerLeaderElectionConfiguration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"), }, }, "clientConnection": { SchemaProps: spec.SchemaProps{ Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), }, }, @@ -42680,27 +50748,13 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerConfiguration(ref Format: "", }, }, - "disablePreemption": { - SchemaProps: spec.SchemaProps{ - Description: "DisablePreemption disables the pod preemption feature.", - Type: []string{"boolean"}, - Format: "", - }, - }, "percentageOfNodesToScore": { SchemaProps: spec.SchemaProps{ - Description: "PercentageOfNodeToScore is the percentage of all nodes that once found feasible for running a pod, the scheduler stops its search for more feasible nodes in the cluster. This helps improve scheduler's performance. Scheduler always tries to find at least \"minFeasibleNodesToFind\" feasible nodes no matter what the value of this flag is. Example: if the cluster size is 500 nodes and the value of this flag is 30, then scheduler stops finding further feasible nodes once it finds 150 feasible ones. When the value is 0, default percentage (5%--50% based on the size of the cluster) of the nodes will be scored.", + Description: "PercentageOfNodesToScore is the percentage of all nodes that once found feasible for running a pod, the scheduler stops its search for more feasible nodes in the cluster. This helps improve scheduler's performance. Scheduler always tries to find at least \"minFeasibleNodesToFind\" feasible nodes no matter what the value of this flag is. Example: if the cluster size is 500 nodes and the value of this flag is 30, then scheduler stops finding further feasible nodes once it finds 150 feasible ones. When the value is 0, default percentage (5%--50% based on the size of the cluster) of the nodes will be scored.", Type: []string{"integer"}, Format: "int32", }, }, - "bindTimeoutSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Duration to wait for a binding operation to complete before timing out Value must be non-negative integer. The value zero indicates no waiting. If this value is nil, the default value will be used.", - Type: []string{"integer"}, - Format: "int64", - }, - }, "podInitialBackoffSeconds": { SchemaProps: spec.SchemaProps{ Description: "PodInitialBackoffSeconds is the initial backoff for unschedulable pods. If specified, it must be greater than 0. If this value is null, the default value (1s) will be used.", @@ -42715,10 +50769,74 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerConfiguration(ref Format: "int64", }, }, + "profiles": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "schedulerName", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Profiles are scheduling profiles that kube-scheduler supports. Pods can choose to be scheduled under a particular profile by setting its associated scheduler name. Pods that don't specify any scheduler name are scheduled with the \"default-scheduler\" profile, if present here.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile"), + }, + }, + }, + }, + }, + "extenders": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Extenders are the list of scheduler extenders, each holding the values of how to communicate with the extender. These extenders are shared by all scheduler profiles.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Extender"), + }, + }, + }, + }, + }, + }, + Required: []string{"leaderElection", "clientConnection"}, + }, + }, + Dependencies: []string{ + "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1beta2.Extender", "k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeSchedulerProfile is a scheduling profile.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "schedulerName": { + SchemaProps: spec.SchemaProps{ + Description: "SchedulerName is the name of the scheduler associated to this profile. If SchedulerName matches with the pod's \"spec.schedulerName\", then the pod is scheduled with this profile.", + Type: []string{"string"}, + Format: "", + }, + }, "plugins": { SchemaProps: spec.SchemaProps{ - Description: "Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.Plugins"), + Description: "Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and PluginConfig must be specified for all profiles.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Plugins"), }, }, "pluginConfig": { @@ -42736,98 +50854,183 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerConfiguration(ref Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginConfig"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginConfig"), }, }, }, }, }, }, - Required: []string{"algorithmSource", "leaderElection", "clientConnection", "bindTimeoutSeconds", "podInitialBackoffSeconds", "podMaxBackoffSeconds"}, }, }, Dependencies: []string{ - "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/kube-scheduler/config/v1alpha1.KubeSchedulerLeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1alpha1.PluginConfig", "k8s.io/kube-scheduler/config/v1alpha1.Plugins", "k8s.io/kube-scheduler/config/v1alpha1.SchedulerAlgorithmSource"}, + "k8s.io/kube-scheduler/config/v1beta2.PluginConfig", "k8s.io/kube-scheduler/config/v1beta2.Plugins"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha1_KubeSchedulerLeaderElectionConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_NodeAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeSchedulerLeaderElectionConfiguration expands LeaderElectionConfiguration to include scheduler specific configuration.", + Description: "NodeAffinityArgs holds arguments to configure the NodeAffinity plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "leaderElect": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "leaderElect enables a leader election client to gain leadership before executing the main loop. Enable this when running replicated components for high availability.", - Type: []string{"boolean"}, + 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: "", }, }, - "leaseDuration": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "leaseDuration is the duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + 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: "", }, }, - "renewDeadline": { + "addedAffinity": { SchemaProps: spec.SchemaProps{ - Description: "renewDeadline is the interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration. This is only applicable if leader election is enabled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "AddedAffinity is applied to all Pods additionally to the NodeAffinity specified in the PodSpec. That is, Nodes need to satisfy AddedAffinity AND .spec.NodeAffinity. AddedAffinity is empty by default (all Nodes match). When AddedAffinity is used, some Pods with affinity requirements that match a specific Node (such as Daemonset Pods) might remain unschedulable.", + Ref: ref("k8s.io/api/core/v1.NodeAffinity"), }, }, - "retryPeriod": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeAffinity"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesBalancedAllocationArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResourcesBalancedAllocation plugin.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "retryPeriod is the duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + 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: "", }, }, - "resourceLock": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "resourceLock indicates the resource object type that will be used to lock during leader election cycles.", + 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: "", }, }, - "resourceName": { + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "resourceName indicates the name of resource object that will be used to lock during leader election cycles.", - Type: []string{"string"}, - Format: "", + Description: "Resources to be managed, the default is \"cpu\" and \"memory\" if not specified.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"), + }, + }, + }, }, }, - "resourceNamespace": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesFitArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "resourceName indicates the namespace of resource object that will be used to lock during leader election cycles.", + 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: "", }, }, - "lockObjectNamespace": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "LockObjectNamespace defines the namespace of the lock object DEPRECATED: will be removed in favor of resourceNamespace", + 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: "", }, }, - "lockObjectName": { + "ignoredResources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "LockObjectName defines the lock object name DEPRECATED: will be removed in favor of resourceName", - Type: []string{"string"}, - Format: "", + Description: "IgnoredResources is the list of resources that NodeResources fit filter should ignore. This doesn't apply to scoring.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "ignoredResourceGroups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. e.g. if group is [\"example.com\"], it will ignore all resource names that begin with \"example.com\", such as \"example.com/aaa\" and \"example.com/bbb\". A resource group name can't contain '/'. This doesn't apply to scoring.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "scoringStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "ScoringStrategy selects the node resource scoring strategy. The default strategy is LeastAllocated with an equal \"cpu\" and \"memory\" weight.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy"), }, }, }, - Required: []string{"leaderElect", "leaseDuration", "renewDeadline", "retryPeriod", "resourceLock", "resourceName", "resourceNamespace", "lockObjectNamespace", "lockObjectName"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha1_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -42837,6 +51040,7 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_Plugin(ref common.ReferenceCall "name": { SchemaProps: spec.SchemaProps{ Description: "Name defines the name of plugin", + Default: "", Type: []string{"string"}, Format: "", }, @@ -42855,7 +51059,7 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_Plugin(ref common.ReferenceCall } } -func schema_k8sio_kube_scheduler_config_v1alpha1_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -42865,6 +51069,7 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_PluginConfig(ref common.Referen "name": { SchemaProps: spec.SchemaProps{ Description: "Name defines the name of plugin being configured", + Default: "", Type: []string{"string"}, Format: "", }, @@ -42872,7 +51077,8 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_PluginConfig(ref common.Referen "args": { SchemaProps: spec.SchemaProps{ Description: "Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, @@ -42880,11 +51086,11 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_PluginConfig(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Unknown"}, + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha1_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -42898,12 +51104,13 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_PluginSet(ref common.ReferenceC }, }, SchemaProps: spec.SchemaProps{ - Description: "Enabled specifies plugins that should be enabled in addition to default plugins. These are called after default plugins and in the same order specified here.", + Description: "Enabled specifies plugins that should be enabled in addition to default plugins. If the default plugin is also configured in the scheduler config file, the weight of plugin will be overridden accordingly. These are called after default plugins and in the same order specified here.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.Plugin"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Plugin"), }, }, }, @@ -42924,7 +51131,8 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_PluginSet(ref common.ReferenceC Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.Plugin"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Plugin"), }, }, }, @@ -42934,11 +51142,11 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_PluginSet(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1alpha1.Plugin"}, + "k8s.io/kube-scheduler/config/v1beta2.Plugin"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha1_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -42948,93 +51156,131 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_Plugins(ref common.ReferenceCal "queueSort": { SchemaProps: spec.SchemaProps{ Description: "QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "preFilter": { SchemaProps: spec.SchemaProps{ Description: "PreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "filter": { SchemaProps: spec.SchemaProps{ Description: "Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "postFilter": { SchemaProps: spec.SchemaProps{ - Description: "PostFilter is a list of plugins that are invoked after filtering out infeasible nodes.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + Description: "PostFilter is a list of plugins that are invoked after filtering phase, no matter whether filtering succeeds or not.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + }, + }, + "preScore": { + SchemaProps: spec.SchemaProps{ + Description: "PreScore is a list of plugins that are invoked before scoring.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "score": { SchemaProps: spec.SchemaProps{ Description: "Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "reserve": { SchemaProps: spec.SchemaProps{ - Description: "Reserve is a list of plugins invoked when reserving a node to run the pod.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + Description: "Reserve is a list of plugins invoked when reserving/unreserving resources after a node is assigned to run the pod.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "permit": { SchemaProps: spec.SchemaProps{ Description: "Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "preBind": { SchemaProps: spec.SchemaProps{ Description: "PreBind is a list of plugins that should be invoked before a pod is bound.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "bind": { SchemaProps: spec.SchemaProps{ Description: "Bind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework. The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "postBind": { SchemaProps: spec.SchemaProps{ Description: "PostBind is a list of plugins that should be invoked after a pod is successfully bound.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), - }, - }, - "unreserve": { - SchemaProps: spec.SchemaProps{ - Description: "Unreserve is a list of plugins invoked when a pod that was previously reserved is rejected in a later phase.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1alpha1.PluginSet"}, + "k8s.io/kube-scheduler/config/v1beta2.PluginSet"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerAlgorithmSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_PodTopologySpreadArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SchedulerAlgorithmSource is the source of a scheduler algorithm. One source field must be specified, and source fields are mutually exclusive.", + Description: "PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "policy": { + "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: "", + }, + }, + "defaultConstraints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Policy is a policy based algorithm source.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicySource"), + Description: "DefaultConstraints defines topology spread constraints to be applied to Pods that don't define any in `pod.spec.topologySpreadConstraints`. `.defaultConstraints[*].labelSelectors` must be empty, as they are deduced from the Pod's membership to Services, ReplicationControllers, ReplicaSets or StatefulSets. When not empty, .defaultingType must be \"List\".", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), + }, + }, + }, }, }, - "provider": { + "defaultingType": { SchemaProps: spec.SchemaProps{ - Description: "Provider is the name of a scheduling algorithm provider to use.", + Description: "DefaultingType determines how .defaultConstraints are deduced. Can be one of \"System\" or \"List\".\n\n- \"System\": Use kubernetes defined constraints that spread Pods among\n Nodes and Zones.\n- \"List\": Use constraints defined in .defaultConstraints.\n\nDefaults to \"List\" if feature gate DefaultPodTopologySpread is disabled and to \"System\" if enabled.", Type: []string{"string"}, Format: "", }, @@ -43043,91 +51289,158 @@ func schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerAlgorithmSource(ref co }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicySource"}, + "k8s.io/api/core/v1.TopologySpreadConstraint"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicyConfigMapSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_RequestedToCapacityRatioParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SchedulerPolicyConfigMapSource is a policy serialized into a config map value under the SchedulerPolicyConfigMapKey key.", + Description: "RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namespace": { + "shape": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace of the policy config map.", - Type: []string{"string"}, - Format: "", + Description: "Shape is a list of points defining the scoring function shape.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"), + }, + }, + }, }, }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta2_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceSpec represents a single resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of hte policy config map.", + Description: "Name of the resource.", + Default: "", Type: []string{"string"}, Format: "", }, }, + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "Weight of the resource.", + Type: []string{"integer"}, + Format: "int64", + }, + }, }, - Required: []string{"namespace", "name"}, + Required: []string{"name"}, }, }, } } -func schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicyFileSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_ScoringStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SchedulerPolicyFileSource is a policy serialized to disk and accessed via path.", + Description: "ScoringStrategy define ScoringStrategyType for node resource plugin", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "path": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "Path is the location of a serialized policy.", + Description: "Type selects which strategy to run.", Type: []string{"string"}, Format: "", }, }, + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "topologyKey", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Resources to consider when scoring. The default resource set includes \"cpu\" and \"memory\" with an equal weight. Allowed weights go from 1 to 100. Weight defaults to 1 if not specified or explicitly set to 0.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"), + }, + }, + }, + }, + }, + "requestedToCapacityRatio": { + SchemaProps: spec.SchemaProps{ + Description: "Arguments specific to RequestedToCapacityRatio strategy.", + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.RequestedToCapacityRatioParam"), + }, + }, }, - Required: []string{"path"}, }, }, + Dependencies: []string{ + "k8s.io/kube-scheduler/config/v1beta2.RequestedToCapacityRatioParam", "k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha1_SchedulerPolicySource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SchedulerPolicySource configures a means to obtain a scheduler Policy. One source field must be specified, and source fields are mutually exclusive.", + Description: "UtilizationShapePoint represents single point of priority function shape.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "file": { + "utilization": { SchemaProps: spec.SchemaProps{ - Description: "File is a file policy source.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyFileSource"), + Description: "Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "configMap": { + "score": { SchemaProps: spec.SchemaProps{ - Description: "ConfigMap is a config map policy source.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyConfigMapSource"), + Description: "Score assigned to given utilization (y axis). Valid values are 0 to 10.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, + Required: []string{"utilization", "score"}, }, }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyConfigMapSource", "k8s.io/kube-scheduler/config/v1alpha1.SchedulerPolicyFileSource"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_VolumeBindingArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeSchedulerConfiguration configures a scheduler", + Description: "VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -43144,429 +51457,191 @@ func schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerConfiguration(ref Format: "", }, }, - "leaderElection": { - SchemaProps: spec.SchemaProps{ - Description: "LeaderElection defines the configuration of leader election client.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerLeaderElectionConfiguration"), - }, - }, - "clientConnection": { - SchemaProps: spec.SchemaProps{ - Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", - Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), - }, - }, - "healthzBindAddress": { - SchemaProps: spec.SchemaProps{ - Description: "HealthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10251", - Type: []string{"string"}, - Format: "", - }, - }, - "metricsBindAddress": { - SchemaProps: spec.SchemaProps{ - Description: "MetricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 0.0.0.0:10251.", - Type: []string{"string"}, - Format: "", - }, - }, - "enableProfiling": { - SchemaProps: spec.SchemaProps{ - Description: "enableProfiling enables profiling via web interface host:port/debug/pprof/", - Type: []string{"boolean"}, - Format: "", - }, - }, - "enableContentionProfiling": { - SchemaProps: spec.SchemaProps{ - Description: "enableContentionProfiling enables lock contention profiling, if enableProfiling is true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "disablePreemption": { - SchemaProps: spec.SchemaProps{ - Description: "DisablePreemption disables the pod preemption feature.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "percentageOfNodesToScore": { - SchemaProps: spec.SchemaProps{ - Description: "PercentageOfNodeToScore is the percentage of all nodes that once found feasible for running a pod, the scheduler stops its search for more feasible nodes in the cluster. This helps improve scheduler's performance. Scheduler always tries to find at least \"minFeasibleNodesToFind\" feasible nodes no matter what the value of this flag is. Example: if the cluster size is 500 nodes and the value of this flag is 30, then scheduler stops finding further feasible nodes once it finds 150 feasible ones. When the value is 0, default percentage (5%--50% based on the size of the cluster) of the nodes will be scored.", - Type: []string{"integer"}, - Format: "int32", - }, - }, "bindTimeoutSeconds": { SchemaProps: spec.SchemaProps{ - Description: "Duration to wait for a binding operation to complete before timing out Value must be non-negative integer. The value zero indicates no waiting. If this value is nil, the default value will be used.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "podInitialBackoffSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "PodInitialBackoffSeconds is the initial backoff for unschedulable pods. If specified, it must be greater than 0. If this value is null, the default value (1s) will be used.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "podMaxBackoffSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "PodMaxBackoffSeconds is the max backoff for unschedulable pods. If specified, it must be greater than podInitialBackoffSeconds. If this value is null, the default value (10s) will be used.", + Description: "BindTimeoutSeconds is the timeout in seconds in volume binding operation. Value must be non-negative integer. The value zero indicates no waiting. If this value is nil, the default value (600) will be used.", Type: []string{"integer"}, Format: "int64", }, }, - "profiles": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "schedulerName", - }, - "x-kubernetes-list-type": "map", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Profiles are scheduling profiles that kube-scheduler supports. Pods can choose to be scheduled under a particular profile by setting its associated scheduler name. Pods that don't specify any scheduler name are scheduled with the \"default-scheduler\" profile, if present here.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerProfile"), - }, - }, - }, - }, - }, - "extenders": { + "shape": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", + "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "Extenders are the list of scheduler extenders, each holding the values of how to communicate with the extender. These extenders are shared by all scheduler profiles.", + Description: "Shape specifies the points defining the score function shape, which is used to score nodes based on the utilization of statically provisioned PVs. The utilization is calculated by dividing the total requested storage of the pod by the total capacity of feasible PVs on each node. Each point contains utilization (ranges from 0 to 100) and its associated score (ranges from 0 to 10). You can turn the priority by specifying different scores for different utilization numbers. The default shape points are: 1) 0 for 0 utilization 2) 10 for 100 utilization All points must be sorted in increasing order by utilization.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1.Extender"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"), }, }, }, }, }, }, - Required: []string{"leaderElection", "clientConnection", "bindTimeoutSeconds", "podInitialBackoffSeconds", "podMaxBackoffSeconds", "profiles", "extenders"}, }, }, Dependencies: []string{ - "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/kube-scheduler/config/v1.Extender", "k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerLeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1alpha2.KubeSchedulerProfile"}, + "k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerLeaderElectionConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeSchedulerLeaderElectionConfiguration expands LeaderElectionConfiguration to include scheduler specific configuration.", + Description: "CredentialProvider represents an exec plugin to be invoked by the kubelet. The plugin is only invoked when an image being pulled matches the images handled by the plugin (see matchImages).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "leaderElect": { - SchemaProps: spec.SchemaProps{ - Description: "leaderElect enables a leader election client to gain leadership before executing the main loop. Enable this when running replicated components for high availability.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "leaseDuration": { - SchemaProps: spec.SchemaProps{ - Description: "leaseDuration is the duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "renewDeadline": { - SchemaProps: spec.SchemaProps{ - Description: "renewDeadline is the interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration. This is only applicable if leader election is enabled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "retryPeriod": { - SchemaProps: spec.SchemaProps{ - Description: "retryPeriod is the duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "resourceLock": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "resourceLock indicates the resource object type that will be used to lock during leader election cycles.", + Description: "name is the required name of the credential provider. It must match the name of the provider executable as seen by the kubelet. The executable must be in the kubelet's bin directory (set by the --image-credential-provider-bin-dir flag).", + Default: "", Type: []string{"string"}, Format: "", }, }, - "resourceName": { + "matchImages": { SchemaProps: spec.SchemaProps{ - Description: "resourceName indicates the name of resource object that will be used to lock during leader election cycles.", - Type: []string{"string"}, - Format: "", + Description: "matchImages is a required list of strings used to match against images in order to determine if this provider should be invoked. If one of the strings matches the requested image from the kubelet, the plugin will be invoked and given a chance to provide credentials. Images are expected to contain the registry domain and URL path.\n\nEach entry in matchImages is a pattern which can optionally contain a port and a path. Globs can be used in the domain, but not in the port or the path. Globs are supported as subdomains like '*.k8s.io' or 'k8s.*.io', and top-level-domains such as 'k8s.*'. Matching partial subdomains like 'app*.k8s.io' is also supported. Each glob can only match a single subdomain segment, so *.io does not match *.k8s.io.\n\nA match exists between an image and a matchImage when all of the below are true: - Both contain the same number of domain parts and each part matches. - The URL path of an imageMatch must be a prefix of the target image URL path. - If the imageMatch contains a port, then the port must match in the image as well.\n\nExample values of matchImages:\n - 123456789.dkr.ecr.us-east-1.amazonaws.com\n - *.azurecr.io\n - gcr.io\n - *.*.registry.io\n - registry.io:8080/path", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "resourceNamespace": { + "defaultCacheDuration": { SchemaProps: spec.SchemaProps{ - Description: "resourceName indicates the namespace of resource object that will be used to lock during leader election cycles.", - Type: []string{"string"}, - Format: "", + Description: "defaultCacheDuration is the default duration the plugin will cache credentials in-memory if a cache duration is not provided in the plugin response. This field is required.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - }, - Required: []string{"leaderElect", "leaseDuration", "renewDeadline", "retryPeriod", "resourceLock", "resourceName", "resourceNamespace"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, - } -} - -func schema_k8sio_kube_scheduler_config_v1alpha2_KubeSchedulerProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "KubeSchedulerProfile is a scheduling profile.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "schedulerName": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "SchedulerName is the name of the scheduler associated to this profile. If SchedulerName matches with the pod's \"spec.schedulerName\", then the pod is scheduled with this profile.", + Description: "Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse MUST use the same encoding version as the input. Current supported values are: - credentialprovider.kubelet.k8s.io/v1alpha1", + Default: "", Type: []string{"string"}, Format: "", }, }, - "plugins": { + "args": { SchemaProps: spec.SchemaProps{ - Description: "Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and PluginConfig must be specified for all profiles.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.Plugins"), - }, - }, - "pluginConfig": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "name", + Description: "Arguments to pass to the command when executing it.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, }, - "x-kubernetes-list-type": "map", }, }, + }, + "env": { SchemaProps: spec.SchemaProps{ - Description: "PluginConfig is an optional set of custom plugin arguments for each plugin. Omitting config args for a plugin is equivalent to using the default config for that plugin.", + Description: "Env defines additional environment variables to expose to the process. These are unioned with the host's environment, as well as variables client-go uses to pass argument to the plugin.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginConfig"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kubelet/config/v1alpha1.ExecEnvVar"), }, }, }, }, }, }, + Required: []string{"name", "matchImages", "defaultCacheDuration", "apiVersion"}, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1alpha2.PluginConfig", "k8s.io/kube-scheduler/config/v1alpha2.Plugins"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kubelet/config/v1alpha1.ExecEnvVar"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha2_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kubelet_config_v1alpha1_CredentialProviderConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.", + Description: "CredentialProviderConfig is the configuration containing information about each exec credential provider. Kubelet reads this configuration from disk and enables each provider as specified by the CredentialProvider type.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Name defines the name of plugin", + 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: "", }, }, - "weight": { - SchemaProps: spec.SchemaProps{ - Description: "Weight defines the weight of plugin, only used for Score plugins.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_kube_scheduler_config_v1alpha2_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. It is up to the plugin to process these Args.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Name defines the name of plugin being configured", + 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: "", }, }, - "args": { - SchemaProps: spec.SchemaProps{ - Description: "Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Unknown"}, - } -} - -func schema_k8sio_kube_scheduler_config_v1alpha2_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PluginSet specifies enabled and disabled plugins for an extension point. If an array is empty, missing, or nil, default plugins at that extension point will be used.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "enabled": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Enabled specifies plugins that should be enabled in addition to default plugins. These are called after default plugins and in the same order specified here.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.Plugin"), - }, - }, - }, - }, - }, - "disabled": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "name", - }, - "x-kubernetes-list-type": "map", - }, - }, + "providers": { SchemaProps: spec.SchemaProps{ - Description: "Disabled specifies default plugins that should be disabled. When all default plugins need to be disabled, an array containing only one \"*\" should be provided.", + Description: "providers is a list of credential provider plugins that will be enabled by the kubelet. Multiple providers may match against a single image, in which case credentials from all providers will be returned to the kubelet. If multiple providers are called for a single image, the results are combined. If providers return overlapping auth keys, the value from the provider earlier in this list is used.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.Plugin"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kubelet/config/v1alpha1.CredentialProvider"), }, }, }, }, }, }, + Required: []string{"providers"}, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1alpha2.Plugin"}, + "k8s.io/kubelet/config/v1alpha1.CredentialProvider"}, } } -func schema_k8sio_kube_scheduler_config_v1alpha2_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kubelet_config_v1alpha1_ExecEnvVar(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Plugins include multiple extension points. When specified, the list of plugins for a particular extension point are the only ones enabled. If an extension point is omitted from the config, then the default set of plugins is used for that extension point. Enabled plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.", + Description: "ExecEnvVar is used for setting environment variables when executing an exec-based credential plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "queueSort": { - SchemaProps: spec.SchemaProps{ - Description: "QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), - }, - }, - "preFilter": { - SchemaProps: spec.SchemaProps{ - Description: "PreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), - }, - }, - "filter": { - SchemaProps: spec.SchemaProps{ - Description: "Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), - }, - }, - "preScore": { - SchemaProps: spec.SchemaProps{ - Description: "PreScore is a list of plugins that are invoked before scoring.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), - }, - }, - "score": { - SchemaProps: spec.SchemaProps{ - Description: "Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), - }, - }, - "reserve": { - SchemaProps: spec.SchemaProps{ - Description: "Reserve is a list of plugins invoked when reserving a node to run the pod.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), - }, - }, - "permit": { - SchemaProps: spec.SchemaProps{ - Description: "Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), - }, - }, - "preBind": { - SchemaProps: spec.SchemaProps{ - Description: "PreBind is a list of plugins that should be invoked before a pod is bound.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), - }, - }, - "bind": { - SchemaProps: spec.SchemaProps{ - Description: "Bind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework. The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), - }, - }, - "postBind": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "PostBind is a list of plugins that should be invoked after a pod is successfully bound.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "unreserve": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "Unreserve is a list of plugins invoked when a pod that was previously reserved is rejected in a later phase.", - Ref: ref("k8s.io/kube-scheduler/config/v1alpha2.PluginSet"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"name", "value"}, }, }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1alpha2.PluginSet"}, } } @@ -43578,7 +51653,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletAnonymousAuthentication(ref comm Properties: map[string]spec.Schema{ "enabled": { SchemaProps: spec.SchemaProps{ - Description: "enabled allows anonymous requests to the kubelet server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated.", + Description: "enabled allows anonymous requests to the kubelet server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of `system:anonymous`, and a group name of `system:unauthenticated`.", Type: []string{"boolean"}, Format: "", }, @@ -43597,19 +51672,22 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletAuthentication(ref common.Refere Properties: map[string]spec.Schema{ "x509": { SchemaProps: spec.SchemaProps{ - Description: "x509 contains settings related to x509 client certificate authentication", + Description: "x509 contains settings related to x509 client certificate authentication.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletX509Authentication"), }, }, "webhook": { SchemaProps: spec.SchemaProps{ - Description: "webhook contains settings related to webhook bearer token authentication", + Description: "webhook contains settings related to webhook bearer token authentication.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthentication"), }, }, "anonymous": { SchemaProps: spec.SchemaProps{ - Description: "anonymous contains settings related to anonymous authentication", + Description: "anonymous contains settings related to anonymous authentication.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletAnonymousAuthentication"), }, }, @@ -43629,7 +51707,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref common.Referen Properties: map[string]spec.Schema{ "mode": { SchemaProps: spec.SchemaProps{ - Description: "mode is the authorization mode to apply to requests to the kubelet server. Valid values are AlwaysAllow and Webhook. Webhook mode uses the SubjectAccessReview API to determine authorization.", + Description: "mode is the authorization mode to apply to requests to the kubelet server. Valid values are `AlwaysAllow` and `Webhook`. Webhook mode uses the SubjectAccessReview API to determine authorization.", Type: []string{"string"}, Format: "", }, @@ -43637,6 +51715,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletAuthorization(ref common.Referen "webhook": { SchemaProps: spec.SchemaProps{ Description: "webhook contains settings related to Webhook authorization.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletWebhookAuthorization"), }, }, @@ -43669,41 +51748,51 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen Format: "", }, }, + "enableServer": { + SchemaProps: spec.SchemaProps{ + Description: "enableServer enables Kubelet's secured server. Note: Kubelet's insecure port is controlled by the readOnlyPort option. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, "staticPodPath": { SchemaProps: spec.SchemaProps{ - Description: "staticPodPath is the path to the directory containing local (static) pods to run, or the path to a single static pod file. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that the set of static pods specified at the new path may be different than the ones the Kubelet initially started with, and this may disrupt your node. Default: \"\"", + Description: "staticPodPath is the path to the directory containing local (static) pods to run, or the path to a single static pod file. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that the set of static pods specified at the new path may be different than the ones the Kubelet initially started with, and this may disrupt your node. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "syncFrequency": { SchemaProps: spec.SchemaProps{ - Description: "syncFrequency is the max period between synchronizing running containers and config. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that shortening this duration may have a negative performance impact, especially as the number of Pods on the node increases. Alternatively, increasing this duration will result in longer refresh times for ConfigMaps and Secrets. Default: \"1m\"", + Description: "syncFrequency is the max period between synchronizing running containers and config. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening this duration may have a negative performance impact, especially as the number of Pods on the node increases. Alternatively, increasing this duration will result in longer refresh times for ConfigMaps and Secrets. Default: \"1m\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "fileCheckFrequency": { SchemaProps: spec.SchemaProps{ - Description: "fileCheckFrequency is the duration between checking config files for new data Dynamic Kubelet Config (beta): If dynamically updating this field, consider that shortening the duration will cause the Kubelet to reload local Static Pod configurations more frequently, which may have a negative performance impact. Default: \"20s\"", + Description: "fileCheckFrequency is the duration between checking config files for new data. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the duration will cause the Kubelet to reload local Static Pod configurations more frequently, which may have a negative performance impact. Default: \"20s\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "httpCheckFrequency": { SchemaProps: spec.SchemaProps{ - Description: "httpCheckFrequency is the duration between checking http for new data Dynamic Kubelet Config (beta): If dynamically updating this field, consider that shortening the duration will cause the Kubelet to poll staticPodURL more frequently, which may have a negative performance impact. Default: \"20s\"", + Description: "httpCheckFrequency is the duration between checking http for new data. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the duration will cause the Kubelet to poll staticPodURL more frequently, which may have a negative performance impact. Default: \"20s\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "staticPodURL": { SchemaProps: spec.SchemaProps{ - Description: "staticPodURL is the URL for accessing static pods to run Dynamic Kubelet Config (beta): If dynamically updating this field, consider that the set of static pods specified at the new URL may be different than the ones the Kubelet initially started with, and this may disrupt your node. Default: \"\"", + Description: "staticPodURL is the URL for accessing static pods to run. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that the set of static pods specified at the new URL may be different than the ones the Kubelet initially started with, and this may disrupt your node. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "staticPodURLHeader": { SchemaProps: spec.SchemaProps{ - Description: "staticPodURLHeader is a map of slices with HTTP headers to use when accessing the podURL Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt the ability to read the latest set of static pods from StaticPodURL. Default: nil", + Description: "staticPodURLHeader is a map of slices with HTTP headers to use when accessing the podURL. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt the ability to read the latest set of static pods from StaticPodURL. Default: nil", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -43713,8 +51802,9 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -43725,48 +51815,49 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "address": { SchemaProps: spec.SchemaProps{ - Description: "address is the IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces). Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"0.0.0.0\"", + Description: "address is the IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces). If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"0.0.0.0\"", Type: []string{"string"}, Format: "", }, }, "port": { SchemaProps: spec.SchemaProps{ - Description: "port is the port for the Kubelet to serve on. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: 10250", + Description: "port is the port for the Kubelet to serve on. The port number must be between 1 and 65535, inclusive. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: 10250", Type: []string{"integer"}, Format: "int32", }, }, "readOnlyPort": { SchemaProps: spec.SchemaProps{ - Description: "readOnlyPort is the read-only port for the Kubelet to serve on with no authentication/authorization. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: 0 (disabled)", + Description: "readOnlyPort is the read-only port for the Kubelet to serve on with no authentication/authorization. The port number must be between 1 and 65535, inclusive. Setting this field to 0 disables the read-only service. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: 0 (disabled)", Type: []string{"integer"}, Format: "int32", }, }, "tlsCertFile": { SchemaProps: spec.SchemaProps{ - Description: "tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If tlsCertFile and tlsPrivateKeyFile are not provided, a self-signed certificate and key are generated for the public address and saved to the directory passed to the Kubelet's --cert-dir flag. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"\"", + Description: "tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If tlsCertFile and tlsPrivateKeyFile are not provided, a self-signed certificate and key are generated for the public address and saved to the directory passed to the Kubelet's --cert-dir flag. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "tlsPrivateKeyFile": { SchemaProps: spec.SchemaProps{ - Description: "tlsPrivateKeyFile is the file containing x509 private key matching tlsCertFile Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"\"", + Description: "tlsPrivateKeyFile is the file containing x509 private key matching tlsCertFile. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "tlsCipherSuites": { SchemaProps: spec.SchemaProps{ - Description: "TLSCipherSuites is the list of allowed cipher suites for the server. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: nil", + Description: "tlsCipherSuites is the list of allowed cipher suites for the server. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: nil", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -43774,116 +51865,119 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "tlsMinVersion": { SchemaProps: spec.SchemaProps{ - Description: "TLSMinVersion is the minimum TLS version supported. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"\"", + Description: "tlsMinVersion is the minimum TLS version supported. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "rotateCertificates": { SchemaProps: spec.SchemaProps{ - Description: "rotateCertificates enables client certificate rotation. The Kubelet will request a new certificate from the certificates.k8s.io API. This requires an approver to approve the certificate signing requests. The RotateKubeletClientCertificate feature must be enabled. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that disabling it may disrupt the Kubelet's ability to authenticate with the API server after the current certificate expires. Default: false", + Description: "rotateCertificates enables client certificate rotation. The Kubelet will request a new certificate from the certificates.k8s.io API. This requires an approver to approve the certificate signing requests. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that disabling it may disrupt the Kubelet's ability to authenticate with the API server after the current certificate expires. Default: false", Type: []string{"boolean"}, Format: "", }, }, "serverTLSBootstrap": { SchemaProps: spec.SchemaProps{ - Description: "serverTLSBootstrap enables server certificate bootstrap. Instead of self signing a serving certificate, the Kubelet will request a certificate from the certificates.k8s.io API. This requires an approver to approve the certificate signing requests. The RotateKubeletServerCertificate feature must be enabled. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that disabling it will stop the renewal of Kubelet server certificates, which can disrupt components that interact with the Kubelet server in the long term, due to certificate expiration. Default: false", + Description: "serverTLSBootstrap enables server certificate bootstrap. Instead of self signing a serving certificate, the Kubelet will request a certificate from the 'certificates.k8s.io' API. This requires an approver to approve the certificate signing requests (CSR). The RotateKubeletServerCertificate feature must be enabled when setting this field. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that disabling it will stop the renewal of Kubelet server certificates, which can disrupt components that interact with the Kubelet server in the long term, due to certificate expiration. Default: false", Type: []string{"boolean"}, Format: "", }, }, "authentication": { SchemaProps: spec.SchemaProps{ - Description: "authentication specifies how requests to the Kubelet's server are authenticated Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Defaults:\n anonymous:\n enabled: false\n webhook:\n enabled: true\n cacheTTL: \"2m\"", + Description: "authentication specifies how requests to the Kubelet's server are authenticated. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Defaults:\n anonymous:\n enabled: false\n webhook:\n enabled: true\n cacheTTL: \"2m\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletAuthentication"), }, }, "authorization": { SchemaProps: spec.SchemaProps{ - Description: "authorization specifies how requests to the Kubelet's server are authorized Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Defaults:\n mode: Webhook\n webhook:\n cacheAuthorizedTTL: \"5m\"\n cacheUnauthorizedTTL: \"30s\"", + Description: "authorization specifies how requests to the Kubelet's server are authorized. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Defaults:\n mode: Webhook\n webhook:\n cacheAuthorizedTTL: \"5m\"\n cacheUnauthorizedTTL: \"30s\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/kubelet/config/v1beta1.KubeletAuthorization"), }, }, "registryPullQPS": { SchemaProps: spec.SchemaProps{ - Description: "registryPullQPS is the limit of registry pulls per second. Set to 0 for no limit. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by image pulls. Default: 5", + Description: "registryPullQPS is the limit of registry pulls per second. The value must not be a negative number. Setting it to 0 means no limit. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by image pulls. Default: 5", Type: []string{"integer"}, Format: "int32", }, }, "registryBurst": { SchemaProps: spec.SchemaProps{ - Description: "registryBurst is the maximum size of bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registryPullQPS. Only used if registryPullQPS > 0. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by image pulls. Default: 10", + Description: "registryBurst is the maximum size of bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registryPullQPS. The value must not be a negative number. Only used if registryPullQPS is greater than 0. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by image pulls. Default: 10", Type: []string{"integer"}, Format: "int32", }, }, "eventRecordQPS": { SchemaProps: spec.SchemaProps{ - Description: "eventRecordQPS is the maximum event creations per second. If 0, there is no limit enforced. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by event creations. Default: 5", + Description: "eventRecordQPS is the maximum event creations per second. If 0, there is no limit enforced. The value cannot be a negative number. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by event creations. Default: 5", Type: []string{"integer"}, Format: "int32", }, }, "eventBurst": { SchemaProps: spec.SchemaProps{ - Description: "eventBurst is the maximum size of a burst of event creations, temporarily allows event creations to burst to this number, while still not exceeding eventRecordQPS. Only used if eventRecordQPS > 0. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by event creations. Default: 10", + Description: "eventBurst is the maximum size of a burst of event creations, temporarily allows event creations to burst to this number, while still not exceeding eventRecordQPS. This field canot be a negative number and it is only used when eventRecordQPS > 0. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by event creations. Default: 10", Type: []string{"integer"}, Format: "int32", }, }, "enableDebuggingHandlers": { SchemaProps: spec.SchemaProps{ - Description: "enableDebuggingHandlers enables server endpoints for log access and local running of containers and commands, including the exec, attach, logs, and portforward features. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that disabling it may disrupt components that interact with the Kubelet server. Default: true", + Description: "enableDebuggingHandlers enables server endpoints for log access and local running of containers and commands, including the exec, attach, logs, and portforward features. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that disabling it may disrupt components that interact with the Kubelet server. Default: true", Type: []string{"boolean"}, Format: "", }, }, "enableContentionProfiling": { SchemaProps: spec.SchemaProps{ - Description: "enableContentionProfiling enables lock contention profiling, if enableDebuggingHandlers is true. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that enabling it may carry a performance impact. Default: false", + Description: "enableContentionProfiling enables lock contention profiling, if enableDebuggingHandlers is true. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that enabling it may carry a performance impact. Default: false", Type: []string{"boolean"}, Format: "", }, }, "healthzPort": { SchemaProps: spec.SchemaProps{ - Description: "healthzPort is the port of the localhost healthz endpoint (set to 0 to disable) Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that monitor Kubelet health. Default: 10248", + Description: "healthzPort is the port of the localhost healthz endpoint (set to 0 to disable). A valid number is between 1 and 65535. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that monitor Kubelet health. Default: 10248", Type: []string{"integer"}, Format: "int32", }, }, "healthzBindAddress": { SchemaProps: spec.SchemaProps{ - Description: "healthzBindAddress is the IP address for the healthz server to serve on Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that monitor Kubelet health. Default: \"127.0.0.1\"", + Description: "healthzBindAddress is the IP address for the healthz server to serve on. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that monitor Kubelet health. Default: \"127.0.0.1\"", Type: []string{"string"}, Format: "", }, }, "oomScoreAdj": { SchemaProps: spec.SchemaProps{ - Description: "oomScoreAdj is The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000]. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact the stability of nodes under memory pressure. Default: -999", + Description: "oomScoreAdj is The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000]. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the stability of nodes under memory pressure. Default: -999", Type: []string{"integer"}, Format: "int32", }, }, "clusterDomain": { SchemaProps: spec.SchemaProps{ - Description: "clusterDomain is the DNS domain for this cluster. If set, kubelet will configure all containers to search this domain in addition to the host's search domains. Dynamic Kubelet Config (beta): Dynamically updating this field is not recommended, as it should be kept in sync with the rest of the cluster. Default: \"\"", + Description: "clusterDomain is the DNS domain for this cluster. If set, kubelet will configure all containers to search this domain in addition to the host's search domains. Dynamic Kubelet Config (deprecated): Dynamically updating this field is not recommended, as it should be kept in sync with the rest of the cluster. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "clusterDNS": { SchemaProps: spec.SchemaProps{ - Description: "clusterDNS is a list of IP addresses for the cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution instead of the host's DNS servers. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changes will only take effect on Pods created after the update. Draining the node is recommended before changing this field. Default: nil", + Description: "clusterDNS is a list of IP addresses for the cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution instead of the host's DNS servers. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changes will only take effect on Pods created after the update. Draining the node is recommended before changing this field. Default: nil", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -43891,120 +51985,157 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "streamingConnectionIdleTimeout": { SchemaProps: spec.SchemaProps{ - Description: "streamingConnectionIdleTimeout is the maximum time a streaming connection can be idle before the connection is automatically closed. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact components that rely on infrequent updates over streaming connections to the Kubelet server. Default: \"4h\"", + Description: "streamingConnectionIdleTimeout is the maximum time a streaming connection can be idle before the connection is automatically closed. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact components that rely on infrequent updates over streaming connections to the Kubelet server. Default: \"4h\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "nodeStatusUpdateFrequency": { SchemaProps: spec.SchemaProps{ - Description: "nodeStatusUpdateFrequency is the frequency that kubelet computes node status. If node lease feature is not enabled, it is also the frequency that kubelet posts node status to master. Note: When node lease feature is not enabled, be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact node scalability, and also that the node controller's nodeMonitorGracePeriod must be set to N*NodeStatusUpdateFrequency, where N is the number of retries before the node controller marks the node unhealthy. Default: \"10s\"", + Description: "nodeStatusUpdateFrequency is the frequency that kubelet computes node status. If node lease feature is not enabled, it is also the frequency that kubelet posts node status to master. Note: When node lease feature is not enabled, be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact node scalability, and also that the node controller's nodeMonitorGracePeriod must be set to N*NodeStatusUpdateFrequency, where N is the number of retries before the node controller marks the node unhealthy. Default: \"10s\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "nodeStatusReportFrequency": { SchemaProps: spec.SchemaProps{ - Description: "nodeStatusReportFrequency is the frequency that kubelet posts node status to master if node status does not change. Kubelet will ignore this frequency and post node status immediately if any change is detected. It is only used when node lease feature is enabled. nodeStatusReportFrequency's default value is 1m. But if nodeStatusUpdateFrequency is set explicitly, nodeStatusReportFrequency's default value will be set to nodeStatusUpdateFrequency for backward compatibility. Default: \"1m\"", + Description: "nodeStatusReportFrequency is the frequency that kubelet posts node status to master if node status does not change. Kubelet will ignore this frequency and post node status immediately if any change is detected. It is only used when node lease feature is enabled. nodeStatusReportFrequency's default value is 5m. But if nodeStatusUpdateFrequency is set explicitly, nodeStatusReportFrequency's default value will be set to nodeStatusUpdateFrequency for backward compatibility. Default: \"5m\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "nodeLeaseDurationSeconds": { SchemaProps: spec.SchemaProps{ - Description: "nodeLeaseDurationSeconds is the duration the Kubelet will set on its corresponding Lease, when the NodeLease feature is enabled. This feature provides an indicator of node health by having the Kubelet create and periodically renew a lease, named after the node, in the kube-node-lease namespace. If the lease expires, the node can be considered unhealthy. The lease is currently renewed every 10s, per KEP-0009. In the future, the lease renewal interval may be set based on the lease duration. Requires the NodeLease feature gate to be enabled. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that decreasing the duration may reduce tolerance for issues that temporarily prevent the Kubelet from renewing the lease (e.g. a short-lived network issue). Default: 40", + Description: "nodeLeaseDurationSeconds is the duration the Kubelet will set on its corresponding Lease, when the NodeLease feature is enabled. This feature provides an indicator of node health by having the Kubelet create and periodically renew a lease, named after the node, in the kube-node-lease namespace. If the lease expires, the node can be considered unhealthy. The lease is currently renewed every 10s, per KEP-0009. In the future, the lease renewal interval may be set based on the lease duration. The field value must be greater than 0. Requires the NodeLease feature gate to be enabled. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that decreasing the duration may reduce tolerance for issues that temporarily prevent the Kubelet from renewing the lease (e.g. a short-lived network issue). Default: 40", Type: []string{"integer"}, Format: "int32", }, }, "imageMinimumGCAge": { SchemaProps: spec.SchemaProps{ - Description: "imageMinimumGCAge is the minimum age for an unused image before it is garbage collected. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: \"2m\"", + Description: "imageMinimumGCAge is the minimum age for an unused image before it is garbage collected. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: \"2m\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "imageGCHighThresholdPercent": { SchemaProps: spec.SchemaProps{ - Description: "imageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run. The percent is calculated as this field value out of 100. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: 85", + Description: "imageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run. The percent is calculated by dividing this field value by 100, so this field must be between 0 and 100, inclusive. When specified, the value must be greater than imageGCLowThresholdPercent. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: 85", Type: []string{"integer"}, Format: "int32", }, }, "imageGCLowThresholdPercent": { SchemaProps: spec.SchemaProps{ - Description: "imageGCLowThresholdPercent is the percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to. The percent is calculated as this field value out of 100. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: 80", + Description: "imageGCLowThresholdPercent is the percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to. The percent is calculated by dividing this field value by 100, so the field value must be between 0 and 100, inclusive. When specified, the value must be less than imageGCHighThresholdPercent. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: 80", Type: []string{"integer"}, Format: "int32", }, }, "volumeStatsAggPeriod": { SchemaProps: spec.SchemaProps{ - Description: "How frequently to calculate and cache volume disk usage for all pods Dynamic Kubelet Config (beta): If dynamically updating this field, consider that shortening the period may carry a performance impact. Default: \"1m\"", + Description: "volumeStatsAggPeriod is the frequency for calculating and caching volume disk usage for all pods. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the period may carry a performance impact. Default: \"1m\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "kubeletCgroups": { SchemaProps: spec.SchemaProps{ - Description: "kubeletCgroups is the absolute name of cgroups to isolate the kubelet in Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", + Description: "kubeletCgroups is the absolute name of cgroups to isolate the kubelet in Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "systemCgroups": { SchemaProps: spec.SchemaProps{ - Description: "systemCgroups is absolute name of cgroups in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", + Description: "systemCgroups is absolute name of cgroups in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. The cgroupRoot must be specified if this field is not empty. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "cgroupRoot": { SchemaProps: spec.SchemaProps{ - Description: "cgroupRoot is the root cgroup to use for pods. This is handled by the container runtime on a best effort basis. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", + Description: "cgroupRoot is the root cgroup to use for pods. This is handled by the container runtime on a best effort basis. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "cgroupsPerQOS": { SchemaProps: spec.SchemaProps{ - Description: "Enable QoS based Cgroup hierarchy: top level cgroups for QoS Classes And all Burstable and BestEffort pods are brought up under their specific top level QoS cgroup. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: true", + Description: "cgroupsPerQOS enable QoS based CGroup hierarchy: top level CGroups for QoS classes and all Burstable and BestEffort Pods are brought up under their specific top level QoS CGroup. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: true", Type: []string{"boolean"}, Format: "", }, }, "cgroupDriver": { SchemaProps: spec.SchemaProps{ - Description: "driver that the kubelet uses to manipulate cgroups on the host (cgroupfs or systemd) Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"cgroupfs\"", + Description: "cgroupDriver is the driver kubelet uses to manipulate CGroups on the host (cgroupfs or systemd). Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"cgroupfs\"", Type: []string{"string"}, Format: "", }, }, "cpuManagerPolicy": { SchemaProps: spec.SchemaProps{ - Description: "CPUManagerPolicy is the name of the policy to use. Requires the CPUManager feature gate to be enabled. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"none\"", + Description: "cpuManagerPolicy is the name of the policy to use. Requires the CPUManager feature gate to be enabled. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"None\"", Type: []string{"string"}, Format: "", }, }, + "cpuManagerPolicyOptions": { + SchemaProps: spec.SchemaProps{ + Description: "cpuManagerPolicyOptions is a set of key=value which \tallows to set extra options to fine tune the behaviour of the cpu manager policies. Requires both the \"CPUManager\" and \"CPUManagerPolicyOptions\" feature gates to be enabled. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: nil", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, "cpuManagerReconcilePeriod": { SchemaProps: spec.SchemaProps{ - Description: "CPU Manager reconciliation period. Requires the CPUManager feature gate to be enabled. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that shortening the period may carry a performance impact. Default: \"10s\"", + Description: "cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager. Requires the CPUManager feature gate to be enabled. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the period may carry a performance impact. Default: \"10s\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, + "memoryManagerPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "memoryManagerPolicy is the name of the policy to use by memory manager. Requires the MemoryManager feature gate to be enabled. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"none\"", + Type: []string{"string"}, + Format: "", + }, + }, "topologyManagerPolicy": { SchemaProps: spec.SchemaProps{ - Description: "TopologyManagerPolicy is the name of the policy to use. Policies other than \"none\" require the TopologyManager feature gate to be enabled. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"none\"", + Description: "topologyManagerPolicy is the name of the topology manager policy to use. Valid values include:\n\n- `restricted`: kubelet only allows pods with optimal NUMA node alignment for\n requested resources;\n- `best-effort`: kubelet will favor pods with NUMA alignment of CPU and device\n resources;\n- `none`: kublet has no knowledge of NUMA alignment of a pod's CPU and device resources. - `single-numa-node`: kubelet only allows pods with a single NUMA alignment\n of CPU and device resources.\n\nPolicies other than \"none\" require the TopologyManager feature gate to be enabled. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"none\"", + Type: []string{"string"}, + Format: "", + }, + }, + "topologyManagerScope": { + SchemaProps: spec.SchemaProps{ + Description: "topologyManagerScope represents the scope of topology hint generation that topology manager requests and hint providers generate. Valid values include:\n\n- `container`: topology policy is applied on a per-container basis. - `pod`: topology policy is applied on a per-pod basis.\n\n\"pod\" scope requires the TopologyManager feature gate to be enabled. Default: \"container\"", Type: []string{"string"}, Format: "", }, }, "qosReserved": { SchemaProps: spec.SchemaProps{ - Description: "qosReserved is a set of resource name to percentage pairs that specify the minimum percentage of a resource reserved for exclusive use by the guaranteed QoS tier. Currently supported resources: \"memory\" Requires the QOSReserved feature gate to be enabled. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: nil", + Description: "qosReserved is a set of resource name to percentage pairs that specify the minimum percentage of a resource reserved for exclusive use by the guaranteed QoS tier. Currently supported resources: \"memory\" Requires the QOSReserved feature gate to be enabled. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: nil", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -44012,103 +52143,119 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "runtimeRequestTimeout": { SchemaProps: spec.SchemaProps{ - Description: "runtimeRequestTimeout is the timeout for all runtime requests except long running requests - pull, logs, exec and attach. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"2m\"", + Description: "runtimeRequestTimeout is the timeout for all runtime requests except long running requests - pull, logs, exec and attach. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"2m\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "hairpinMode": { SchemaProps: spec.SchemaProps{ - Description: "hairpinMode specifies how the Kubelet should configure the container bridge for hairpin packets. Setting this flag allows endpoints in a Service to loadbalance back to themselves if they should try to access their own Service. Values:\n \"promiscuous-bridge\": make the container bridge promiscuous.\n \"hairpin-veth\": set the hairpin flag on container veth interfaces.\n \"none\": do nothing.\nGenerally, one must set --hairpin-mode=hairpin-veth to achieve hairpin NAT, because promiscuous-bridge assumes the existence of a container bridge named cbr0. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may require a node reboot, depending on the network plugin. Default: \"promiscuous-bridge\"", + Description: "hairpinMode specifies how the Kubelet should configure the container bridge for hairpin packets. Setting this flag allows endpoints in a Service to loadbalance back to themselves if they should try to access their own Service. Values:\n\n- \"promiscuous-bridge\": make the container bridge promiscuous. - \"hairpin-veth\": set the hairpin flag on container veth interfaces. - \"none\": do nothing.\n\nGenerally, one must set `--hairpin-mode=hairpin-veth to` achieve hairpin NAT, because promiscuous-bridge assumes the existence of a container bridge named cbr0. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may require a node reboot, depending on the network plugin. Default: \"promiscuous-bridge\"", Type: []string{"string"}, Format: "", }, }, "maxPods": { SchemaProps: spec.SchemaProps{ - Description: "maxPods is the number of pods that can run on this Kubelet. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changes may cause Pods to fail admission on Kubelet restart, and may change the value reported in Node.Status.Capacity[v1.ResourcePods], thus affecting future scheduling decisions. Increasing this value may also decrease performance, as more Pods can be packed into a single node. Default: 110", + Description: "maxPods is the maximum number of Pods that can run on this Kubelet. The value must be a non-negative integer. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changes may cause Pods to fail admission on Kubelet restart, and may change the value reported in Node.Status.Capacity[v1.ResourcePods], thus affecting future scheduling decisions. Increasing this value may also decrease performance, as more Pods can be packed into a single node. Default: 110", Type: []string{"integer"}, Format: "int32", }, }, "podCIDR": { SchemaProps: spec.SchemaProps{ - Description: "The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. Dynamic Kubelet Config (beta): This field should always be set to the empty default. It should only set for standalone Kubelets, which cannot use Dynamic Kubelet Config. Default: \"\"", + Description: "podCIDR is the CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the control plane. Dynamic Kubelet Config (deprecated): This field should always be set to the empty default. It should only set for standalone Kubelets, which cannot use Dynamic Kubelet Config. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "podPidsLimit": { SchemaProps: spec.SchemaProps{ - Description: "PodPidsLimit is the maximum number of pids in any pod. Requires the SupportPodPidsLimit feature gate to be enabled. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that lowering it may prevent container processes from forking after the change. Default: -1", + Description: "podPidsLimit is the maximum number of PIDs in any pod. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that lowering it may prevent container processes from forking after the change. Default: -1", Type: []string{"integer"}, Format: "int64", }, }, "resolvConf": { SchemaProps: spec.SchemaProps{ - Description: "ResolverConfig is the resolver configuration file used as the basis for the container DNS resolution configuration. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changes will only take effect on Pods created after the update. Draining the node is recommended before changing this field. Default: \"/etc/resolv.conf\"", + Description: "resolvConf is the resolver configuration file used as the basis for the container DNS resolution configuration. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changes will only take effect on Pods created after the update. Draining the node is recommended before changing this field. Default: \"/etc/resolv.conf\"", Type: []string{"string"}, Format: "", }, }, + "runOnce": { + SchemaProps: spec.SchemaProps{ + Description: "runOnce causes the Kubelet to check the API server once for pods, run those in addition to the pods specified by static pod files, and exit. Default: false", + Type: []string{"boolean"}, + Format: "", + }, + }, "cpuCFSQuota": { SchemaProps: spec.SchemaProps{ - Description: "cpuCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that disabling it may reduce node stability. Default: true", + Description: "cpuCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that disabling it may reduce node stability. Default: true", Type: []string{"boolean"}, Format: "", }, }, "cpuCFSQuotaPeriod": { SchemaProps: spec.SchemaProps{ - Description: "CPUCFSQuotaPeriod is the CPU CFS quota period value, cpu.cfs_period_us. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that limits set for containers will result in different cpu.cfs_quota settings. This will trigger container restarts on the node being reconfigured. Default: \"100ms\"", + Description: "cpuCFSQuotaPeriod is the CPU CFS quota period value, `cpu.cfs_period_us`. The value must be between 1 us and 1 second, inclusive. Requires the CustomCPUCFSQuotaPeriod feature gate to be enabled. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that limits set for containers will result in different cpu.cfs_quota settings. This will trigger container restarts on the node being reconfigured. Default: \"100ms\"", Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, + "nodeStatusMaxImages": { + SchemaProps: spec.SchemaProps{ + Description: "nodeStatusMaxImages caps the number of images reported in Node.status.images. The value must be greater than -2. Note: If -1 is specified, no cap will be applied. If 0 is specified, no image is returned. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that different values can be reported on node status. Default: 50", + Type: []string{"integer"}, + Format: "int32", + }, + }, "maxOpenFiles": { SchemaProps: spec.SchemaProps{ - Description: "maxOpenFiles is Number of files that can be opened by Kubelet process. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact the ability of the Kubelet to interact with the node's filesystem. Default: 1000000", + Description: "maxOpenFiles is Number of files that can be opened by Kubelet process. The value must be a non-negative number. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the ability of the Kubelet to interact with the node's filesystem. Default: 1000000", Type: []string{"integer"}, Format: "int64", }, }, "contentType": { SchemaProps: spec.SchemaProps{ - Description: "contentType is contentType of requests sent to apiserver. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact the ability for the Kubelet to communicate with the API server. If the Kubelet loses contact with the API server due to a change to this field, the change cannot be reverted via dynamic Kubelet config. Default: \"application/vnd.kubernetes.protobuf\"", + Description: "contentType is contentType of requests sent to apiserver. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the ability for the Kubelet to communicate with the API server. If the Kubelet loses contact with the API server due to a change to this field, the change cannot be reverted via dynamic Kubelet config. Default: \"application/vnd.kubernetes.protobuf\"", Type: []string{"string"}, Format: "", }, }, "kubeAPIQPS": { SchemaProps: spec.SchemaProps{ - Description: "kubeAPIQPS is the QPS to use while talking with kubernetes apiserver Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic the Kubelet sends to the API server. Default: 5", + Description: "kubeAPIQPS is the QPS to use while talking with kubernetes apiserver. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic the Kubelet sends to the API server. Default: 5", Type: []string{"integer"}, Format: "int32", }, }, "kubeAPIBurst": { SchemaProps: spec.SchemaProps{ - Description: "kubeAPIBurst is the burst to allow while talking with kubernetes apiserver Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact scalability by changing the amount of traffic the Kubelet sends to the API server. Default: 10", + Description: "kubeAPIBurst is the burst to allow while talking with kubernetes API server. This field cannot be a negative number. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic the Kubelet sends to the API server. Default: 10", Type: []string{"integer"}, Format: "int32", }, }, "serializeImagePulls": { SchemaProps: spec.SchemaProps{ - Description: "serializeImagePulls when enabled, tells the Kubelet to pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may impact the performance of image pulls. Default: true", + Description: "serializeImagePulls when enabled, tells the Kubelet to pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the performance of image pulls. Default: true", Type: []string{"boolean"}, Format: "", }, }, "evictionHard": { SchemaProps: spec.SchemaProps{ - Description: "Map of signal names to quantities that defines hard eviction thresholds. For example: {\"memory.available\": \"300Mi\"}. To explicitly disable, pass a 0% or 100% threshold on an arbitrary resource. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay Pod evictions. Default:\n memory.available: \"100Mi\"\n nodefs.available: \"10%\"\n nodefs.inodesFree: \"5%\"\n imagefs.available: \"15%\"", + Description: "evictionHard is a map of signal names to quantities that defines hard eviction thresholds. For example: `{\"memory.available\": \"300Mi\"}`. To explicitly disable, pass a 0% or 100% threshold on an arbitrary resource. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay Pod evictions. Default:\n memory.available: \"100Mi\"\n nodefs.available: \"10%\"\n nodefs.inodesFree: \"5%\"\n imagefs.available: \"15%\"", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -44116,14 +52263,15 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "evictionSoft": { SchemaProps: spec.SchemaProps{ - Description: "Map of signal names to quantities that defines soft eviction thresholds. For example: {\"memory.available\": \"300Mi\"}. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay Pod evictions, and may change the allocatable reported by the node. Default: nil", + Description: "evictionSoft is a map of signal names to quantities that defines soft eviction thresholds. For example: `{\"memory.available\": \"300Mi\"}`. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay Pod evictions, and may change the allocatable reported by the node. Default: nil", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -44131,14 +52279,15 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "evictionSoftGracePeriod": { SchemaProps: spec.SchemaProps{ - Description: "Map of signal names to quantities that defines grace periods for each soft eviction signal. For example: {\"memory.available\": \"30s\"}. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger or delay Pod evictions. Default: nil", + Description: "evictionSoftGracePeriod is a map of signal names to quantities that defines grace periods for each soft eviction signal. For example: `{\"memory.available\": \"30s\"}`. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay Pod evictions. Default: nil", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -44146,27 +52295,29 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "evictionPressureTransitionPeriod": { SchemaProps: spec.SchemaProps{ - Description: "Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that lowering it may decrease the stability of the node when the node is overcommitted. Default: \"5m\"", + Description: "evictionPressureTransitionPeriod is the duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that lowering it may decrease the stability of the node when the node is overcommitted. Default: \"5m\"", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "evictionMaxPodGracePeriod": { SchemaProps: spec.SchemaProps{ - Description: "Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met. This value effectively caps the Pod's TerminationGracePeriodSeconds value during soft evictions. Note: Due to issue #64530, the behavior has a bug where this value currently just overrides the grace period during soft eviction, which can increase the grace period from what is set on the Pod. This bug will be fixed in a future release. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that lowering it decreases the amount of time Pods will have to gracefully clean up before being killed during a soft eviction. Default: 0", + Description: "evictionMaxPodGracePeriod is the maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met. This value effectively caps the Pod's terminationGracePeriodSeconds value during soft evictions. Note: Due to issue #64530, the behavior has a bug where this value currently just overrides the grace period during soft eviction, which can increase the grace period from what is set on the Pod. This bug will be fixed in a future release. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that lowering it decreases the amount of time Pods will have to gracefully clean up before being killed during a soft eviction. Default: 0", Type: []string{"integer"}, Format: "int32", }, }, "evictionMinimumReclaim": { SchemaProps: spec.SchemaProps{ - Description: "Map of signal names to quantities that defines minimum reclaims, which describe the minimum amount of a given resource the kubelet will reclaim when performing a pod eviction while that resource is under pressure. For example: {\"imagefs.available\": \"2Gi\"} Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may change how well eviction can manage resource pressure. Default: nil", + Description: "evictionMinimumReclaim is a map of signal names to quantities that defines minimum reclaims, which describe the minimum amount of a given resource the kubelet will reclaim when performing a pod eviction while that resource is under pressure. For example: `{\"imagefs.available\": \"2Gi\"}`. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may change how well eviction can manage resource pressure. Default: nil", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -44174,56 +52325,57 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "podsPerCore": { SchemaProps: spec.SchemaProps{ - Description: "podsPerCore is the maximum number of pods per core. Cannot exceed MaxPods. If 0, this field is ignored. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changes may cause Pods to fail admission on Kubelet restart, and may change the value reported in Node.Status.Capacity[v1.ResourcePods], thus affecting future scheduling decisions. Increasing this value may also decrease performance, as more Pods can be packed into a single node. Default: 0", + Description: "podsPerCore is the maximum number of pods per core. Cannot exceed maxPods. The value must be a non-negative integer. If 0, there is no limit on the number of Pods. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changes may cause Pods to fail admission on Kubelet restart, and may change the value reported in `Node.status.capacity.pods`, thus affecting future scheduling decisions. Increasing this value may also decrease performance, as more Pods can be packed into a single node. Default: 0", Type: []string{"integer"}, Format: "int32", }, }, "enableControllerAttachDetach": { SchemaProps: spec.SchemaProps{ - Description: "enableControllerAttachDetach enables the Attach/Detach controller to manage attachment/detachment of volumes scheduled to this node, and disables kubelet from executing any attach/detach operations Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changing which component is responsible for volume management on a live node may result in volumes refusing to detach if the node is not drained prior to the update, and if Pods are scheduled to the node before the volumes.kubernetes.io/controller-managed-attach-detach annotation is updated by the Kubelet. In general, it is safest to leave this value set the same as local config. Default: true", + Description: "enableControllerAttachDetach enables the Attach/Detach controller to manage attachment/detachment of volumes scheduled to this node, and disables kubelet from executing any attach/detach operations. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changing which component is responsible for volume management on a live node may result in volumes refusing to detach if the node is not drained prior to the update, and if Pods are scheduled to the node before the volumes.kubernetes.io/controller-managed-attach-detach annotation is updated by the Kubelet. In general, it is safest to leave this value set the same as local config. Default: true", Type: []string{"boolean"}, Format: "", }, }, "protectKernelDefaults": { SchemaProps: spec.SchemaProps{ - Description: "protectKernelDefaults, if true, causes the Kubelet to error if kernel flags are not as it expects. Otherwise the Kubelet will attempt to modify kernel flags to match its expectation. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that enabling it may cause the Kubelet to crash-loop if the Kernel is not configured as Kubelet expects. Default: false", + Description: "protectKernelDefaults, if true, causes the Kubelet to error if kernel flags are not as it expects. Otherwise the Kubelet will attempt to modify kernel flags to match its expectation. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that enabling it may cause the Kubelet to crash-loop if the Kernel is not configured as Kubelet expects. Default: false", Type: []string{"boolean"}, Format: "", }, }, "makeIPTablesUtilChains": { SchemaProps: spec.SchemaProps{ - Description: "If true, Kubelet ensures a set of iptables rules are present on host. These rules will serve as utility rules for various components, e.g. KubeProxy. The rules will be created based on IPTablesMasqueradeBit and IPTablesDropBit. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that disabling it will prevent the Kubelet from healing locally misconfigured iptables rules. Default: true", + Description: "makeIPTablesUtilChains, if true, causes the Kubelet ensures a set of iptables rules are present on host. These rules will serve as utility rules for various components, e.g. kube-proxy. The rules will be created based on iptablesMasqueradeBit and iptablesDropBit. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that disabling it will prevent the Kubelet from healing locally misconfigured iptables rules. Default: true", Type: []string{"boolean"}, Format: "", }, }, "iptablesMasqueradeBit": { SchemaProps: spec.SchemaProps{ - Description: "iptablesMasqueradeBit is the bit of the iptables fwmark space to mark for SNAT Values must be within the range [0, 31]. Must be different from other mark bits. Warning: Please match the value of the corresponding parameter in kube-proxy. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it needs to be coordinated with other components, like kube-proxy, and the update will only be effective if MakeIPTablesUtilChains is enabled. Default: 14", + Description: "iptablesMasqueradeBit is the bit of the iptables fwmark space to mark for SNAT. Values must be within the range [0, 31]. Must be different from other mark bits. Warning: Please match the value of the corresponding parameter in kube-proxy. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it needs to be coordinated with other components, like kube-proxy, and the update will only be effective if MakeIPTablesUtilChains is enabled. Default: 14", Type: []string{"integer"}, Format: "int32", }, }, "iptablesDropBit": { SchemaProps: spec.SchemaProps{ - Description: "iptablesDropBit is the bit of the iptables fwmark space to mark for dropping packets. Values must be within the range [0, 31]. Must be different from other mark bits. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it needs to be coordinated with other components, like kube-proxy, and the update will only be effective if MakeIPTablesUtilChains is enabled. Default: 15", + Description: "iptablesDropBit is the bit of the iptables fwmark space to mark for dropping packets. Values must be within the range [0, 31]. Must be different from other mark bits. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it needs to be coordinated with other components, like kube-proxy, and the update will only be effective if MakeIPTablesUtilChains is enabled. Default: 15", Type: []string{"integer"}, Format: "int32", }, }, "featureGates": { SchemaProps: spec.SchemaProps{ - Description: "featureGates is a map of feature names to bools that enable or disable alpha/experimental features. This field modifies piecemeal the built-in default values from \"k8s.io/kubernetes/pkg/features/kube_features.go\". Dynamic Kubelet Config (beta): If dynamically updating this field, consider the documentation for the features you are enabling or disabling. While we encourage feature developers to make it possible to dynamically enable and disable features, some changes may require node reboots, and some features may require careful coordination to retroactively disable. Default: nil", + Description: "featureGates is a map of feature names to bools that enable or disable experimental features. This field modifies piecemeal the built-in default values from \"k8s.io/kubernetes/pkg/features/kube_features.go\". If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider the documentation for the features you are enabling or disabling. While we encourage feature developers to make it possible to dynamically enable and disable features, some changes may require node reboots, and some features may require careful coordination to retroactively disable. Default: nil", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, }, @@ -44231,42 +52383,50 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "failSwapOn": { SchemaProps: spec.SchemaProps{ - Description: "failSwapOn tells the Kubelet to fail to start if swap is enabled on the node. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that setting it to true will cause the Kubelet to crash-loop if swap is enabled. Default: true", + Description: "failSwapOn tells the Kubelet to fail to start if swap is enabled on the node. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that setting it to true will cause the Kubelet to crash-loop if swap is enabled. Default: true", Type: []string{"boolean"}, Format: "", }, }, + "memorySwap": { + SchemaProps: spec.SchemaProps{ + Description: "memorySwap configures swap memory available to container workloads.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration"), + }, + }, "containerLogMaxSize": { SchemaProps: spec.SchemaProps{ - Description: "A quantity defines the maximum size of the container log file before it is rotated. For example: \"5Mi\" or \"256Ki\". Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may trigger log rotation. Default: \"10Mi\"", + Description: "containerLogMaxSize is a quantity defining the maximum size of the container log file before it is rotated. For example: \"5Mi\" or \"256Ki\". If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger log rotation. Default: \"10Mi\"", Type: []string{"string"}, Format: "", }, }, "containerLogMaxFiles": { SchemaProps: spec.SchemaProps{ - Description: "Maximum number of container log files that can be present for a container. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that lowering it may cause log files to be deleted. Default: 5", + Description: "containerLogMaxFiles specifies the maximum number of container log files that can be present for a container. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that lowering it may cause log files to be deleted. Default: 5", Type: []string{"integer"}, Format: "int32", }, }, "configMapAndSecretChangeDetectionStrategy": { SchemaProps: spec.SchemaProps{ - Description: "ConfigMapAndSecretChangeDetectionStrategy is a mode in which config map and secret managers are running. Default: \"Watch\"", + Description: "configMapAndSecretChangeDetectionStrategy is a mode in which ConfigMap and Secret managers are running. Valid values include:\n\n- `Get`: kubelet fetches necessary objects directly from the API server; - `Cache`: kubelet uses TTL cache for object fetched from the API server; - `Watch`: kubelet uses watches to observe changes to objects that are in its interest.\n\nDefault: \"Watch\"", Type: []string{"string"}, Format: "", }, }, "systemReserved": { SchemaProps: spec.SchemaProps{ - Description: "systemReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for non-kubernetes components. Currently only cpu and memory are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may not be possible to increase the reserved resources, because this requires resizing cgroups. Always look for a NodeAllocatableEnforced event after updating this field to ensure that the update was successful. Default: nil", + Description: "systemReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for non-kubernetes components. Currently only cpu and memory are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may not be possible to increase the reserved resources, because this requires resizing cgroups. Always look for a NodeAllocatableEnforced event after updating this field to ensure that the update was successful. Default: nil", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -44274,14 +52434,15 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "kubeReserved": { SchemaProps: spec.SchemaProps{ - Description: "A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for kubernetes system components. Currently cpu, memory and local storage for root file system are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that it may not be possible to increase the reserved resources, because this requires resizing cgroups. Always look for a NodeAllocatableEnforced event after updating this field to ensure that the update was successful. Default: nil", + Description: "kubeReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for kubernetes system components. Currently cpu, memory and local storage for root file system are supported. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for more details. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may not be possible to increase the reserved resources, because this requires resizing cgroups. Always look for a NodeAllocatableEnforced event after updating this field to ensure that the update was successful. Default: nil", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -44289,41 +52450,42 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "reservedSystemCPUs": { SchemaProps: spec.SchemaProps{ - Description: "This ReservedSystemCPUs option specifies the cpu list reserved for the host level system threads and kubernetes related threads. This provide a \"static\" CPU list rather than the \"dynamic\" list by system-reserved and kube-reserved. This option overwrites CPUs provided by system-reserved and kube-reserved.", + Description: "The reservedSystemCPUs option specifies the CPU list reserved for the host level system threads and kubernetes related threads. This provide a \"static\" CPU list rather than the \"dynamic\" list by systemReserved and kubeReserved. This option does not support systemReservedCgroup or kubeReservedCgroup.", Type: []string{"string"}, Format: "", }, }, "showHiddenMetricsForVersion": { SchemaProps: spec.SchemaProps{ - Description: "The previous version for which you want to show hidden metrics. Only the previous minor version is meaningful, other values will not be allowed. The format is ., e.g.: '1.16'. The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, rather than being surprised when they are permanently removed in the release after that. Default: \"\"", + Description: "showHiddenMetricsForVersion is the previous version for which you want to show hidden metrics. Only the previous minor version is meaningful, other values will not be allowed. The format is `.`, e.g.: `1.16`. The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, rather than being surprised when they are permanently removed in the release after that. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "systemReservedCgroup": { SchemaProps: spec.SchemaProps{ - Description: "This flag helps kubelet identify absolute name of top level cgroup used to enforce `SystemReserved` compute resource reservation for OS system daemons. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", + Description: "systemReservedCgroup helps the kubelet identify absolute name of top level CGroup used to enforce `systemReserved` compute resource reservation for OS system daemons. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "kubeReservedCgroup": { SchemaProps: spec.SchemaProps{ - Description: "This flag helps kubelet identify absolute name of top level cgroup used to enforce `KubeReserved` compute resource reservation for Kubernetes node system daemons. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", + Description: "kubeReservedCgroup helps the kubelet identify absolute name of top level CGroup used to enforce `KubeReserved` compute resource reservation for Kubernetes node system daemons. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"\"", Type: []string{"string"}, Format: "", }, }, "enforceNodeAllocatable": { SchemaProps: spec.SchemaProps{ - Description: "This flag specifies the various Node Allocatable enforcements that Kubelet needs to perform. This flag accepts a list of options. Acceptable options are `none`, `pods`, `system-reserved` & `kube-reserved`. If `none` is specified, no other options may be specified. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. Dynamic Kubelet Config (beta): If dynamically updating this field, consider that removing enforcements may reduce the stability of the node. Alternatively, adding enforcements may reduce the stability of components which were using more than the reserved amount of resources; for example, enforcing kube-reserved may cause Kubelets to OOM if it uses more than the reserved resources, and enforcing system-reserved may cause system daemons to OOM if they use more than the reserved resources. Default: [\"pods\"]", + Description: "This flag specifies the various Node Allocatable enforcements that Kubelet needs to perform. This flag accepts a list of options. Acceptable options are `none`, `pods`, `system-reserved` and `kube-reserved`. If `none` is specified, no other options may be specified. When `system-reserved` is in the list, systemReservedCgroup must be specified. When `kube-reserved` is in the list, kubeReservedCgroup must be specified. This field is supported only when `cgroupsPerQOS` is set to true. Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) for more information. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that removing enforcements may reduce the stability of the node. Alternatively, adding enforcements may reduce the stability of components which were using more than the reserved amount of resources; for example, enforcing kube-reserved may cause Kubelets to OOM if it uses more than the reserved resources, and enforcing system-reserved may cause system daemons to OOM if they use more than the reserved resources. Default: [\"pods\"]", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -44331,23 +52493,115 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "allowedUnsafeSysctls": { SchemaProps: spec.SchemaProps{ - Description: "A comma separated whitelist of unsafe sysctls or sysctl patterns (ending in *). Unsafe sysctl groups are kernel.shm*, kernel.msg*, kernel.sem, fs.mqueue.*, and net.*. These sysctls are namespaced but not allowed by default. For example: \"kernel.msg*,net.ipv4.route.min_pmtu\" Default: []", + Description: "A comma separated whitelist of unsafe sysctls or sysctl patterns (ending in `*`). Unsafe sysctl groups are `kernel.shm*`, `kernel.msg*`, `kernel.sem`, `fs.mqueue.*`, and `net.*`. For example: \"`kernel.msg*,net.ipv4.route.min_pmtu`\" Default: []", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumePluginDir": { + SchemaProps: spec.SchemaProps{ + Description: "volumePluginDir is the full path of the directory in which to search for additional third party volume plugins. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changing the volumePluginDir may disrupt workloads relying on third party volume plugins. Default: \"/usr/libexec/kubernetes/kubelet-plugins/volume/exec/\"", + Type: []string{"string"}, + Format: "", + }, + }, + "providerID": { + SchemaProps: spec.SchemaProps{ + Description: "providerID, if set, sets the unique ID of the instance that an external provider (i.e. cloudprovider) can use to identify a specific node. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the ability of the Kubelet to interact with cloud providers. Default: \"\"", + Type: []string{"string"}, + Format: "", + }, + }, + "kernelMemcgNotification": { + SchemaProps: spec.SchemaProps{ + Description: "kernelMemcgNotification, if set, instructs the the kubelet to integrate with the kernel memcg notification for determining if memory eviction thresholds are exceeded rather than polling. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the way Kubelet interacts with the kernel. Default: false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "logging": { + SchemaProps: spec.SchemaProps{ + Description: "logging specifies the options of logging. Refer to [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information. Default:\n Format: text", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/component-base/config/v1alpha1.LoggingConfiguration"), + }, + }, + "enableSystemLogHandler": { + SchemaProps: spec.SchemaProps{ + Description: "enableSystemLogHandler enables system logs via web interface host:port/logs/ Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "shutdownGracePeriod": { + SchemaProps: spec.SchemaProps{ + Description: "shutdownGracePeriod specifies the total duration that the node should delay the shutdown and total grace period for pod termination during a node shutdown. Default: \"0s\"", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "shutdownGracePeriodCriticalPods": { + SchemaProps: spec.SchemaProps{ + Description: "shutdownGracePeriodCriticalPods specifies the duration used to terminate critical pods during a node shutdown. This should be less than shutdownGracePeriod. For example, if shutdownGracePeriod=30s, and shutdownGracePeriodCriticalPods=10s, during a node shutdown the first 20 seconds would be reserved for gracefully terminating normal pods, and the last 10 seconds would be reserved for terminating critical pods. Default: \"0s\"", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "reservedMemory": { + SchemaProps: spec.SchemaProps{ + Description: "reservedMemory specifies a comma-separated list of memory reservations for NUMA nodes. The parameter makes sense only in the context of the memory manager feature. The memory manager will not allocate reserved memory for container workloads. For example, if you have a NUMA0 with 10Gi of memory and the reservedMemory was specified to reserve 1Gi of memory at NUMA0, the memory manager will assume that only 9Gi is available for allocation. You can specify a different amount of NUMA node and memory types. You can omit this parameter at all, but you should be aware that the amount of reserved memory from all NUMA nodes should be equal to the amount of memory specified by the [node allocatable](https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable). If at least one node allocatable parameter has a non-zero value, you will need to specify at least one NUMA node. Also, avoid specifying:\n\n1. Duplicates, the same NUMA node, and memory type, but with a different value. 2. zero limits for any memory type. 3. NUMAs nodes IDs that do not exist under the machine. 4. memory types except for memory and hugepages-\n\nDefault: nil", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kubelet/config/v1beta1.MemoryReservation"), }, }, }, }, }, + "enableProfilingHandler": { + SchemaProps: spec.SchemaProps{ + Description: "enableProfilingHandler enables profiling via web interface host:port/debug/pprof/ Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "enableDebugFlagsHandler": { + SchemaProps: spec.SchemaProps{ + Description: "enableDebugFlagsHandler enables flags endpoint via web interface host:port/debug/flags/v Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "seccompDefault": { + SchemaProps: spec.SchemaProps{ + Description: "SeccompDefault enables the use of `RuntimeDefault` as the default seccomp profile for all workloads. This requires the corresponding SeccompDefault feature gate to be enabled as well. Default: false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "memoryThrottlingFactor": { + SchemaProps: spec.SchemaProps{ + Description: "MemoryThrottlingFactor specifies the factor multiplied by the memory limit or node allocatable memory when setting the cgroupv2 memory.high value to enforce MemoryQoS. Decreasing this factor will set lower high limit for container cgroups and put heavier reclaim pressure while increasing will put less reclaim pressure. See http://kep.k8s.io/2570 for more details. Default: 0.8", + Type: []string{"number"}, + Format: "double", + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kubelet/config/v1beta1.KubeletAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletAuthorization"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.LoggingConfiguration", "k8s.io/kubelet/config/v1beta1.KubeletAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletAuthorization", "k8s.io/kubelet/config/v1beta1.MemoryReservation", "k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration"}, } } @@ -44359,7 +52613,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref common Properties: map[string]spec.Schema{ "enabled": { SchemaProps: spec.SchemaProps{ - Description: "enabled allows bearer token authentication backed by the tokenreviews.authentication.k8s.io API", + Description: "enabled allows bearer token authentication backed by the tokenreviews.authentication.k8s.io API.", Type: []string{"boolean"}, Format: "", }, @@ -44367,6 +52621,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref common "cacheTTL": { SchemaProps: spec.SchemaProps{ Description: "cacheTTL enables caching of authentication results", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -44387,12 +52642,14 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref common. "cacheAuthorizedTTL": { SchemaProps: spec.SchemaProps{ Description: "cacheAuthorizedTTL is the duration to cache 'authorized' responses from the webhook authorizer.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "cacheUnauthorizedTTL": { SchemaProps: spec.SchemaProps{ Description: "cacheUnauthorizedTTL is the duration to cache 'unauthorized' responses from the webhook authorizer.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -44423,46 +52680,68 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletX509Authentication(ref common.Re } } -func schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kubelet_config_v1beta1_MemoryReservation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SerializedNodeConfigSource allows us to serialize v1.NodeConfigSource. This type is used internally by the Kubelet for tracking checkpointed dynamic configs. It exists in the kubeletconfig API group because it is classified as a versioned input to the Kubelet.", + Description: "MemoryReservation specifies the memory reservation of different types for each NUMA node", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "numaNode": { 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: "", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "apiVersion": { + "limits": { 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: "", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, }, }, - "source": { + }, + Required: []string{"numaNode", "limits"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_kubelet_config_v1beta1_MemorySwapConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "swapBehavior": { SchemaProps: spec.SchemaProps{ - Description: "Source is the source that we are serializing", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Description: "swapBehavior configures swap memory available to container workloads. May be one of \"\", \"LimitedSwap\": workload combined memory and swap usage cannot exceed pod memory limit \"UnlimitedSwap\": workloads can use unlimited swap, up to the allocatable limit.", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource"}, } } -func schema_app_apis_config_v1alpha1_CloudControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "SerializedNodeConfigSource allows us to serialize v1.NodeConfigSource. This type is used internally by the Kubelet for tracking checkpointed dynamic configs. It exists in the kubeletconfig API group because it is classified as a versioned input to the Kubelet.", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ @@ -44478,36 +52757,18 @@ func schema_app_apis_config_v1alpha1_CloudControllerManagerConfiguration(ref com Format: "", }, }, - "Generic": { - SchemaProps: spec.SchemaProps{ - Description: "Generic holds configuration for a generic controller-manager", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), - }, - }, - "KubeCloudShared": { - SchemaProps: spec.SchemaProps{ - Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.KubeCloudSharedConfiguration"), - }, - }, - "ServiceController": { - SchemaProps: spec.SchemaProps{ - Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ServiceControllerConfiguration"), - }, - }, - "NodeStatusUpdateFrequency": { + "source": { SchemaProps: spec.SchemaProps{ - Description: "NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "source is the source that we are serializing.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), }, }, }, - Required: []string{"Generic", "KubeCloudShared", "ServiceController", "NodeStatusUpdateFrequency"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.GenericControllerManagerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ServiceControllerConfiguration"}, + "k8s.io/api/core/v1.NodeConfigSource"}, } } @@ -44535,6 +52796,7 @@ func schema_pkg_apis_abac_v1beta1_Policy(ref common.ReferenceCallback) common.Op "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec describes the policy rule", + Default: map[string]interface{}{}, Ref: ref("k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec"), }, }, @@ -44674,12 +52936,14 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref common.ReferenceCall "describedObject": { SchemaProps: spec.SchemaProps{ Description: "a reference to the described object", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, "metricName": { SchemaProps: spec.SchemaProps{ Description: "the name of the metric", + Default: "", Type: []string{"string"}, Format: "", }, @@ -44687,6 +52951,7 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref common.ReferenceCall "timestamp": { SchemaProps: spec.SchemaProps{ Description: "indicates the time at which the metrics were produced", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -44700,6 +52965,7 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValue(ref common.ReferenceCall "value": { SchemaProps: spec.SchemaProps{ Description: "the value of the metric for this", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -44741,7 +53007,8 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref common.Reference }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { @@ -44751,7 +53018,8 @@ func schema_pkg_apis_custom_metrics_v1beta1_MetricValueList(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricValue"), }, }, }, @@ -44776,6 +53044,7 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricIdentifier(ref common.Referenc "name": { SchemaProps: spec.SchemaProps{ Description: "name is the name of the given metric", + Default: "", Type: []string{"string"}, Format: "", }, @@ -44860,17 +53129,20 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref common.ReferenceCall "describedObject": { SchemaProps: spec.SchemaProps{ Description: "a reference to the described object", + Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, "metric": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricIdentifier"), }, }, "timestamp": { SchemaProps: spec.SchemaProps{ Description: "indicates the time at which the metrics were produced", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -44884,6 +53156,7 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricValue(ref common.ReferenceCall "value": { SchemaProps: spec.SchemaProps{ Description: "the value of the metric for this", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -44919,7 +53192,8 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref common.Reference }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { @@ -44929,7 +53203,8 @@ func schema_pkg_apis_custom_metrics_v1beta2_MetricValueList(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/metrics/pkg/apis/custom_metrics/v1beta2.MetricValue"), }, }, }, @@ -44968,6 +53243,7 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref common.Ref "metricName": { SchemaProps: spec.SchemaProps{ Description: "the name of the metric", + Default: "", Type: []string{"string"}, Format: "", }, @@ -44980,8 +53256,9 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref common.Ref Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -44990,6 +53267,7 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref common.Ref "timestamp": { SchemaProps: spec.SchemaProps{ Description: "indicates the time at which the metrics were produced", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -45003,6 +53281,7 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValue(ref common.Ref "value": { SchemaProps: spec.SchemaProps{ Description: "the value of the metric", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, @@ -45038,7 +53317,8 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref common }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { @@ -45048,7 +53328,8 @@ func schema_pkg_apis_external_metrics_v1beta1_ExternalMetricValueList(ref common Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/metrics/pkg/apis/external_metrics/v1beta1.ExternalMetricValue"), }, }, }, @@ -45073,6 +53354,7 @@ func schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref common.ReferenceCallb "name": { SchemaProps: spec.SchemaProps{ Description: "Container name corresponding to the one from pod.spec.containers.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -45085,7 +53367,8 @@ func schema_pkg_apis_metrics_v1alpha1_ContainerMetrics(ref common.ReferenceCallb Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -45123,18 +53406,21 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "timestamp": { SchemaProps: spec.SchemaProps{ Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "window": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "usage": { @@ -45145,7 +53431,8 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -45184,6 +53471,7 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref common.ReferenceCallba "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -45194,7 +53482,8 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetricsList(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.NodeMetrics"), }, }, }, @@ -45232,18 +53521,21 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref common.ReferenceCallback) c }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "timestamp": { SchemaProps: spec.SchemaProps{ Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "window": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "containers": { @@ -45253,7 +53545,8 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref common.ReferenceCallback) c Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.ContainerMetrics"), }, }, }, @@ -45292,6 +53585,7 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref common.ReferenceCallbac "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -45302,7 +53596,8 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetricsList(ref common.ReferenceCallbac Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1alpha1.PodMetrics"), }, }, }, @@ -45327,6 +53622,7 @@ func schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref common.ReferenceCallba "name": { SchemaProps: spec.SchemaProps{ Description: "Container name corresponding to the one from pod.spec.containers.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -45339,7 +53635,8 @@ func schema_pkg_apis_metrics_v1beta1_ContainerMetrics(ref common.ReferenceCallba Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -45377,18 +53674,21 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref common.ReferenceCallback) c }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "timestamp": { SchemaProps: spec.SchemaProps{ Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "window": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "usage": { @@ -45399,7 +53699,8 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref common.ReferenceCallback) c Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, @@ -45438,6 +53739,7 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref common.ReferenceCallbac "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -45448,7 +53750,8 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetricsList(ref common.ReferenceCallbac Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.NodeMetrics"), }, }, }, @@ -45486,18 +53789,21 @@ func schema_pkg_apis_metrics_v1beta1_PodMetrics(ref common.ReferenceCallback) co }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "timestamp": { SchemaProps: spec.SchemaProps{ Description: "The following fields define time interval from which metrics were collected from the interval [Timestamp-Window, Timestamp].", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "window": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "containers": { @@ -45507,7 +53813,8 @@ func schema_pkg_apis_metrics_v1beta1_PodMetrics(ref common.ReferenceCallback) co Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.ContainerMetrics"), }, }, }, @@ -45546,6 +53853,7 @@ func schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref common.ReferenceCallback "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -45556,7 +53864,8 @@ func schema_pkg_apis_metrics_v1beta1_PodMetricsList(ref common.ReferenceCallback Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/metrics/pkg/apis/metrics/v1beta1.PodMetrics"), }, }, }, diff --git a/pkg/genericcontrolplane/aggregator.go b/pkg/genericcontrolplane/aggregator.go index 3b82520b19fee..97333ddeaccec 100644 --- a/pkg/genericcontrolplane/aggregator.go +++ b/pkg/genericcontrolplane/aggregator.go @@ -180,7 +180,10 @@ func makeAPIService(gv schema.GroupVersion) *v1.APIService { return nil } return &v1.APIService{ - ObjectMeta: metav1.ObjectMeta{Name: gv.Version + "." + gv.Group}, + ObjectMeta: metav1.ObjectMeta{ + Name: gv.Version + "." + gv.Group, + ClusterName: RootClusterName, + }, Spec: v1.APIServiceSpec{ Group: gv.Group, Version: gv.Version, @@ -267,7 +270,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{ func apiServicesToRegister(delegateAPIServer genericapiserver.DelegationTarget, registration autoregister.AutoAPIServiceRegistration) []*v1.APIService { apiServices := []*v1.APIService{} - for _, curr := range delegateAPIServer.ListedPaths() { + for _, curr := range delegateAPIServer.ListedPaths("") { if curr == "/api/v1" { apiService := makeAPIService(schema.GroupVersion{Group: "", Version: "v1"}) registration.AddAPIServiceToSyncOnStart(apiService) diff --git a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go new file mode 100644 index 0000000000000..e3b2616e4fb52 --- /dev/null +++ b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go @@ -0,0 +1,157 @@ +/* +Copyright 2014 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 app does all of the work necessary to create a Kubernetes +// APIServer by binding together the API, master and APIServer infrastructure. +// It can be configured and called directly or via the hyperkube framework. +package clientutils + +import ( + "bytes" + "errors" + "fmt" + "net/http" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + utilnet "k8s.io/apimachinery/pkg/util/net" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/endpoints/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/server" + genericapiserver "k8s.io/apiserver/pkg/server" + "k8s.io/client-go/rest" + _ "k8s.io/component-base/metrics/prometheus/workqueue" // for workqueue metric registration + "k8s.io/klog" +) + +type multiClusterClientConfigRoundTripper struct { + rt http.RoundTripper + requestInfoResolver func() genericapirequest.RequestInfoResolver + enabledOn sets.String +} + +// EnableMultiCluster allows uses a rountripper to hack the rest.Config used by +// client-go APIs, in order to add support for logical clusters for a given list of resources. +// - By default it enables "wildcard" cluster in list and watch request to enable searchng in all logical clusters +// - For other types of requests, tries to guess the logical cluster where the operation should occur +// - It finally sets the "X-Kubernetes-Cluster" header accordingly. +// +// This is a temporary hack and should be replaced by thoughtful and real support of logical clusters +// in the client-go layer +func EnableMultiCluster(config *rest.Config, apiServerConfig *genericapiserver.Config, enabledOnResources ...string) { + config.ContentConfig.ContentType = "application/json" + + config.Wrap(func(rt http.RoundTripper) http.RoundTripper { + defaultResolver := defaultRequestInfoResolver() + return &multiClusterClientConfigRoundTripper{ + rt: rt, + requestInfoResolver: func() genericapirequest.RequestInfoResolver { + if apiServerConfig != nil { + return apiServerConfig.RequestInfoResolver + } else { + return defaultResolver + } + }, + enabledOn: sets.NewString(enabledOnResources...), + } + }) +} + +func defaultRequestInfoResolver() genericapirequest.RequestInfoResolver { + apiPrefixes := sets.NewString(strings.Trim(server.APIGroupPrefix, "/")) // all possible API prefixes + legacyAPIPrefixes := sets.String{} // APIPrefixes that won't have groups (legacy) + apiPrefixes.Insert(strings.Trim(server.DefaultLegacyAPIPrefix, "/")) + legacyAPIPrefixes.Insert(strings.Trim(server.DefaultLegacyAPIPrefix, "/")) + + return &request.RequestInfoFactory{ + APIPrefixes: apiPrefixes, + GrouplessAPIPrefixes: legacyAPIPrefixes, + } +} + +func (mcrt *multiClusterClientConfigRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + req = utilnet.CloneRequest(req) + requestInfo, err := mcrt.requestInfoResolver().NewRequestInfo(req) + if err != nil { + return nil, err + } + if requestInfo != nil && + mcrt.enabledOn.Has(requestInfo.Resource) { + contextCluster := genericapirequest.ClusterFrom(req.Context()) + resourceClusterName := "" + headerCluster := "" + switch requestInfo.Verb { + case "list", "watch": + if contextCluster != nil && !contextCluster.Wildcard { + headerCluster = contextCluster.Name + } else { + headerCluster = "*" + } + case "create", "update": + err := func() error { + // We dn't try to mutate the object here. Just guessing the ClusterName field from the body, + // in order to set the header accordingly + reader, err := req.GetBody() + if err != nil { + klog.Infof("DEBUG: Error when trying to read the request body from the multicluster client config roundtripper: %v", err) + return err + } + defer reader.Close() + buf := new(bytes.Buffer) + _, err = buf.ReadFrom(reader) + if err != nil { + klog.Infof("DEBUG: Error when trying to read the request body from the multicluster client config roundtripper: %v", err) + return err + } + bytes := buf.Bytes() + obj, _, err := unstructured.UnstructuredJSONScheme.Decode(bytes, nil, nil) + if err != nil { + klog.Infof("DEBUG: Error when trying to read the request body from the multicluster client config roundtripper: %v", err) + return err + } + if s, ok := obj.(metav1.Object); ok { + resourceClusterName = s.GetClusterName() + } + return nil + }() + if err != nil { + return nil, err + } + fallthrough + default: + if resourceClusterName != "" { + if contextCluster != nil && contextCluster.Name != resourceClusterName { + return nil, errors.New("Resource cluster name " + resourceClusterName + " incompatible with context cluster name " + contextCluster.Name) + } + headerCluster = resourceClusterName + } else { + if contextCluster != nil { // + if contextCluster.Wildcard { + return nil, errors.New("Cluster should be set for request " + requestInfo.Verb + ", but instead wildcards were provided.") + } + headerCluster = contextCluster.Name + } + } + } + if headerCluster == "" { + return nil, fmt.Errorf("Cluster should not be empty for request '%s' on resource '%s' (%s)", requestInfo.Verb, requestInfo.Resource, requestInfo.Path) + } + req.Header.Add("X-Kubernetes-Cluster", headerCluster) + } + return mcrt.rt.RoundTrip(req) +} diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 7034f724a2c99..b3025c9754b3e 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -29,6 +29,7 @@ import ( "github.com/emicklei/go-restful" extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" + "k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" @@ -49,9 +50,12 @@ import ( "k8s.io/component-base/version" "k8s.io/klog/v2" aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" + "k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator" + "k8s.io/kube-openapi/pkg/handler" "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" "k8s.io/kubernetes/pkg/genericcontrolplane/apis" + "k8s.io/kubernetes/pkg/genericcontrolplane/clientutils" "k8s.io/kubernetes/pkg/genericcontrolplane/options" "k8s.io/kubernetes/pkg/kubeapiserver" "k8s.io/kubernetes/pkg/serviceaccount" @@ -63,6 +67,7 @@ const Include = "kube-control-plane" const ( etcdRetryLimit = 60 etcdRetryInterval = 1 * time.Second + RootClusterName = "admin" ) // Run runs the specified APIServer. This should never exit. @@ -75,15 +80,12 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro return err } - prepared, err := server.PrepareRun() - if err != nil { - return err - } + prepared := server.PrepareRun() return prepared.Run(stopCh) } // CreateServerChain creates the apiservers connected via delegation. -func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan struct{}) (*aggregatorapiserver.APIAggregator, error) { +func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan struct{}) (*genericapiserver.GenericAPIServer, error) { kubeAPIServerConfig, serviceResolver, pluginInitializer, err := CreateKubeAPIServerConfig(completedOptions) if err != nil { return nil, err @@ -128,7 +130,71 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan } }) - return aggregatorServer, nil + // HACK: we don't use the OpenAPI Aggregator of the aggretorServer anymore (only the agregator generic server is prepared) + // because the openAPI Agregator isn't compatible with CRD tenancy. + // So instead, at the same path, we register our own handler that mainly returns the right merged openAPI schema + // based on the logical cluster based on the incoming request. + downloader := aggregator.NewDownloader() + aggregatorServer.GenericAPIServer.Handler.NonGoRestfulMux.HandleFunc("/openapi/v2", func(res http.ResponseWriter, req *http.Request) { + req = req.Clone(req.Context()) + req.URL.Path = "/openapi/v2" + req.URL.RawPath = req.URL.Path + + cluster := genericapirequest.ClusterFrom(req.Context()) + + withCluster := func(handler http.Handler) http.HandlerFunc { + return func(res http.ResponseWriter, req *http.Request) { + if cluster != nil { + req = req.Clone(genericapirequest.WithCluster(req.Context(), *cluster)) + } + handler.ServeHTTP(res, req) + } + } + + // DAVID TODO: try to understand why adding the cluster returns nil here. The default openAPIService should work + controlPlaneSpec, etag, httpStatus, err := downloader.Download(kubeAPIServer.GenericAPIServer.Handler.Director, "") + klog.Infof(etag, httpStatus) + + crdSpecs, etag, httpStatus, err := downloader.Download(withCluster(apiExtensionsServer.GenericAPIServer.Handler.Director), "") + klog.Infof(etag, httpStatus) + + mergedSpecs, err := builder.MergeSpecs(controlPlaneSpec, crdSpecs) + + openAPIVersionedService, err := handler.NewOpenAPIService(mergedSpecs) + if err != nil { + klog.Errorf("Error while building OpenAPI schema: %v", err) + } + + handler := &singlePathHandler{} + + // In order to reuse the kube-openapi API as much as possible, we + // register the OpenAPI service in the singlePathHandler + err = openAPIVersionedService.RegisterOpenAPIVersionedService("/openapi/v2", handler) + if err != nil { + klog.Errorf("Error while building OpenAPI schema: %v", err) + } + + handler.ServeHTTP(res, req) + }) + + return aggregatorServer.GenericAPIServer, nil +} + +// singlePathHandler is a dummy PathHandler that mainly allows grabbing a http.Handler +// from a PathHandler consumer and then being able to use the http.Handler +// to serve a request. +type singlePathHandler struct { + handler [1]http.Handler +} + +func (sph *singlePathHandler) Handle(path string, handler http.Handler) { + sph.handler[0] = handler +} +func (sph *singlePathHandler) ServeHTTP(res http.ResponseWriter, req *http.Request) { + if sph.handler[0] == nil { + res.WriteHeader(404) + } + sph.handler[0].ServeHTTP(res, req) } // CreateKubeAPIServer creates and wires a workable kube-apiserver @@ -295,6 +361,9 @@ func BuildGenericConfig( genericConfig.LoopbackClientConfig.DisableCompression = true kubeClientConfig := genericConfig.LoopbackClientConfig + + clientutils.EnableMultiCluster(genericConfig.LoopbackClientConfig, genericConfig, "apiservices", "customresourcedefinitions") + clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) if err != nil { lastErr = fmt.Errorf("failed to create real external clientset: %v", err) @@ -351,7 +420,7 @@ func BuildGenericConfig( cluster.Wildcard = true fallthrough case "": - cluster.Name = "admin" + cluster.Name = RootClusterName default: if !reClusterName.MatchString(clusterName) { http.Error(w, "Unknown cluster", http.StatusNotFound) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go index 6783ced4b0149..decb28b3e7eb1 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go @@ -180,11 +180,11 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) } versionDiscoveryHandler := &versionDiscoveryHandler{ - discovery: map[schema.GroupVersion]*discovery.APIVersionHandler{}, + discovery: map[string]map[schema.GroupVersion]*discovery.APIVersionHandler{}, delegate: delegateHandler, } groupDiscoveryHandler := &groupDiscoveryHandler{ - discovery: map[string]*discovery.APIGroupHandler{}, + discovery: map[string]map[string]*discovery.APIGroupHandler{}, delegate: delegateHandler, } establishingController := establish.NewEstablishingController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), crdClient.ApiextensionsV1()) @@ -211,7 +211,7 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) s.GenericAPIServer.Handler.NonGoRestfulMux.Handle("/apis", crdHandler) s.GenericAPIServer.Handler.NonGoRestfulMux.HandlePrefix("/apis/", crdHandler) // HACK: Added to allow serving core resources registered through CRDs (for the KCP scenario) - s.GenericAPIServer.Handler.NonGoRestfulMux.HandlePrefix("/api/v1/", crdHandler) + s.GenericAPIServer.Handler.NonGoRestfulMux.UnlistedHandlePrefix("/api/v1/", crdHandler) discoveryController := NewDiscoveryController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), versionDiscoveryHandler, groupDiscoveryHandler) namingController := status.NewNamingConditionController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), crdClient.ApiextensionsV1()) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go index f40c33791b6a7..4d13bed97891d 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go @@ -23,12 +23,13 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/endpoints/discovery" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) type versionDiscoveryHandler struct { // TODO, writing is infrequent, optimize this discoveryLock sync.RWMutex - discovery map[schema.GroupVersion]*discovery.APIVersionHandler + discovery map[string]map[schema.GroupVersion]*discovery.APIVersionHandler delegate http.Handler } @@ -40,7 +41,14 @@ func (r *versionDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Req r.delegate.ServeHTTP(w, req) return } - discovery, ok := r.getDiscovery(schema.GroupVersion{Group: pathParts[1], Version: pathParts[2]}) + + clusterName, err := genericapirequest.ClusterNameFrom(req.Context()) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + discovery, ok := r.getDiscovery(clusterName, schema.GroupVersion{Group: pathParts[1], Version: pathParts[2]}) if !ok { r.delegate.ServeHTTP(w, req) return @@ -49,32 +57,46 @@ func (r *versionDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Req discovery.ServeHTTP(w, req) } -func (r *versionDiscoveryHandler) getDiscovery(gv schema.GroupVersion) (*discovery.APIVersionHandler, bool) { +func (r *versionDiscoveryHandler) getDiscovery(clusterName string, gv schema.GroupVersion) (*discovery.APIVersionHandler, bool) { r.discoveryLock.RLock() defer r.discoveryLock.RUnlock() - ret, ok := r.discovery[gv] + clusterDiscovery, clusterExists := r.discovery[clusterName] + if !clusterExists { + return nil, false + } + ret, ok := clusterDiscovery[gv] return ret, ok } -func (r *versionDiscoveryHandler) setDiscovery(gv schema.GroupVersion, discovery *discovery.APIVersionHandler) { +func (r *versionDiscoveryHandler) setDiscovery(clusterName string, gv schema.GroupVersion, discoveryHandler *discovery.APIVersionHandler) { r.discoveryLock.Lock() defer r.discoveryLock.Unlock() - r.discovery[gv] = discovery + if _, clusterExists := r.discovery[clusterName]; !clusterExists { + r.discovery[clusterName] = map[schema.GroupVersion]*discovery.APIVersionHandler{} + } + r.discovery[clusterName][gv] = discoveryHandler } -func (r *versionDiscoveryHandler) unsetDiscovery(gv schema.GroupVersion) { +func (r *versionDiscoveryHandler) unsetDiscovery(clusterName string, gv schema.GroupVersion) { r.discoveryLock.Lock() defer r.discoveryLock.Unlock() - delete(r.discovery, gv) + if _, clusterExists := r.discovery[clusterName]; !clusterExists { + return + } + + delete(r.discovery[clusterName], gv) + if len(r.discovery[clusterName]) == 0 { + delete(r.discovery, clusterName) + } } type groupDiscoveryHandler struct { // TODO, writing is infrequent, optimize this discoveryLock sync.RWMutex - discovery map[string]*discovery.APIGroupHandler + discovery map[string]map[string]*discovery.APIGroupHandler delegate http.Handler } @@ -86,7 +108,14 @@ func (r *groupDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Reque r.delegate.ServeHTTP(w, req) return } - discovery, ok := r.getDiscovery(pathParts[1]) + + clusterName, err := genericapirequest.ClusterNameFrom(req.Context()) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + discovery, ok := r.getDiscovery(clusterName, pathParts[1]) if !ok { r.delegate.ServeHTTP(w, req) return @@ -95,26 +124,40 @@ func (r *groupDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Reque discovery.ServeHTTP(w, req) } -func (r *groupDiscoveryHandler) getDiscovery(group string) (*discovery.APIGroupHandler, bool) { +func (r *groupDiscoveryHandler) getDiscovery(clusterName, group string) (*discovery.APIGroupHandler, bool) { r.discoveryLock.RLock() defer r.discoveryLock.RUnlock() - ret, ok := r.discovery[group] + clusterDiscovery, clusterExists := r.discovery[clusterName] + if !clusterExists { + return nil, false + } + ret, ok := clusterDiscovery[group] return ret, ok } -func (r *groupDiscoveryHandler) setDiscovery(group string, discovery *discovery.APIGroupHandler) { +func (r *groupDiscoveryHandler) setDiscovery(clusterName, group string, discoveryHandler *discovery.APIGroupHandler) { r.discoveryLock.Lock() defer r.discoveryLock.Unlock() - r.discovery[group] = discovery + if _, clusterExists := r.discovery[clusterName]; !clusterExists { + r.discovery[clusterName] = map[string]*discovery.APIGroupHandler{} + } + r.discovery[clusterName][group] = discoveryHandler } -func (r *groupDiscoveryHandler) unsetDiscovery(group string) { +func (r *groupDiscoveryHandler) unsetDiscovery(clusterName, group string) { r.discoveryLock.Lock() defer r.discoveryLock.Unlock() - delete(r.discovery, group) + if _, clusterExists := r.discovery[clusterName]; !clusterExists { + return + } + + delete(r.discovery[clusterName], group) + if len(r.discovery[clusterName]) == 0 { + delete(r.discovery, clusterName) + } } // splitPath returns the segments for a URL path. diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go index 9ab93fe068caa..38aee2eb7ef6f 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go @@ -22,12 +22,11 @@ import ( "time" "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" autoscaling "k8s.io/api/autoscaling/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/version" @@ -49,7 +48,7 @@ type DiscoveryController struct { crdsSynced cache.InformerSynced // To allow injection for testing. - syncFn func(version schema.GroupVersion) error + syncFn func(clusterGroupVersion discovery.ClusterGroupVersion) error queue workqueue.RateLimitingInterface } @@ -75,7 +74,7 @@ func NewDiscoveryController(crdInformer informers.CustomResourceDefinitionInform return c } -func (c *DiscoveryController) sync(version schema.GroupVersion) error { +func (c *DiscoveryController) sync(clusterGroupVersion discovery.ClusterGroupVersion) error { apiVersionsForDiscovery := []metav1.GroupVersionForDiscovery{} apiResourcesForDiscovery := []metav1.APIResource{} @@ -92,7 +91,11 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { continue } - if crd.Spec.Group != version.Group { + if crd.Spec.Group != clusterGroupVersion.Group { + continue + } + + if crd.GetClusterName() != clusterGroupVersion.ClusterName { continue } @@ -120,11 +123,11 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { Version: v.Name, }) } - if v.Name == version.Version { + if v.Name == clusterGroupVersion.Version { foundThisVersion = true } if v.Storage { - storageVersionHash = discovery.StorageVersionHash(gv.Group, gv.Version, crd.Spec.Names.Kind) + storageVersionHash = discovery.StorageVersionHash(clusterGroupVersion.ClusterName, gv.Group, gv.Version, crd.Spec.Names.Kind) } } @@ -150,7 +153,7 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { StorageVersionHash: storageVersionHash, }) - subresources, err := apiextensionshelpers.GetSubresourcesForVersion(crd, version.Version) + subresources, err := apiextensionshelpers.GetSubresourcesForVersion(crd, clusterGroupVersion.Version) if err != nil { return err } @@ -184,36 +187,37 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { // HACK: if we are adding resources in legacy scheme group through CRDs (KCP scenario) // then do not expose the CRD `APIResource`s in their own CRD-related group`, // But instead add them in the existing legacy schema group - if legacyscheme.Scheme.IsGroupRegistered(version.Group) { + if genericcontrolplanescheme.Scheme.IsGroupRegistered(clusterGroupVersion.Group) { if !foundGroup || !foundVersion { - delete(discovery.ContributedResources, version) + delete(discovery.ContributedResources, clusterGroupVersion) } - discovery.ContributedResources[version] = resourceListerFunc + discovery.ContributedResources[clusterGroupVersion] = resourceListerFunc + return nil } if !foundGroup { - c.groupHandler.unsetDiscovery(version.Group) - c.versionHandler.unsetDiscovery(version) + c.groupHandler.unsetDiscovery(clusterGroupVersion.ClusterName, clusterGroupVersion.Group) + c.versionHandler.unsetDiscovery(clusterGroupVersion.ClusterName, clusterGroupVersion.GroupVersion()) return nil } - if version.Group != "" { + if clusterGroupVersion.Group != "" { // If we don't add resources in the core API group apiGroup := metav1.APIGroup{ - Name: version.Group, + Name: clusterGroupVersion.Group, Versions: apiVersionsForDiscovery, // the preferred versions for a group is the first item in // apiVersionsForDiscovery after it put in the right ordered PreferredVersion: apiVersionsForDiscovery[0], } - c.groupHandler.setDiscovery(version.Group, discovery.NewAPIGroupHandler(Codecs, apiGroup)) + c.groupHandler.setDiscovery(clusterGroupVersion.ClusterName, clusterGroupVersion.Group, discovery.NewAPIGroupHandler(Codecs, apiGroup)) if !foundVersion { - c.versionHandler.unsetDiscovery(version) + c.versionHandler.unsetDiscovery(clusterGroupVersion.ClusterName, clusterGroupVersion.GroupVersion()) return nil } - c.versionHandler.setDiscovery(version, discovery.NewAPIVersionHandler(Codecs, version, resourceListerFunc)) + c.versionHandler.setDiscovery(clusterGroupVersion.ClusterName, clusterGroupVersion.GroupVersion(), discovery.NewAPIVersionHandler(Codecs, clusterGroupVersion.GroupVersion(), resourceListerFunc)) } return nil @@ -246,7 +250,11 @@ func (c *DiscoveryController) Run(stopCh <-chan struct{}, synchedCh chan<- struc } for _, crd := range crds { for _, v := range crd.Spec.Versions { - gv := schema.GroupVersion{crd.Spec.Group, v.Name} + gv := discovery.ClusterGroupVersion{ + Group: crd.Spec.Group, + Version: v.Name, + ClusterName: crd.GetClusterName(), + } if err := c.sync(gv); err != nil { utilruntime.HandleError(fmt.Errorf("failed to initially sync CRD version %v: %v", gv, err)) return false, nil @@ -281,7 +289,7 @@ func (c *DiscoveryController) processNextWorkItem() bool { } defer c.queue.Done(key) - err := c.syncFn(key.(schema.GroupVersion)) + err := c.syncFn(key.(discovery.ClusterGroupVersion)) if err == nil { c.queue.Forget(key) return true @@ -295,7 +303,10 @@ func (c *DiscoveryController) processNextWorkItem() bool { func (c *DiscoveryController) enqueue(obj *apiextensionsv1.CustomResourceDefinition) { for _, v := range obj.Spec.Versions { - c.queue.Add(schema.GroupVersion{Group: obj.Spec.Group, Version: v.Name}) + c.queue.Add(discovery.ClusterGroupVersion{ + ClusterName: obj.GetClusterName(), + Group: obj.Spec.Group, + Version: v.Name}) } } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index cd84adda6d897..1fce7a4a34920 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -72,6 +72,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apiserver/pkg/endpoints/openapi" apirequest "k8s.io/apiserver/pkg/endpoints/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" @@ -85,6 +86,7 @@ import ( "k8s.io/client-go/scale" "k8s.io/client-go/scale/scheme/autoscalingv1" "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/clusters" "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/util/proto" "k8s.io/kube-openapi/pkg/validation/spec" @@ -264,7 +266,17 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { if requestInfo.APIGroup == "" { crdName = crdName + "core" } - crd, err := r.crdLister.Get(crdName) + + crdKey := crdName + clusterName, err := genericapirequest.ClusterNameFrom(ctx) + if err != nil { + responsewriters.ErrorNegotiated( + apierrors.NewInternalError(fmt.Errorf("error resolving resource: %v", err)), + Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req, + ) + } + crdKey = clusters.ToClusterAwareKey(clusterName, crdKey) + crd, err := r.crdLister.Get(crdKey) if apierrors.IsNotFound(err) { r.delegate.ServeHTTP(w, req) return @@ -307,7 +319,7 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { terminating := apiextensionshelpers.IsCRDConditionTrue(crd, apiextensionsv1.Terminating) - crdInfo, err := r.getOrCreateServingInfoFor(crd.UID, crd.Name) + crdInfo, err := r.getOrCreateServingInfoFor(crd.UID, crd.Name, clusterName) if apierrors.IsNotFound(err) { r.delegate.ServeHTTP(w, req) return @@ -498,9 +510,9 @@ func (r *crdHandler) updateCustomResourceDefinition(oldObj, newObj interface{}) if !apiextensionshelpers.IsCRDConditionTrue(newCRD, apiextensionsv1.Established) && apiextensionshelpers.IsCRDConditionTrue(newCRD, apiextensionsv1.NamesAccepted) { if r.masterCount > 1 { - r.establishingController.QueueCRD(newCRD.Name, 5*time.Second) + r.establishingController.QueueCRD(newCRD.Name, newCRD.GetClusterName(), 5*time.Second) } else { - r.establishingController.QueueCRD(newCRD.Name, 0) + r.establishingController.QueueCRD(newCRD.Name, newCRD.GetClusterName(), 0) } } @@ -596,7 +608,7 @@ func (r *crdHandler) tearDown(oldInfo *crdInfo) { // GetCustomResourceListerCollectionDeleter returns the ListerCollectionDeleter of // the given crd. func (r *crdHandler) GetCustomResourceListerCollectionDeleter(crd *apiextensionsv1.CustomResourceDefinition) (finalizer.ListerCollectionDeleter, error) { - info, err := r.getOrCreateServingInfoFor(crd.UID, crd.Name) + info, err := r.getOrCreateServingInfoFor(crd.UID, crd.Name, crd.GetClusterName()) if err != nil { return nil, err } @@ -605,7 +617,7 @@ func (r *crdHandler) GetCustomResourceListerCollectionDeleter(crd *apiextensions // getOrCreateServingInfoFor gets the CRD serving info for the given CRD UID if the key exists in the storage map. // Otherwise the function fetches the up-to-date CRD using the given CRD name and creates CRD serving info. -func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crdInfo, error) { +func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name, clusterName string) (*crdInfo, error) { storageMap := r.customStorage.Load().(crdStorageMap) if ret, ok := storageMap[uid]; ok { return ret, nil @@ -618,7 +630,11 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd // If updateCustomResourceDefinition sees an update and happens later, the storage will be deleted and // we will re-create the updated storage on demand. If updateCustomResourceDefinition happens before, // we make sure that we observe the same up-to-date CRD. - crd, err := r.crdLister.Get(name) + crdKey := name + if clusterName != "" { + crdKey = clusters.ToClusterAwareKey(clusterName, crdKey) + } + crd, err := r.crdLister.Get(crdKey) if err != nil { return nil, err } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go index b981c3a66a905..4f3ce68b261e3 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go @@ -172,20 +172,24 @@ func TestRouting(t *testing.T) { crdLister: crdLister, delegate: delegate, versionDiscoveryHandler: &versionDiscoveryHandler{ - discovery: map[schema.GroupVersion]*discovery.APIVersionHandler{ - customV1: discovery.NewAPIVersionHandler(Codecs, customV1, discovery.APIResourceListerFunc(func() []metav1.APIResource { - return nil - })), + discovery: map[string]map[schema.GroupVersion]*discovery.APIVersionHandler{ + "": { + customV1: discovery.NewAPIVersionHandler(Codecs, customV1, discovery.APIResourceListerFunc(func() []metav1.APIResource { + return nil + })), + }, }, delegate: delegate, }, groupDiscoveryHandler: &groupDiscoveryHandler{ - discovery: map[string]*discovery.APIGroupHandler{ - "custom": discovery.NewAPIGroupHandler(Codecs, metav1.APIGroup{ - Name: customV1.Group, - Versions: []metav1.GroupVersionForDiscovery{{GroupVersion: customV1.String(), Version: customV1.Version}}, - PreferredVersion: metav1.GroupVersionForDiscovery{GroupVersion: customV1.String(), Version: customV1.Version}, - }), + discovery: map[string]map[string]*discovery.APIGroupHandler{ + "": { + "custom": discovery.NewAPIGroupHandler(Codecs, metav1.APIGroup{ + Name: customV1.Group, + Versions: []metav1.GroupVersionForDiscovery{{GroupVersion: customV1.String(), Version: customV1.Version}}, + PreferredVersion: metav1.GroupVersionForDiscovery{GroupVersion: customV1.String(), Version: customV1.Version}, + }), + }, }, delegate: delegate, }, @@ -507,7 +511,7 @@ func testHandlerConversion(t *testing.T, enableWatchCache bool) { t.Fatal(err) } - crdInfo, err := handler.getOrCreateServingInfoFor(crd.UID, crd.Name) + crdInfo, err := handler.getOrCreateServingInfoFor(crd.UID, crd.Name, "") if err != nil { t.Fatal(err) } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go index c2d7d55718fca..f2fd41987e9fb 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go @@ -34,6 +34,7 @@ import ( client "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" informers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1" listers "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" + "k8s.io/client-go/tools/clusters" ) // EstablishingController controls how and when CRD is established. @@ -64,8 +65,8 @@ func NewEstablishingController(crdInformer informers.CustomResourceDefinitionInf } // QueueCRD adds CRD into the establishing queue. -func (ec *EstablishingController) QueueCRD(key string, timeout time.Duration) { - ec.queue.AddAfter(key, timeout) +func (ec *EstablishingController) QueueCRD(name, clusterName string, timeout time.Duration) { + ec.queue.AddAfter(clusters.ToClusterAwareKey(clusterName, name), timeout) } // Run starts the EstablishingController. diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/crd_finalizer.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/crd_finalizer.go index d559dca45d8f4..7f63b925b1b63 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/crd_finalizer.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/crd_finalizer.go @@ -190,7 +190,10 @@ func (c *CRDFinalizer) deleteInstances(crd *apiextensionsv1.CustomResourceDefini }, err } - ctx := genericapirequest.NewContext() + ctx := genericapirequest.WithCluster(genericapirequest.NewContext(), genericapirequest.Cluster{ + Name: crd.GetClusterName(), + }) + allResources, err := crClient.List(ctx, nil) if err != nil { return apiextensionsv1.CustomResourceDefinitionCondition{ diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go index a99d95c6ef2ad..db3e08a9d46fe 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go @@ -26,10 +26,10 @@ import ( "k8s.io/apimachinery/pkg/labels" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/server/routes" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" "k8s.io/klog/v2" - "k8s.io/kube-openapi/pkg/handler" "k8s.io/kube-openapi/pkg/validation/spec" apiextensionshelpers "k8s.io/apiextensions-apiserver/pkg/apihelpers" @@ -37,6 +37,7 @@ import ( informers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1" listers "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" "k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder" + "k8s.io/client-go/tools/clusters" ) // Controller watches CustomResourceDefinitions and publishes validation schema @@ -49,12 +50,12 @@ type Controller struct { queue workqueue.RateLimitingInterface - staticSpec *spec.Swagger - openAPIService *handler.OpenAPIService + staticSpec *spec.Swagger + openAPIServiceProvider routes.OpenAPIServiceProvider - // specs per version and per CRD name + // specs per cluster and per version and per CRD name lock sync.Mutex - crdSpecs map[string]map[string]*spec.Swagger + crdSpecs map[string]map[string]map[string]*spec.Swagger } // NewController creates a new Controller with input CustomResourceDefinition informer @@ -63,7 +64,7 @@ func NewController(crdInformer informers.CustomResourceDefinitionInformer) *Cont crdLister: crdInformer.Lister(), crdsSynced: crdInformer.Informer().HasSynced, queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "crd_openapi_controller"), - crdSpecs: map[string]map[string]*spec.Swagger{}, + crdSpecs: map[string]map[string]map[string]*spec.Swagger{}, } crdInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ @@ -76,8 +77,51 @@ func NewController(crdInformer informers.CustomResourceDefinitionInformer) *Cont return c } +// HACK: +// Everything regarding OpenAPI and resource discovery is managed through controllers currently +// (a number of controllers highly coupled with the corresponding http handlers). +// The following code is an attempt at provising CRD tenancy while accommodating the current design without being too much invasive, +// because doing differently would have meant too much refactoring.. +// But in the long run the "do this dynamically, not as part of a controller" is probably going to be important. +// openapi/crd generation is expensive, so doing on a controller means that CPU and memory scale O(crds), +// when we really want them to scale O(active_clusters). + +func (c *Controller) setClusterCrdSpecs(clusterName, crdName string, newSpecs map[string]*spec.Swagger) { + _, found := c.crdSpecs[clusterName] + if !found { + c.crdSpecs[clusterName] = map[string]map[string]*spec.Swagger{} + } + c.crdSpecs[clusterName][crdName] = newSpecs + c.openAPIServiceProvider.AddCuster(clusterName) +} + +func (c *Controller) removeClusterCrdSpecs(clusterName, crdName string) bool { + _, crdsForClusterFound := c.crdSpecs[clusterName] + if !crdsForClusterFound { + return false + } + if _, found := c.crdSpecs[clusterName][crdName]; !found { + return false + } + delete(c.crdSpecs[clusterName], crdName) + if len(c.crdSpecs[clusterName]) == 0 { + delete(c.crdSpecs, clusterName) + c.openAPIServiceProvider.RemoveCuster(clusterName) + } + return true +} + +func (c *Controller) getClusterCrdSpecs(clusterName, crdName string) (map[string]*spec.Swagger, bool) { + _, specsFoundForCluster := c.crdSpecs[clusterName] + if !specsFoundForCluster { + return map[string]*spec.Swagger{}, false + } + crdSpecs, found := c.crdSpecs[clusterName][crdName] + return crdSpecs, found +} + // Run sets openAPIAggregationManager and starts workers -func (c *Controller) Run(staticSpec *spec.Swagger, openAPIService *handler.OpenAPIService, stopCh <-chan struct{}) { +func (c *Controller) Run(staticSpec *spec.Swagger, openAPIServiceProvider routes.OpenAPIServiceProvider, stopCh <-chan struct{}) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() defer klog.Infof("Shutting down OpenAPI controller") @@ -85,7 +129,7 @@ func (c *Controller) Run(staticSpec *spec.Swagger, openAPIService *handler.OpenA klog.Infof("Starting OpenAPI controller") c.staticSpec = staticSpec - c.openAPIService = openAPIService + c.openAPIServiceProvider = openAPIServiceProvider if !cache.WaitForCacheSync(stopCh, c.crdsSynced) { utilruntime.HandleError(fmt.Errorf("timed out waiting for caches to sync")) @@ -108,7 +152,7 @@ func (c *Controller) Run(staticSpec *spec.Swagger, openAPIService *handler.OpenA } else if !changed { continue } - c.crdSpecs[crd.Name] = newSpecs + c.setClusterCrdSpecs(crd.GetClusterName(), crd.Name, newSpecs) } if err := c.updateSpecLocked(); err != nil { utilruntime.HandleError(fmt.Errorf("failed to initially create OpenAPI spec for CRDs: %v", err)) @@ -153,28 +197,35 @@ func (c *Controller) processNextWorkItem() bool { return true } -func (c *Controller) sync(name string) error { +func (c *Controller) sync(clusterAndName string) error { c.lock.Lock() defer c.lock.Unlock() - crd, err := c.crdLister.Get(name) + crd, err := c.crdLister.Get(clusterAndName) if err != nil && !errors.IsNotFound(err) { return err } // do we have to remove all specs of this CRD? if errors.IsNotFound(err) || !apiextensionshelpers.IsCRDConditionTrue(crd, apiextensionsv1.Established) { - if _, found := c.crdSpecs[name]; !found { + clusterName := "" + crdName := clusterAndName + if crd != nil { + clusterName = crd.GetClusterName() + crdName = crd.Name + } else { + clusterName, crdName = clusters.SplitClusterAwareKey(clusterAndName) + } + if !c.removeClusterCrdSpecs(clusterName, crdName) { return nil } - delete(c.crdSpecs, name) - klog.V(2).Infof("Updating CRD OpenAPI spec because %s was removed", name) - regenerationCounter.With(map[string]string{"crd": name, "reason": "remove"}) + klog.V(2).Infof("Updating CRD OpenAPI spec because %s was removed", crdName) + regenerationCounter.With(map[string]string{"crd": crdName, "reason": "remove"}) return c.updateSpecLocked() } // compute CRD spec and see whether it changed - oldSpecs, updated := c.crdSpecs[crd.Name] + oldSpecs, updated := c.getClusterCrdSpecs(crd.GetClusterName(), crd.Name) newSpecs, changed, err := buildVersionSpecs(crd, oldSpecs) if err != nil { return err @@ -184,13 +235,13 @@ func (c *Controller) sync(name string) error { } // update specs of this CRD - c.crdSpecs[crd.Name] = newSpecs - klog.V(2).Infof("Updating CRD OpenAPI spec because %s changed", name) + c.setClusterCrdSpecs(crd.GetClusterName(), crd.Name, newSpecs) + klog.V(2).Infof("Updating CRD OpenAPI spec because %s changed", crd.Name) reason := "add" if updated { reason = "update" } - regenerationCounter.With(map[string]string{"crd": name, "reason": reason}) + regenerationCounter.With(map[string]string{"crd": crd.Name, "reason": reason}) return c.updateSpecLocked() } @@ -222,16 +273,19 @@ func buildVersionSpecs(crd *apiextensionsv1.CustomResourceDefinition, oldSpecs m // It is not thread-safe. The caller is responsible to hold proper lock (Controller.lock). func (c *Controller) updateSpecLocked() error { crdSpecs := []*spec.Swagger{} - for _, versionSpecs := range c.crdSpecs { - for _, s := range versionSpecs { - crdSpecs = append(crdSpecs, s) + for clusterName, clusterCrdSpecs := range c.crdSpecs { + for _, versionSpecs := range clusterCrdSpecs { + for _, s := range versionSpecs { + crdSpecs = append(crdSpecs, s) + } } + mergedSpec, err := builder.MergeSpecs(c.staticSpec, crdSpecs...) + if err != nil { + return fmt.Errorf("failed to merge specs: %v", err) + } + return c.openAPIServiceProvider.ForCluster(clusterName).UpdateSpec(mergedSpec) } - mergedSpec, err := builder.MergeSpecs(c.staticSpec, crdSpecs...) - if err != nil { - return fmt.Errorf("failed to merge specs: %v", err) - } - return c.openAPIService.UpdateSpec(mergedSpec) + return nil } func (c *Controller) addCustomResourceDefinition(obj interface{}) { @@ -265,5 +319,6 @@ func (c *Controller) deleteCustomResourceDefinition(obj interface{}) { } func (c *Controller) enqueue(obj *apiextensionsv1.CustomResourceDefinition) { - c.queue.Add(obj.Name) + key, _ := cache.MetaNamespaceKeyFunc(obj) + c.queue.Add(key) } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go index d437b7551615a..940fd4f785734 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go @@ -41,6 +41,7 @@ import ( client "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" informers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1" listers "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" + "k8s.io/client-go/tools/clusters" ) // This controller is reserving names. To avoid conflicts, be sure to run only one instance of the worker at a time. @@ -86,7 +87,7 @@ func NewNamingConditionController( return c } -func (c *NamingConditionController) getAcceptedNamesForGroup(group string) (allResources sets.String, allKinds sets.String) { +func (c *NamingConditionController) getAcceptedNamesForGroup(clusterName, group string) (allResources sets.String, allKinds sets.String) { allResources = sets.String{} allKinds = sets.String{} @@ -100,11 +101,15 @@ func (c *NamingConditionController) getAcceptedNamesForGroup(group string) (allR continue } + if curr.GetClusterName() != clusterName { + continue + } + // for each item here, see if we have a mutation cache entry that is more recent // this makes sure that if we tight loop on update and run, our mutation cache will show // us the version of the objects we just updated to. item := curr - obj, exists, err := c.crdMutationCache.GetByKey(curr.Name) + obj, exists, err := c.crdMutationCache.GetByKey(clusters.ToClusterAwareKey(curr.GetClusterName(), curr.Name)) if exists && err == nil { item = obj.(*apiextensionsv1.CustomResourceDefinition) } @@ -122,7 +127,7 @@ func (c *NamingConditionController) getAcceptedNamesForGroup(group string) (allR func (c *NamingConditionController) calculateNamesAndConditions(in *apiextensionsv1.CustomResourceDefinition) (apiextensionsv1.CustomResourceDefinitionNames, apiextensionsv1.CustomResourceDefinitionCondition, apiextensionsv1.CustomResourceDefinitionCondition) { // Get the names that have already been claimed - allResources, allKinds := c.getAcceptedNamesForGroup(in.Spec.Group) + allResources, allKinds := c.getAcceptedNamesForGroup(in.GetClusterName(), in.Spec.Group) namesAcceptedCondition := apiextensionsv1.CustomResourceDefinitionCondition{ Type: apiextensionsv1.NamesAccepted, diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/storageversionhash.go b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/storageversionhash.go index d72d4ba207c75..69b1fc1c12e66 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/storageversionhash.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/storageversionhash.go @@ -25,8 +25,8 @@ import ( // tuple. // WARNING: this function is subject to change. Clients shouldn't depend on // this function. -func StorageVersionHash(group, version, kind string) string { - gvk := group + "/" + version + "/" + kind +func StorageVersionHash(clusterName, group, version, kind string) string { + gvk := clusterName + "/" + group + "/" + version + "/" + kind if gvk == "" { return "" } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go index 1989355e201b0..e18f0a259192d 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go @@ -44,7 +44,7 @@ type APIVersionHandler struct { serializer runtime.NegotiatedSerializer groupVersion schema.GroupVersion - apiResourceLister APIResourceLister + apiResourceLister func(*http.Request) APIResourceLister } func NewAPIVersionHandler(serializer runtime.NegotiatedSerializer, groupVersion schema.GroupVersion, apiResourceLister APIResourceLister) *APIVersionHandler { @@ -80,5 +80,5 @@ func (s *APIVersionHandler) handle(req *restful.Request, resp *restful.Response) func (s *APIVersionHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { responsewriters.WriteObjectNegotiated(s.serializer, negotiation.DefaultEndpointRestrictions, schema.GroupVersion{}, w, req, http.StatusOK, - &metav1.APIResourceList{GroupVersion: s.groupVersion.String(), APIResources: s.apiResourceLister.ListAPIResources()}) + &metav1.APIResourceList{GroupVersion: s.groupVersion.String(), APIResources: s.apiResourceLister(req).ListAPIResources()}) } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go index 8a57f88adbf20..f702b6c8f45be 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go @@ -17,29 +17,81 @@ limitations under the License. package discovery import ( + "net/http" "regexp" "sort" "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) // HACK: support the case when we can add core or other legacy scheme resources through CRDs (KCP scenario) -var ContributedResources map[schema.GroupVersion]APIResourceLister = map[schema.GroupVersion]APIResourceLister{} +// Possibly we wouldn't need a global variable for ContributedResources that is cluster scoped, +// In the long run we could see the context carrying an injected interface that would let us perform +// some of these cluster scoped behaviors (where we would call methods on it instead of having lots of little caches everywhere). +// Finally with more refactoring we might also just want to skip having the cache and do it dynamically. +var ContributedResources map[ClusterGroupVersion]APIResourceLister = map[ClusterGroupVersion]APIResourceLister{} -func withContributedResources(groupVersion schema.GroupVersion, apiResourceLister APIResourceLister) APIResourceLister { - return APIResourceListerFunc(func() []metav1.APIResource { - result := apiResourceLister.ListAPIResources() - if additionalResources := ContributedResources[groupVersion]; additionalResources != nil { - result = append(result, additionalResources.ListAPIResources()...) - } - sort.Slice(result, func(i, j int) bool { - return result[i].Name < result[j].Name - }) +type ClusterGroupVersion struct { + ClusterName string + Group string + Version string +} + +// Empty returns true if group and version are empty +func (cgv ClusterGroupVersion) Empty() bool { + return len(cgv.Group) == 0 && len(cgv.Version) == 0 +} + +// String puts "group" and "version" into a single "group/version" string. For the legacy v1 +// it returns "v1". +func (cgv ClusterGroupVersion) String() string { + // special case the internal apiVersion for the legacy kube types + if cgv.Empty() { + return "" + } + + gv := cgv.Group + "/" + cgv.Version + // special case of "v1" for backward compatibility + if len(cgv.Group) == 0 && cgv.Version == "v1" { + gv = cgv.Version + } + result := gv + if cgv.ClusterName != "" { + result = cgv.ClusterName + "/" + gv + } + return result +} + +func (cgv ClusterGroupVersion) GroupVersion() schema.GroupVersion { + return schema.GroupVersion{ + Group: cgv.Group, + Version: cgv.Version, + } +} - return result - }) +func withContributedResources(groupVersion schema.GroupVersion, apiResourceLister APIResourceLister) func(*http.Request) APIResourceLister { + return func(req *http.Request) APIResourceLister { + cluster := genericapirequest.ClusterFrom(req.Context()) + return APIResourceListerFunc(func() []metav1.APIResource { + result := []metav1.APIResource{} + result = append(result, apiResourceLister.ListAPIResources()...) + if cluster != nil { + if additionalResources := ContributedResources[ClusterGroupVersion{ + ClusterName: cluster.Name, + Group: groupVersion.Group, + Version: groupVersion.Version}]; additionalResources != nil { + result = append(result, additionalResources.ListAPIResources()...) + } + sort.Slice(result, func(i, j int) bool { + return result[i].Name < result[j].Name + }) + } + return result + }) + } } // IsAPIContributed returns `true` is the path corresponds to a resource that diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go index 13d703afb2871..e4ac014261ad1 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go @@ -405,7 +405,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag if err != nil { return nil, nil, err } - apiResource.StorageVersionHash = discovery.StorageVersionHash(gvk.Group, gvk.Version, gvk.Kind) + apiResource.StorageVersionHash = discovery.StorageVersionHash("", gvk.Group, gvk.Version, gvk.Kind) } // Get the list of actions for the given scope. diff --git a/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go b/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go index 954c61756dfc6..c8c493ec70626 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go +++ b/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go @@ -51,7 +51,6 @@ import ( "k8s.io/klog/v2" openapibuilder2 "k8s.io/kube-openapi/pkg/builder" openapicommon "k8s.io/kube-openapi/pkg/common" - "k8s.io/kube-openapi/pkg/handler" "k8s.io/kube-openapi/pkg/handler3" openapiutil "k8s.io/kube-openapi/pkg/util" openapiproto "k8s.io/kube-openapi/pkg/util/proto" @@ -143,7 +142,7 @@ type GenericAPIServer struct { // OpenAPIVersionedService controls the /openapi/v2 endpoint, and can be used to update the served spec. // It is set during PrepareRun if `openAPIConfig` is non-nil unless `skipOpenAPIInstallation` is true. - OpenAPIVersionedService *handler.OpenAPIService + OpenAPIVersionedService routes.OpenAPIServiceProvider // OpenAPIV3VersionedService controls the /openapi/v3 endpoint and can be used to update the served spec. // It is set during PrepareRun if `openAPIConfig` is non-nil unless `skipOpenAPIInstallation` is true. @@ -251,7 +250,7 @@ type DelegationTarget interface { HealthzChecks() []healthz.HealthChecker // ListedPaths returns the paths for supporting an index - ListedPaths() []string + ListedPaths(clusterName string) []string // NextDelegate returns the next delegationTarget in the chain of delegations NextDelegate() DelegationTarget @@ -276,8 +275,8 @@ func (s *GenericAPIServer) PreShutdownHooks() map[string]preShutdownHookEntry { func (s *GenericAPIServer) HealthzChecks() []healthz.HealthChecker { return s.healthzChecks } -func (s *GenericAPIServer) ListedPaths() []string { - return s.listedPathProvider.ListedPaths() +func (s *GenericAPIServer) ListedPaths(clusterName string) []string { + return s.listedPathProvider.ListedPaths(clusterName) } func (s *GenericAPIServer) NextDelegate() DelegationTarget { @@ -325,7 +324,7 @@ func (s emptyDelegate) PreShutdownHooks() map[string]preShutdownHookEntry { func (s emptyDelegate) HealthzChecks() []healthz.HealthChecker { return []healthz.HealthChecker{} } -func (s emptyDelegate) ListedPaths() []string { +func (s emptyDelegate) ListedPaths(clusterName string) []string { return []string{} } func (s emptyDelegate) NextDelegate() DelegationTarget { diff --git a/staging/src/k8s.io/apiserver/pkg/server/handler.go b/staging/src/k8s.io/apiserver/pkg/server/handler.go index 85d8af1ce3f60..fa5c064e9e2ae 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/handler.go +++ b/staging/src/k8s.io/apiserver/pkg/server/handler.go @@ -64,6 +64,8 @@ type APIServerHandler struct { // we should consider completely removing gorestful. // Other servers should only use this opaquely to delegate to an API server. Director http.Handler + + PathValidForCluster func(path, clusterName string) bool } // HandlerChainBuilderFn is used to wrap the GoRestfulContainer handler using the provided handler chain. @@ -101,13 +103,18 @@ func NewAPIServerHandler(name string, s runtime.NegotiatedSerializer, handlerCha } // ListedPaths returns the paths that should be shown under / -func (a *APIServerHandler) ListedPaths() []string { +func (a *APIServerHandler) ListedPaths(clusterName string) []string { var handledPaths []string // Extract the paths handled using restful.WebService for _, ws := range a.GoRestfulContainer.RegisteredWebServices() { handledPaths = append(handledPaths, ws.RootPath()) } - handledPaths = append(handledPaths, a.NonGoRestfulMux.ListedPaths()...) + + for _, path := range a.NonGoRestfulMux.ListedPaths("") { + if a.PathValidForCluster == nil || a.PathValidForCluster(path, clusterName) { + handledPaths = append(handledPaths, path) + } + } sort.Strings(handledPaths) return handledPaths diff --git a/staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go b/staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go index cb4941f0261aa..3bd0dd5f0c626 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go +++ b/staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go @@ -95,7 +95,7 @@ func NewPathRecorderMux(name string) *PathRecorderMux { } // ListedPaths returns the registered handler exposedPaths. -func (m *PathRecorderMux) ListedPaths() []string { +func (m *PathRecorderMux) ListedPaths(clusterName string) []string { handledPaths := append([]string{}, m.exposedPaths...) sort.Strings(handledPaths) diff --git a/staging/src/k8s.io/apiserver/pkg/server/routes/index.go b/staging/src/k8s.io/apiserver/pkg/server/routes/index.go index 14075798867cc..0146bfd88fe6a 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/routes/index.go +++ b/staging/src/k8s.io/apiserver/pkg/server/routes/index.go @@ -22,23 +22,24 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/server/mux" ) // ListedPathProvider is an interface for providing paths that should be reported at /. type ListedPathProvider interface { // ListedPaths is an alphabetically sorted list of paths to be reported at /. - ListedPaths() []string + ListedPaths(clusterName string) []string } // ListedPathProviders is a convenient way to combine multiple ListedPathProviders type ListedPathProviders []ListedPathProvider // ListedPaths unions and sorts the included paths. -func (p ListedPathProviders) ListedPaths() []string { +func (p ListedPathProviders) ListedPaths(clusterName string) []string { ret := sets.String{} for _, provider := range p { - for _, path := range provider.ListedPaths() { + for _, path := range provider.ListedPaths(clusterName) { ret.Insert(path) } } @@ -65,5 +66,10 @@ type IndexLister struct { // ServeHTTP serves the available paths. func (i IndexLister) ServeHTTP(w http.ResponseWriter, r *http.Request) { - responsewriters.WriteRawJSON(i.StatusCode, metav1.RootPaths{Paths: i.PathProvider.ListedPaths()}, w) + clusterName, err := genericapirequest.ClusterNameFrom(r.Context()) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + responsewriters.WriteRawJSON(i.StatusCode, metav1.RootPaths{Paths: i.PathProvider.ListedPaths(clusterName)}, w) } diff --git a/staging/src/k8s.io/apiserver/pkg/server/routes/openapi.go b/staging/src/k8s.io/apiserver/pkg/server/routes/openapi.go index 44e463532ae4b..7073b8f16cf4a 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/routes/openapi.go +++ b/staging/src/k8s.io/apiserver/pkg/server/routes/openapi.go @@ -17,9 +17,12 @@ limitations under the License. package routes import ( + "net/http" + restful "github.com/emicklei/go-restful" "k8s.io/klog/v2" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/server/mux" builder2 "k8s.io/kube-openapi/pkg/builder" "k8s.io/kube-openapi/pkg/builder3" @@ -34,24 +37,140 @@ type OpenAPI struct { Config *common.Config } -// Install adds the SwaggerUI webservice to the given mux. -func (oa OpenAPI) InstallV2(c *restful.Container, mux *mux.PathRecorderMux) (*handler.OpenAPIService, *spec.Swagger) { - spec, err := builder2.BuildOpenAPISpec(c.RegisteredWebServices(), oa.Config) - if err != nil { - klog.Fatalf("Failed to build open api spec for root: %v", err) +// OpenAPIServiceProvider is a hacky way to +// replace a single OpenAPIService by a provider which will +// provide an distinct openAPIService per logical cluster. +// This is required to implement CRD tenancy and have the openAPI +// models be conistent with the current logical cluster. +// +// However this is just a first step, since a better way +// would be to completly avoid the need of registering a OpenAPIService +// for each logical cluster. See the addition comments below. +type OpenAPIServiceProvider interface { + ForCluster(clusterName string) *handler.OpenAPIService + AddCuster(clusterName string) + RemoveCuster(clusterName string) + UpdateSpec(openapiSpec *spec.Swagger) error +} + +type clusterAwarePathHandler struct { + clusterName string + addHandlerForCluster func(clusterName string, handler http.Handler) +} + +func (c *clusterAwarePathHandler) Handle(path string, handler http.Handler) { + c.addHandlerForCluster(c.clusterName, handler) +} + +// HACK: This is the implementation of OpenAPIServiceProvider +// that allows supporting several logical clusters for CRD tenancy. +// +// However this should be conisdered a temporary step, to cope with the +// current design of OpenAPI publishing. But having to register every logical +// cluster creates more cost on creating logical clusters. +// Instead, we'd expect us to slowly refactor the openapi generation code so +// that it can be used dynamically, and time limited or size limited openapi caches +// would be used to serve the calculated version. +// Finally a development princple for the logical cluster prototype would be +// - don't do static registration of logical clusters +// - do lazy instantiation wherever possible so that starting a new logical cluster remains as cheap as possible +type openAPIServiceProvider struct { + staticSpec *spec.Swagger + defaultOpenAPIServiceHandler http.Handler + defaultOpenAPIService *handler.OpenAPIService + openAPIServices map[string]*handler.OpenAPIService + handlers map[string]http.Handler + path string + mux *mux.PathRecorderMux +} + +var _ OpenAPIServiceProvider = (*openAPIServiceProvider)(nil) + +func (p *openAPIServiceProvider) ForCluster(clusterName string) *handler.OpenAPIService { + return p.openAPIServices[clusterName] +} + +func (p *openAPIServiceProvider) AddCuster(clusterName string) { + if _, found := p.openAPIServices[clusterName]; !found { + openAPIVersionedService, err := handler.NewOpenAPIService(p.staticSpec) + if err != nil { + klog.Fatalf("Failed to create OpenAPIService: %v", err) + } + + if err = openAPIVersionedService.RegisterOpenAPIVersionedService(p.path, &clusterAwarePathHandler{ + clusterName: clusterName, + addHandlerForCluster: func(clusterName string, handler http.Handler) { + p.handlers[clusterName] = handler + }, + }); err != nil { + klog.Fatalf("Failed to register versioned open api spec for root: %v", err) + } + p.openAPIServices[clusterName] = openAPIVersionedService } - spec.Definitions = handler.PruneDefaults(spec.Definitions) - openAPIVersionedService, err := handler.NewOpenAPIService(spec) +} + +func (p *openAPIServiceProvider) RemoveCuster(clusterName string) { + delete(p.openAPIServices, clusterName) + delete(p.handlers, clusterName) +} + +func (p *openAPIServiceProvider) ServeHTTP(resp http.ResponseWriter, req *http.Request) { + cluster := genericapirequest.ClusterFrom(req.Context()) + if cluster == nil { + p.defaultOpenAPIServiceHandler.ServeHTTP(resp, req) + return + } + handler, found := p.handlers[cluster.Name] + if !found { + resp.WriteHeader(404) + return + } + handler.ServeHTTP(resp, req) +} + +func (o *openAPIServiceProvider) UpdateSpec(openapiSpec *spec.Swagger) (err error) { + return o.defaultOpenAPIService.UpdateSpec(openapiSpec) +} + +func (p *openAPIServiceProvider) Register() { + defaultOpenAPIService, err := handler.NewOpenAPIService(p.staticSpec) if err != nil { klog.Fatalf("Failed to create OpenAPIService: %v", err) } - err = openAPIVersionedService.RegisterOpenAPIVersionedService("/openapi/v2", mux) + err = defaultOpenAPIService.RegisterOpenAPIVersionedService(p.path, &clusterAwarePathHandler{ + clusterName: "", + addHandlerForCluster: func(clusterName string, handler http.Handler) { + p.defaultOpenAPIServiceHandler = handler + }, + }) if err != nil { klog.Fatalf("Failed to register versioned open api spec for root: %v", err) } - return openAPIVersionedService, spec + p.defaultOpenAPIService = defaultOpenAPIService + p.mux.Handle(p.path, p) +} + +// Install adds the SwaggerUI webservice to the given mux. +func (oa OpenAPI) InstallV2(c *restful.Container, mux *mux.PathRecorderMux) (OpenAPIServiceProvider, *spec.Swagger) { + spec, err := builder2.BuildOpenAPISpec(c.RegisteredWebServices(), oa.Config) + if err != nil { + klog.Fatalf("Failed to build open api spec for root: %v", err) + } + spec.Definitions = handler.PruneDefaults(spec.Definitions) + + provider := &openAPIServiceProvider{ + mux: mux, + staticSpec: spec, + openAPIServices: map[string]*handler.OpenAPIService{}, + handlers: map[string]http.Handler{}, + path: "/openapi/v2", + } + + provider.Register() + + return provider, spec } // InstallV3 adds the static group/versions defined in the RegisteredWebServices to the OpenAPI v3 spec diff --git a/staging/src/k8s.io/client-go/tools/cache/store.go b/staging/src/k8s.io/client-go/tools/cache/store.go index 24ffabab7b51b..a325798db3c09 100644 --- a/staging/src/k8s.io/client-go/tools/cache/store.go +++ b/staging/src/k8s.io/client-go/tools/cache/store.go @@ -21,6 +21,7 @@ import ( "strings" "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/client-go/tools/clusters" ) // Store is a generic object storage and processing interface. A @@ -105,14 +106,16 @@ func MetaNamespaceKeyFunc(obj interface{}) (string, error) { if key, ok := obj.(ExplicitKey); ok { return string(key), nil } - meta, err := meta.Accessor(obj) + metaObj, err := meta.Accessor(obj) if err != nil { return "", fmt.Errorf("object has no meta: %v", err) } - if len(meta.GetNamespace()) > 0 { - return meta.GetNamespace() + "/" + meta.GetName(), nil + + name := clusters.ToClusterAwareKey(metaObj.GetClusterName(), metaObj.GetName()) + if len(metaObj.GetNamespace()) > 0 { + return metaObj.GetNamespace() + "/" + name, nil } - return meta.GetName(), nil + return name, nil } // SplitMetaNamespaceKey returns the namespace and name that diff --git a/staging/src/k8s.io/client-go/tools/clusters/cache.go b/staging/src/k8s.io/client-go/tools/clusters/cache.go new file mode 100644 index 0000000000000..ed7834a688f35 --- /dev/null +++ b/staging/src/k8s.io/client-go/tools/clusters/cache.go @@ -0,0 +1,30 @@ +package clusters + +import "strings" + +// ToClusterAwareKey allows combining the object name and +// the object cluster in a single key that can be used by informers. +// This is KCP-related hack useful when watching across several +// logical clusters using a wildcard context cluster +// +// This is a temporary hack and should be replaced by thoughtful +// and real support of logical cluster in the client-go layer +func ToClusterAwareKey(clusterName, name string) string { + if clusterName != "" { + return clusterName + "#$#" + name + } + + return name +} + +// ToClusterAwareKey just allows extract the name and clusterName +// from a Key initially created with ToClusterAwareKey +func SplitClusterAwareKey(clusterAwareKey string) (clusterName, name string) { + parts := strings.SplitN(clusterAwareKey, "#$#", 2) + if len(parts) == 1 { + // name only, no cluster + return "", parts[0] + } + // clusterName and name + return parts[0], parts[1] +} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go index 45223e53cd8d8..c704ec76a86ac 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go @@ -38,6 +38,7 @@ import ( openapicommon "k8s.io/kube-openapi/pkg/common" "k8s.io/apiserver/pkg/server/dynamiccertificates" + "k8s.io/client-go/tools/clusters" v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" v1helper "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/helper" "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" @@ -134,6 +135,9 @@ type APIAggregator struct { // handledGroups are the groups that already have routes handledGroups sets.String + // pathToClusters is a map that provids a list of clusters for which a given path is to be visible + pathToClusters map[string][]string + // lister is used to add group handling for /apis/ aggregator lookups based on // controller state lister listers.APIServiceLister @@ -202,6 +206,7 @@ func (c completedConfig) NewWithDelegate(delegationTarget genericapiserver.Deleg delegateHandler: delegationTarget.UnprotectedHandler(), proxyTransport: c.ExtraConfig.ProxyTransport, proxyHandlers: map[string]*proxyHandler{}, + pathToClusters: map[string][]string{}, handledGroups: sets.String{}, lister: informerFactory.Apiregistration().V1().APIServices().Lister(), APIRegistrationInformers: informerFactory, @@ -211,6 +216,21 @@ func (c completedConfig) NewWithDelegate(delegationTarget genericapiserver.Deleg proxyCurrentCertKeyContent: func() (bytes []byte, bytes2 []byte) { return nil, nil }, } + s.GenericAPIServer.Handler.PathValidForCluster = func(path, clusterName string) bool { + clusters, found := s.pathToClusters[path] + if !found { + return true + } + + for _, cluster := range clusters { + if cluster == clusterName { + return true + } + } + + return false + } + // used later to filter the served resource by those that have expired. resourceExpirationEvaluator, err := genericapiserver.NewResourceExpirationEvaluator(*c.GenericConfig.Version) if err != nil { @@ -431,6 +451,12 @@ func (s *APIAggregator) AddAPIService(apiService *v1.APIService) error { s.openAPIV3AggregationController.AddAPIService(proxyHandler, apiService) } s.proxyHandlers[apiService.Name] = proxyHandler + + if !IsVersionForAllClusters(apiService.Spec) { + s.pathToClusters[proxyPath] = append(s.pathToClusters[proxyPath], apiService.GetClusterName()) + s.pathToClusters[proxyPath+"/"] = append(s.pathToClusters[proxyPath+"/"], apiService.GetClusterName()) + } + s.GenericAPIServer.Handler.NonGoRestfulMux.Handle(proxyPath, proxyHandler) s.GenericAPIServer.Handler.NonGoRestfulMux.UnlistedHandlePrefix(proxyPath+"/", proxyHandler) @@ -453,6 +479,11 @@ func (s *APIAggregator) AddAPIService(apiService *v1.APIService) error { delegate: s.delegateHandler, } // aggregation is protected + + if !IsGroupForAllClusters(apiService.Spec.Group) { + s.pathToClusters[groupPath] = append(s.pathToClusters[groupPath], apiService.GetClusterName()) + s.pathToClusters[groupPath+"/"] = s.pathToClusters[groupPath] + } s.GenericAPIServer.Handler.NonGoRestfulMux.Handle(groupPath, groupDiscoveryHandler) s.GenericAPIServer.Handler.NonGoRestfulMux.UnlistedHandle(groupPath+"/", groupDiscoveryHandler) s.handledGroups.Insert(apiService.Spec.Group) @@ -461,7 +492,8 @@ func (s *APIAggregator) AddAPIService(apiService *v1.APIService) error { // RemoveAPIService removes the APIService from being handled. It is not thread-safe, so only call it on one thread at a time please. // It's a slow moving API, so it's ok to run the controller on a single thread. -func (s *APIAggregator) RemoveAPIService(apiServiceName string) { +func (s *APIAggregator) RemoveAPIService(clusterAndApiServiceName string) { + clusterName, apiServiceName := clusters.SplitClusterAwareKey(clusterAndApiServiceName) version := v1helper.APIServiceNameToGroupVersion(apiServiceName) proxyPath := "/apis/" + version.Group + "/" + version.Version @@ -469,18 +501,32 @@ func (s *APIAggregator) RemoveAPIService(apiServiceName string) { if apiServiceName == legacyAPIServiceName { proxyPath = "/api" } - s.GenericAPIServer.Handler.NonGoRestfulMux.Unregister(proxyPath) - s.GenericAPIServer.Handler.NonGoRestfulMux.Unregister(proxyPath + "/") - if s.openAPIAggregationController != nil { - s.openAPIAggregationController.RemoveAPIService(apiServiceName) - } - if s.openAPIV3AggregationController != nil { - s.openAPIAggregationController.RemoveAPIService(apiServiceName) - } - delete(s.proxyHandlers, apiServiceName) - // TODO unregister group level discovery when there are no more versions for the group - // We don't need this right away because the handler properly delegates when no versions are present + if clusterName != "" { + newPathToClusters := sets.NewString(s.pathToClusters[proxyPath]...).Delete(clusterName).List() + + if len(newPathToClusters) > 0 { + s.pathToClusters[proxyPath] = newPathToClusters + s.pathToClusters[proxyPath+"/"] = s.pathToClusters[proxyPath] + } else { + s.GenericAPIServer.Handler.NonGoRestfulMux.Unregister(proxyPath) + s.GenericAPIServer.Handler.NonGoRestfulMux.Unregister(proxyPath + "/") + if s.openAPIAggregationController != nil { + s.openAPIAggregationController.RemoveAPIService(apiServiceName) + } + if s.openAPIV3AggregationController != nil { + s.openAPIAggregationController.RemoveAPIService(apiServiceName) + } + delete(s.proxyHandlers, apiServiceName) + + // TODO unregister group level discovery when there are no more versions for the group + // We don't need this right away because the handler properly delegates when no versions are present + + delete(s.pathToClusters, proxyPath) + delete(s.pathToClusters, proxyPath+"/") + } + + } } // DefaultAPIResourceConfigSource returns default configuration for an APIResource. diff --git a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go index 52df3cb25fad2..2ead7d721186b 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go @@ -38,7 +38,7 @@ import ( // APIHandlerManager defines the behaviour that an API handler should have. type APIHandlerManager interface { AddAPIService(apiService *v1.APIService) error - RemoveAPIService(apiServiceName string) + RemoveAPIService(clusterAndApiServiceName string) } // APIServiceRegistrationController is responsible for registering and removing API services. diff --git a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_apis.go b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_apis.go index c014e044aad7e..b52ce7fb6b4aa 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_apis.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_apis.go @@ -28,10 +28,13 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" + extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" apiregistrationv1api "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" apiregistrationv1apihelper "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/helper" apiregistrationv1beta1api "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" listers "k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1" + "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" ) // apisHandler serves the `/apis` endpoint. @@ -74,6 +77,12 @@ func (r *apisHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { Groups: []metav1.APIGroup{r.discoveryGroup}, } + clusterName, err := genericapirequest.ClusterNameFrom(req.Context()) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + apiServices, err := r.lister.List(labels.Everything()) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) @@ -85,7 +94,7 @@ func (r *apisHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { if len(apiGroupServers[0].Spec.Group) == 0 { continue } - discoveryGroup := convertToDiscoveryAPIGroup(apiGroupServers) + discoveryGroup := convertToDiscoveryAPIGroup(clusterName, apiGroupServers) if discoveryGroup != nil { discoveryGroupList.Groups = append(discoveryGroupList.Groups, *discoveryGroup) } @@ -94,14 +103,31 @@ func (r *apisHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { responsewriters.WriteObjectNegotiated(r.codecs, negotiation.DefaultEndpointRestrictions, schema.GroupVersion{}, w, req, http.StatusOK, discoveryGroupList) } +func IsVersionForAllClusters(serviceSpec apiregistrationv1api.APIServiceSpec) bool { + return genericcontrolplanescheme.Scheme.IsVersionRegistered(schema.GroupVersion{ + Group: serviceSpec.Group, + Version: serviceSpec.Version, + }) || extensionsapiserver.Scheme.IsVersionRegistered(schema.GroupVersion{ + Group: serviceSpec.Group, + Version: serviceSpec.Version, + }) +} + +func IsGroupForAllClusters(group string) bool { + return genericcontrolplanescheme.Scheme.IsGroupRegistered(group) || extensionsapiserver.Scheme.IsGroupRegistered(group) +} + // convertToDiscoveryAPIGroup takes apiservices in a single group and returns a discovery compatible object. // if none of the services are available, it will return nil. -func convertToDiscoveryAPIGroup(apiServices []*apiregistrationv1api.APIService) *metav1.APIGroup { +func convertToDiscoveryAPIGroup(clusterName string, apiServices []*apiregistrationv1api.APIService) *metav1.APIGroup { apiServicesByGroup := apiregistrationv1apihelper.SortedByGroupAndVersion(apiServices)[0] var discoveryGroup *metav1.APIGroup - for _, apiService := range apiServicesByGroup { + + if !IsVersionForAllClusters(apiService.Spec) && apiService.GetClusterName() != clusterName { + continue + } // the first APIService which is valid becomes the default if discoveryGroup == nil { discoveryGroup = &metav1.APIGroup{ @@ -135,6 +161,12 @@ type apiGroupHandler struct { } func (r *apiGroupHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { + clusterName, err := genericapirequest.ClusterNameFrom(req.Context()) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + apiServices, err := r.lister.List(labels.Everything()) if statusErr, ok := err.(*apierrors.StatusError); ok { responsewriters.WriteRawJSON(int(statusErr.Status().Code), statusErr.Status(), w) @@ -147,7 +179,7 @@ func (r *apiGroupHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { apiServicesForGroup := []*apiregistrationv1api.APIService{} for _, apiService := range apiServices { - if apiService.Spec.Group == r.groupName { + if apiService.Spec.Group == r.groupName && apiService.GetClusterName() == clusterName { apiServicesForGroup = append(apiServicesForGroup, apiService) } } @@ -157,7 +189,7 @@ func (r *apiGroupHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { return } - discoveryGroup := convertToDiscoveryAPIGroup(apiServicesForGroup) + discoveryGroup := convertToDiscoveryAPIGroup(clusterName, apiServicesForGroup) if discoveryGroup == nil { http.Error(w, "", http.StatusNotFound) return diff --git a/staging/src/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go b/staging/src/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go index fe40f595a3736..ef68639d41c02 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go @@ -33,6 +33,8 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/client-go/tools/clusters" v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" apiregistrationclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1" informers "k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1" @@ -58,7 +60,7 @@ type AutoAPIServiceRegistration interface { // AddAPIServiceToSync adds an API service to sync continuously. AddAPIServiceToSync(in *v1.APIService) // RemoveAPIServiceToSync removes an API service to auto-register. - RemoveAPIServiceToSync(name string) + RemoveAPIServiceToSync(clusterAndName string) } // autoRegisterController is used to keep a particular set of APIServices present in the API. It is useful @@ -71,7 +73,7 @@ type autoRegisterController struct { apiServicesToSyncLock sync.RWMutex apiServicesToSync map[string]*v1.APIService - syncHandler func(apiServiceName string) error + syncHandler func(clusterAndApiServiceName string) error // track which services we have synced syncedSuccessfullyLock *sync.RWMutex @@ -104,11 +106,11 @@ func NewAutoRegisterController(apiServiceInformer informers.APIServiceInformer, apiServiceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { cast := obj.(*v1.APIService) - c.queue.Add(cast.Name) + c.queue.Add(clusters.ToClusterAwareKey(cast.GetClusterName(), cast.Name)) }, UpdateFunc: func(_, obj interface{}) { cast := obj.(*v1.APIService) - c.queue.Add(cast.Name) + c.queue.Add(clusters.ToClusterAwareKey(cast.GetClusterName(), cast.Name)) }, DeleteFunc: func(obj interface{}) { cast, ok := obj.(*v1.APIService) @@ -124,7 +126,7 @@ func NewAutoRegisterController(apiServiceInformer informers.APIServiceInformer, return } } - c.queue.Add(cast.Name) + c.queue.Add(clusters.ToClusterAwareKey(cast.GetClusterName(), cast.Name)) }, }) @@ -149,7 +151,7 @@ func (c *autoRegisterController) Run(workers int, stopCh <-chan struct{}) { // record APIService objects that existed when we started if services, err := c.apiServiceLister.List(labels.Everything()); err == nil { for _, service := range services { - c.apiServicesAtStart[service.Name] = true + c.apiServicesAtStart[clusters.ToClusterAwareKey(service.GetClusterName(), service.Name)] = true } } @@ -212,16 +214,16 @@ func (c *autoRegisterController) processNextWorkItem() bool { // 4. current: sync on start, not present at start | - | - | - // 5. current: sync on start, present at start | delete once | update once | update once // 6. current: sync always | delete | update once | update -func (c *autoRegisterController) checkAPIService(name string) (err error) { - desired := c.GetAPIServiceToSync(name) - curr, err := c.apiServiceLister.Get(name) +func (c *autoRegisterController) checkAPIService(clusterAndName string) (err error) { + desired := c.GetAPIServiceToSync(clusterAndName) + curr, err := c.apiServiceLister.Get(clusterAndName) // if we've never synced this service successfully, record a successful sync. - hasSynced := c.hasSyncedSuccessfully(name) + hasSynced := c.hasSyncedSuccessfully(clusterAndName) if !hasSynced { defer func() { if err == nil { - c.setSyncedSuccessfully(name) + c.setSyncedSuccessfully(clusterAndName) } }() } @@ -241,7 +243,10 @@ func (c *autoRegisterController) checkAPIService(name string) (err error) { // we don't have an entry and we do want one (2B,2C) case apierrors.IsNotFound(err) && desired != nil: - _, err := c.apiServiceClient.APIServices().Create(context.TODO(), desired, metav1.CreateOptions{}) + context := genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{ + Name: desired.GetClusterName(), + }) + _, err := c.apiServiceClient.APIServices().Create(context, desired, metav1.CreateOptions{}) if apierrors.IsAlreadyExists(err) { // created in the meantime, we'll get called again return nil @@ -253,7 +258,7 @@ func (c *autoRegisterController) checkAPIService(name string) (err error) { return nil // the remote object only wants to sync on start, but was added after we started (4A,4B,4C) - case isAutomanagedOnStart(curr) && !c.apiServicesAtStart[name]: + case isAutomanagedOnStart(curr) && !c.apiServicesAtStart[clusterAndName]: return nil // the remote object only wants to sync on start and has already synced (5A,5B,5C "once" enforcement) @@ -263,7 +268,10 @@ func (c *autoRegisterController) checkAPIService(name string) (err error) { // we have a spurious APIService that we're managing, delete it (5A,6A) case desired == nil: opts := metav1.DeleteOptions{Preconditions: metav1.NewUIDPreconditions(string(curr.UID))} - err := c.apiServiceClient.APIServices().Delete(context.TODO(), curr.Name, opts) + context := genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{ + Name: curr.GetClusterName(), + }) + err := c.apiServiceClient.APIServices().Delete(context, curr.Name, opts) if apierrors.IsNotFound(err) || apierrors.IsConflict(err) { // deleted or changed in the meantime, we'll get called again return nil @@ -287,11 +295,11 @@ func (c *autoRegisterController) checkAPIService(name string) (err error) { } // GetAPIServiceToSync gets a single API service to sync. -func (c *autoRegisterController) GetAPIServiceToSync(name string) *v1.APIService { +func (c *autoRegisterController) GetAPIServiceToSync(clusterAndName string) *v1.APIService { c.apiServicesToSyncLock.RLock() defer c.apiServicesToSyncLock.RUnlock() - return c.apiServicesToSync[name] + return c.apiServicesToSync[clusterAndName] } // AddAPIServiceToSyncOnStart registers an API service to sync only when the controller starts. @@ -314,29 +322,30 @@ func (c *autoRegisterController) addAPIServiceToSync(in *v1.APIService, syncType } apiService.Labels[AutoRegisterManagedLabel] = syncType - c.apiServicesToSync[apiService.Name] = apiService - c.queue.Add(apiService.Name) + clusterAndName := clusters.ToClusterAwareKey(apiService.GetClusterName(), apiService.Name) + c.apiServicesToSync[clusterAndName] = apiService + c.queue.Add(clusterAndName) } // RemoveAPIServiceToSync deletes a registered APIService. -func (c *autoRegisterController) RemoveAPIServiceToSync(name string) { +func (c *autoRegisterController) RemoveAPIServiceToSync(clusterAndName string) { c.apiServicesToSyncLock.Lock() defer c.apiServicesToSyncLock.Unlock() - delete(c.apiServicesToSync, name) - c.queue.Add(name) + delete(c.apiServicesToSync, clusterAndName) + c.queue.Add(clusterAndName) } -func (c *autoRegisterController) hasSyncedSuccessfully(name string) bool { +func (c *autoRegisterController) hasSyncedSuccessfully(clusterAndName string) bool { c.syncedSuccessfullyLock.RLock() defer c.syncedSuccessfullyLock.RUnlock() - return c.syncedSuccessfully[name] + return c.syncedSuccessfully[clusterAndName] } -func (c *autoRegisterController) setSyncedSuccessfully(name string) { +func (c *autoRegisterController) setSyncedSuccessfully(clusterAndName string) { c.syncedSuccessfullyLock.Lock() defer c.syncedSuccessfullyLock.Unlock() - c.syncedSuccessfully[name] = true + c.syncedSuccessfully[clusterAndName] = true } func automanagedType(service *v1.APIService) string { diff --git a/staging/src/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/aggregator.go b/staging/src/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/aggregator.go index f9b78ddaa54f1..b1bae9c497628 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/aggregator.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/aggregator.go @@ -99,7 +99,7 @@ func BuildAndRegisterAggregator(downloader *Downloader, delegationTarget server. // ignore errors for the empty delegate we attach at the end the chain // atm the empty delegate returns 503 when the server hasn't been fully initialized // and the spec downloader only silences 404s - if len(delegate.ListedPaths()) == 0 && delegate.NextDelegate() == nil { + if len(delegate.ListedPaths("")) == 0 && delegate.NextDelegate() == nil { continue } return nil, err diff --git a/test/e2e/apimachinery/discovery.go b/test/e2e/apimachinery/discovery.go index 0fd964915713b..a08b4af0225d0 100644 --- a/test/e2e/apimachinery/discovery.go +++ b/test/e2e/apimachinery/discovery.go @@ -67,7 +67,7 @@ var _ = SIGDescribe("Discovery", func() { // is an implementation detail, which shouldn't be relied on by // the clients. The following calculation is for test purpose // only. - expected := discovery.StorageVersionHash(spec.Group, storageVersion, spec.Names.Kind) + expected := discovery.StorageVersionHash(testcrd.Crd.GetClusterName(), spec.Group, storageVersion, spec.Names.Kind) for _, r := range resources.APIResources { if r.Name == spec.Names.Plural { From 84f23923424e9f67a8f86c3bf3da46bb5fb82006 Mon Sep 17 00:00:00 2001 From: David Festal Date: Mon, 20 Sep 2021 14:04:49 +0200 Subject: [PATCH 19/87] HACK: Better support client-go scheme CRDs In some contexts, like the controller-runtime library used by the Operator SDK, all the resources of the client-go scheme are created / updated using the protobuf content type. However when these resources are in fact added as CRDs, in the KCP minimal API server scenario, these resources cannot be created / updated since the protobuf (de)serialization is not supported for CRDs. So in this case we just convert the protobuf request to a Json one (using the `client-go` scheme decoder/encoder), before letting the CRD handler serve it. A real, long-term and non-hacky, fix for this problem would be as follows: When a request for an unsupported serialization is returned, the server should reject it with a 406 and provide a list of supported content types. client-go should then examine whether it can satisfy such a request by encoding the object with a different scheme. This would require a KEP but is in keeping with content negotiation on GET / WATCH in Kube Signed-off-by: David Festal --- .../pkg/apiserver/customresource_handler.go | 70 ++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index 1fce7a4a34920..7698a83073d60 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -17,7 +17,9 @@ limitations under the License. package apiserver import ( + "bytes" "fmt" + "io/ioutil" "net/http" "path" "sort" @@ -83,6 +85,7 @@ import ( utilopenapi "k8s.io/apiserver/pkg/util/openapi" "k8s.io/apiserver/pkg/util/webhook" "k8s.io/apiserver/pkg/warning" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/scale" "k8s.io/client-go/scale/scheme/autoscalingv1" "k8s.io/client-go/tools/cache" @@ -350,9 +353,29 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { string(types.JSONPatchType), string(types.MergePatchType), } - if legacyscheme.Scheme.IsGroupRegistered(requestInfo.APIGroup) { + + // HACK: Support resources of the client-go scheme the way existing clients expect it: + // - Support Strategic Merge Patch (used by default on these resources by kubectl) + // - Support the Protobuf content type on Create / Update resources + // (by simply converting the request to the json content type), + // since protobuf content type is expected to be supported in a number of client + // contexts (like controller-runtime for example) + if clientgoscheme.Scheme.IsGroupRegistered(requestInfo.APIGroup) { supportedTypes = append(supportedTypes, string(types.StrategicMergePatchType)) + req, err := convertProtobufRequestsToJson(verb, req, schema.GroupVersionKind{ + Group: requestInfo.APIGroup, + Version: requestInfo.APIVersion, + Kind: crd.Spec.Names.Kind, + }) + if err != nil { + responsewriters.ErrorNegotiated( + apierrors.NewInternalError(err), + Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req, + ) + return + } } + if utilfeature.DefaultFeatureGate.Enabled(features.ServerSideApply) { supportedTypes = append(supportedTypes, string(types.ApplyPatchType)) } @@ -389,6 +412,51 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { } } +// HACK: In some contexts, like the controller-runtime library used by the Operator SDK, all the resources of the +// client-go scheme are created / updated using the protobuf content type. +// However when these resources are in fact added as CRDs, in the KCP minimal API server scenario, these resources cannot +// be created / updated since the protobuf (de)serialization is not supported for CRDs. +// So in this case we just convert the protobuf request to a Json one (using the `client-go` scheme decoder/encoder), +// before letting the CRD handler serve it. +// +// A real, long-term and non-hacky, fix for this problem would be as follows: +// When a request for an unsupported serialization is returned, the server should reject it with a 406 +// and provide a list of supported content types. +// client-go should then examine whether it can satisfy such a request by encoding the object with a different scheme. +// This would require a KEP but is in keeping with content negotiation on GET / WATCH in Kube +func convertProtobufRequestsToJson(verb string, req *http.Request, gvk schema.GroupVersionKind) (*http.Request, error) { + if (verb == "CREATE" || verb == "UPDATE") && + req.Header.Get("Content-Type") == runtime.ContentTypeProtobuf { + resource, err := clientgoscheme.Scheme.New(gvk) + if err != nil { + utilruntime.HandleError(err) + return nil, fmt.Errorf("Error when converting a protobuf request to a json request on a client-go resource added as a CRD") + } + reader, err := req.Body, nil + if err != nil { + utilruntime.HandleError(err) + return nil, fmt.Errorf("Error when converting a protobuf request to a json request on a client-go resource added as a CRD") + } + defer reader.Close() + buf := new(bytes.Buffer) + _, err = buf.ReadFrom(reader) + if err != nil { + utilruntime.HandleError(err) + return nil, fmt.Errorf("Error when converting a protobuf request to a json request on a client-go resource added as a CRD") + } + + // get bytes through IO operations + protobuf.NewSerializer(clientgoscheme.Scheme, clientgoscheme.Scheme).Decode(buf.Bytes(), &gvk, resource) + buf = new(bytes.Buffer) + json.NewSerializerWithOptions(json.DefaultMetaFactory, clientgoscheme.Scheme, clientgoscheme.Scheme, json.SerializerOptions{Yaml: false, Pretty: false, Strict: true}). + Encode(resource, buf) + req.Body = ioutil.NopCloser(buf) + req.ContentLength = int64(buf.Len()) + req.Header.Set("Content-Type", runtime.ContentTypeJSON) + } + return req, nil +} + func (r *crdHandler) serveResource(w http.ResponseWriter, req *http.Request, requestInfo *apirequest.RequestInfo, crdInfo *crdInfo, crd *apiextensionsv1.CustomResourceDefinition, terminating bool, supportedTypes []string) http.HandlerFunc { requestScope := crdInfo.requestScopes[requestInfo.APIVersion] storage := crdInfo.storages[requestInfo.APIVersion].CustomResource From 2c724b12eca8e04a33a85fa065e5d0d142f3cd3b Mon Sep 17 00:00:00 2001 From: David Festal Date: Tue, 21 Sep 2021 14:56:11 +0200 Subject: [PATCH 20/87] MD file about KCP changes ... ... and potential client problems Signed-off-by: David Festal --- KCP_RELATED_CHANGES.md | 97 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 KCP_RELATED_CHANGES.md diff --git a/KCP_RELATED_CHANGES.md b/KCP_RELATED_CHANGES.md new file mode 100644 index 0000000000000..1fe2076592476 --- /dev/null +++ b/KCP_RELATED_CHANGES.md @@ -0,0 +1,97 @@ +# Why this forked repository ? + +This repository carries the prototype branch which accumulates the hacks, prototypes, proto-KEP experiments, and workarounds required to make [KCP](https://github.com/kcp-dev/kcp/blob/main/README.md) a reality. +It is based on K8S 1.22 for now and commits are identified with basic labels like HACK/FEATURE/WORKAROUND. + +# Summary of changes + +The detailed explanation of the changes made on top of the Kubernetes code can be found in both the commit messages, and comments of the associated code. + +However here is a summary of the changes, with the underlying requirements and motivations. Reading the linked investigation document first will help. + +## A. Minimal API Server + +__Investigation document:__ [minimal-api-server.md](https://github.com/kcp-dev/kcp/blob/main/docs/investigations/minimal-api-server.md) + +1. New generic control plane based on kube api-server + + It is mainly provided by code: + + 1. initially duplicated from kube api-server main code, and legacy scheme (`DUPLICATE` commits), + + 2. then stripped down from unnecessary things (ergress, api aggregation, webhooks) and APIs (Pods, Nodes, Deployments, etc ...) (`NEW` commits) + +2. Support adding K8S built-in resources (`core/Pod`, `apps/Deployment`, ...) as CRDs + + This is required since the new generic control plane scheme doesn't contain those resources any more. + + This is provided by: + + - hacks (`HACK` commits) that: + + 1. allow the go-restful server to be bypassed for those resources, and route them to the CRD handler + 2. allow the CRD handler, and opanapi publisher, to support resources of the `core` group + 3. convert the `protobuf` requests sent to those resources resources to requests in the `application/json` content type, before letting the CRD handler serve them + 4. replace the table converter of CRDs that bring back those resources, with the default table converter of the related built-in resource + + - a new feature, or potential kube fix (`KUBEFIX` commit), that: + + 5. introduces the support of strategic merge patch for CRDs. + This support uses the OpenAPI v3 schema of the CRD to drive the SMP execution, but only adds a minimal implementation and doesn't fully support OpenAPI schemas that don't have expected `patchStrategy` and `patchMergeKey` annotations. + In order to avoid changing the behavior of existing client tools, the support is only added for those K8S built-in resources + +## B. Logical clusters + +__Investigation document:__ [logical-clusters.md](https://github.com/kcp-dev/kcp/blob/main/docs/investigations/logical-clusters.md) + +1. Logical clusters represented as a prefix in etcd + + It is mainly provided by hacks (`HACK` commits) that: + + 1. allow intercepting the api server handler chain to set the expected logical cluster context value from either a given suffix in the request APIServer base URL, or a given header in the http request + + 2. change etcd storage layer in order to use the logical cluster as a prefix in the etcd key + + 3. allow wildcard watches that retrieve objects from all the logical clusters + + 4. correctly get or set the `clusterName` metadata field in the storage layer operations based on the etcd key and its new prefix + +2. Support of logical clusters (== tenancy) in the CRD management, OpenAPI and discovery endpoints, and clients used by controllers + + It is mainly provided by a hack (`HACK` commit) that adds CRD tenancy by ensuring that logical clusters are taken in account in: + - CRD-related controllers + - APIServices-related controllers + - Discovery + OpenAPI endpoints + + In the current Kubernetes design, those 3 areas are highly coupled and intricated, which explains why this commit had to hack the code at various levels: + - client-go level + - controllers level, + - http handlers level. + + While this gives a detailed idea of which code needs to be touched in order to enable CRD tenancy, a clean implementation would first require some refactoring, in order to build the required abstraction layers that would allow decoupling those areas. + +# Potential client problems + +Although these changes in the K8S codebase were made in order to keep the compatibility with Kuberntes client tools, there might be some problems: + +## Incomplete protobuf support for built-in resources + +In some contexts, like the `controller-runtime` library used by the Operator SDK, all the resources of the `client-go` scheme are created / updated using the `application/vnd.kubernetes.protobuf` content type. + +However when these resources are in fact added as CRDs, in the KCP minimal API server scenario, these resources cannot be created / updated since the protobuf (de)serialization is not (and probably cannot be) supported for CRDs. +So for now in this case, the [A.2.3 hack mentioned above](#A-2-3) just converts the `protobuf` request to a `json` one, but this might not cover all the use-cases or corner cases. + +The clean solution would probably be the negotiation of serialization type in `client-go`, which we haven't implemented yet, but which would work like this: +When a request for an unsupported serialization is returned, the server should reject it with a 406 +and provide a list of supported content types. `client-go` should then examine whether it can satisfy such a request by encoding the object with a different scheme. +This would require a KEP but at least is in keeping with content negotiation on GET / WATCH in Kube + +## Incomplete Strategic merge patch support for built-in resources + +Client tools like `kubectl` assume that all K8S native resources (== `client-go` schema resources) +support strategic merge patch, and use it by default when updating or patching a resource. + +In Kube, currently, strategic merge patch is not supported for CRDs, which would break compatibility with client tools for all the K8S natives resources that are in fact added as CRD in the KCP minimal api server. +The [A-2-5 change mentioned above](#A-2-5) tries to fix this by using the CRD openAPI v3 schema as the source of the required information that will drive the strategic merge patch execution. + +While this fixes the problem in most cases, there might still be errors in case the OpenAPI v2 schema for such a resource is missing `x-kubernetes-patch-strategy` and `x-kubernetes-patch-merge-key` annotations when imported from the CRD OpenAPI v3 schema. \ No newline at end of file From 3e4c7244c214f7ee2379a0cb0e0d4759eab6560a Mon Sep 17 00:00:00 2001 From: David Festal Date: Thu, 23 Sep 2021 17:40:14 +0200 Subject: [PATCH 21/87] HACK: Make the Namespace admission multi-cluster-aware It is necessary to take in account the `ClusterName` (logical cluster) of the current request context and use it to validate the request against the given namespace of the same logical cluster. Before this change, it was not possible to create an object in a given namespace in a non-default logical cluster until a namespace with the same name would be created in the default ('admin') logical cluster (issue kcp-dev/kcp#157) Signed-off-by: David Festal --- pkg/genericcontrolplane/server.go | 8 +++---- .../plugin/namespace/lifecycle/admission.go | 21 +++++++++++++------ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index b3025c9754b3e..ce76c9c8dfc13 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -36,8 +36,8 @@ import ( "k8s.io/apiserver/pkg/authorization/union" "k8s.io/apiserver/pkg/endpoints/discovery" openapinamer "k8s.io/apiserver/pkg/endpoints/openapi" - genericfeatures "k8s.io/apiserver/pkg/features" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + genericfeatures "k8s.io/apiserver/pkg/features" genericapiserver "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/filters" serverstorage "k8s.io/apiserver/pkg/server/storage" @@ -362,7 +362,7 @@ func BuildGenericConfig( kubeClientConfig := genericConfig.LoopbackClientConfig - clientutils.EnableMultiCluster(genericConfig.LoopbackClientConfig, genericConfig, "apiservices", "customresourcedefinitions") + clientutils.EnableMultiCluster(genericConfig.LoopbackClientConfig, genericConfig, "namespaces", "apiservices", "customresourcedefinitions") clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) if err != nil { @@ -378,8 +378,8 @@ func BuildGenericConfig( genericConfig.Authorization.Authorizer, genericConfig.RuleResolver, err = BuildAuthorizer(s, versionedInformers) if err != nil { - lastErr = fmt.Errorf("invalid authorization config: %v", err) - return + lastErr = fmt.Errorf("invalid authorization config: %v", err) + return } // if !sets.NewString(s.Authorization.Modes...).Has(modes.ModeRBAC) { diff --git a/staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go b/staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go index 936a95e45cc15..db416af770a54 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go +++ b/staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go @@ -32,9 +32,11 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/admission/initializer" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" corelisters "k8s.io/client-go/listers/core/v1" + "k8s.io/client-go/tools/clusters" "k8s.io/utils/clock" ) @@ -85,13 +87,18 @@ func (l *Lifecycle) Admit(ctx context.Context, a admission.Attributes, o admissi return nil } + clusterName, err := genericapirequest.ClusterNameFrom(ctx) + if err != nil { + return errors.NewInternalError(err) + } + if a.GetKind().GroupKind() == v1.SchemeGroupVersion.WithKind("Namespace").GroupKind() { // if a namespace is deleted, we want to prevent all further creates into it // while it is undergoing termination. to reduce incidences where the cache // is slow to update, we add the namespace into a force live lookup list to ensure // we are not looking at stale state. if a.GetOperation() == admission.Delete { - l.forceLiveLookupCache.Add(a.GetName(), true, forceLiveLookupTTL) + l.forceLiveLookupCache.Add(clusters.ToClusterAwareKey(clusterName, a.GetName()), true, forceLiveLookupTTL) } // allow all operations to namespaces return nil @@ -114,10 +121,12 @@ func (l *Lifecycle) Admit(ctx context.Context, a admission.Attributes, o admissi var ( exists bool - err error ) - namespace, err := l.namespaceLister.Get(a.GetNamespace()) + namespaceKey := a.GetNamespace() + namespaceKey = clusters.ToClusterAwareKey(clusterName, namespaceKey) + + namespace, err := l.namespaceLister.Get(namespaceKey) if err != nil { if !errors.IsNotFound(err) { return errors.NewInternalError(err) @@ -130,7 +139,7 @@ func (l *Lifecycle) Admit(ctx context.Context, a admission.Attributes, o admissi // give the cache time to observe the namespace before rejecting a create. // this helps when creating a namespace and immediately creating objects within it. time.Sleep(missingNamespaceWait) - namespace, err = l.namespaceLister.Get(a.GetNamespace()) + namespace, err = l.namespaceLister.Get(namespaceKey) switch { case errors.IsNotFound(err): // no-op @@ -146,7 +155,7 @@ func (l *Lifecycle) Admit(ctx context.Context, a admission.Attributes, o admissi // forceLiveLookup if true will skip looking at local cache state and instead always make a live call to server. forceLiveLookup := false - if _, ok := l.forceLiveLookupCache.Get(a.GetNamespace()); ok { + if _, ok := l.forceLiveLookupCache.Get(namespaceKey); ok { // we think the namespace was marked for deletion, but our current local cache says otherwise, we will force a live lookup. forceLiveLookup = exists && namespace.Status.Phase == v1.NamespaceActive } @@ -154,7 +163,7 @@ func (l *Lifecycle) Admit(ctx context.Context, a admission.Attributes, o admissi // refuse to operate on non-existent namespaces if !exists || forceLiveLookup { // as a last resort, make a call directly to storage - namespace, err = l.client.CoreV1().Namespaces().Get(context.TODO(), a.GetNamespace(), metav1.GetOptions{}) + namespace, err = l.client.CoreV1().Namespaces().Get(genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{Name: clusterName}), a.GetNamespace(), metav1.GetOptions{}) switch { case errors.IsNotFound(err): return err From 8f48114a577a59f9ff605cb7c410c2d7cff4e3e5 Mon Sep 17 00:00:00 2001 From: David Festal Date: Mon, 27 Sep 2021 17:24:21 +0200 Subject: [PATCH 22/87] HACK: Make the namepsace controller multi-cluster-aware The Namespace controller must take in account the `ClusterName` (== logical cluster) in all its actions, especially when deleting contained objects during finalization. This also required hacking a bit the RBAC policy initialization so that it explicitely uses the `admin` logical cluster (until we have a decent inheritance mechanism between logical clusters for RBAC) Signed-off-by: David Festal --- cmd/kube-controller-manager/app/core.go | 5 +- .../deletion/namespaced_resources_deleter.go | 93 +++++++++++-------- .../namespaced_resources_deleter_test.go | 14 +-- .../namespace/namespace_controller.go | 4 +- .../clientutils/multiclusterconfig.go | 6 +- pkg/registry/rbac/rest/storage_rbac.go | 5 +- .../e2e_node/services/namespace_controller.go | 5 +- .../namespace/ns_conditions_test.go | 5 +- 8 files changed, 84 insertions(+), 53 deletions(-) diff --git a/cmd/kube-controller-manager/app/core.go b/cmd/kube-controller-manager/app/core.go index acaea3168671a..4890eaaa6cb7a 100644 --- a/cmd/kube-controller-manager/app/core.go +++ b/cmd/kube-controller-manager/app/core.go @@ -31,6 +31,7 @@ import ( "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/quota/v1/generic" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -466,7 +467,9 @@ func startModifiedNamespaceController(ctx context.Context, controllerContext Con return nil, true, err } - discoverResourcesFn := namespaceKubeClient.Discovery().ServerPreferredNamespacedResources + discoverResourcesFn := func(clusterName string) ([]*metav1.APIResourceList, error) { + return namespaceKubeClient.Discovery().ServerPreferredNamespacedResources() + } namespaceController := namespacecontroller.NewNamespaceController( namespaceKubeClient, diff --git a/pkg/controller/namespace/deletion/namespaced_resources_deleter.go b/pkg/controller/namespace/deletion/namespaced_resources_deleter.go index 7f97f34fdb9d2..ae94ca4898a0a 100644 --- a/pkg/controller/namespace/deletion/namespaced_resources_deleter.go +++ b/pkg/controller/namespace/deletion/namespaced_resources_deleter.go @@ -32,6 +32,7 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/client-go/discovery" v1clientset "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/metadata" @@ -39,25 +40,22 @@ import ( // NamespacedResourcesDeleterInterface is the interface to delete a namespace with all resources in it. type NamespacedResourcesDeleterInterface interface { - Delete(nsName string) error + Delete(clusterName, nsName string) error } // NewNamespacedResourcesDeleter returns a new NamespacedResourcesDeleter. func NewNamespacedResourcesDeleter(nsClient v1clientset.NamespaceInterface, metadataClient metadata.Interface, podsGetter v1clientset.PodsGetter, - discoverResourcesFn func() ([]*metav1.APIResourceList, error), + discoverResourcesFn func(clusterName string) ([]*metav1.APIResourceList, error), finalizerToken v1.FinalizerName) NamespacedResourcesDeleterInterface { d := &namespacedResourcesDeleter{ - nsClient: nsClient, - metadataClient: metadataClient, - podsGetter: podsGetter, - opCache: &operationNotSupportedCache{ - m: make(map[operationKey]bool), - }, + nsClient: nsClient, + metadataClient: metadataClient, + podsGetter: podsGetter, + opCaches: map[string]*operationNotSupportedCache{}, discoverResourcesFn: discoverResourcesFn, finalizerToken: finalizerToken, } - d.initOpCache() return d } @@ -72,8 +70,10 @@ type namespacedResourcesDeleter struct { // Interface to get PodInterface. podsGetter v1clientset.PodsGetter // Cache of what operations are not supported on each group version resource. - opCache *operationNotSupportedCache - discoverResourcesFn func() ([]*metav1.APIResourceList, error) + opCaches map[string]*operationNotSupportedCache + opCachesMutex sync.RWMutex + + discoverResourcesFn func(clusterName string) ([]*metav1.APIResourceList, error) // The finalizer token that should be removed from the namespace // when all resources in that namespace have been deleted. finalizerToken v1.FinalizerName @@ -92,11 +92,11 @@ type namespacedResourcesDeleter struct { // Returns ResourcesRemainingError if it deleted some resources but needs // to wait for them to go away. // Caller is expected to keep calling this until it succeeds. -func (d *namespacedResourcesDeleter) Delete(nsName string) error { +func (d *namespacedResourcesDeleter) Delete(clusterName, nsName string) error { // Multiple controllers may edit a namespace during termination // first get the latest state of the namespace before proceeding // if the namespace was deleted already, don't do anything - namespace, err := d.nsClient.Get(context.TODO(), nsName, metav1.GetOptions{}) + namespace, err := d.nsClient.Get(genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{Name: clusterName}), nsName, metav1.GetOptions{}) if err != nil { if errors.IsNotFound(err) { return nil @@ -152,11 +152,11 @@ func (d *namespacedResourcesDeleter) Delete(nsName string) error { return nil } -func (d *namespacedResourcesDeleter) initOpCache() { +func (d *namespacedResourcesDeleter) initOpCache(clusterName string) { // pre-fill opCache with the discovery info // // TODO(sttts): get rid of opCache and http 405 logic around it and trust discovery info - resources, err := d.discoverResourcesFn() + resources, err := d.discoverResourcesFn(clusterName) if err != nil { utilruntime.HandleError(fmt.Errorf("unable to get all supported resources from server: %v", err)) } @@ -181,7 +181,7 @@ func (d *namespacedResourcesDeleter) initOpCache() { for _, op := range []operation{operationList, operationDeleteCollection} { if !verbs.Has(string(op)) { - d.opCache.setNotSupported(operationKey{operation: op, gvr: gvr}) + d.opCaches[clusterName].setNotSupported(operationKey{operation: op, gvr: gvr}) } } } @@ -233,6 +233,22 @@ func (o *operationNotSupportedCache) setNotSupported(key operationKey) { o.m[key] = true } +// isSupported returns true if the operation is supported +func (d *namespacedResourcesDeleter) isSupported(clusterName string, key operationKey) bool { + d.opCachesMutex.RLock() + defer d.opCachesMutex.RUnlock() + cache, exists := d.opCaches[clusterName] + if !exists { + cache = &operationNotSupportedCache{ + m: make(map[operationKey]bool), + } + d.opCaches[clusterName] = cache + d.initOpCache(clusterName) + } + + return cache.isSupported(key) +} + // updateNamespaceFunc is a function that makes an update to a namespace type updateNamespaceFunc func(namespace *v1.Namespace) (*v1.Namespace, error) @@ -250,7 +266,7 @@ func (d *namespacedResourcesDeleter) retryOnConflictError(namespace *v1.Namespac return nil, err } prevNamespace := latestNamespace - latestNamespace, err = d.nsClient.Get(context.TODO(), latestNamespace.Name, metav1.GetOptions{}) + latestNamespace, err = d.nsClient.Get(genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{Name: latestNamespace.ClusterName}), latestNamespace.Name, metav1.GetOptions{}) if err != nil { return nil, err } @@ -267,7 +283,7 @@ func (d *namespacedResourcesDeleter) updateNamespaceStatusFunc(namespace *v1.Nam } newNamespace := namespace.DeepCopy() newNamespace.Status.Phase = v1.NamespaceTerminating - return d.nsClient.UpdateStatus(context.TODO(), newNamespace, metav1.UpdateOptions{}) + return d.nsClient.UpdateStatus(genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{Name: newNamespace.ClusterName}), newNamespace, metav1.UpdateOptions{}) } // finalized returns true if the namespace.Spec.Finalizers is an empty list @@ -303,11 +319,11 @@ func (d *namespacedResourcesDeleter) finalizeNamespace(namespace *v1.Namespace) // deleteCollection is a helper function that will delete the collection of resources // it returns true if the operation was supported on the server. // it returns an error if the operation was supported on the server but was unable to complete. -func (d *namespacedResourcesDeleter) deleteCollection(gvr schema.GroupVersionResource, namespace string) (bool, error) { +func (d *namespacedResourcesDeleter) deleteCollection(clusterName string, gvr schema.GroupVersionResource, namespace string) (bool, error) { klog.V(5).Infof("namespace controller - deleteCollection - namespace: %s, gvr: %v", namespace, gvr) key := operationKey{operation: operationDeleteCollection, gvr: gvr} - if !d.opCache.isSupported(key) { + if !d.isSupported(clusterName, key) { klog.V(5).Infof("namespace controller - deleteCollection ignored since not supported - namespace: %s, gvr: %v", namespace, gvr) return false, nil } @@ -317,7 +333,7 @@ func (d *namespacedResourcesDeleter) deleteCollection(gvr schema.GroupVersionRes // namespace itself. background := metav1.DeletePropagationBackground opts := metav1.DeleteOptions{PropagationPolicy: &background} - err := d.metadataClient.Resource(gvr).Namespace(namespace).DeleteCollection(context.TODO(), opts, metav1.ListOptions{}) + err := d.metadataClient.Resource(gvr).Namespace(namespace).DeleteCollection(genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{Name: clusterName}), opts, metav1.ListOptions{}) if err == nil { return true, nil @@ -342,16 +358,16 @@ func (d *namespacedResourcesDeleter) deleteCollection(gvr schema.GroupVersionRes // the list of items in the collection (if found) // a boolean if the operation is supported // an error if the operation is supported but could not be completed. -func (d *namespacedResourcesDeleter) listCollection(gvr schema.GroupVersionResource, namespace string) (*metav1.PartialObjectMetadataList, bool, error) { +func (d *namespacedResourcesDeleter) listCollection(clusterName string, gvr schema.GroupVersionResource, namespace string) (*metav1.PartialObjectMetadataList, bool, error) { klog.V(5).Infof("namespace controller - listCollection - namespace: %s, gvr: %v", namespace, gvr) key := operationKey{operation: operationList, gvr: gvr} - if !d.opCache.isSupported(key) { + if !d.isSupported(clusterName, key) { klog.V(5).Infof("namespace controller - listCollection ignored since not supported - namespace: %s, gvr: %v", namespace, gvr) return nil, false, nil } - partialList, err := d.metadataClient.Resource(gvr).Namespace(namespace).List(context.TODO(), metav1.ListOptions{}) + partialList, err := d.metadataClient.Resource(gvr).Namespace(namespace).List(genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{Name: clusterName}), metav1.ListOptions{}) if err == nil { return partialList, true, nil } @@ -370,10 +386,10 @@ func (d *namespacedResourcesDeleter) listCollection(gvr schema.GroupVersionResou } // deleteEachItem is a helper function that will list the collection of resources and delete each item 1 by 1. -func (d *namespacedResourcesDeleter) deleteEachItem(gvr schema.GroupVersionResource, namespace string) error { +func (d *namespacedResourcesDeleter) deleteEachItem(clusterName string, gvr schema.GroupVersionResource, namespace string) error { klog.V(5).Infof("namespace controller - deleteEachItem - namespace: %s, gvr: %v", namespace, gvr) - unstructuredList, listSupported, err := d.listCollection(gvr, namespace) + unstructuredList, listSupported, err := d.listCollection(clusterName, gvr, namespace) if err != nil { return err } @@ -383,7 +399,7 @@ func (d *namespacedResourcesDeleter) deleteEachItem(gvr schema.GroupVersionResou for _, item := range unstructuredList.Items { background := metav1.DeletePropagationBackground opts := metav1.DeleteOptions{PropagationPolicy: &background} - if err = d.metadataClient.Resource(gvr).Namespace(namespace).Delete(context.TODO(), item.GetName(), opts); err != nil && !errors.IsNotFound(err) && !errors.IsMethodNotSupported(err) { + if err = d.metadataClient.Resource(gvr).Namespace(namespace).Delete(genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{Name: clusterName}), item.GetName(), opts); err != nil && !errors.IsNotFound(err) && !errors.IsMethodNotSupported(err) { return err } } @@ -404,12 +420,13 @@ type gvrDeletionMetadata struct { // It returns an estimate of the time remaining before the remaining resources are deleted. // If estimate > 0, not all resources are guaranteed to be gone. func (d *namespacedResourcesDeleter) deleteAllContentForGroupVersionResource( + clusterName string, gvr schema.GroupVersionResource, namespace string, namespaceDeletedAt metav1.Time) (gvrDeletionMetadata, error) { klog.V(5).Infof("namespace controller - deleteAllContentForGroupVersionResource - namespace: %s, gvr: %v", namespace, gvr) // estimate how long it will take for the resource to be deleted (needed for objects that support graceful delete) - estimate, err := d.estimateGracefulTermination(gvr, namespace, namespaceDeletedAt) + estimate, err := d.estimateGracefulTermination(clusterName, gvr, namespace, namespaceDeletedAt) if err != nil { klog.V(5).Infof("namespace controller - deleteAllContentForGroupVersionResource - unable to estimate - namespace: %s, gvr: %v, err: %v", namespace, gvr, err) return gvrDeletionMetadata{}, err @@ -417,14 +434,14 @@ func (d *namespacedResourcesDeleter) deleteAllContentForGroupVersionResource( klog.V(5).Infof("namespace controller - deleteAllContentForGroupVersionResource - estimate - namespace: %s, gvr: %v, estimate: %v", namespace, gvr, estimate) // first try to delete the entire collection - deleteCollectionSupported, err := d.deleteCollection(gvr, namespace) + deleteCollectionSupported, err := d.deleteCollection(clusterName, gvr, namespace) if err != nil { return gvrDeletionMetadata{finalizerEstimateSeconds: estimate}, err } // delete collection was not supported, so we list and delete each item... if !deleteCollectionSupported { - err = d.deleteEachItem(gvr, namespace) + err = d.deleteEachItem(clusterName, gvr, namespace) if err != nil { return gvrDeletionMetadata{finalizerEstimateSeconds: estimate}, err } @@ -433,7 +450,7 @@ func (d *namespacedResourcesDeleter) deleteAllContentForGroupVersionResource( // verify there are no more remaining items // it is not an error condition for there to be remaining items if local estimate is non-zero klog.V(5).Infof("namespace controller - deleteAllContentForGroupVersionResource - checking for no more items in namespace: %s, gvr: %v", namespace, gvr) - unstructuredList, listSupported, err := d.listCollection(gvr, namespace) + unstructuredList, listSupported, err := d.listCollection(clusterName, gvr, namespace) if err != nil { klog.V(5).Infof("namespace controller - deleteAllContentForGroupVersionResource - error verifying no items in namespace: %s, gvr: %v, err: %v", namespace, gvr, err) return gvrDeletionMetadata{finalizerEstimateSeconds: estimate}, err @@ -499,7 +516,7 @@ func (d *namespacedResourcesDeleter) deleteAllContent(ns *v1.Namespace) (int64, estimate := int64(0) klog.V(4).Infof("namespace controller - deleteAllContent - namespace: %s", namespace) - resources, err := d.discoverResourcesFn() + resources, err := d.discoverResourcesFn(ns.ClusterName) if err != nil { // discovery errors are not fatal. We often have some set of resources we can operate against even if we don't have a complete list errs = append(errs, err) @@ -519,7 +536,7 @@ func (d *namespacedResourcesDeleter) deleteAllContent(ns *v1.Namespace) (int64, finalizersToNumRemaining: map[string]int{}, } for gvr := range groupVersionResources { - gvrDeletionMetadata, err := d.deleteAllContentForGroupVersionResource(gvr, namespace, namespaceDeletedAt) + gvrDeletionMetadata, err := d.deleteAllContentForGroupVersionResource(ns.ClusterName, gvr, namespace, namespaceDeletedAt) if err != nil { // If there is an error, hold on to it but proceed with all the remaining // groupVersionResources. @@ -545,7 +562,7 @@ func (d *namespacedResourcesDeleter) deleteAllContent(ns *v1.Namespace) (int64, // we need to reflect that information. Recall that additional finalizers can be set on namespaces, so this finalizer may clear itself and // NOT remove the resource instance. if hasChanged := conditionUpdater.Update(ns); hasChanged { - if _, err = d.nsClient.UpdateStatus(context.TODO(), ns, metav1.UpdateOptions{}); err != nil { + if _, err = d.nsClient.UpdateStatus(genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{Name: ns.ClusterName}), ns, metav1.UpdateOptions{}); err != nil { utilruntime.HandleError(fmt.Errorf("couldn't update status condition for namespace %q: %v", namespace, err)) } } @@ -556,14 +573,14 @@ func (d *namespacedResourcesDeleter) deleteAllContent(ns *v1.Namespace) (int64, } // estimateGracefulTermination will estimate the graceful termination required for the specific entity in the namespace -func (d *namespacedResourcesDeleter) estimateGracefulTermination(gvr schema.GroupVersionResource, ns string, namespaceDeletedAt metav1.Time) (int64, error) { +func (d *namespacedResourcesDeleter) estimateGracefulTermination(clusterName string, gvr schema.GroupVersionResource, ns string, namespaceDeletedAt metav1.Time) (int64, error) { groupResource := gvr.GroupResource() klog.V(5).Infof("namespace controller - estimateGracefulTermination - group %s, resource: %s", groupResource.Group, groupResource.Resource) estimate := int64(0) var err error switch groupResource { case schema.GroupResource{Group: "", Resource: "pods"}: - estimate, err = d.estimateGracefulTerminationForPods(ns) + estimate, err = d.estimateGracefulTerminationForPods(clusterName, ns) } if err != nil { return 0, err @@ -578,14 +595,14 @@ func (d *namespacedResourcesDeleter) estimateGracefulTermination(gvr schema.Grou } // estimateGracefulTerminationForPods determines the graceful termination period for pods in the namespace -func (d *namespacedResourcesDeleter) estimateGracefulTerminationForPods(ns string) (int64, error) { +func (d *namespacedResourcesDeleter) estimateGracefulTerminationForPods(clusterName, ns string) (int64, error) { klog.V(5).Infof("namespace controller - estimateGracefulTerminationForPods - namespace %s", ns) estimate := int64(0) podsGetter := d.podsGetter if podsGetter == nil || reflect.ValueOf(podsGetter).IsNil() { return 0, fmt.Errorf("unexpected: podsGetter is nil. Cannot estimate grace period seconds for pods") } - items, err := podsGetter.Pods(ns).List(context.TODO(), metav1.ListOptions{}) + items, err := podsGetter.Pods(ns).List(genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{Name: clusterName}), metav1.ListOptions{}) if err != nil { return 0, err } diff --git a/pkg/controller/namespace/deletion/namespaced_resources_deleter_test.go b/pkg/controller/namespace/deletion/namespaced_resources_deleter_test.go index 5bb8b94c7187d..4d0678c8c4255 100644 --- a/pkg/controller/namespace/deletion/namespaced_resources_deleter_test.go +++ b/pkg/controller/namespace/deletion/namespaced_resources_deleter_test.go @@ -198,11 +198,11 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *metav1.APIVersio t.Fatal(err) } - fn := func() ([]*metav1.APIResourceList, error) { + fn := func(clusterName string) ([]*metav1.APIResourceList, error) { return resources, testInput.gvrError } d := NewNamespacedResourcesDeleter(mockClient.CoreV1().Namespaces(), metadataClient, mockClient.CoreV1(), fn, v1.FinalizerKubernetes) - if err := d.Delete(testInput.testNamespace.Name); !matchErrors(err, testInput.expectErrorOnDelete) { + if err := d.Delete("", testInput.testNamespace.Name); !matchErrors(err, testInput.expectErrorOnDelete) { t.Errorf("expected error %q when syncing namespace, got %q, %v", testInput.expectErrorOnDelete, err, testInput.expectErrorOnDelete == err) } @@ -295,12 +295,12 @@ func TestSyncNamespaceThatIsActive(t *testing.T) { Phase: v1.NamespaceActive, }, } - fn := func() ([]*metav1.APIResourceList, error) { + fn := func(clusterName string) ([]*metav1.APIResourceList, error) { return testResources(), nil } d := NewNamespacedResourcesDeleter(mockClient.CoreV1().Namespaces(), nil, mockClient.CoreV1(), fn, v1.FinalizerKubernetes) - err := d.Delete(testNamespace.Name) + err := d.Delete("", testNamespace.Name) if err != nil { t.Errorf("Unexpected error when synching namespace %v", err) } @@ -424,7 +424,7 @@ func TestDeleteEncounters404(t *testing.T) { mockMetadataClient.PrependReactor("delete-collection", "flakes", ns1FlakesNotFound) mockMetadataClient.PrependReactor("list", "flakes", ns1FlakesNotFound) - resourcesFn := func() ([]*metav1.APIResourceList, error) { + resourcesFn := func(clusterName string) ([]*metav1.APIResourceList, error) { return []*metav1.APIResourceList{{ GroupVersion: "example.com/v1", APIResources: []metav1.APIResource{{Name: "flakes", Namespaced: true, Kind: "Flake", Verbs: []string{"get", "list", "delete", "deletecollection", "create", "update"}}}, @@ -435,7 +435,7 @@ func TestDeleteEncounters404(t *testing.T) { // Delete ns1 and get NotFound errors for the flakes resource mockMetadataClient.ClearActions() - if err := d.Delete(ns1.Name); err != nil { + if err := d.Delete("", ns1.Name); err != nil { t.Fatal(err) } if len(mockMetadataClient.Actions()) != 3 || @@ -450,7 +450,7 @@ func TestDeleteEncounters404(t *testing.T) { // Delete ns2 mockMetadataClient.ClearActions() - if err := d.Delete(ns2.Name); err != nil { + if err := d.Delete("", ns2.Name); err != nil { t.Fatal(err) } if len(mockMetadataClient.Actions()) != 2 || diff --git a/pkg/controller/namespace/namespace_controller.go b/pkg/controller/namespace/namespace_controller.go index fd8abd43f8387..26d9bd28fe8e2 100644 --- a/pkg/controller/namespace/namespace_controller.go +++ b/pkg/controller/namespace/namespace_controller.go @@ -66,7 +66,7 @@ type NamespaceController struct { func NewNamespaceController( kubeClient clientset.Interface, metadataClient metadata.Interface, - discoverResourcesFn func() ([]*metav1.APIResourceList, error), + discoverResourcesFn func(clusterName string) ([]*metav1.APIResourceList, error), namespaceInformer coreinformers.NamespaceInformer, resyncPeriod time.Duration, finalizerToken v1.FinalizerName) *NamespaceController { @@ -189,7 +189,7 @@ func (nm *NamespaceController) syncNamespaceFromKey(key string) (err error) { utilruntime.HandleError(fmt.Errorf("Unable to retrieve namespace %v from store: %v", key, err)) return err } - return nm.namespacedResourcesDeleter.Delete(namespace.Name) + return nm.namespacedResourcesDeleter.Delete(namespace.ClusterName, namespace.Name) } // Run starts observing the system with the specified number of workers. diff --git a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go index e3b2616e4fb52..a33ca86fda5a9 100644 --- a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go +++ b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go @@ -90,9 +90,9 @@ func (mcrt *multiClusterClientConfigRoundTripper) RoundTrip(req *http.Request) ( if err != nil { return nil, err } + contextCluster := genericapirequest.ClusterFrom(req.Context()) if requestInfo != nil && mcrt.enabledOn.Has(requestInfo.Resource) { - contextCluster := genericapirequest.ClusterFrom(req.Context()) resourceClusterName := "" headerCluster := "" switch requestInfo.Verb { @@ -152,6 +152,10 @@ func (mcrt *multiClusterClientConfigRoundTripper) RoundTrip(req *http.Request) ( return nil, fmt.Errorf("Cluster should not be empty for request '%s' on resource '%s' (%s)", requestInfo.Verb, requestInfo.Resource, requestInfo.Path) } req.Header.Add("X-Kubernetes-Cluster", headerCluster) + } else { + if contextCluster != nil && contextCluster.Name != "" { + req.Header.Add("X-Kubernetes-Cluster", contextCluster.Name) + } } return mcrt.rt.RoundTrip(req) } diff --git a/pkg/registry/rbac/rest/storage_rbac.go b/pkg/registry/rbac/rest/storage_rbac.go index e73b332ba6af1..177633f71803e 100644 --- a/pkg/registry/rbac/rest/storage_rbac.go +++ b/pkg/registry/rbac/rest/storage_rbac.go @@ -37,6 +37,7 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" clientset "k8s.io/client-go/kubernetes" rbacv1client "k8s.io/client-go/kubernetes/typed/rbac/v1" + clientgorest "k8s.io/client-go/rest" "k8s.io/client-go/util/retry" "k8s.io/component-helpers/auth/rbac/reconciliation" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -158,7 +159,9 @@ func (p *PolicyData) EnsureRBACPolicy() genericapiserver.PostStartHookFunc { // initializing roles is really important. On some e2e runs, we've seen cases where etcd is down when the server // starts, the roles don't initialize, and nothing works. err := wait.Poll(1*time.Second, 30*time.Second, func() (done bool, err error) { - client, err := clientset.NewForConfig(hookContext.LoopbackClientConfig) + adminLogicalClusterConfig := clientgorest.CopyConfig(hookContext.LoopbackClientConfig) + adminLogicalClusterConfig.Host += "/clusters/admin" + client, err := clientset.NewForConfig(adminLogicalClusterConfig) if err != nil { utilruntime.HandleError(fmt.Errorf("unable to initialize client set: %v", err)) return false, nil diff --git a/test/e2e_node/services/namespace_controller.go b/test/e2e_node/services/namespace_controller.go index 61fef77030789..fb0aab08aea9c 100644 --- a/test/e2e_node/services/namespace_controller.go +++ b/test/e2e_node/services/namespace_controller.go @@ -20,6 +20,7 @@ import ( "time" v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/informers" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/metadata" @@ -70,7 +71,9 @@ func (n *NamespaceController) Start() error { if err != nil { return err } - discoverResourcesFn := client.Discovery().ServerPreferredNamespacedResources + discoverResourcesFn := func(clusterName string) ([]*metav1.APIResourceList, error) { + return client.Discovery().ServerPreferredNamespacedResources() + } informerFactory := informers.NewSharedInformerFactory(client, ncResyncPeriod) nc := namespacecontroller.NewNamespaceController( client, diff --git a/test/integration/namespace/ns_conditions_test.go b/test/integration/namespace/ns_conditions_test.go index 5dfc8ebb0c598..ed8316539d4bf 100644 --- a/test/integration/namespace/ns_conditions_test.go +++ b/test/integration/namespace/ns_conditions_test.go @@ -183,8 +183,9 @@ func namespaceLifecycleSetup(t *testing.T) (framework.CloseFunc, *namespace.Name panic(err) } - discoverResourcesFn := clientSet.Discovery().ServerPreferredNamespacedResources - + discoverResourcesFn := func(clusterName string) ([]*metav1.APIResourceList, error) { + return clientSet.Discovery().ServerPreferredNamespacedResources() + } controller := namespace.NewNamespaceController( clientSet, metadataClient, From b8ce5ef87767e4fa477c848a930e270f7c0bc3cf Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 20 Oct 2021 10:34:03 -0400 Subject: [PATCH 23/87] HACK: fix klog import Signed-off-by: Andy Goldstein --- pkg/genericcontrolplane/clientutils/multiclusterconfig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go index a33ca86fda5a9..8bfb37c68ebac 100644 --- a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go +++ b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go @@ -36,7 +36,7 @@ import ( genericapiserver "k8s.io/apiserver/pkg/server" "k8s.io/client-go/rest" _ "k8s.io/component-base/metrics/prometheus/workqueue" // for workqueue metric registration - "k8s.io/klog" + "k8s.io/klog/v2" ) type multiClusterClientConfigRoundTripper struct { From e27ad74b689f05f7c0396595b84ca92f1c9c81de Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 1 Nov 2021 15:57:49 -0400 Subject: [PATCH 24/87] HACK: fix hot-looping in naming controller Fix an issue where the naming controller was hot looping trying to enqueue other CRDs in the same API group. With the change to cache.MetaNamespaceKeyFunc to now encode the cluster name as part of the string key, we have to make a similar change to the naming controller so that it decodes the cluster name from the key and reinserts it when enqueuing new items. Signed-off-by: Andy Goldstein --- .../controller/status/naming_controller.go | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go index 940fd4f785734..ead61dad811e2 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go @@ -372,18 +372,40 @@ func (c *NamingConditionController) deleteCustomResourceDefinition(obj interface } func (c *NamingConditionController) requeueAllOtherGroupCRDs(name string) error { + // HACK(kcp): name is a key from the shared informer's cache. With the changes we've + // made to cache.MetaNamespaceKeyFunc to encode the cluster name as part of the key, + // we have to decode it here (into "cluster name" and "name") so we can make sure to + // re-encode the key correctly down below when adding to the work queue. + clusterName, name := clusters.SplitClusterAwareKey(name) + pluralGroup := strings.SplitN(name, ".", 2) + var groupForName string + // In case the group is empty because we're adding core resources as CRDs in KCP if len(pluralGroup) == 1 { - pluralGroup = append(pluralGroup, "") + groupForName = "" + } else { + // Given name = widgets.example.com + // pluralGroup[0] is the name, such as widgets + // pluarlGroup[1] is the API group, such as example.com + groupForName = pluralGroup[1] } + list, err := c.crdLister.List(labels.Everything()) if err != nil { return err } + for _, curr := range list { - if curr.Spec.Group == pluralGroup[1] && curr.Name != name { - c.queue.Add(curr.Name) + if curr.ClusterName != clusterName { + continue + } + + if curr.Spec.Group == groupForName && curr.Name != name { + // HACK(kcp): make sure to re-encode the cluster name in the key so + // future sync() calls are able to have crdLister.Get() work properly. + clusterKey := clusters.ToClusterAwareKey(clusterName, curr.Name) + c.queue.Add(clusterKey) } } return nil From 6c8577cb26e4c36441756e9d9cbc4731fda370e3 Mon Sep 17 00:00:00 2001 From: David Festal Date: Thu, 7 Oct 2021 19:35:15 +0200 Subject: [PATCH 25/87] HACK: Search for the right CRD cluster when watching... This hack fixes issue https://github.com/kcp-dev/kcp/issues/183: One cannot watch with wildcards (across logical clusters) if the CRD of the related API Resource hasn't been added in the admin logical cluster first. The fix in this HACK is limited since the request will fail if 2 logical clusters contain CRDs for the same GVK with non-equal specs (especially non-equal schemas). Signed-off-by: David Festal --- .../pkg/apiserver/customresource_handler.go | 51 +++++++++++++++++-- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index 7698a83073d60..e6fcc14f8d111 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -49,7 +49,9 @@ import ( "k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor" "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/apimachinery/pkg/api/equality" apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -270,16 +272,55 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { crdName = crdName + "core" } - crdKey := crdName - clusterName, err := genericapirequest.ClusterNameFrom(ctx) + var crdClusterName string + var crd *apiextensionsv1.CustomResourceDefinition + var err error + + cluster, err := genericapirequest.ValidClusterFrom(ctx) if err != nil { responsewriters.ErrorNegotiated( apierrors.NewInternalError(fmt.Errorf("error resolving resource: %v", err)), Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req, ) + return + } + + if cluster.Wildcard { + // HACK: Search for the right logical cluster hosting the given CRD when watching or listing with wildcards. + // This is a temporary fix for issue https://github.com/kcp-dev/kcp/issues/183: One cannot watch with wildcards + // (across logical clusters) if the CRD of the related API Resource hasn't been added in the admin logical cluster first. + // The fix in this HACK is limited since the request will fail if 2 logical clusters contain CRDs for the same GVK + // with non-equal specs (especially non-equal schemas). + var crds []*apiextensionsv1.CustomResourceDefinition + crds, err = r.crdLister.List(labels.Everything()) + if err == nil { + if len(crds) == 0 { + err = errors.NewNotFound(schema.GroupResource{Group: apiextensionsv1.SchemeGroupVersion.Group, Resource: "customresourcedefinitions"}, "") + } else { + for _, aCRD := range crds { + if aCRD.Name != crdName { + continue + } + if crd == nil { + crd = aCRD + crdClusterName = aCRD.GetClusterName() + } else { + if !equality.Semantic.DeepEqual(crd.Spec, aCRD.Spec) { + responsewriters.ErrorNegotiated( + apierrors.NewInternalError(fmt.Errorf("error resolving resource: cannot watch across logical clusters for a resource type with several distinct schemas")), + Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req, + ) + return + } + } + } + } + } + } else { + crdClusterName = cluster.Name + crdKey := clusters.ToClusterAwareKey(crdClusterName, crdName) + crd, err = r.crdLister.Get(crdKey) } - crdKey = clusters.ToClusterAwareKey(clusterName, crdKey) - crd, err := r.crdLister.Get(crdKey) if apierrors.IsNotFound(err) { r.delegate.ServeHTTP(w, req) return @@ -322,7 +363,7 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { terminating := apiextensionshelpers.IsCRDConditionTrue(crd, apiextensionsv1.Terminating) - crdInfo, err := r.getOrCreateServingInfoFor(crd.UID, crd.Name, clusterName) + crdInfo, err := r.getOrCreateServingInfoFor(crd.UID, crd.Name, crdClusterName) if apierrors.IsNotFound(err) { r.delegate.ServeHTTP(w, req) return From 34777caaf20a75e197e290919af14e307e02a120 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Thu, 16 Sep 2021 11:41:52 -0700 Subject: [PATCH 26/87] HACK: allow configuring the handler chain from options Transparent sharding needs to occur after a client has passed auth{n,z} for the primary replica they contact. This means that kcp needs to inject a handler in between those chains and the gorestful delegates. Right now the simplest way to do that is to just open up the option. Signed-off-by: Steve Kuznetsov --- pkg/genericcontrolplane/options/options.go | 5 +++++ pkg/genericcontrolplane/server.go | 3 +++ 2 files changed, 8 insertions(+) diff --git a/pkg/genericcontrolplane/options/options.go b/pkg/genericcontrolplane/options/options.go index e4ed8390783fd..db1db12c1e057 100644 --- a/pkg/genericcontrolplane/options/options.go +++ b/pkg/genericcontrolplane/options/options.go @@ -17,10 +17,12 @@ limitations under the License. package options import ( + "net/http" "time" "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating" "k8s.io/apiserver/pkg/admission/plugin/webhook/validating" + genericapiserver "k8s.io/apiserver/pkg/server" genericoptions "k8s.io/apiserver/pkg/server/options" "k8s.io/apiserver/pkg/storage/storagebackend" "k8s.io/component-base/logs" @@ -66,6 +68,9 @@ type ServerRunOptions struct { ServiceAccountTokenMaxExpiration time.Duration ShowHiddenMetricsForVersion string + + // BuildHandlerChainFunc allows you to build custom handler chains by decorating the apiHandler. + BuildHandlerChainFunc func(apiHandler http.Handler, c *genericapiserver.Config) (secure http.Handler) } // NewServerRunOptions creates a new ServerRunOptions object with default parameters diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index ce76c9c8dfc13..e2df4c9ac84ed 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -297,6 +297,9 @@ func BuildGenericConfig( lastErr error, ) { genericConfig = genericapiserver.NewConfig(genericcontrolplanescheme.Codecs) + if s.BuildHandlerChainFunc != nil { + genericConfig.BuildHandlerChainFunc = s.BuildHandlerChainFunc + } if lastErr = s.GenericServerRunOptions.ApplyTo(genericConfig); lastErr != nil { return From e9ad3a0c61a3029d13e8bc79dd6024c8b4e63b53 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 27 Sep 2021 07:14:31 -0700 Subject: [PATCH 27/87] HACK: opt kcp controllers out of multi-cluster Signed-off-by: Steve Kuznetsov --- pkg/genericcontrolplane/clientutils/multiclusterconfig.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go index 8bfb37c68ebac..827288f519eeb 100644 --- a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go +++ b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go @@ -157,5 +157,6 @@ func (mcrt *multiClusterClientConfigRoundTripper) RoundTrip(req *http.Request) ( req.Header.Add("X-Kubernetes-Cluster", contextCluster.Name) } } + req.Header.Add("X-Kubernetes-Sharded-Request", "false") return mcrt.rt.RoundTrip(req) } From 3b9864d86c67b5417e23d4d423e4fcdaa0500188 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 27 Sep 2021 09:25:56 -0700 Subject: [PATCH 28/87] HACK: export continue token impl Signed-off-by: Steve Kuznetsov --- .../apiserver/pkg/storage/etcd3/errors.go | 4 ++-- .../apiserver/pkg/storage/etcd3/store.go | 20 +++++++++---------- .../apiserver/pkg/storage/etcd3/store_test.go | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/errors.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/errors.go index 652bd7ca6dcac..6d113243d1884 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/errors.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/errors.go @@ -57,10 +57,10 @@ func interpretListError(err error, paging bool, continueKey, keyPrefix string) e } func handleCompactedErrorForPaging(continueKey, keyPrefix string) error { - // continueToken.ResoureVersion=-1 means that the apiserver can + // ContinueToken.ResoureVersion=-1 means that the apiserver can // continue the list at the latest resource version. We don't use rv=0 // for this purpose to distinguish from a bad token that has empty rv. - newToken, err := encodeContinue(continueKey, keyPrefix, -1) + newToken, err := EncodeContinue(continueKey, keyPrefix, -1) if err != nil { utilruntime.HandleError(err) return errors.NewResourceExpired(continueExpired) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go index dd761eed0b922..869b6abb9b161 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -576,24 +576,24 @@ func (s *store) Count(key string) (int64, error) { return getResp.Count, nil } -// continueToken is a simple structured object for encoding the state of a continue token. +// ContinueToken is a simple structured object for encoding the state of a continue token. // TODO: if we change the version of the encoded from, we can't start encoding the new version // until all other servers are upgraded (i.e. we need to support rolling schema) // This is a public API struct and cannot change. -type continueToken struct { +type ContinueToken struct { APIVersion string `json:"v"` ResourceVersion int64 `json:"rv"` StartKey string `json:"start"` } -// parseFrom transforms an encoded predicate from into a versioned struct. +// DecodeContinue transforms an encoded predicate from into a versioned struct. // TODO: return a typed error that instructs clients that they must relist -func decodeContinue(continueValue, keyPrefix string) (fromKey string, rv int64, err error) { +func DecodeContinue(continueValue, keyPrefix string) (fromKey string, rv int64, err error) { data, err := base64.RawURLEncoding.DecodeString(continueValue) if err != nil { return "", 0, fmt.Errorf("continue key is not valid: %v", err) } - var c continueToken + var c ContinueToken if err := json.Unmarshal(data, &c); err != nil { return "", 0, fmt.Errorf("continue key is not valid: %v", err) } @@ -623,13 +623,13 @@ func decodeContinue(continueValue, keyPrefix string) (fromKey string, rv int64, } } -// encodeContinue returns a string representing the encoded continuation of the current query. -func encodeContinue(key, keyPrefix string, resourceVersion int64) (string, error) { +// EncodeContinue returns a string representing the encoded continuation of the current query. +func EncodeContinue(key, keyPrefix string, resourceVersion int64) (string, error) { nextKey := strings.TrimPrefix(key, keyPrefix) if nextKey == key { return "", fmt.Errorf("unable to encode next field: the key and key prefix do not match") } - out, err := json.Marshal(&continueToken{APIVersion: "meta.k8s.io/v1", ResourceVersion: resourceVersion, StartKey: nextKey}) + out, err := json.Marshal(&ContinueToken{APIVersion: "meta.k8s.io/v1", ResourceVersion: resourceVersion, StartKey: nextKey}) if err != nil { return "", err } @@ -691,7 +691,7 @@ func (s *store) List(ctx context.Context, key string, opts storage.ListOptions, var continueKey string switch { case s.pagingEnabled && len(pred.Continue) > 0: - continueKey, continueRV, err = decodeContinue(pred.Continue, keyPrefix) + continueKey, continueRV, err = DecodeContinue(pred.Continue, keyPrefix) if err != nil { return apierrors.NewBadRequest(fmt.Sprintf("invalid continue token: %v", err)) } @@ -850,7 +850,7 @@ func (s *store) List(ctx context.Context, key string, opts storage.ListOptions, // we never return a key that the client wouldn't be allowed to see if hasMore { // we want to start immediately after the last key - next, err := encodeContinue(string(lastKey)+"\x00", keyPrefix, returnedRV) + next, err := EncodeContinue(string(lastKey)+"\x00", keyPrefix, returnedRV) if err != nil { return err } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go index 69f1996240ae9..4b06844682df5 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go @@ -1137,7 +1137,7 @@ func TestList(t *testing.T) { list := &example.PodList{} store.List(ctx, "/two-level", storage.ListOptions{ResourceVersion: "0", Predicate: storage.Everything}, list) continueRV, _ := strconv.Atoi(list.ResourceVersion) - secondContinuation, err := encodeContinue("/two-level/2", "/two-level/", int64(continueRV)) + secondContinuation, err := EncodeContinue("/two-level/2", "/two-level/", int64(continueRV)) if err != nil { t.Fatal(err) } @@ -1659,7 +1659,7 @@ func TestListContinuation(t *testing.T) { t.Fatalf("Unexpected continuation token set") } if !reflect.DeepEqual(out.Items, []example.Pod{*preset[1].storedObj, *preset[2].storedObj}) { - key, rv, err := decodeContinue(continueFromSecondItem, "/") + key, rv, err := DecodeContinue(continueFromSecondItem, "/") t.Logf("continue token was %d %s %v", rv, key, err) t.Fatalf("Unexpected second page: %#v", out.Items) } @@ -2036,7 +2036,7 @@ func TestPrefix(t *testing.T) { } func encodeContinueOrDie(apiVersion string, resourceVersion int64, nextKey string) string { - out, err := json.Marshal(&continueToken{APIVersion: apiVersion, ResourceVersion: resourceVersion, StartKey: nextKey}) + out, err := json.Marshal(&ContinueToken{APIVersion: apiVersion, ResourceVersion: resourceVersion, StartKey: nextKey}) if err != nil { panic(err) } @@ -2068,7 +2068,7 @@ func Test_decodeContinue(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - gotFromKey, gotRv, err := decodeContinue(tt.args.continueValue, tt.args.keyPrefix) + gotFromKey, gotRv, err := DecodeContinue(tt.args.continueValue, tt.args.keyPrefix) if (err != nil) != tt.wantErr { t.Errorf("decodeContinue() error = %v, wantErr %v", err, tt.wantErr) return From 4d2c5638f2c538f39d22df761022598480155b85 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Thu, 30 Sep 2021 14:55:10 -0700 Subject: [PATCH 29/87] HACK: expose unstructured creator and helpers Signed-off-by: Steve Kuznetsov --- .../pkg/apiserver/customresource_handler.go | 12 ++++++------ .../pkg/registry/generic/registry/store.go | 2 +- .../k8s.io/apiserver/pkg/storage/etcd3/store.go | 16 ++++++++-------- staging/src/k8s.io/client-go/rest/request.go | 12 ++++++++++++ 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index e6fcc14f8d111..68caa5e31c601 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -864,8 +864,8 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name, clusterName kind := schema.GroupVersionKind{Group: crd.Spec.Group, Version: v.Name, Kind: crd.Status.AcceptedNames.Kind} equivalentResourceRegistry.RegisterKindFor(resource, "", kind) - typer := newUnstructuredObjectTyper(parameterScheme) - creator := unstructuredCreator{} + typer := NewUnstructuredObjectTyper(parameterScheme) + creator := UnstructuredCreator{} validationSchema, err := apiextensionshelpers.GetSchemaForVersion(crd, v.Name) if err != nil { @@ -1251,7 +1251,7 @@ type UnstructuredObjectTyper struct { UnstructuredTyper runtime.ObjectTyper } -func newUnstructuredObjectTyper(Delegate runtime.ObjectTyper) UnstructuredObjectTyper { +func NewUnstructuredObjectTyper(Delegate runtime.ObjectTyper) UnstructuredObjectTyper { return UnstructuredObjectTyper{ Delegate: Delegate, UnstructuredTyper: crdserverscheme.NewUnstructuredObjectTyper(), @@ -1270,9 +1270,9 @@ func (t UnstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { return t.Delegate.Recognizes(gvk) || t.UnstructuredTyper.Recognizes(gvk) } -type unstructuredCreator struct{} +type UnstructuredCreator struct{} -func (c unstructuredCreator) New(kind schema.GroupVersionKind) (runtime.Object, error) { +func (c UnstructuredCreator) New(kind schema.GroupVersionKind) (runtime.Object, error) { ret := &unstructured.Unstructured{} ret.SetGroupVersionKind(kind) return ret, nil @@ -1367,7 +1367,7 @@ func (t crdConversionRESTOptionsGetter) GetRESTOptions(resource schema.GroupReso ret.StorageConfig.Codec, d, c, - &unstructuredCreator{}, + &UnstructuredCreator{}, crdserverscheme.NewUnstructuredObjectTyper(), &unstructuredDefaulter{ delegate: Scheme, diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go index 680d6a27f7dd5..50e789f2ccd77 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go @@ -722,7 +722,7 @@ func (e *Store) Get(ctx context.Context, name string, options *metav1.GetOptions if err != nil { return nil, err } - klog.Infof("DEBUG: GET key func returned: %s", key) + // klog.Infof("DEBUG: GET key func returned: %s", key) if err := e.Storage.Get(ctx, key, storage.GetOptions{ResourceVersion: options.ResourceVersion}, obj); err != nil { return nil, storeerr.InterpretGetError(err, e.qualifiedResourceFromContext(ctx), name) } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go index 869b6abb9b161..e486a4b779401 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -1065,16 +1065,16 @@ func decode(codec runtime.Codec, versioner storage.Versioner, value []byte, objP // The etcd key is ultimately the only thing that links us to a cluster if clusterName != "" { if s, ok := objPtr.(metav1.ObjectMetaAccessor); ok { - klog.Infof("Setting ClusterName %s in appendListItem", clusterName) + //klog.Infof("Setting ClusterName %s in appendListItem", clusterName) s.GetObjectMeta().SetClusterName(clusterName) } else if s, ok := objPtr.(metav1.Object); ok { - klog.Infof("Setting ClusterName %s in appendListItem", clusterName) + //klog.Infof("Setting ClusterName %s in appendListItem", clusterName) s.SetClusterName(clusterName) } else if s, ok := objPtr.(*unstructured.Unstructured); ok { - klog.Infof("SUB: %s", clusterName) + //klog.Infof("SUB: %s", clusterName) s.SetClusterName(clusterName) } else { - klog.Infof("Could not set ClusterName %s in appendListItem on object: %T", clusterName, objPtr) + klog.Warningf("Could not set ClusterName %s in appendListItem on object: %T", clusterName, objPtr) } } else { klog.Errorf("Cluster should not be unknown") @@ -1101,16 +1101,16 @@ func appendListItem(v reflect.Value, data []byte, rev uint64, pred storage.Selec // The etcd key is ultimately the only thing that links us to a cluster if clusterName != "" { if s, ok := obj.(metav1.ObjectMetaAccessor); ok { - klog.Infof("Setting ClusterName %s in appendListItem", clusterName) + //klog.Infof("Setting ClusterName %s in appendListItem", clusterName) s.GetObjectMeta().SetClusterName(clusterName) } else if s, ok := obj.(metav1.Object); ok { - klog.Infof("Setting ClusterName %s in appendListItem", clusterName) + //klog.Infof("Setting ClusterName %s in appendListItem", clusterName) s.SetClusterName(clusterName) } else if s, ok := obj.(*unstructured.Unstructured); ok { - klog.Infof("SUB: %s", clusterName) + //klog.Infof("SUB: %s", clusterName) s.SetClusterName(clusterName) } else { - klog.Infof("Could not set ClusterName %s in appendListItem on object: %T", clusterName, obj) + //klog.Infof("Could not set ClusterName %s in appendListItem on object: %T", clusterName, obj) } } else { klog.Errorf("Cluster should not be unknown") diff --git a/staging/src/k8s.io/client-go/rest/request.go b/staging/src/k8s.io/client-go/rest/request.go index 5cc9900b04a6e..83a33ed2ed796 100644 --- a/staging/src/k8s.io/client-go/rest/request.go +++ b/staging/src/k8s.io/client-go/rest/request.go @@ -347,6 +347,18 @@ func (r *Request) Param(paramName, s string) *Request { return r.setParam(paramName, s) } +// OverwriteParam creates a query parameter with the given string value. +func (r *Request) OverwriteParam(paramName, s string) *Request { + if r.err != nil { + return r + } + if r.params == nil { + r.params = make(url.Values) + } + r.params[paramName] = []string{s} + return r +} + // VersionedParams will take the provided object, serialize it to a map[string][]string using the // implicit RESTClient API version and the default parameter codec, and then add those as parameters // to the request. Use this to provide versioned query parameters from client libraries. From 1089fca3af6237665cceb70c0fd38defb6b30c14 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 11 Oct 2021 16:04:12 -0700 Subject: [PATCH 30/87] HACK: rest: request: allow debugging incoming and outgoing requests Signed-off-by: Steve Kuznetsov --- staging/src/k8s.io/client-go/rest/request.go | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/staging/src/k8s.io/client-go/rest/request.go b/staging/src/k8s.io/client-go/rest/request.go index 83a33ed2ed796..72355907c1d53 100644 --- a/staging/src/k8s.io/client-go/rest/request.go +++ b/staging/src/k8s.io/client-go/rest/request.go @@ -25,6 +25,7 @@ import ( "io/ioutil" "mime" "net/http" + "net/http/httputil" "net/url" "path" "reflect" @@ -112,6 +113,8 @@ type Request struct { err error body io.Reader retry WithRetry + + debug bool } // NewRequest creates a new request helper object for accessing runtime.Objects on a server. @@ -405,6 +408,11 @@ func (r *Request) SetHeader(key string, values ...string) *Request { return r } +func (r *Request) Debug() *Request { + r.debug = true + return r +} + // Timeout makes the request use the given duration as an overall timeout for the // request. Additionally, if set passes the value as "timeout" parameter in URL. func (r *Request) Timeout(d time.Duration) *Request { @@ -930,6 +938,13 @@ func (r *Request) newHTTPRequest(ctx context.Context) (*http.Request, error) { } req = req.WithContext(ctx) req.Header = r.headers + if r.debug { + v, e := httputil.DumpRequestOut(req, true) + klog.V(10).Info(string(v)) + if e != nil { + klog.Error(e) + } + } return req, nil } @@ -990,6 +1005,13 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp retryAfter = nil } resp, err := client.Do(req) + if r.debug { + v, e := httputil.DumpResponse(resp, true) + klog.V(10).Info(string(v)) + if e != nil { + klog.Error(e) + } + } updateURLMetrics(ctx, r, resp, err) if err != nil { r.backoff.UpdateBackoff(r.URL(), err, 0) From 3b9bef015cdef80631a11e7a766e64025c392422 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 11 Oct 2021 16:04:36 -0700 Subject: [PATCH 31/87] HACK: tablewriter: allow a default type-less handler Signed-off-by: Steve Kuznetsov --- pkg/printers/tablegenerator.go | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/pkg/printers/tablegenerator.go b/pkg/printers/tablegenerator.go index b947a3af53ab5..99f72d471d744 100644 --- a/pkg/printers/tablegenerator.go +++ b/pkg/printers/tablegenerator.go @@ -52,6 +52,7 @@ type handlerEntry struct { // PrintObj(). type HumanReadableGenerator struct { handlerMap map[reflect.Type]*handlerEntry + defaultHandler *handlerEntry } var _ TableGenerator = &HumanReadableGenerator{} @@ -79,7 +80,10 @@ func (h *HumanReadableGenerator) GenerateTable(obj runtime.Object, options Gener t := reflect.TypeOf(obj) handler, ok := h.handlerMap[t] if !ok { - return nil, fmt.Errorf("no table handler registered for this type %v", t) + if h.defaultHandler == nil { + return nil, fmt.Errorf("no table handler registered for this type %v", t) + } + handler = h.defaultHandler } args := []reflect.Value{reflect.ValueOf(obj), reflect.ValueOf(options)} @@ -122,13 +126,33 @@ func (h *HumanReadableGenerator) GenerateTable(obj runtime.Object, options Gener return table, nil } +// DefaultHandler adds a print handler with a given set of columns to HumanReadableGenerator instance. +// See ValidateRowPrintHandlerFunc for required method signature. +func (h *HumanReadableGenerator) DefaultHandler(columnDefinitions []metav1.TableColumnDefinition, printFunc interface{}) error { + _, entry, err := h.handlerHelper(columnDefinitions, printFunc) + if err != nil { + return err + } + h.defaultHandler = entry + return nil +} + // TableHandler adds a print handler with a given set of columns to HumanReadableGenerator instance. // See ValidateRowPrintHandlerFunc for required method signature. func (h *HumanReadableGenerator) TableHandler(columnDefinitions []metav1.TableColumnDefinition, printFunc interface{}) error { + objType, entry, err := h.handlerHelper(columnDefinitions, printFunc) + if err != nil { + return err + } + h.handlerMap[objType] = entry + return nil +} + +func (h *HumanReadableGenerator) handlerHelper(columnDefinitions []metav1.TableColumnDefinition, printFunc interface{}) (reflect.Type, *handlerEntry, error) { printFuncValue := reflect.ValueOf(printFunc) if err := ValidateRowPrintHandlerFunc(printFuncValue); err != nil { utilruntime.HandleError(fmt.Errorf("unable to register print function: %v", err)) - return err + return nil, nil, err } entry := &handlerEntry{ columnDefinitions: columnDefinitions, @@ -139,10 +163,9 @@ func (h *HumanReadableGenerator) TableHandler(columnDefinitions []metav1.TableCo if _, ok := h.handlerMap[objType]; ok { err := fmt.Errorf("registered duplicate printer for %v", objType) utilruntime.HandleError(err) - return err + return nil, nil, err } - h.handlerMap[objType] = entry - return nil + return objType, entry, nil } // ValidateRowPrintHandlerFunc validates print handler signature. From 1ae2f635015e798c64e3bc0cfd6309f24797e381 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 11 Oct 2021 16:05:17 -0700 Subject: [PATCH 32/87] HACK: make e2e pass against kcp There are a couple issues with the current e2e, including some weird client config munging that breaks our setup as well as a lot of assumptions that the cluster under test has Pods, Nodes, etc. We need to turn all of this off so that the e2e is meaningful. Signed-off-by: Steve Kuznetsov --- test/e2e/e2e.go | 55 +++++++++---------- test/e2e/framework/framework.go | 88 +++++++++++++++--------------- test/e2e/framework/test_context.go | 2 +- test/e2e/framework/util.go | 9 ++- test/e2e/suites.go | 26 ++++----- 5 files changed, 92 insertions(+), 88 deletions(-) diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index b387e05983cd5..60028b7a1e3fb 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -46,9 +46,6 @@ import ( commontest "k8s.io/kubernetes/test/e2e/common" "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/framework/daemonset" - e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl" - e2enode "k8s.io/kubernetes/test/e2e/framework/node" - e2epod "k8s.io/kubernetes/test/e2e/framework/pod" e2ereporters "k8s.io/kubernetes/test/e2e/reporters" utilnet "k8s.io/utils/net" @@ -83,7 +80,7 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte { return nil }, func(data []byte) { // Run on all Ginkgo nodes - setupSuitePerGinkgoNode() + //setupSuitePerGinkgoNode() }) var _ = ginkgo.SynchronizedAfterSuite(func() { @@ -231,33 +228,33 @@ func setupSuite() { // In large clusters we may get to this point but still have a bunch // of nodes without Routes created. Since this would make a node // unschedulable, we need to wait until all of them are schedulable. - framework.ExpectNoError(framework.WaitForAllNodesSchedulable(c, framework.TestContext.NodeSchedulableTimeout)) + //framework.ExpectNoError(framework.WaitForAllNodesSchedulable(c, framework.TestContext.NodeSchedulableTimeout)) // If NumNodes is not specified then auto-detect how many are scheduleable and not tainted - if framework.TestContext.CloudConfig.NumNodes == framework.DefaultNumNodes { - nodes, err := e2enode.GetReadySchedulableNodes(c) - framework.ExpectNoError(err) - framework.TestContext.CloudConfig.NumNodes = len(nodes.Items) - } + //if framework.TestContext.CloudConfig.NumNodes == framework.DefaultNumNodes { + // nodes, err := e2enode.GetReadySchedulableNodes(c) + // framework.ExpectNoError(err) + // framework.TestContext.CloudConfig.NumNodes = len(nodes.Items) + //} // Ensure all pods are running and ready before starting tests (otherwise, // cluster infrastructure pods that are being pulled or started can block // test pods from running, and tests that ensure all pods are running and // ready will fail). - podStartupTimeout := framework.TestContext.SystemPodsStartupTimeout - // TODO: In large clusters, we often observe a non-starting pods due to - // #41007. To avoid those pods preventing the whole test runs (and just - // wasting the whole run), we allow for some not-ready pods (with the - // number equal to the number of allowed not-ready nodes). - if err := e2epod.WaitForPodsRunningReady(c, metav1.NamespaceSystem, int32(framework.TestContext.MinStartupPods), int32(framework.TestContext.AllowedNotReadyNodes), podStartupTimeout, map[string]string{}); err != nil { - framework.DumpAllNamespaceInfo(c, metav1.NamespaceSystem) - e2ekubectl.LogFailedContainers(c, metav1.NamespaceSystem, framework.Logf) - framework.Failf("Error waiting for all pods to be running and ready: %v", err) - } - - if err := waitForDaemonSets(c, metav1.NamespaceSystem, int32(framework.TestContext.AllowedNotReadyNodes), framework.TestContext.SystemDaemonsetStartupTimeout); err != nil { - framework.Logf("WARNING: Waiting for all daemonsets to be ready failed: %v", err) - } + //podStartupTimeout := framework.TestContext.SystemPodsStartupTimeout + //// TODO: In large clusters, we often observe a non-starting pods due to + //// #41007. To avoid those pods preventing the whole test runs (and just + //// wasting the whole run), we allow for some not-ready pods (with the + //// number equal to the number of allowed not-ready nodes). + //if err := e2epod.WaitForPodsRunningReady(c, metav1.NamespaceSystem, int32(framework.TestContext.MinStartupPods), int32(framework.TestContext.AllowedNotReadyNodes), podStartupTimeout, map[string]string{}); err != nil { + // framework.DumpAllNamespaceInfo(c, metav1.NamespaceSystem) + // e2ekubectl.LogFailedContainers(c, metav1.NamespaceSystem, framework.Logf) + // framework.Failf("Error waiting for all pods to be running and ready: %v", err) + //} + + //if err := waitForDaemonSets(c, metav1.NamespaceSystem, int32(framework.TestContext.AllowedNotReadyNodes), framework.TestContext.SystemDaemonsetStartupTimeout); err != nil { + // framework.Logf("WARNING: Waiting for all daemonsets to be ready failed: %v", err) + //} if framework.TestContext.PrepullImages { framework.Logf("Pre-pulling images so that they are cached for the tests.") @@ -276,11 +273,11 @@ func setupSuite() { if serverVersion != nil { framework.Logf("kube-apiserver version: %s", serverVersion.GitVersion) } - - if framework.TestContext.NodeKiller.Enabled { - nodeKiller := framework.NewNodeKiller(framework.TestContext.NodeKiller, c, framework.TestContext.Provider) - go nodeKiller.Run(framework.TestContext.NodeKiller.NodeKillerStopCh) - } + // + //if framework.TestContext.NodeKiller.Enabled { + // nodeKiller := framework.NewNodeKiller(framework.TestContext.NodeKiller, c, framework.TestContext.Provider) + // go nodeKiller.Run(framework.TestContext.NodeKiller.NodeKillerStopCh) + //} } // logClusterImageSources writes out cluster image sources. diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 5d72e89f7921a..0b8f3491416e7 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -431,53 +431,53 @@ func (f *Framework) AfterEach() { afterEachFn(f, ginkgo.CurrentGinkgoTestDescription().Failed) } - if TestContext.GatherKubeSystemResourceUsageData != "false" && TestContext.GatherKubeSystemResourceUsageData != "none" && f.gatherer != nil { - ginkgo.By("Collecting resource usage data") - summary, resourceViolationError := f.gatherer.StopAndSummarize([]int{90, 99, 100}, f.AddonResourceConstraints) - defer ExpectNoError(resourceViolationError) - f.TestSummaries = append(f.TestSummaries, summary) - } - - if TestContext.GatherLogsSizes { - ginkgo.By("Gathering log sizes data") - close(f.logsSizeCloseChannel) - f.logsSizeWaitGroup.Wait() - f.TestSummaries = append(f.TestSummaries, f.logsSizeVerifier.GetSummary()) - } - - if TestContext.GatherMetricsAfterTest != "false" { - ginkgo.By("Gathering metrics") - // Grab apiserver, scheduler, controller-manager metrics and (optionally) nodes' kubelet metrics. - grabMetricsFromKubelets := TestContext.GatherMetricsAfterTest != "master" && !ProviderIs("kubemark") - grabber, err := e2emetrics.NewMetricsGrabber(f.ClientSet, f.KubemarkExternalClusterClientSet, f.ClientConfig(), grabMetricsFromKubelets, true, true, true, TestContext.IncludeClusterAutoscalerMetrics, false) - if err != nil { - Logf("Failed to create MetricsGrabber (skipping metrics gathering): %v", err) - } else { - received, err := grabber.Grab() - if err != nil { - Logf("MetricsGrabber failed to grab some of the metrics: %v", err) - } - (*e2emetrics.ComponentCollection)(&received).ComputeClusterAutoscalerMetricsDelta(f.clusterAutoscalerMetricsBeforeTest) - f.TestSummaries = append(f.TestSummaries, (*e2emetrics.ComponentCollection)(&received)) - } - } - - TestContext.CloudConfig.Provider.FrameworkAfterEach(f) - - // Report any flakes that were observed in the e2e test and reset. - if f.flakeReport != nil && f.flakeReport.GetFlakeCount() > 0 { - f.TestSummaries = append(f.TestSummaries, f.flakeReport) - f.flakeReport = nil - } + //if TestContext.GatherKubeSystemResourceUsageData != "false" && TestContext.GatherKubeSystemResourceUsageData != "none" && f.gatherer != nil { + // ginkgo.By("Collecting resource usage data") + // summary, resourceViolationError := f.gatherer.StopAndSummarize([]int{90, 99, 100}, f.AddonResourceConstraints) + // defer ExpectNoError(resourceViolationError) + // f.TestSummaries = append(f.TestSummaries, summary) + //} + // + //if TestContext.GatherLogsSizes { + // ginkgo.By("Gathering log sizes data") + // close(f.logsSizeCloseChannel) + // f.logsSizeWaitGroup.Wait() + // f.TestSummaries = append(f.TestSummaries, f.logsSizeVerifier.GetSummary()) + //} + // + //if TestContext.GatherMetricsAfterTest != "false" { + // ginkgo.By("Gathering metrics") + // // Grab apiserver, scheduler, controller-manager metrics and (optionally) nodes' kubelet metrics. + // grabMetricsFromKubelets := TestContext.GatherMetricsAfterTest != "master" && !ProviderIs("kubemark") + // grabber, err := e2emetrics.NewMetricsGrabber(f.ClientSet, f.KubemarkExternalClusterClientSet, f.ClientConfig(), grabMetricsFromKubelets, true, true, true, TestContext.IncludeClusterAutoscalerMetrics, false) + // if err != nil { + // Logf("Failed to create MetricsGrabber (skipping metrics gathering): %v", err) + // } else { + // received, err := grabber.Grab() + // if err != nil { + // Logf("MetricsGrabber failed to grab some of the metrics: %v", err) + // } + // (*e2emetrics.ComponentCollection)(&received).ComputeClusterAutoscalerMetricsDelta(f.clusterAutoscalerMetricsBeforeTest) + // f.TestSummaries = append(f.TestSummaries, (*e2emetrics.ComponentCollection)(&received)) + // } + //} + // + //TestContext.CloudConfig.Provider.FrameworkAfterEach(f) + // + //// Report any flakes that were observed in the e2e test and reset. + //if f.flakeReport != nil && f.flakeReport.GetFlakeCount() > 0 { + // f.TestSummaries = append(f.TestSummaries, f.flakeReport) + // f.flakeReport = nil + //} printSummaries(f.TestSummaries, f.BaseName) - // Check whether all nodes are ready after the test. - // This is explicitly done at the very end of the test, to avoid - // e.g. not removing namespace in case of this failure. - if err := AllNodesReady(f.ClientSet, 3*time.Minute); err != nil { - Failf("All nodes should be ready after test, %v", err) - } + //// Check whether all nodes are ready after the test. + //// This is explicitly done at the very end of the test, to avoid + //// e.g. not removing namespace in case of this failure. + //if err := AllNodesReady(f.ClientSet, 3*time.Minute); err != nil { + // Failf("All nodes should be ready after test, %v", err) + //} } // DeleteNamespace can be used to delete a namespace. Additionally it can be used to diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index 43508106511f1..c8cd6eeedfa2a 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -335,7 +335,7 @@ func RegisterClusterFlags(flags *flag.FlagSet) { flags.BoolVar(&TestContext.VerifyServiceAccount, "e2e-verify-service-account", true, "If true tests will verify the service account before running.") flags.StringVar(&TestContext.KubeConfig, clientcmd.RecommendedConfigPathFlag, os.Getenv(clientcmd.RecommendedConfigPathEnvVar), "Path to kubeconfig containing embedded authinfo.") flags.StringVar(&TestContext.KubeContext, clientcmd.FlagContext, "", "kubeconfig context to use/override. If unset, will use value from 'current-context'") - flags.StringVar(&TestContext.KubeAPIContentType, "kube-api-content-type", "application/vnd.kubernetes.protobuf", "ContentType used to communicate with apiserver") + flags.StringVar(&TestContext.KubeAPIContentType, "kube-api-content-type", "application/json", "ContentType used to communicate with apiserver") flags.StringVar(&TestContext.KubeVolumeDir, "volume-dir", "/var/lib/kubelet", "Path to the directory containing the kubelet volumes.") flags.StringVar(&TestContext.CertDir, "cert-dir", "", "Path to the directory containing the certs. Default is empty, which doesn't use certs.") diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 3f3602e9f3f74..29d0fd2f2df38 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -496,7 +496,14 @@ func LoadConfig() (config *restclient.Config, err error) { } } - return clientcmd.NewDefaultClientConfig(*c, &clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: TestContext.Host}}).ClientConfig() + cfg, err := clientcmd.NewDefaultClientConfig(*c, &clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: TestContext.Host}}).ClientConfig() + if err != nil { + return nil, err + } + cfg.TLSClientConfig.ServerName = "apiserver-loopback-client" + cfg.ContentConfig.AcceptContentTypes = "application/json" + cfg.ContentConfig.ContentType = "application/json" + return cfg, nil } // LoadClientset returns clientset for connecting to kubernetes clusters. diff --git a/test/e2e/suites.go b/test/e2e/suites.go index d8bf0f8bd886b..a93b77e2b4bc6 100644 --- a/test/e2e/suites.go +++ b/test/e2e/suites.go @@ -34,24 +34,24 @@ import ( func CleanupSuite() { // Run on all Ginkgo nodes framework.Logf("Running AfterSuite actions on all nodes") - framework.RunCleanupActions() + //framework.RunCleanupActions() } // AfterSuiteActions are actions that are run on ginkgo's SynchronizedAfterSuite func AfterSuiteActions() { // Run only Ginkgo on node 1 - framework.Logf("Running AfterSuite actions on node 1") - if framework.TestContext.ReportDir != "" { - framework.CoreDump(framework.TestContext.ReportDir) - } - if framework.TestContext.GatherSuiteMetricsAfterTest { - if err := gatherTestSuiteMetrics(); err != nil { - framework.Logf("Error gathering metrics: %v", err) - } - } - if framework.TestContext.NodeKiller.Enabled { - close(framework.TestContext.NodeKiller.NodeKillerStopCh) - } + //framework.Logf("Running AfterSuite actions on node 1") + //if framework.TestContext.ReportDir != "" { + // framework.CoreDump(framework.TestContext.ReportDir) + //} + //if framework.TestContext.GatherSuiteMetricsAfterTest { + // if err := gatherTestSuiteMetrics(); err != nil { + // framework.Logf("Error gathering metrics: %v", err) + // } + //} + //if framework.TestContext.NodeKiller.Enabled { + // close(framework.TestContext.NodeKiller.NodeKillerStopCh) + //} } func gatherTestSuiteMetrics() error { From 6e55fe104c628ba147b0262d896a59508aaef5aa Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Tue, 12 Oct 2021 12:59:49 -0700 Subject: [PATCH 33/87] HACK: prefix cluster names with external host We need to have globally unique logical cluster names in order to be able to meaningfully delegate requests to the cross-shard proxy. Furthermore, until a source of truth exists for the mapping between Workspaces and shards, we can get a fascimile of this by encoding the serving address of the kcp shard into the workspace name and making sure we pass around kubeconfigs with correct identifiers. Signed-off-by: Steve Kuznetsov --- pkg/genericcontrolplane/aggregator.go | 17 ++++++++------- pkg/genericcontrolplane/server.go | 30 ++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/pkg/genericcontrolplane/aggregator.go b/pkg/genericcontrolplane/aggregator.go index 97333ddeaccec..6c70408817d33 100644 --- a/pkg/genericcontrolplane/aggregator.go +++ b/pkg/genericcontrolplane/aggregator.go @@ -48,8 +48,8 @@ import ( apiregistrationclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1" informers "k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1" "k8s.io/kube-aggregator/pkg/controllers/autoregister" - "k8s.io/kubernetes/pkg/genericcontrolplane/options" "k8s.io/kubernetes/pkg/controlplane/controller/crdregistration" + "k8s.io/kubernetes/pkg/genericcontrolplane/options" ) func createAggregatorConfig( @@ -123,7 +123,7 @@ func createAggregatorConfig( return aggregatorConfig, nil } -func createAggregatorServer(aggregatorConfig *aggregatorapiserver.Config, delegateAPIServer genericapiserver.DelegationTarget, apiExtensionInformers apiextensionsinformers.SharedInformerFactory) (*aggregatorapiserver.APIAggregator, error) { +func createAggregatorServer(aggregatorConfig *aggregatorapiserver.Config, delegateAPIServer genericapiserver.DelegationTarget, apiExtensionInformers apiextensionsinformers.SharedInformerFactory, id string) (*aggregatorapiserver.APIAggregator, error) { aggregatorServer, err := aggregatorConfig.Complete().NewWithDelegate(delegateAPIServer) if err != nil { return nil, err @@ -135,7 +135,7 @@ func createAggregatorServer(aggregatorConfig *aggregatorapiserver.Config, delega return nil, err } autoRegistrationController := autoregister.NewAutoRegisterController(aggregatorServer.APIRegistrationInformers.Apiregistration().V1().APIServices(), apiRegistrationClient) - apiServices := apiServicesToRegister(delegateAPIServer, autoRegistrationController) + apiServices := apiServicesToRegister(delegateAPIServer, autoRegistrationController, id) crdRegistrationController := crdregistration.NewCRDRegistrationController( apiExtensionInformers.Apiextensions().V1().CustomResourceDefinitions(), autoRegistrationController) @@ -171,7 +171,7 @@ func createAggregatorServer(aggregatorConfig *aggregatorapiserver.Config, delega return aggregatorServer, nil } -func makeAPIService(gv schema.GroupVersion) *v1.APIService { +func makeAPIService(gv schema.GroupVersion, id string) *v1.APIService { apiServicePriority, ok := apiVersionPriorities[gv] if !ok { // if we aren't found, then we shouldn't register ourselves because it could result in a CRD group version @@ -179,10 +179,11 @@ func makeAPIService(gv schema.GroupVersion) *v1.APIService { klog.Infof("Skipping APIService creation for %v", gv) return nil } + cluster := SanitizedClusterName(id, RootClusterName) return &v1.APIService{ ObjectMeta: metav1.ObjectMeta{ Name: gv.Version + "." + gv.Group, - ClusterName: RootClusterName, + ClusterName: cluster, }, Spec: v1.APIServiceSpec{ Group: gv.Group, @@ -267,12 +268,12 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{ {Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16100, version: 9}, } -func apiServicesToRegister(delegateAPIServer genericapiserver.DelegationTarget, registration autoregister.AutoAPIServiceRegistration) []*v1.APIService { +func apiServicesToRegister(delegateAPIServer genericapiserver.DelegationTarget, registration autoregister.AutoAPIServiceRegistration, id string) []*v1.APIService { apiServices := []*v1.APIService{} for _, curr := range delegateAPIServer.ListedPaths("") { if curr == "/api/v1" { - apiService := makeAPIService(schema.GroupVersion{Group: "", Version: "v1"}) + apiService := makeAPIService(schema.GroupVersion{Group: "", Version: "v1"}, id) registration.AddAPIServiceToSyncOnStart(apiService) apiServices = append(apiServices, apiService) continue @@ -287,7 +288,7 @@ func apiServicesToRegister(delegateAPIServer genericapiserver.DelegationTarget, continue } - apiService := makeAPIService(schema.GroupVersion{Group: tokens[2], Version: tokens[3]}) + apiService := makeAPIService(schema.GroupVersion{Group: tokens[2], Version: tokens[3]}, id) if apiService == nil { continue } diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index e2df4c9ac84ed..0ffb490d78107 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -70,6 +70,28 @@ const ( RootClusterName = "admin" ) +func SanitizeClusterId(id string) string { + r := regexp.MustCompile(`[^a-zA-Z0-9]`) + return r.ReplaceAllString(id, "-") +} + +func SanitizedClusterName(id, name string) string { + return fmt.Sprintf("%s---%s", SanitizeClusterId(id), name) +} + +func ParseClusterName(name string) (string, string, error) { + parts := strings.Split(name, "---") + switch len(parts) { + case 1: + // nothing provided, no error though + return "", "", nil + case 2: + return parts[0], parts[1], nil + default: + return "", "", fmt.Errorf("invalid cluster: %v", name) + } +} + // Run runs the specified APIServer. This should never exit. func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) error { // To help debugging, immediately log version @@ -112,7 +134,7 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan if err != nil { return nil, err } - aggregatorServer, err := createAggregatorServer(aggregatorConfig, kubeAPIServer.GenericAPIServer, apiExtensionsServer.Informers) + aggregatorServer, err := createAggregatorServer(aggregatorConfig, kubeAPIServer.GenericAPIServer, apiExtensionsServer.Informers, kubeAPIServer.GenericAPIServer.ExternalAddress) if err != nil { // we don't need special handling for innerStopCh because the aggregator server doesn't create any go routines return nil, err @@ -413,8 +435,10 @@ func BuildGenericConfig( klog.Infof("DEBUG: %s -> %s", req.URL.RawPath, req.URL.RawPath[slash:]) req.URL.RawPath = req.URL.RawPath[slash:] } + //klog.Infof("got cluster %q from keypath", clusterName) } else { clusterName = req.Header.Get("X-Kubernetes-Cluster") + //klog.Infof("got cluster %q from header", clusterName) } var cluster genericapirequest.Cluster switch clusterName { @@ -423,7 +447,7 @@ func BuildGenericConfig( cluster.Wildcard = true fallthrough case "": - cluster.Name = RootClusterName + cluster.Name = SanitizedClusterName(c.ExternalAddress, RootClusterName) default: if !reClusterName.MatchString(clusterName) { http.Error(w, "Unknown cluster", http.StatusNotFound) @@ -431,7 +455,7 @@ func BuildGenericConfig( } cluster.Name = clusterName } - //klog.V(0).Infof("DEBUG: running with cluster %s", cluster) + //klog.V(0).Infof("DEBUG: running with cluster %#v", cluster) ctx := genericapirequest.WithCluster(req.Context(), cluster) h.ServeHTTP(w, req.WithContext(ctx)) }) From 10b9a570ce55d92e581342aefb26ad9e99fbb689 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Fri, 15 Oct 2021 11:46:10 -0700 Subject: [PATCH 34/87] server: move kcp-specific cluster handler to kcp Signed-off-by: Steve Kuznetsov --- pkg/genericcontrolplane/server.go | 89 ------------------------------- 1 file changed, 89 deletions(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 0ffb490d78107..5170b2925436e 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -407,95 +407,6 @@ func BuildGenericConfig( return } - // if !sets.NewString(s.Authorization.Modes...).Has(modes.ModeRBAC) { - // genericConfig.DisabledPostStartHooks.Insert(rbacrest.PostStartHookName) - // } - - var originalHandler = genericConfig.BuildHandlerChainFunc - var reClusterName = regexp.MustCompile(`^[a-z0-9][a-z0-9-]{0,78}[a-z0-9]$`) - genericConfig.BuildHandlerChainFunc = func(handler http.Handler, c *genericapiserver.Config) http.Handler { - h := originalHandler(handler, c) - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - var clusterName string - if path := req.URL.Path; strings.HasPrefix(path, "/clusters/") { - path = strings.TrimPrefix(path, "/clusters/") - i := strings.Index(path, "/") - if i == -1 { - http.Error(w, "Unknown cluster", http.StatusNotFound) - return - } - clusterName, path = path[:i], path[i:] - req.URL.Path = path - for i := 0; i < 2 && len(req.URL.RawPath) > 1; i++ { - slash := strings.Index(req.URL.RawPath[1:], "/") - if slash == -1 { - http.Error(w, "Unknown cluster", http.StatusNotFound) - return - } - klog.Infof("DEBUG: %s -> %s", req.URL.RawPath, req.URL.RawPath[slash:]) - req.URL.RawPath = req.URL.RawPath[slash:] - } - //klog.Infof("got cluster %q from keypath", clusterName) - } else { - clusterName = req.Header.Get("X-Kubernetes-Cluster") - //klog.Infof("got cluster %q from header", clusterName) - } - var cluster genericapirequest.Cluster - switch clusterName { - case "*": - // HACK: just a workaround for testing - cluster.Wildcard = true - fallthrough - case "": - cluster.Name = SanitizedClusterName(c.ExternalAddress, RootClusterName) - default: - if !reClusterName.MatchString(clusterName) { - http.Error(w, "Unknown cluster", http.StatusNotFound) - return - } - cluster.Name = clusterName - } - //klog.V(0).Infof("DEBUG: running with cluster %#v", cluster) - ctx := genericapirequest.WithCluster(req.Context(), cluster) - h.ServeHTTP(w, req.WithContext(ctx)) - }) - } - - // admissionConfig := &controlplaneadmission.Config{ - // ExternalInformers: versionedInformers, - // LoopbackClientConfig: genericConfig.LoopbackClientConfig, - // } - - // lastErr = s.Audit.ApplyTo(genericConfig) - // if lastErr != nil { - // return - // } - - // admissionConfig := &controlplaneadmission.Config{ - // ExternalInformers: versionedInformers, - // LoopbackClientConfig: genericConfig.LoopbackClientConfig, - // } - // pluginInitializers, admissionPostStartHook, err = admissionConfig.New() - // if err != nil { - // lastErr = fmt.Errorf("failed to create admission plugin initializer: %v", err) - // return - // } - - // err = s.Admission.ApplyTo( - // genericConfig, - // versionedInformers, - // kubeClientConfig, - // utilfeature.DefaultFeatureGate, - // pluginInitializers...) - // if err != nil { - // lastErr = fmt.Errorf("failed to initialize admission: %v", err) - // return - // } - - // if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && s.GenericServerRunOptions.EnablePriorityAndFairness { - // genericConfig.FlowControl, lastErr = BuildPriorityAndFairness(s, clientgoExternalClient, versionedInformers) - // } - return } From c60f28c01f3486dec8dc27d8d363b91cdc122a24 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 18 Oct 2021 18:37:21 -0700 Subject: [PATCH 35/87] horrible hack: why? make lists when we need lists... but why ? Signed-off-by: Steve Kuznetsov --- .../pkg/apiserver/customresource_handler.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index 68caa5e31c601..04af5c29715da 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -1273,9 +1273,14 @@ func (t UnstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { type UnstructuredCreator struct{} func (c UnstructuredCreator) New(kind schema.GroupVersionKind) (runtime.Object, error) { - ret := &unstructured.Unstructured{} + var ret schema.ObjectKind + if strings.HasSuffix(kind.Kind, "List") { + ret = &unstructured.UnstructuredList{} + } else { + ret = &unstructured.Unstructured{} + } ret.SetGroupVersionKind(kind) - return ret, nil + return ret.(runtime.Object), nil } type unstructuredDefaulter struct { From 9fcc14f6947a17125a51258eb75f19d879f67e14 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 1 Nov 2021 15:31:07 -0700 Subject: [PATCH 36/87] HACK: add generated bits for go 1.17 Signed-off-by: Steve Kuznetsov --- pkg/generated/openapi/zz_generated.openapi.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index a3c3c7f441969..6818f865fcaa5 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* From b34aaf8d323857f0ab53b28dd3cb6515f4971330 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Wed, 3 Nov 2021 11:36:02 -0700 Subject: [PATCH 37/87] client-go, client-gen: support cluster explicitly Signed-off-by: Steve Kuznetsov --- staging/src/k8s.io/client-go/rest/request.go | 45 ++++++++-- .../src/k8s.io/client-go/rest/request_test.go | 83 +++++++++++-------- .../generators/generator_for_clientset.go | 59 +++++++++++-- .../generators/generator_for_group.go | 13 ++- .../generators/generator_for_type.go | 31 +++++-- 5 files changed, 175 insertions(+), 56 deletions(-) diff --git a/staging/src/k8s.io/client-go/rest/request.go b/staging/src/k8s.io/client-go/rest/request.go index 72355907c1d53..bf29526687452 100644 --- a/staging/src/k8s.io/client-go/rest/request.go +++ b/staging/src/k8s.io/client-go/rest/request.go @@ -97,12 +97,15 @@ type Request struct { // generic components accessible via method setters verb string + basePath string pathPrefix string subpath string params url.Values headers http.Header // structural elements of the request that are part of the Kubernetes API conventions + cluster string + clusterSet bool namespace string namespaceSet bool resource string @@ -127,11 +130,11 @@ func NewRequest(c *RESTClient) *Request { backoff = noBackoff } - var pathPrefix string + var basePath string if c.base != nil { - pathPrefix = path.Join("/", c.base.Path, c.versionedAPIPath) + basePath = path.Join("/", c.base.Path) } else { - pathPrefix = path.Join("/", c.versionedAPIPath) + basePath = "/" } var timeout time.Duration @@ -144,7 +147,8 @@ func NewRequest(c *RESTClient) *Request { rateLimiter: c.rateLimiter, backoff: backoff, timeout: timeout, - pathPrefix: pathPrefix, + basePath: basePath, + pathPrefix: c.versionedAPIPath, retry: &withRetry{maxRetries: 10}, warningHandler: c.warningHandler, } @@ -297,6 +301,24 @@ func (r *Request) Namespace(namespace string) *Request { return r } +// Cluster applies the cluster scope to a request ([clusters/]/...) +func (r *Request) Cluster(cluster string) *Request { + if r.err != nil { + return r + } + if r.clusterSet { + r.err = fmt.Errorf("cluster already set to %q, cannot change to %q", r.namespace, cluster) + return r + } + if msgs := IsValidPathSegmentName(cluster); len(msgs) != 0 { + r.err = fmt.Errorf("invalid cluster %q: %v", cluster, msgs) + return r + } + r.clusterSet = true + r.cluster = cluster + return r +} + // NamespaceIfScoped is a convenience function to set a namespace if scoped is true func (r *Request) NamespaceIfScoped(namespace string, scoped bool) *Request { if scoped { @@ -311,8 +333,8 @@ func (r *Request) AbsPath(segments ...string) *Request { if r.err != nil { return r } - r.pathPrefix = path.Join(r.c.base.Path, path.Join(segments...)) - if len(segments) == 1 && (len(r.c.base.Path) > 1 || len(segments[0]) > 1) && strings.HasSuffix(segments[0], "/") { + r.pathPrefix = path.Join(segments...) + if len(segments) == 1 && len(segments[0]) > 1 && strings.HasSuffix(segments[0], "/") { // preserve any trailing slashes for legacy behavior r.pathPrefix += "/" } @@ -483,7 +505,11 @@ func (r *Request) Body(obj interface{}) *Request { // URL returns the current working URL. func (r *Request) URL() *url.URL { - p := r.pathPrefix + p := r.basePath + if r.clusterSet && len(r.cluster) > 0 { + p = path.Join(p, "clusters", r.cluster) + } + p = path.Join(p, r.pathPrefix) if r.namespaceSet && len(r.namespace) > 0 { p = path.Join(p, "namespaces", r.namespace) } @@ -548,6 +574,11 @@ func (r Request) finalURLTemplate() url.URL { return *url } + if segments[groupIndex] == "clusters" { + segments[groupIndex+1] = "{cluster}" + groupIndex += 2 + } + const CoreGroupPrefix = "api" const NamedGroupPrefix = "apis" isCoreGroup := segments[groupIndex] == CoreGroupPrefix diff --git a/staging/src/k8s.io/client-go/rest/request_test.go b/staging/src/k8s.io/client-go/rest/request_test.go index 8e9bb92b5a7f3..434da088c89d2 100644 --- a/staging/src/k8s.io/client-go/rest/request_test.go +++ b/staging/src/k8s.io/client-go/rest/request_test.go @@ -39,6 +39,7 @@ import ( "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" + "github.com/google/go-cmp/cmp" apiequality "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -341,26 +342,27 @@ func TestURLTemplate(t *testing.T) { uri, _ := url.Parse("http://localhost/some/base/url/path") uriSingleSlash, _ := url.Parse("http://localhost/") testCases := []struct { + Name string Request *Request ExpectedFullURL string ExpectedFinalURL string }{ { - // non dynamic client + Name: "non dynamic client", Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("POST"). Prefix("api", "v1").Resource("r1").Namespace("ns").Name("nm").Param("p0", "v0"), ExpectedFullURL: "http://localhost/some/base/url/path/api/v1/namespaces/ns/r1/nm?p0=v0", ExpectedFinalURL: "http://localhost/some/base/url/path/api/v1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D?p0=%7Bvalue%7D", }, { - // non dynamic client with wrong api group + Name: "non dynamic client with wrong api group", Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("POST"). Prefix("pre1", "v1").Resource("r1").Namespace("ns").Name("nm").Param("p0", "v0"), ExpectedFullURL: "http://localhost/some/base/url/path/pre1/v1/namespaces/ns/r1/nm?p0=v0", ExpectedFinalURL: "http://localhost/%7Bprefix%7D", }, { - // dynamic client with core group + namespace + resourceResource (with name) + Name: "dynamic client with core group + namespace + resourceResource (with name)", // /api/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/api/v1/namespaces/ns/r1/name1"), @@ -368,7 +370,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/api/v1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D", }, { - // dynamic client with named group + namespace + resourceResource (with name) + Name: "dynamic client with named group + namespace + resourceResource (with name)", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/g1/v1/namespaces/ns/r1/name1"), @@ -376,7 +378,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/g1/v1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D", }, { - // dynamic client with core group + namespace + resourceResource (with NO name) + Name: "dynamic client with core group + namespace + resourceResource (with NO name)", // /api/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/api/v1/namespaces/ns/r1"), @@ -384,7 +386,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/api/v1/namespaces/%7Bnamespace%7D/r1", }, { - // dynamic client with named group + namespace + resourceResource (with NO name) + Name: "dynamic client with named group + namespace + resourceResource (with NO name)", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/g1/v1/namespaces/ns/r1"), @@ -392,7 +394,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/g1/v1/namespaces/%7Bnamespace%7D/r1", }, { - // dynamic client with core group + resourceResource (with name) + Name: "dynamic client with core group + resourceResource (with name)", // /api/$RESOURCEVERSION/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/api/v1/r1/name1"), @@ -400,7 +402,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/api/v1/r1/%7Bname%7D", }, { - // dynamic client with named group + resourceResource (with name) + Name: "dynamic client with named group + resourceResource (with name)", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/g1/v1/r1/name1"), @@ -408,7 +410,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/g1/v1/r1/%7Bname%7D", }, { - // dynamic client with named group + namespace + resourceResource (with name) + subresource + Name: "dynamic client with named group + namespace + resourceResource (with name) + subresource", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME/$SUBRESOURCE Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/namespaces/namespaces/namespaces/namespaces/namespaces/namespaces/finalize"), @@ -416,7 +418,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bnamespace%7D/namespaces/%7Bname%7D/finalize", }, { - // dynamic client with named group + namespace + resourceResource (with name) + Name: "dynamic client with named group + namespace + resourceResource (with name)", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/namespaces/namespaces/namespaces/namespaces/namespaces/namespaces"), @@ -424,7 +426,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bnamespace%7D/namespaces/%7Bname%7D", }, { - // dynamic client with named group + namespace + resourceResource (with NO name) + subresource + Name: "dynamic client with named group + namespace + resourceResource (with NO name) + subresource", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%SUBRESOURCE Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/namespaces/namespaces/namespaces/namespaces/namespaces/finalize"), @@ -432,7 +434,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bnamespace%7D/namespaces/finalize", }, { - // dynamic client with named group + namespace + resourceResource (with NO name) + subresource + Name: "dynamic client with named group + namespace + resourceResource (with NO name) + subresource", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%SUBRESOURCE Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/namespaces/namespaces/namespaces/namespaces/namespaces/status"), @@ -440,7 +442,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bnamespace%7D/namespaces/status", }, { - // dynamic client with named group + namespace + resourceResource (with no name) + Name: "dynamic client with named group + namespace + resourceResource (with no name)", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/namespaces/namespaces/namespaces/namespaces/namespaces"), @@ -448,7 +450,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bnamespace%7D/namespaces", }, { - // dynamic client with named group + resourceResource (with name) + subresource + Name: "dynamic client with named group + resourceResource (with name) + subresource", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/namespaces/namespaces/namespaces/namespaces/finalize"), @@ -456,7 +458,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bname%7D/finalize", }, { - // dynamic client with named group + resourceResource (with name) + subresource + Name: "dynamic client with named group + resourceResource (with name) + subresource", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/namespaces/namespaces/namespaces/namespaces/status"), @@ -464,7 +466,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bname%7D/status", }, { - // dynamic client with named group + resourceResource (with name) + Name: "dynamic client with named group + resourceResource (with name)", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/namespaces/namespaces/namespaces/namespaces"), @@ -472,7 +474,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bname%7D", }, { - // dynamic client with named group + resourceResource (with no name) + Name: "dynamic client with named group + resourceResource (with no name)", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/apis/namespaces/namespaces/namespaces"), @@ -480,7 +482,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces", }, { - // dynamic client with wrong api group + namespace + resourceResource (with name) + subresource + Name: "dynamic client with wrong api group + namespace + resourceResource (with name) + subresource", // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME/$SUBRESOURCE Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/pre1/namespaces/namespaces/namespaces/namespaces/namespaces/namespaces/finalize"), @@ -488,7 +490,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/%7Bprefix%7D", }, { - // dynamic client with core group + namespace + resourceResource (with name) where baseURL is a single / + Name: "dynamic client with core group + namespace + resourceResource (with name) where baseURL is a single /", // /api/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME Request: NewRequestWithClient(uriSingleSlash, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/api/v1/namespaces/ns/r2/name1"), @@ -496,7 +498,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/api/v1/namespaces/%7Bnamespace%7D/r2/%7Bname%7D", }, { - // dynamic client with core group + namespace + resourceResource (with name) where baseURL is 'some/base/url/path' + Name: "dynamic client with core group + namespace + resourceResource (with name) where baseURL is 'some/base/url/path'", // /api/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/api/v1/namespaces/ns/r3/name1"), @@ -504,7 +506,7 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/some/base/url/path/api/v1/namespaces/%7Bnamespace%7D/r3/%7Bname%7D", }, { - // dynamic client where baseURL is a single / + Name: "dynamic client where baseURL is a single /", // / Request: NewRequestWithClient(uriSingleSlash, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/"), @@ -512,28 +514,37 @@ func TestURLTemplate(t *testing.T) { ExpectedFinalURL: "http://localhost/", }, { - // dynamic client where baseURL is a single / + Name: "dynamic client where baseURL is a single /", // /version Request: NewRequestWithClient(uriSingleSlash, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). Prefix("/version"), ExpectedFullURL: "http://localhost/version", ExpectedFinalURL: "http://localhost/version", }, + { + Name: "non dynamic client with a cluster prefix", + Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Cluster("cluster").Verb("POST"). + Prefix("api", "v1").Resource("r1").Namespace("ns").Name("nm").Param("p0", "v0"), + ExpectedFullURL: "http://localhost/some/base/url/path/clusters/cluster/api/v1/namespaces/ns/r1/nm?p0=v0", + ExpectedFinalURL: "http://localhost/some/base/url/path/clusters/%7Bcluster%7D/api/v1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D?p0=%7Bvalue%7D", + }, } - for i, testCase := range testCases { - r := testCase.Request - full := r.URL() - if full.String() != testCase.ExpectedFullURL { - t.Errorf("%d: unexpected initial URL: %s %s", i, full, testCase.ExpectedFullURL) - } - actualURL := r.finalURLTemplate() - actual := actualURL.String() - if actual != testCase.ExpectedFinalURL { - t.Errorf("%d: unexpected URL template: %s %s", i, actual, testCase.ExpectedFinalURL) - } - if r.URL().String() != full.String() { - t.Errorf("%d, creating URL template changed request: %s -> %s", i, full.String(), r.URL().String()) - } + for _, testCase := range testCases { + t.Run(testCase.Name, func(t *testing.T) { + r := testCase.Request + full := r.URL() + if d := cmp.Diff(full.String(), testCase.ExpectedFullURL); d != "" { + t.Errorf("%s: unexpected initial URL: %s", testCase.Name, d) + } + actualURL := r.finalURLTemplate() + actual := actualURL.String() + if d := cmp.Diff(actual, testCase.ExpectedFinalURL); d != "" { + t.Errorf("%s: unexpected URL template: %s", testCase.Name, d) + } + if d := cmp.Diff(r.URL().String(), full.String()); d != "" { + t.Errorf("%s, creating URL template changed request: %s", testCase.Name, d) + } + }) } } diff --git a/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go b/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go index b0212296c1cd9..2bd6f601b744e 100644 --- a/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go +++ b/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go @@ -85,8 +85,13 @@ func (g *genClientset) GenerateType(c *generator.Context, t *types.Type, w io.Wr "NewDiscoveryClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/discovery", Name: "NewDiscoveryClient"}), "flowcontrolNewTokenBucketRateLimiter": c.Universe.Function(types.Name{Package: "k8s.io/client-go/util/flowcontrol", Name: "NewTokenBucketRateLimiter"}), } + sw.Do(clusterInterface, m) + sw.Do(clusterTemplate, m) + sw.Do(setClusterTemplate, m) + sw.Do(newClusterForConfigTemplate, m) sw.Do(clientsetInterface, m) sw.Do(clientsetTemplate, m) + sw.Do(scopedClientsetTemplate, m) for _, g := range allGroups { sw.Do(clientsetInterfaceImplTemplate, g) } @@ -99,6 +104,41 @@ func (g *genClientset) GenerateType(c *generator.Context, t *types.Type, w io.Wr return sw.Error() } +var clusterInterface = ` +type ClusterInterface interface { + Cluster(name string) Interface +} +` + +var clusterTemplate = ` +type Cluster struct { + *scopedClientset +} +` + +var setClusterTemplate = ` +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} +` + +var newClusterForConfigTemplate = ` +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *$.Config|raw$) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} +` + var clientsetInterface = ` type Interface interface { Discovery() $.DiscoveryInterface|raw$ @@ -111,6 +151,15 @@ var clientsetTemplate = ` // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} +` + +var scopedClientsetTemplate = ` +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *$.DiscoveryClient|raw$ $range .allGroups$$.LowerCaseGroupGoName$$.Version$ *$.PackageAlias$.$.GroupGoName$$.Version$Client $end$ @@ -120,7 +169,7 @@ type Clientset struct { var clientsetInterfaceImplTemplate = ` // $.GroupGoName$$.Version$ retrieves the $.GroupGoName$$.Version$Client func (c *Clientset) $.GroupGoName$$.Version$() $.PackageAlias$.$.GroupGoName$$.Version$Interface { - return c.$.LowerCaseGroupGoName$$.Version$ + return $.PackageAlias$.NewWithCluster(c.$.LowerCaseGroupGoName$$.Version$.RESTClient(), c.cluster) } ` @@ -167,7 +216,7 @@ func NewForConfigAndClient(c *$.Config|raw$, httpClient *http.Client) (*Clientse configShallowCopy.RateLimiter = $.flowcontrolNewTokenBucketRateLimiter|raw$(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error $range .allGroups$ cs.$.LowerCaseGroupGoName$$.Version$, err =$.PackageAlias$.NewForConfigAndClient(&configShallowCopy, httpClient) if err!=nil { @@ -178,7 +227,7 @@ $end$ if err!=nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } ` @@ -197,10 +246,10 @@ func NewForConfigOrDie(c *$.Config|raw$) *Clientset { var newClientsetForRESTClientTemplate = ` // New creates a new Clientset for the given RESTClient. func New(c $.RESTClientInterface|raw$) *Clientset { - var cs Clientset + var cs scopedClientset $range .allGroups$ cs.$.LowerCaseGroupGoName$$.Version$ =$.PackageAlias$.New(c) $end$ cs.DiscoveryClient = $.NewDiscoveryClient|raw$(c) - return &cs + return &Clientset{scopedClientset: &cs} } ` diff --git a/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go b/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go index 30284990037a0..23ba1a2939671 100644 --- a/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go +++ b/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go @@ -128,6 +128,7 @@ func (g *genGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer sw.Do(newClientForConfigAndClientTemplate, m) sw.Do(newClientForConfigOrDieTemplate, m) sw.Do(newClientForRESTClientTemplate, m) + sw.Do(newClientForRESTClientAndClusterTemplate, m) if g.version == "" { sw.Do(setInternalVersionClientDefaultsTemplate, m) } else { @@ -150,6 +151,7 @@ var groupClientTemplate = ` // $.GroupGoName$$.Version$Client is used to interact with features provided by the $.groupName$ group. type $.GroupGoName$$.Version$Client struct { restClient $.restRESTClientInterface|raw$ + cluster string } ` @@ -194,7 +196,7 @@ func NewForConfigAndClient(c *$.restConfig|raw$, h *http.Client) (*$.GroupGoName if err != nil { return nil, err } - return &$.GroupGoName$$.Version$Client{client}, nil + return &$.GroupGoName$$.Version$Client{restClient: client}, nil } ` @@ -224,7 +226,14 @@ func (c *$.GroupGoName$$.Version$Client) RESTClient() $.restRESTClientInterface| var newClientForRESTClientTemplate = ` // New creates a new $.GroupGoName$$.Version$Client for the given RESTClient. func New(c $.restRESTClientInterface|raw$) *$.GroupGoName$$.Version$Client { - return &$.GroupGoName$$.Version$Client{c} + return &$.GroupGoName$$.Version$Client{restClient: c} +} +` + +var newClientForRESTClientAndClusterTemplate = ` +// NewWithCluster creates a new $.GroupGoName$$.Version$Client for the given RESTClient and cluster. +func NewWithCluster(c $.restRESTClientInterface|raw$, cluster string) *$.GroupGoName$$.Version$Client { + return &$.GroupGoName$$.Version$Client{restClient: c, cluster: cluster} } ` diff --git a/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go b/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go index fe63dd1989567..a9ae2bb7326ac 100644 --- a/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go +++ b/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go @@ -422,8 +422,9 @@ var interfaceTemplate4 = ` var structNamespaced = ` // $.type|privatePlural$ implements $.type|public$Interface type $.type|privatePlural$ struct { - client $.RESTClientInterface|raw$ - ns string + client $.RESTClientInterface|raw$ + cluster string + ns string } ` @@ -431,7 +432,8 @@ type $.type|privatePlural$ struct { var structNonNamespaced = ` // $.type|privatePlural$ implements $.type|public$Interface type $.type|privatePlural$ struct { - client $.RESTClientInterface|raw$ + client $.RESTClientInterface|raw$ + cluster string } ` @@ -439,8 +441,9 @@ var newStructNamespaced = ` // new$.type|publicPlural$ returns a $.type|publicPlural$ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client, namespace string) *$.type|privatePlural$ { return &$.type|privatePlural${ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } ` @@ -449,7 +452,8 @@ var newStructNonNamespaced = ` // new$.type|publicPlural$ returns a $.type|publicPlural$ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client) *$.type|privatePlural$ { return &$.type|privatePlural${ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } ` @@ -462,6 +466,7 @@ func (c *$.type|privatePlural$) List(ctx context.Context, opts $.ListOptions|raw } result = &$.resultType|raw$List{} err = c.client.Get(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). VersionedParams(&opts, $.schemeParameterCodec|raw$). @@ -481,6 +486,7 @@ func (c *$.type|privatePlural$) List(ctx context.Context, $.type|private$Name st } result = &$.resultType|raw$List{} err = c.client.Get(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.type|private$Name). @@ -498,6 +504,7 @@ var getTemplate = ` func (c *$.type|privatePlural$) Get(ctx context.Context, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Get(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name(name). @@ -513,6 +520,7 @@ var getSubresourceTemplate = ` func (c *$.type|privatePlural$) Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Get(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.type|private$Name). @@ -528,6 +536,7 @@ var deleteTemplate = ` // Delete takes name of the $.type|private$ and deletes it. Returns an error if one occurs. func (c *$.type|privatePlural$) Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error { return c.client.Delete(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name(name). @@ -545,6 +554,7 @@ func (c *$.type|privatePlural$) DeleteCollection(ctx context.Context, opts $.Del timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). VersionedParams(&listOpts, $.schemeParameterCodec|raw$). @@ -560,6 +570,7 @@ var createSubresourceTemplate = ` func (c *$.type|privatePlural$) Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Post(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.type|private$Name). @@ -577,6 +588,7 @@ var createTemplate = ` func (c *$.type|privatePlural$) Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Post(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). VersionedParams(&opts, $.schemeParameterCodec|raw$). @@ -592,6 +604,7 @@ var updateSubresourceTemplate = ` func (c *$.type|privatePlural$) Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Put(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.type|private$Name). @@ -609,6 +622,7 @@ var updateTemplate = ` func (c *$.type|privatePlural$) Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Put(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.inputType|private$.Name). @@ -626,6 +640,7 @@ var updateStatusTemplate = ` func (c *$.type|privatePlural$) UpdateStatus(ctx context.Context, $.type|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (result *$.type|raw$, err error) { result = &$.type|raw${} err = c.client.Put(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.type|private$.Name). @@ -660,6 +675,7 @@ var patchTemplate = ` func (c *$.type|privatePlural$) Patch(ctx context.Context, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.client.Patch(pt). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name(name). @@ -689,6 +705,7 @@ func (c *$.type|privatePlural$) Apply(ctx context.Context, $.inputType|private$ } result = &$.resultType|raw${} err = c.client.Patch($.ApplyPatchType|raw$). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name(*name). @@ -720,6 +737,7 @@ func (c *$.type|privatePlural$) ApplyStatus(ctx context.Context, $.inputType|pri result = &$.resultType|raw${} err = c.client.Patch($.ApplyPatchType|raw$). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name(*name). @@ -747,6 +765,7 @@ func (c *$.type|privatePlural$) Apply(ctx context.Context, $.type|private$Name s result = &$.resultType|raw${} err = c.client.Patch($.ApplyPatchType|raw$). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). Name($.type|private$Name). From 24af74e99176efb3bb0d2f9ce9f17a60a7f792e7 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Wed, 3 Nov 2021 11:36:17 -0700 Subject: [PATCH 38/87] clients: regenerate Signed-off-by: Steve Kuznetsov --- .../client/clientset/versioned/clientset.go | 44 +- .../versioned/typed/cr/v1/cr_client.go | 10 +- .../versioned/typed/cr/v1/example.go | 17 +- .../client/clientset/clientset/clientset.go | 46 +- .../apiextensions/v1/apiextensions_client.go | 10 +- .../v1/customresourcedefinition.go | 14 +- .../v1beta1/apiextensions_client.go | 10 +- .../v1beta1/customresourcedefinition.go | 14 +- .../applyconfigurations/internal/internal.go | 2923 +++++++---------- .../k8s.io/client-go/kubernetes/clientset.go | 132 +- .../v1/admissionregistration_client.go | 10 +- .../v1/mutatingwebhookconfiguration.go | 14 +- .../v1/validatingwebhookconfiguration.go | 14 +- .../v1beta1/admissionregistration_client.go | 10 +- .../v1beta1/mutatingwebhookconfiguration.go | 14 +- .../v1beta1/validatingwebhookconfiguration.go | 14 +- .../v1alpha1/apiserverinternal_client.go | 10 +- .../v1alpha1/storageversion.go | 16 +- .../kubernetes/typed/apps/v1/apps_client.go | 10 +- .../typed/apps/v1/controllerrevision.go | 18 +- .../kubernetes/typed/apps/v1/daemonset.go | 20 +- .../kubernetes/typed/apps/v1/deployment.go | 23 +- .../kubernetes/typed/apps/v1/replicaset.go | 23 +- .../kubernetes/typed/apps/v1/statefulset.go | 23 +- .../typed/apps/v1beta1/apps_client.go | 10 +- .../typed/apps/v1beta1/controllerrevision.go | 18 +- .../typed/apps/v1beta1/deployment.go | 20 +- .../typed/apps/v1beta1/statefulset.go | 20 +- .../typed/apps/v1beta2/apps_client.go | 10 +- .../typed/apps/v1beta2/controllerrevision.go | 18 +- .../typed/apps/v1beta2/daemonset.go | 20 +- .../typed/apps/v1beta2/deployment.go | 20 +- .../typed/apps/v1beta2/replicaset.go | 20 +- .../typed/apps/v1beta2/statefulset.go | 23 +- .../v1/authentication_client.go | 10 +- .../typed/authentication/v1/tokenreview.go | 7 +- .../v1beta1/authentication_client.go | 10 +- .../authentication/v1beta1/tokenreview.go | 7 +- .../authorization/v1/authorization_client.go | 10 +- .../v1/localsubjectaccessreview.go | 11 +- .../v1/selfsubjectaccessreview.go | 7 +- .../v1/selfsubjectrulesreview.go | 7 +- .../authorization/v1/subjectaccessreview.go | 7 +- .../v1beta1/authorization_client.go | 10 +- .../v1beta1/localsubjectaccessreview.go | 11 +- .../v1beta1/selfsubjectaccessreview.go | 7 +- .../v1beta1/selfsubjectrulesreview.go | 7 +- .../v1beta1/subjectaccessreview.go | 7 +- .../autoscaling/v1/autoscaling_client.go | 10 +- .../autoscaling/v1/horizontalpodautoscaler.go | 20 +- .../autoscaling/v2/autoscaling_client.go | 10 +- .../autoscaling/v2/horizontalpodautoscaler.go | 20 +- .../autoscaling/v2beta1/autoscaling_client.go | 10 +- .../v2beta1/horizontalpodautoscaler.go | 20 +- .../autoscaling/v2beta2/autoscaling_client.go | 10 +- .../v2beta2/horizontalpodautoscaler.go | 20 +- .../kubernetes/typed/batch/v1/batch_client.go | 10 +- .../kubernetes/typed/batch/v1/cronjob.go | 20 +- .../kubernetes/typed/batch/v1/job.go | 20 +- .../typed/batch/v1beta1/batch_client.go | 10 +- .../kubernetes/typed/batch/v1beta1/cronjob.go | 20 +- .../certificates/v1/certificates_client.go | 10 +- .../v1/certificatesigningrequest.go | 17 +- .../v1beta1/certificates_client.go | 10 +- .../v1beta1/certificatesigningrequest.go | 16 +- .../coordination/v1/coordination_client.go | 10 +- .../kubernetes/typed/coordination/v1/lease.go | 18 +- .../v1beta1/coordination_client.go | 10 +- .../typed/coordination/v1beta1/lease.go | 18 +- .../typed/core/v1/componentstatus.go | 14 +- .../kubernetes/typed/core/v1/configmap.go | 18 +- .../kubernetes/typed/core/v1/core_client.go | 10 +- .../kubernetes/typed/core/v1/endpoints.go | 18 +- .../kubernetes/typed/core/v1/event.go | 18 +- .../kubernetes/typed/core/v1/limitrange.go | 18 +- .../kubernetes/typed/core/v1/namespace.go | 15 +- .../kubernetes/typed/core/v1/node.go | 16 +- .../typed/core/v1/persistentvolume.go | 16 +- .../typed/core/v1/persistentvolumeclaim.go | 20 +- .../client-go/kubernetes/typed/core/v1/pod.go | 21 +- .../kubernetes/typed/core/v1/podtemplate.go | 18 +- .../typed/core/v1/replicationcontroller.go | 22 +- .../kubernetes/typed/core/v1/resourcequota.go | 20 +- .../kubernetes/typed/core/v1/secret.go | 18 +- .../kubernetes/typed/core/v1/service.go | 19 +- .../typed/core/v1/serviceaccount.go | 19 +- .../typed/discovery/v1/discovery_client.go | 10 +- .../typed/discovery/v1/endpointslice.go | 18 +- .../discovery/v1beta1/discovery_client.go | 10 +- .../typed/discovery/v1beta1/endpointslice.go | 18 +- .../kubernetes/typed/events/v1/event.go | 18 +- .../typed/events/v1/events_client.go | 10 +- .../kubernetes/typed/events/v1beta1/event.go | 18 +- .../typed/events/v1beta1/events_client.go | 10 +- .../typed/extensions/v1beta1/daemonset.go | 20 +- .../typed/extensions/v1beta1/deployment.go | 23 +- .../extensions/v1beta1/extensions_client.go | 10 +- .../typed/extensions/v1beta1/ingress.go | 20 +- .../typed/extensions/v1beta1/networkpolicy.go | 18 +- .../extensions/v1beta1/podsecuritypolicy.go | 14 +- .../typed/extensions/v1beta1/replicaset.go | 23 +- .../v1alpha1/flowcontrol_client.go | 10 +- .../typed/flowcontrol/v1alpha1/flowschema.go | 16 +- .../v1alpha1/prioritylevelconfiguration.go | 16 +- .../flowcontrol/v1beta1/flowcontrol_client.go | 10 +- .../typed/flowcontrol/v1beta1/flowschema.go | 16 +- .../v1beta1/prioritylevelconfiguration.go | 16 +- .../flowcontrol/v1beta2/flowcontrol_client.go | 10 +- .../typed/flowcontrol/v1beta2/flowschema.go | 16 +- .../v1beta2/prioritylevelconfiguration.go | 16 +- .../kubernetes/typed/networking/v1/ingress.go | 20 +- .../typed/networking/v1/ingressclass.go | 14 +- .../typed/networking/v1/networking_client.go | 10 +- .../typed/networking/v1/networkpolicy.go | 18 +- .../typed/networking/v1beta1/ingress.go | 20 +- .../typed/networking/v1beta1/ingressclass.go | 14 +- .../networking/v1beta1/networking_client.go | 10 +- .../kubernetes/typed/node/v1/node_client.go | 10 +- .../kubernetes/typed/node/v1/runtimeclass.go | 14 +- .../typed/node/v1alpha1/node_client.go | 10 +- .../typed/node/v1alpha1/runtimeclass.go | 14 +- .../typed/node/v1beta1/node_client.go | 10 +- .../typed/node/v1beta1/runtimeclass.go | 14 +- .../kubernetes/typed/policy/v1/eviction.go | 10 +- .../typed/policy/v1/poddisruptionbudget.go | 20 +- .../typed/policy/v1/policy_client.go | 10 +- .../typed/policy/v1beta1/eviction.go | 10 +- .../policy/v1beta1/poddisruptionbudget.go | 20 +- .../typed/policy/v1beta1/podsecuritypolicy.go | 14 +- .../typed/policy/v1beta1/policy_client.go | 10 +- .../kubernetes/typed/rbac/v1/clusterrole.go | 14 +- .../typed/rbac/v1/clusterrolebinding.go | 14 +- .../kubernetes/typed/rbac/v1/rbac_client.go | 10 +- .../kubernetes/typed/rbac/v1/role.go | 18 +- .../kubernetes/typed/rbac/v1/rolebinding.go | 18 +- .../typed/rbac/v1alpha1/clusterrole.go | 14 +- .../typed/rbac/v1alpha1/clusterrolebinding.go | 14 +- .../typed/rbac/v1alpha1/rbac_client.go | 10 +- .../kubernetes/typed/rbac/v1alpha1/role.go | 18 +- .../typed/rbac/v1alpha1/rolebinding.go | 18 +- .../typed/rbac/v1beta1/clusterrole.go | 14 +- .../typed/rbac/v1beta1/clusterrolebinding.go | 14 +- .../typed/rbac/v1beta1/rbac_client.go | 10 +- .../kubernetes/typed/rbac/v1beta1/role.go | 18 +- .../typed/rbac/v1beta1/rolebinding.go | 18 +- .../typed/scheduling/v1/priorityclass.go | 14 +- .../typed/scheduling/v1/scheduling_client.go | 10 +- .../scheduling/v1alpha1/priorityclass.go | 14 +- .../scheduling/v1alpha1/scheduling_client.go | 10 +- .../typed/scheduling/v1beta1/priorityclass.go | 14 +- .../scheduling/v1beta1/scheduling_client.go | 10 +- .../kubernetes/typed/storage/v1/csidriver.go | 14 +- .../kubernetes/typed/storage/v1/csinode.go | 14 +- .../typed/storage/v1/storage_client.go | 10 +- .../typed/storage/v1/storageclass.go | 14 +- .../typed/storage/v1/volumeattachment.go | 16 +- .../storage/v1alpha1/csistoragecapacity.go | 18 +- .../typed/storage/v1alpha1/storage_client.go | 10 +- .../storage/v1alpha1/volumeattachment.go | 16 +- .../typed/storage/v1beta1/csidriver.go | 14 +- .../typed/storage/v1beta1/csinode.go | 14 +- .../storage/v1beta1/csistoragecapacity.go | 18 +- .../typed/storage/v1beta1/storage_client.go | 10 +- .../typed/storage/v1beta1/storageclass.go | 14 +- .../typed/storage/v1beta1/volumeattachment.go | 16 +- .../clientset/versioned/clientset.go | 44 +- .../typed/example/v1/clustertesttype.go | 16 +- .../typed/example/v1/example_client.go | 10 +- .../versioned/typed/example/v1/testtype.go | 18 +- .../clientset/versioned/clientset.go | 44 +- .../typed/example/v1/clustertesttype.go | 17 +- .../typed/example/v1/example_client.go | 10 +- .../versioned/typed/example/v1/testtype.go | 18 +- .../clientset/internalversion/clientset.go | 48 +- .../example/internalversion/example_client.go | 10 +- .../typed/example/internalversion/testtype.go | 18 +- .../internalversion/example2_client.go | 10 +- .../example2/internalversion/testtype.go | 14 +- .../internalversion/example3.io_client.go | 10 +- .../example3.io/internalversion/testtype.go | 18 +- .../clientset/versioned/clientset.go | 48 +- .../typed/example/v1/example_client.go | 10 +- .../versioned/typed/example/v1/testtype.go | 18 +- .../typed/example2/v1/example2_client.go | 10 +- .../versioned/typed/example2/v1/testtype.go | 18 +- .../example3.io/v1/example3.io_client.go | 10 +- .../typed/example3.io/v1/testtype.go | 18 +- .../crd/clientset/versioned/clientset.go | 46 +- .../typed/example/v1/clustertesttype.go | 16 +- .../typed/example/v1/example_client.go | 10 +- .../versioned/typed/example/v1/testtype.go | 18 +- .../typed/example2/v1/example2_client.go | 10 +- .../versioned/typed/example2/v1/testtype.go | 18 +- .../clientset/clientset.go | 46 +- .../v1/apiregistration_client.go | 10 +- .../typed/apiregistration/v1/apiservice.go | 14 +- .../v1beta1/apiregistration_client.go | 10 +- .../apiregistration/v1beta1/apiservice.go | 14 +- .../client/clientset/versioned/clientset.go | 46 +- .../typed/metrics/v1alpha1/metrics_client.go | 10 +- .../typed/metrics/v1alpha1/nodemetrics.go | 8 +- .../typed/metrics/v1alpha1/podmetrics.go | 12 +- .../typed/metrics/v1beta1/metrics_client.go | 10 +- .../typed/metrics/v1beta1/nodemetrics.go | 8 +- .../typed/metrics/v1beta1/podmetrics.go | 12 +- .../clientset/versioned/clientset.go | 46 +- .../typed/wardle/v1alpha1/fischer.go | 13 +- .../typed/wardle/v1alpha1/flunder.go | 18 +- .../typed/wardle/v1alpha1/wardle_client.go | 10 +- .../versioned/typed/wardle/v1beta1/flunder.go | 18 +- .../typed/wardle/v1beta1/wardle_client.go | 10 +- .../clientset/versioned/clientset.go | 44 +- .../typed/samplecontroller/v1alpha1/foo.go | 18 +- .../v1alpha1/samplecontroller_client.go | 10 +- 214 files changed, 3935 insertions(+), 2482 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go index 7de7514538f94..34479c19e94ac 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go @@ -28,6 +28,33 @@ import ( flowcontrol "k8s.io/client-go/util/flowcontrol" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface CrV1() crv1.CrV1Interface @@ -36,13 +63,20 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient crV1 *crv1.CrV1Client } // CrV1 retrieves the CrV1Client func (c *Clientset) CrV1() crv1.CrV1Interface { - return c.crV1 + return crv1.NewWithCluster(c.crV1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -83,7 +117,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.crV1, err = crv1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -94,7 +128,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -109,9 +143,9 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.crV1 = crv1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/cr_client.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/cr_client.go index 1b95346a485e0..4bc159ae49ffb 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/cr_client.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/cr_client.go @@ -34,6 +34,7 @@ type CrV1Interface interface { // CrV1Client is used to interact with features provided by the cr.example.apiextensions.k8s.io group. type CrV1Client struct { restClient rest.Interface + cluster string } func (c *CrV1Client) Examples(namespace string) ExampleInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CrV1Client, error) if err != nil { return nil, err } - return &CrV1Client{client}, nil + return &CrV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new CrV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *CrV1Client { // New creates a new CrV1Client for the given RESTClient. func New(c rest.Interface) *CrV1Client { - return &CrV1Client{c} + return &CrV1Client{restClient: c} +} + +// NewWithCluster creates a new CrV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *CrV1Client { + return &CrV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go index dfb8a54df70cc..c4c185aca1024 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go @@ -51,15 +51,17 @@ type ExampleInterface interface { // examples implements ExampleInterface type examples struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newExamples returns a Examples func newExamples(c *CrV1Client, namespace string) *examples { return &examples{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -67,6 +69,7 @@ func newExamples(c *CrV1Client, namespace string) *examples { func (c *examples) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Example, err error) { result = &v1.Example{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("examples"). Name(name). @@ -84,6 +87,7 @@ func (c *examples) List(ctx context.Context, opts metav1.ListOptions) (result *v } result = &v1.ExampleList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("examples"). VersionedParams(&opts, scheme.ParameterCodec). @@ -112,6 +116,7 @@ func (c *examples) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In func (c *examples) Create(ctx context.Context, example *v1.Example, opts metav1.CreateOptions) (result *v1.Example, err error) { result = &v1.Example{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("examples"). VersionedParams(&opts, scheme.ParameterCodec). @@ -125,6 +130,7 @@ func (c *examples) Create(ctx context.Context, example *v1.Example, opts metav1. func (c *examples) Update(ctx context.Context, example *v1.Example, opts metav1.UpdateOptions) (result *v1.Example, err error) { result = &v1.Example{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("examples"). Name(example.Name). @@ -138,6 +144,7 @@ func (c *examples) Update(ctx context.Context, example *v1.Example, opts metav1. // Delete takes name of the example and deletes it. Returns an error if one occurs. func (c *examples) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("examples"). Name(name). @@ -153,6 +160,7 @@ func (c *examples) DeleteCollection(ctx context.Context, opts metav1.DeleteOptio timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("examples"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -166,6 +174,7 @@ func (c *examples) DeleteCollection(ctx context.Context, opts metav1.DeleteOptio func (c *examples) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Example, err error) { result = &v1.Example{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("examples"). Name(name). diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go index 23f75d5d17d07..07320cdbfddc5 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go @@ -29,6 +29,33 @@ import ( flowcontrol "k8s.io/client-go/util/flowcontrol" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface @@ -38,6 +65,13 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient apiextensionsV1beta1 *apiextensionsv1beta1.ApiextensionsV1beta1Client apiextensionsV1 *apiextensionsv1.ApiextensionsV1Client @@ -45,12 +79,12 @@ type Clientset struct { // ApiextensionsV1beta1 retrieves the ApiextensionsV1beta1Client func (c *Clientset) ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface { - return c.apiextensionsV1beta1 + return apiextensionsv1beta1.NewWithCluster(c.apiextensionsV1beta1.RESTClient(), c.cluster) } // ApiextensionsV1 retrieves the ApiextensionsV1Client func (c *Clientset) ApiextensionsV1() apiextensionsv1.ApiextensionsV1Interface { - return c.apiextensionsV1 + return apiextensionsv1.NewWithCluster(c.apiextensionsV1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -91,7 +125,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.apiextensionsV1beta1, err = apiextensionsv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -106,7 +140,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -121,10 +155,10 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.apiextensionsV1beta1 = apiextensionsv1beta1.New(c) cs.apiextensionsV1 = apiextensionsv1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/apiextensions_client.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/apiextensions_client.go index 0bdc44c408744..dc1602c3824cd 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/apiextensions_client.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/apiextensions_client.go @@ -34,6 +34,7 @@ type ApiextensionsV1Interface interface { // ApiextensionsV1Client is used to interact with features provided by the apiextensions.k8s.io group. type ApiextensionsV1Client struct { restClient rest.Interface + cluster string } func (c *ApiextensionsV1Client) CustomResourceDefinitions() CustomResourceDefinitionInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ApiextensionsV1Clie if err != nil { return nil, err } - return &ApiextensionsV1Client{client}, nil + return &ApiextensionsV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new ApiextensionsV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *ApiextensionsV1Client { // New creates a new ApiextensionsV1Client for the given RESTClient. func New(c rest.Interface) *ApiextensionsV1Client { - return &ApiextensionsV1Client{c} + return &ApiextensionsV1Client{restClient: c} +} + +// NewWithCluster creates a new ApiextensionsV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ApiextensionsV1Client { + return &ApiextensionsV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go index 5569b12d9c7e6..5611060f89e06 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go @@ -52,13 +52,15 @@ type CustomResourceDefinitionInterface interface { // customResourceDefinitions implements CustomResourceDefinitionInterface type customResourceDefinitions struct { - client rest.Interface + client rest.Interface + cluster string } // newCustomResourceDefinitions returns a CustomResourceDefinitions func newCustomResourceDefinitions(c *ApiextensionsV1Client) *customResourceDefinitions { return &customResourceDefinitions{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -66,6 +68,7 @@ func newCustomResourceDefinitions(c *ApiextensionsV1Client) *customResourceDefin func (c *customResourceDefinitions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Get(). + Cluster(c.cluster). Resource("customresourcedefinitions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -82,6 +85,7 @@ func (c *customResourceDefinitions) List(ctx context.Context, opts metav1.ListOp } result = &v1.CustomResourceDefinitionList{} err = c.client.Get(). + Cluster(c.cluster). Resource("customresourcedefinitions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -108,6 +112,7 @@ func (c *customResourceDefinitions) Watch(ctx context.Context, opts metav1.ListO func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Post(). + Cluster(c.cluster). Resource("customresourcedefinitions"). VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). @@ -120,6 +125,7 @@ func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDe func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Put(). + Cluster(c.cluster). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -134,6 +140,7 @@ func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDe func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Put(). + Cluster(c.cluster). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). SubResource("status"). @@ -147,6 +154,7 @@ func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customReso // Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. func (c *customResourceDefinitions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("customresourcedefinitions"). Name(name). Body(&opts). @@ -161,6 +169,7 @@ func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, opts m timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("customresourcedefinitions"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -173,6 +182,7 @@ func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, opts m func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("customresourcedefinitions"). Name(name). SubResource(subresources...). diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go index 657ce2ca8d28a..03dab0f4fb08f 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go @@ -34,6 +34,7 @@ type ApiextensionsV1beta1Interface interface { // ApiextensionsV1beta1Client is used to interact with features provided by the apiextensions.k8s.io group. type ApiextensionsV1beta1Client struct { restClient rest.Interface + cluster string } func (c *ApiextensionsV1beta1Client) CustomResourceDefinitions() CustomResourceDefinitionInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ApiextensionsV1beta if err != nil { return nil, err } - return &ApiextensionsV1beta1Client{client}, nil + return &ApiextensionsV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new ApiextensionsV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *ApiextensionsV1beta1Client { // New creates a new ApiextensionsV1beta1Client for the given RESTClient. func New(c rest.Interface) *ApiextensionsV1beta1Client { - return &ApiextensionsV1beta1Client{c} + return &ApiextensionsV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new ApiextensionsV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ApiextensionsV1beta1Client { + return &ApiextensionsV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go index 2d16ca7097aad..c9c963f1cda56 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go @@ -52,13 +52,15 @@ type CustomResourceDefinitionInterface interface { // customResourceDefinitions implements CustomResourceDefinitionInterface type customResourceDefinitions struct { - client rest.Interface + client rest.Interface + cluster string } // newCustomResourceDefinitions returns a CustomResourceDefinitions func newCustomResourceDefinitions(c *ApiextensionsV1beta1Client) *customResourceDefinitions { return &customResourceDefinitions{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -66,6 +68,7 @@ func newCustomResourceDefinitions(c *ApiextensionsV1beta1Client) *customResource func (c *customResourceDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Get(). + Cluster(c.cluster). Resource("customresourcedefinitions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -82,6 +85,7 @@ func (c *customResourceDefinitions) List(ctx context.Context, opts v1.ListOption } result = &v1beta1.CustomResourceDefinitionList{} err = c.client.Get(). + Cluster(c.cluster). Resource("customresourcedefinitions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -108,6 +112,7 @@ func (c *customResourceDefinitions) Watch(ctx context.Context, opts v1.ListOptio func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.CreateOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Post(). + Cluster(c.cluster). Resource("customresourcedefinitions"). VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). @@ -120,6 +125,7 @@ func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDe func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Put(). + Cluster(c.cluster). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -134,6 +140,7 @@ func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDe func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Put(). + Cluster(c.cluster). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). SubResource("status"). @@ -147,6 +154,7 @@ func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customReso // Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. func (c *customResourceDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("customresourcedefinitions"). Name(name). Body(&opts). @@ -161,6 +169,7 @@ func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, opts v timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("customresourcedefinitions"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -173,6 +182,7 @@ func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, opts v func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("customresourcedefinitions"). Name(name). SubResource(subresources...). diff --git a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go index 824c5e9582e06..7cb3c6b9890fc 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -907,24 +907,12 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy - map: - fields: - - name: whenDeleted - type: - scalar: string - - name: whenScaled - type: - scalar: string - name: io.k8s.api.apps.v1.StatefulSetSpec map: fields: - name: minReadySeconds type: scalar: numeric - - name: persistentVolumeClaimRetentionPolicy - type: - namedType: io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy - name: podManagementPolicy type: scalar: string @@ -961,7 +949,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: availableReplicas type: scalar: numeric - default: 0 - name: collisionCount type: scalar: numeric @@ -1207,24 +1194,12 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.apps.v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy - map: - fields: - - name: whenDeleted - type: - scalar: string - - name: whenScaled - type: - scalar: string - name: io.k8s.api.apps.v1beta1.StatefulSetSpec map: fields: - name: minReadySeconds type: scalar: numeric - - name: persistentVolumeClaimRetentionPolicy - type: - namedType: io.k8s.api.apps.v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy - name: podManagementPolicy type: scalar: string @@ -1261,7 +1236,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: availableReplicas type: scalar: numeric - default: 0 - name: collisionCount type: scalar: numeric @@ -1705,24 +1679,12 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.apps.v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy - map: - fields: - - name: whenDeleted - type: - scalar: string - - name: whenScaled - type: - scalar: string - name: io.k8s.api.apps.v1beta2.StatefulSetSpec map: fields: - name: minReadySeconds type: scalar: numeric - - name: persistentVolumeClaimRetentionPolicy - type: - namedType: io.k8s.api.apps.v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy - name: podManagementPolicy type: scalar: string @@ -1759,7 +1721,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: availableReplicas type: scalar: numeric - default: 0 - name: collisionCount type: scalar: numeric @@ -1875,7 +1836,17 @@ var schemaYAML = typed.YAMLObject(`types: - name: observedGeneration type: scalar: numeric -- name: io.k8s.api.autoscaling.v2.ContainerResourceMetricSource +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource map: fields: - name: container @@ -1886,26 +1857,31 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" - - name: target + - name: targetAverageUtilization type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus + scalar: numeric + - name: targetAverageValue + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus map: fields: - name: container type: scalar: string default: "" - - name: current + - name: currentAverageUtilization + type: + scalar: numeric + - name: currentAverageValue type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity default: {} - name: name type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2.CrossVersionObjectReference +- name: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference map: fields: - name: apiVersion @@ -1919,59 +1895,40 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2.ExternalMetricSource +- name: io.k8s.api.autoscaling.v2beta1.ExternalMetricSource map: fields: - - name: metric + - name: metricName type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} - - name: target + scalar: string + default: "" + - name: metricSelector type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.ExternalMetricStatus - map: - fields: - - name: current + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: targetAverageValue type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: metric + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: targetValue type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2.HPAScalingPolicy + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus map: fields: - - name: periodSeconds - type: - scalar: numeric - default: 0 - - name: type - type: - scalar: string - default: "" - - name: value + - name: currentAverageValue type: - scalar: numeric - default: 0 -- name: io.k8s.api.autoscaling.v2.HPAScalingRules - map: - fields: - - name: policies + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: currentValue type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2.HPAScalingPolicy - elementRelationship: atomic - - name: selectPolicy + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + default: {} + - name: metricName type: scalar: string - - name: stabilizationWindowSeconds + default: "" + - name: metricSelector type: - scalar: numeric -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler map: fields: - name: apiVersion @@ -1986,22 +1943,13 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec + namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec default: {} - name: status type: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus + namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus default: {} -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior - map: - fields: - - name: scaleDown - type: - namedType: io.k8s.api.autoscaling.v2.HPAScalingRules - - name: scaleUp - type: - namedType: io.k8s.api.autoscaling.v2.HPAScalingRules -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition +- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition map: fields: - name: lastTransitionTime @@ -2022,12 +1970,9 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec +- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec map: fields: - - name: behavior - type: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior - name: maxReplicas type: scalar: numeric @@ -2036,35 +1981,34 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.autoscaling.v2.MetricSpec + namedType: io.k8s.api.autoscaling.v2beta1.MetricSpec elementRelationship: atomic - name: minReplicas type: scalar: numeric - name: scaleTargetRef type: - namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference + namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference default: {} -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus +- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus map: fields: - name: conditions type: list: elementType: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition - elementRelationship: associative - keys: - - type + namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition + elementRelationship: atomic - name: currentMetrics type: list: elementType: - namedType: io.k8s.api.autoscaling.v2.MetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.MetricStatus elementRelationship: atomic - name: currentReplicas type: scalar: numeric + default: 0 - name: desiredReplicas type: scalar: numeric @@ -2075,163 +2019,148 @@ var schemaYAML = typed.YAMLObject(`types: - name: observedGeneration type: scalar: numeric -- name: io.k8s.api.autoscaling.v2.MetricIdentifier - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2.MetricSpec +- name: io.k8s.api.autoscaling.v2beta1.MetricSpec map: fields: - name: containerResource type: - namedType: io.k8s.api.autoscaling.v2.ContainerResourceMetricSource + namedType: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource - name: external type: - namedType: io.k8s.api.autoscaling.v2.ExternalMetricSource + namedType: io.k8s.api.autoscaling.v2beta1.ExternalMetricSource - name: object type: - namedType: io.k8s.api.autoscaling.v2.ObjectMetricSource + namedType: io.k8s.api.autoscaling.v2beta1.ObjectMetricSource - name: pods type: - namedType: io.k8s.api.autoscaling.v2.PodsMetricSource + namedType: io.k8s.api.autoscaling.v2beta1.PodsMetricSource - name: resource type: - namedType: io.k8s.api.autoscaling.v2.ResourceMetricSource + namedType: io.k8s.api.autoscaling.v2beta1.ResourceMetricSource - name: type type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2.MetricStatus +- name: io.k8s.api.autoscaling.v2beta1.MetricStatus map: fields: - name: containerResource type: - namedType: io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus - name: external type: - namedType: io.k8s.api.autoscaling.v2.ExternalMetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus - name: object type: - namedType: io.k8s.api.autoscaling.v2.ObjectMetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus - name: pods type: - namedType: io.k8s.api.autoscaling.v2.PodsMetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.PodsMetricStatus - name: resource type: - namedType: io.k8s.api.autoscaling.v2.ResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus - name: type type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2.MetricTarget +- name: io.k8s.api.autoscaling.v2beta1.ObjectMetricSource map: fields: - - name: averageUtilization - type: - scalar: numeric - name: averageValue type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: type + - name: metricName type: scalar: string default: "" - - name: value + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: target + type: + namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference + default: {} + - name: targetValue type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2.MetricValueStatus + default: {} +- name: io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus map: fields: - - name: averageUtilization - type: - scalar: numeric - name: averageValue type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: value + - name: currentValue type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2.ObjectMetricSource - map: - fields: - - name: describedObject - type: - namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference default: {} - - name: metric + - name: metricName type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} + scalar: string + default: "" + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - name: target type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget + namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference default: {} -- name: io.k8s.api.autoscaling.v2.ObjectMetricStatus +- name: io.k8s.api.autoscaling.v2beta1.PodsMetricSource map: fields: - - name: current + - name: metricName type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: describedObject + scalar: string + default: "" + - name: selector type: - namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference - default: {} - - name: metric + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: targetAverageValue type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity default: {} -- name: io.k8s.api.autoscaling.v2.PodsMetricSource +- name: io.k8s.api.autoscaling.v2beta1.PodsMetricStatus map: fields: - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} - - name: target + - name: currentAverageValue type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity default: {} -- name: io.k8s.api.autoscaling.v2.PodsMetricStatus - map: - fields: - - name: current + - name: metricName type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: metric + scalar: string + default: "" + - name: selector type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2.ResourceMetricSource + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: io.k8s.api.autoscaling.v2beta1.ResourceMetricSource map: fields: - name: name type: scalar: string default: "" - - name: target + - name: targetAverageUtilization type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.ResourceMetricStatus + scalar: numeric + - name: targetAverageValue + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus map: fields: - - name: current + - name: currentAverageUtilization + type: + scalar: numeric + - name: currentAverageValue type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity default: {} - name: name type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource +- name: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource map: fields: - name: container @@ -2242,31 +2171,26 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" - - name: targetAverageUtilization - type: - scalar: numeric - - name: targetAverageValue + - name: target type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus map: fields: - name: container type: scalar: string default: "" - - name: currentAverageUtilization - type: - scalar: numeric - - name: currentAverageValue + - name: current type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus default: {} - name: name type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference +- name: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference map: fields: - name: apiVersion @@ -2280,40 +2204,59 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.ExternalMetricSource +- name: io.k8s.api.autoscaling.v2beta2.ExternalMetricSource map: fields: - - name: metricName - type: - scalar: string - default: "" - - name: metricSelector + - name: metric type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: targetAverageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: targetValue + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + default: {} + - name: target type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus + namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus map: fields: - - name: currentAverageValue + - name: current type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: currentValue + namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus + default: {} + - name: metric type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier default: {} - - name: metricName +- name: io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy + map: + fields: + - name: periodSeconds + type: + scalar: numeric + default: 0 + - name: type type: scalar: string default: "" - - name: metricSelector + - name: value type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler + scalar: numeric + default: 0 +- name: io.k8s.api.autoscaling.v2beta2.HPAScalingRules + map: + fields: + - name: policies + type: + list: + elementType: + namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy + elementRelationship: atomic + - name: selectPolicy + type: + scalar: string + - name: stabilizationWindowSeconds + type: + scalar: numeric +- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler map: fields: - name: apiVersion @@ -2328,13 +2271,22 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec + namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec default: {} - name: status type: - namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus + namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus default: {} -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition +- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior + map: + fields: + - name: scaleDown + type: + namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingRules + - name: scaleUp + type: + namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingRules +- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition map: fields: - name: lastTransitionTime @@ -2355,9 +2307,12 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec +- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec map: fields: + - name: behavior + type: + namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior - name: maxReplicas type: scalar: numeric @@ -2366,29 +2321,29 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta1.MetricSpec + namedType: io.k8s.api.autoscaling.v2beta2.MetricSpec elementRelationship: atomic - name: minReplicas type: scalar: numeric - name: scaleTargetRef type: - namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference + namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference default: {} -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus +- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus map: fields: - name: conditions type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition + namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition elementRelationship: atomic - name: currentMetrics type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta1.MetricStatus + namedType: io.k8s.api.autoscaling.v2beta2.MetricStatus elementRelationship: atomic - name: currentReplicas type: @@ -2404,154 +2359,143 @@ var schemaYAML = typed.YAMLObject(`types: - name: observedGeneration type: scalar: numeric -- name: io.k8s.api.autoscaling.v2beta1.MetricSpec +- name: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + map: + fields: + - name: name + type: + scalar: string + default: "" + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: io.k8s.api.autoscaling.v2beta2.MetricSpec map: fields: - name: containerResource type: - namedType: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource + namedType: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource - name: external type: - namedType: io.k8s.api.autoscaling.v2beta1.ExternalMetricSource + namedType: io.k8s.api.autoscaling.v2beta2.ExternalMetricSource - name: object type: - namedType: io.k8s.api.autoscaling.v2beta1.ObjectMetricSource + namedType: io.k8s.api.autoscaling.v2beta2.ObjectMetricSource - name: pods type: - namedType: io.k8s.api.autoscaling.v2beta1.PodsMetricSource + namedType: io.k8s.api.autoscaling.v2beta2.PodsMetricSource - name: resource type: - namedType: io.k8s.api.autoscaling.v2beta1.ResourceMetricSource + namedType: io.k8s.api.autoscaling.v2beta2.ResourceMetricSource - name: type type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.MetricStatus +- name: io.k8s.api.autoscaling.v2beta2.MetricStatus map: fields: - name: containerResource type: - namedType: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus - name: external type: - namedType: io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus + namedType: io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus - name: object type: - namedType: io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus + namedType: io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus - name: pods type: - namedType: io.k8s.api.autoscaling.v2beta1.PodsMetricStatus + namedType: io.k8s.api.autoscaling.v2beta2.PodsMetricStatus - name: resource type: - namedType: io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus - name: type type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.ObjectMetricSource +- name: io.k8s.api.autoscaling.v2beta2.MetricTarget map: fields: + - name: averageUtilization + type: + scalar: numeric - name: averageValue type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: metricName + - name: type type: scalar: string default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: target - type: - namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference - default: {} - - name: targetValue + - name: value type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - default: {} -- name: io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus +- name: io.k8s.api.autoscaling.v2beta2.MetricValueStatus map: fields: + - name: averageUtilization + type: + scalar: numeric - name: averageValue type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: currentValue + - name: value type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - default: {} - - name: metricName - type: - scalar: string - default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: target - type: - namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference - default: {} -- name: io.k8s.api.autoscaling.v2beta1.PodsMetricSource +- name: io.k8s.api.autoscaling.v2beta2.ObjectMetricSource map: fields: - - name: metricName + - name: describedObject type: - scalar: string - default: "" - - name: selector + namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference + default: {} + - name: metric type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: targetAverageValue + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + default: {} + - name: target type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget default: {} -- name: io.k8s.api.autoscaling.v2beta1.PodsMetricStatus +- name: io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus map: fields: - - name: currentAverageValue + - name: current type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus default: {} - - name: metricName + - name: describedObject type: - scalar: string - default: "" - - name: selector + namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference + default: {} + - name: metric type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2beta1.ResourceMetricSource + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + default: {} +- name: io.k8s.api.autoscaling.v2beta2.PodsMetricSource map: fields: - - name: name - type: - scalar: string - default: "" - - name: targetAverageUtilization + - name: metric type: - scalar: numeric - - name: targetAverageValue + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + default: {} + - name: target type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2beta2.PodsMetricStatus map: fields: - - name: currentAverageUtilization - type: - scalar: numeric - - name: currentAverageValue + - name: current type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus default: {} - - name: name + - name: metric type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + default: {} +- name: io.k8s.api.autoscaling.v2beta2.ResourceMetricSource map: fields: - - name: container - type: - scalar: string - default: "" - name: name type: scalar: string @@ -2560,13 +2504,9 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget default: {} -- name: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus +- name: io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus map: fields: - - name: container - type: - scalar: string - default: "" - name: current type: namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus @@ -2575,7 +2515,7 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference +- name: io.k8s.api.batch.v1.CronJob map: fields: - name: apiVersion @@ -2584,64 +2524,60 @@ var schemaYAML = typed.YAMLObject(`types: - name: kind type: scalar: string - default: "" - - name: name + - name: metadata type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta2.ExternalMetricSource - map: - fields: - - name: metric + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + namedType: io.k8s.api.batch.v1.CronJobSpec default: {} - - name: target + - name: status type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget + namedType: io.k8s.api.batch.v1.CronJobStatus default: {} -- name: io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus +- name: io.k8s.api.batch.v1.CronJobSpec map: fields: - - name: current + - name: concurrencyPolicy type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy - map: - fields: - - name: periodSeconds + scalar: string + - name: failedJobsHistoryLimit type: scalar: numeric - default: 0 - - name: type + - name: jobTemplate + type: + namedType: io.k8s.api.batch.v1.JobTemplateSpec + default: {} + - name: schedule type: scalar: string default: "" - - name: value + - name: startingDeadlineSeconds type: scalar: numeric - default: 0 -- name: io.k8s.api.autoscaling.v2beta2.HPAScalingRules + - name: successfulJobsHistoryLimit + type: + scalar: numeric + - name: suspend + type: + scalar: boolean +- name: io.k8s.api.batch.v1.CronJobStatus map: fields: - - name: policies + - name: active type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy + namedType: io.k8s.api.core.v1.ObjectReference elementRelationship: atomic - - name: selectPolicy + - name: lastScheduleTime type: - scalar: string - - name: stabilizationWindowSeconds + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: lastSuccessfulTime type: - scalar: numeric -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time +- name: io.k8s.api.batch.v1.Job map: fields: - name: apiVersion @@ -2656,24 +2592,19 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec + namedType: io.k8s.api.batch.v1.JobSpec default: {} - name: status type: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus + namedType: io.k8s.api.batch.v1.JobStatus default: {} -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior +- name: io.k8s.api.batch.v1.JobCondition map: fields: - - name: scaleDown - type: - namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingRules - - name: scaleUp + - name: lastProbeTime type: - namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingRules -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition - map: - fields: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} - name: lastTransitionTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time @@ -2692,277 +2623,269 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec +- name: io.k8s.api.batch.v1.JobSpec map: fields: - - name: behavior + - name: activeDeadlineSeconds type: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior - - name: maxReplicas + scalar: numeric + - name: backoffLimit type: scalar: numeric - default: 0 - - name: metrics + - name: completionMode type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2beta2.MetricSpec - elementRelationship: atomic - - name: minReplicas + scalar: string + - name: completions type: scalar: numeric - - name: scaleTargetRef + - name: manualSelector type: - namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference + scalar: boolean + - name: parallelism + type: + scalar: numeric + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: suspend + type: + scalar: boolean + - name: template + type: + namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus + - name: ttlSecondsAfterFinished + type: + scalar: numeric +- name: io.k8s.api.batch.v1.JobStatus map: fields: - - name: conditions + - name: active type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition - elementRelationship: atomic - - name: currentMetrics + scalar: numeric + - name: completedIndexes + type: + scalar: string + - name: completionTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: conditions type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta2.MetricStatus + namedType: io.k8s.api.batch.v1.JobCondition elementRelationship: atomic - - name: currentReplicas - type: - scalar: numeric - default: 0 - - name: desiredReplicas + - name: failed type: scalar: numeric - default: 0 - - name: lastScaleTime + - name: startTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: observedGeneration + - name: succeeded type: scalar: numeric -- name: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + - name: uncountedTerminatedPods + type: + namedType: io.k8s.api.batch.v1.UncountedTerminatedPods +- name: io.k8s.api.batch.v1.JobTemplateSpec map: fields: - - name: name + - name: metadata type: - scalar: string - default: "" - - name: selector + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2beta2.MetricSpec + namedType: io.k8s.api.batch.v1.JobSpec + default: {} +- name: io.k8s.api.batch.v1.UncountedTerminatedPods map: fields: - - name: containerResource - type: - namedType: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource - - name: external - type: - namedType: io.k8s.api.autoscaling.v2beta2.ExternalMetricSource - - name: object - type: - namedType: io.k8s.api.autoscaling.v2beta2.ObjectMetricSource - - name: pods - type: - namedType: io.k8s.api.autoscaling.v2beta2.PodsMetricSource - - name: resource + - name: failed type: - namedType: io.k8s.api.autoscaling.v2beta2.ResourceMetricSource - - name: type + list: + elementType: + scalar: string + elementRelationship: associative + - name: succeeded type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta2.MetricStatus + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.api.batch.v1beta1.CronJob map: fields: - - name: containerResource - type: - namedType: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus - - name: external + - name: apiVersion type: - namedType: io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus - - name: object + scalar: string + - name: kind type: - namedType: io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus - - name: pods + scalar: string + - name: metadata type: - namedType: io.k8s.api.autoscaling.v2beta2.PodsMetricStatus - - name: resource + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec type: - namedType: io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus - - name: type + namedType: io.k8s.api.batch.v1beta1.CronJobSpec + default: {} + - name: status type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta2.MetricTarget + namedType: io.k8s.api.batch.v1beta1.CronJobStatus + default: {} +- name: io.k8s.api.batch.v1beta1.CronJobSpec map: fields: - - name: averageUtilization + - name: concurrencyPolicy + type: + scalar: string + - name: failedJobsHistoryLimit type: scalar: numeric - - name: averageValue + - name: jobTemplate type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: type + namedType: io.k8s.api.batch.v1beta1.JobTemplateSpec + default: {} + - name: schedule type: scalar: string default: "" - - name: value + - name: startingDeadlineSeconds type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta2.MetricValueStatus + scalar: numeric + - name: successfulJobsHistoryLimit + type: + scalar: numeric + - name: suspend + type: + scalar: boolean +- name: io.k8s.api.batch.v1beta1.CronJobStatus map: fields: - - name: averageUtilization + - name: active type: - scalar: numeric - - name: averageValue + list: + elementType: + namedType: io.k8s.api.core.v1.ObjectReference + elementRelationship: atomic + - name: lastScheduleTime type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: value + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: lastSuccessfulTime type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta2.ObjectMetricSource + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time +- name: io.k8s.api.batch.v1beta1.JobTemplateSpec map: fields: - - name: describedObject - type: - namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference - default: {} - - name: metric + - name: metadata type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} - - name: target + - name: spec type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget + namedType: io.k8s.api.batch.v1.JobSpec default: {} -- name: io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus +- name: io.k8s.api.certificates.v1.CertificateSigningRequest map: fields: - - name: current + - name: apiVersion type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: describedObject + scalar: string + - name: kind type: - namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference - default: {} - - name: metric + scalar: string + - name: metadata type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} -- name: io.k8s.api.autoscaling.v2beta2.PodsMetricSource - map: - fields: - - name: metric + - name: spec type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + namedType: io.k8s.api.certificates.v1.CertificateSigningRequestSpec default: {} - - name: target + - name: status type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget + namedType: io.k8s.api.certificates.v1.CertificateSigningRequestStatus default: {} -- name: io.k8s.api.autoscaling.v2beta2.PodsMetricStatus +- name: io.k8s.api.certificates.v1.CertificateSigningRequestCondition map: fields: - - name: current + - name: lastTransitionTime type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time default: {} - - name: metric + - name: lastUpdateTime type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time default: {} -- name: io.k8s.api.autoscaling.v2beta2.ResourceMetricSource - map: - fields: - - name: name + - name: message type: scalar: string - default: "" - - name: target + - name: reason type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus - map: - fields: - - name: current + scalar: string + - name: status type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: name + scalar: string + default: "" + - name: type type: scalar: string default: "" -- name: io.k8s.api.batch.v1.CronJob +- name: io.k8s.api.certificates.v1.CertificateSigningRequestSpec map: fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata + - name: expirationSeconds type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec + scalar: numeric + - name: extra type: - namedType: io.k8s.api.batch.v1.CronJobSpec - default: {} - - name: status + map: + elementType: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: groups type: - namedType: io.k8s.api.batch.v1.CronJobStatus - default: {} -- name: io.k8s.api.batch.v1.CronJobSpec - map: - fields: - - name: concurrencyPolicy + list: + elementType: + scalar: string + elementRelationship: atomic + - name: request type: scalar: string - - name: failedJobsHistoryLimit - type: - scalar: numeric - - name: jobTemplate - type: - namedType: io.k8s.api.batch.v1.JobTemplateSpec - default: {} - - name: schedule + - name: signerName type: scalar: string default: "" - - name: startingDeadlineSeconds + - name: uid type: - scalar: numeric - - name: successfulJobsHistoryLimit + scalar: string + - name: usages type: - scalar: numeric - - name: suspend + list: + elementType: + scalar: string + elementRelationship: atomic + - name: username type: - scalar: boolean -- name: io.k8s.api.batch.v1.CronJobStatus + scalar: string +- name: io.k8s.api.certificates.v1.CertificateSigningRequestStatus map: fields: - - name: active + - name: certificate + type: + scalar: string + - name: conditions type: list: elementType: - namedType: io.k8s.api.core.v1.ObjectReference - elementRelationship: atomic - - name: lastScheduleTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastSuccessfulTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.batch.v1.Job + namedType: io.k8s.api.certificates.v1.CertificateSigningRequestCondition + elementRelationship: associative + keys: + - type +- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequest map: fields: - name: apiVersion @@ -2977,20 +2900,20 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.batch.v1.JobSpec + namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec default: {} - name: status type: - namedType: io.k8s.api.batch.v1.JobStatus + namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus default: {} -- name: io.k8s.api.batch.v1.JobCondition +- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition map: fields: - - name: lastProbeTime + - name: lastTransitionTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time default: {} - - name: lastTransitionTime + - name: lastUpdateTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time default: {} @@ -3008,100 +2931,59 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.batch.v1.JobSpec +- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec map: fields: - - name: activeDeadlineSeconds - type: - scalar: numeric - - name: backoffLimit - type: - scalar: numeric - - name: completionMode - type: - scalar: string - - name: completions - type: - scalar: numeric - - name: manualSelector - type: - scalar: boolean - - name: parallelism + - name: expirationSeconds type: scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: suspend - type: - scalar: boolean - - name: template + - name: extra type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} - - name: ttlSecondsAfterFinished + map: + elementType: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: groups type: - scalar: numeric -- name: io.k8s.api.batch.v1.JobStatus - map: - fields: - - name: active + list: + elementType: + scalar: string + elementRelationship: atomic + - name: request type: - scalar: numeric - - name: completedIndexes + scalar: string + - name: signerName type: scalar: string - - name: completionTime + - name: uid type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: conditions + scalar: string + - name: usages type: list: elementType: - namedType: io.k8s.api.batch.v1.JobCondition + scalar: string elementRelationship: atomic - - name: failed - type: - scalar: numeric - - name: ready - type: - scalar: numeric - - name: startTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: succeeded - type: - scalar: numeric - - name: uncountedTerminatedPods - type: - namedType: io.k8s.api.batch.v1.UncountedTerminatedPods -- name: io.k8s.api.batch.v1.JobTemplateSpec - map: - fields: - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec + - name: username type: - namedType: io.k8s.api.batch.v1.JobSpec - default: {} -- name: io.k8s.api.batch.v1.UncountedTerminatedPods + scalar: string +- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus map: fields: - - name: failed + - name: certificate type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: succeeded + scalar: string + - name: conditions type: list: elementType: - scalar: string + namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition elementRelationship: associative -- name: io.k8s.api.batch.v1beta1.CronJob + keys: + - type +- name: io.k8s.api.coordination.v1.Lease map: fields: - name: apiVersion @@ -3116,466 +2998,196 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.batch.v1beta1.CronJobSpec + namedType: io.k8s.api.coordination.v1.LeaseSpec default: {} - - name: status - type: - namedType: io.k8s.api.batch.v1beta1.CronJobStatus - default: {} -- name: io.k8s.api.batch.v1beta1.CronJobSpec +- name: io.k8s.api.coordination.v1.LeaseSpec map: fields: - - name: concurrencyPolicy - type: - scalar: string - - name: failedJobsHistoryLimit - type: - scalar: numeric - - name: jobTemplate + - name: acquireTime type: - namedType: io.k8s.api.batch.v1beta1.JobTemplateSpec - default: {} - - name: schedule + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime + - name: holderIdentity type: scalar: string - default: "" - - name: startingDeadlineSeconds + - name: leaseDurationSeconds type: scalar: numeric - - name: successfulJobsHistoryLimit + - name: leaseTransitions type: scalar: numeric - - name: suspend + - name: renewTime type: - scalar: boolean -- name: io.k8s.api.batch.v1beta1.CronJobStatus + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime +- name: io.k8s.api.coordination.v1beta1.Lease map: fields: - - name: active - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ObjectReference - elementRelationship: atomic - - name: lastScheduleTime + - name: apiVersion type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastSuccessfulTime + scalar: string + - name: kind type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.batch.v1beta1.JobTemplateSpec - map: - fields: + scalar: string - name: metadata type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} - name: spec type: - namedType: io.k8s.api.batch.v1.JobSpec + namedType: io.k8s.api.coordination.v1beta1.LeaseSpec default: {} -- name: io.k8s.api.certificates.v1.CertificateSigningRequest +- name: io.k8s.api.coordination.v1beta1.LeaseSpec map: fields: - - name: apiVersion + - name: acquireTime type: - scalar: string - - name: kind + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime + - name: holderIdentity type: scalar: string - - name: metadata + - name: leaseDurationSeconds type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec + scalar: numeric + - name: leaseTransitions type: - namedType: io.k8s.api.certificates.v1.CertificateSigningRequestSpec - default: {} - - name: status + scalar: numeric + - name: renewTime type: - namedType: io.k8s.api.certificates.v1.CertificateSigningRequestStatus - default: {} -- name: io.k8s.api.certificates.v1.CertificateSigningRequestCondition + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime +- name: io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource map: fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: message + - name: fsType type: scalar: string - - name: reason + - name: partition type: - scalar: string - - name: status + scalar: numeric + - name: readOnly type: - scalar: string - default: "" - - name: type + scalar: boolean + - name: volumeID type: scalar: string default: "" -- name: io.k8s.api.certificates.v1.CertificateSigningRequestSpec +- name: io.k8s.api.core.v1.Affinity map: fields: - - name: expirationSeconds + - name: nodeAffinity type: - scalar: numeric - - name: extra + namedType: io.k8s.api.core.v1.NodeAffinity + - name: podAffinity type: - map: - elementType: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: groups + namedType: io.k8s.api.core.v1.PodAffinity + - name: podAntiAffinity type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: request + namedType: io.k8s.api.core.v1.PodAntiAffinity +- name: io.k8s.api.core.v1.AttachedVolume + map: + fields: + - name: devicePath type: scalar: string - - name: signerName + default: "" + - name: name type: scalar: string default: "" - - name: uid +- name: io.k8s.api.core.v1.AzureDiskVolumeSource + map: + fields: + - name: cachingMode type: scalar: string - - name: usages - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: username + - name: diskName type: scalar: string -- name: io.k8s.api.certificates.v1.CertificateSigningRequestStatus - map: - fields: - - name: certificate + default: "" + - name: diskURI type: scalar: string - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.certificates.v1.CertificateSigningRequestCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequest - map: - fields: - - name: apiVersion + default: "" + - name: fsType type: scalar: string - name: kind type: scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec - default: {} - - name: status + - name: readOnly type: - namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus - default: {} -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition + scalar: boolean +- name: io.k8s.api.core.v1.AzureFilePersistentVolumeSource map: fields: - - name: lastTransitionTime + - name: readOnly type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: lastUpdateTime + scalar: boolean + - name: secretName type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: message + scalar: string + default: "" + - name: secretNamespace type: scalar: string - - name: reason + - name: shareName type: scalar: string - - name: status + default: "" +- name: io.k8s.api.core.v1.AzureFileVolumeSource + map: + fields: + - name: readOnly + type: + scalar: boolean + - name: secretName type: scalar: string default: "" - - name: type + - name: shareName type: scalar: string default: "" -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec +- name: io.k8s.api.core.v1.CSIPersistentVolumeSource map: fields: - - name: expirationSeconds - type: - scalar: numeric - - name: extra + - name: controllerExpandSecretRef type: - map: - elementType: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: groups + namedType: io.k8s.api.core.v1.SecretReference + - name: controllerPublishSecretRef type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: request + namedType: io.k8s.api.core.v1.SecretReference + - name: driver type: scalar: string - - name: signerName + default: "" + - name: fsType type: scalar: string - - name: uid + - name: nodePublishSecretRef type: - scalar: string - - name: usages + namedType: io.k8s.api.core.v1.SecretReference + - name: nodeStageSecretRef type: - list: + namedType: io.k8s.api.core.v1.SecretReference + - name: readOnly + type: + scalar: boolean + - name: volumeAttributes + type: + map: elementType: scalar: string - elementRelationship: atomic - - name: username + - name: volumeHandle type: scalar: string -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus + default: "" +- name: io.k8s.api.core.v1.CSIVolumeSource map: fields: - - name: certificate + - name: driver type: scalar: string - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.coordination.v1.Lease - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.coordination.v1.LeaseSpec - default: {} -- name: io.k8s.api.coordination.v1.LeaseSpec - map: - fields: - - name: acquireTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: holderIdentity - type: - scalar: string - - name: leaseDurationSeconds - type: - scalar: numeric - - name: leaseTransitions - type: - scalar: numeric - - name: renewTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime -- name: io.k8s.api.coordination.v1beta1.Lease - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.coordination.v1beta1.LeaseSpec - default: {} -- name: io.k8s.api.coordination.v1beta1.LeaseSpec - map: - fields: - - name: acquireTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: holderIdentity - type: - scalar: string - - name: leaseDurationSeconds - type: - scalar: numeric - - name: leaseTransitions - type: - scalar: numeric - - name: renewTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime -- name: io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: partition - type: - scalar: numeric - - name: readOnly - type: - scalar: boolean - - name: volumeID - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.Affinity - map: - fields: - - name: nodeAffinity - type: - namedType: io.k8s.api.core.v1.NodeAffinity - - name: podAffinity - type: - namedType: io.k8s.api.core.v1.PodAffinity - - name: podAntiAffinity - type: - namedType: io.k8s.api.core.v1.PodAntiAffinity -- name: io.k8s.api.core.v1.AttachedVolume - map: - fields: - - name: devicePath - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.AzureDiskVolumeSource - map: - fields: - - name: cachingMode - type: - scalar: string - - name: diskName - type: - scalar: string - default: "" - - name: diskURI - type: - scalar: string - default: "" - - name: fsType - type: - scalar: string - - name: kind - type: - scalar: string - - name: readOnly - type: - scalar: boolean -- name: io.k8s.api.core.v1.AzureFilePersistentVolumeSource - map: - fields: - - name: readOnly - type: - scalar: boolean - - name: secretName - type: - scalar: string - default: "" - - name: secretNamespace - type: - scalar: string - - name: shareName - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.AzureFileVolumeSource - map: - fields: - - name: readOnly - type: - scalar: boolean - - name: secretName - type: - scalar: string - default: "" - - name: shareName - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.CSIPersistentVolumeSource - map: - fields: - - name: controllerExpandSecretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: controllerPublishSecretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: driver - type: - scalar: string - default: "" - - name: fsType - type: - scalar: string - - name: nodePublishSecretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: nodeStageSecretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: readOnly - type: - scalar: boolean - - name: volumeAttributes - type: - map: - elementType: - scalar: string - - name: volumeHandle - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.CSIVolumeSource - map: - fields: - - name: driver - type: - scalar: string - default: "" - - name: fsType + default: "" + - name: fsType type: scalar: string - name: nodePublishSecretRef @@ -4273,10 +3885,7 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: namedType: io.k8s.api.core.v1.ContainerPort - elementRelationship: associative - keys: - - containerPort - - protocol + elementRelationship: atomic - name: readinessProbe type: namedType: io.k8s.api.core.v1.Probe @@ -4514,17 +4123,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: readOnly type: scalar: boolean -- name: io.k8s.api.core.v1.GRPCAction - map: - fields: - - name: port - type: - scalar: numeric - default: 0 - - name: service - type: - scalar: string - default: "" - name: io.k8s.api.core.v1.GitRepoVolumeSource map: fields: @@ -4602,6 +4200,18 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" +- name: io.k8s.api.core.v1.Handler + map: + fields: + - name: exec + type: + namedType: io.k8s.api.core.v1.ExecAction + - name: httpGet + type: + namedType: io.k8s.api.core.v1.HTTPGetAction + - name: tcpSocket + type: + namedType: io.k8s.api.core.v1.TCPSocketAction - name: io.k8s.api.core.v1.HostAlias map: fields: @@ -4727,22 +4337,10 @@ var schemaYAML = typed.YAMLObject(`types: fields: - name: postStart type: - namedType: io.k8s.api.core.v1.LifecycleHandler + namedType: io.k8s.api.core.v1.Handler - name: preStop type: - namedType: io.k8s.api.core.v1.LifecycleHandler -- name: io.k8s.api.core.v1.LifecycleHandler - map: - fields: - - name: exec - type: - namedType: io.k8s.api.core.v1.ExecAction - - name: httpGet - type: - namedType: io.k8s.api.core.v1.HTTPGetAction - - name: tcpSocket - type: - namedType: io.k8s.api.core.v1.TCPSocketAction + namedType: io.k8s.api.core.v1.Handler - name: io.k8s.api.core.v1.LimitRange map: fields: @@ -5338,11 +4936,6 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic - - name: allocatedResources - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - name: capacity type: map: @@ -5359,9 +4952,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: phase type: scalar: string - - name: resizeStatus - type: - scalar: string - name: io.k8s.api.core.v1.PersistentVolumeClaimTemplate map: fields: @@ -5637,13 +5227,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: ip type: scalar: string -- name: io.k8s.api.core.v1.PodOS - map: - fields: - - name: name - type: - scalar: string - default: "" - name: io.k8s.api.core.v1.PodReadinessGate map: fields: @@ -5772,9 +5355,6 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic - - name: os - type: - namedType: io.k8s.api.core.v1.PodOS - name: overhead type: map: @@ -5984,9 +5564,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: failureThreshold type: scalar: numeric - - name: grpc - type: - namedType: io.k8s.api.core.v1.GRPCAction - name: httpGet type: namedType: io.k8s.api.core.v1.HTTPGetAction @@ -7562,515 +7139,23 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.extensions.v1beta1.DeploymentSpec - default: {} - - name: status - type: - namedType: io.k8s.api.extensions.v1beta1.DeploymentStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.DeploymentCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.DeploymentSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: paused - type: - scalar: boolean - - name: progressDeadlineSeconds - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: rollbackTo - type: - namedType: io.k8s.api.extensions.v1beta1.RollbackConfig - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: strategy - type: - namedType: io.k8s.api.extensions.v1beta1.DeploymentStrategy - default: {} - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.extensions.v1beta1.DeploymentStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.DeploymentCondition - elementRelationship: associative - keys: - - type - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: unavailableReplicas - type: - scalar: numeric - - name: updatedReplicas - type: - scalar: numeric -- name: io.k8s.api.extensions.v1beta1.DeploymentStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.extensions.v1beta1.RollingUpdateDeployment - - name: type - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions - map: - fields: - - name: ranges - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IDRange - elementRelationship: atomic - - name: rule - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.HTTPIngressPath - map: - fields: - - name: backend - type: - namedType: io.k8s.api.extensions.v1beta1.IngressBackend - default: {} - - name: path - type: - scalar: string - - name: pathType - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue - map: - fields: - - name: paths - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.HTTPIngressPath - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.HostPortRange - map: - fields: - - name: max - type: - scalar: numeric - default: 0 - - name: min - type: - scalar: numeric - default: 0 -- name: io.k8s.api.extensions.v1beta1.IDRange - map: - fields: - - name: max - type: - scalar: numeric - default: 0 - - name: min - type: - scalar: numeric - default: 0 -- name: io.k8s.api.extensions.v1beta1.IPBlock - map: - fields: - - name: cidr - type: - scalar: string - default: "" - - name: except - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.Ingress - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.IngressSpec - default: {} - - name: status - type: - namedType: io.k8s.api.extensions.v1beta1.IngressStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.IngressBackend - map: - fields: - - name: resource - type: - namedType: io.k8s.api.core.v1.TypedLocalObjectReference - - name: serviceName - type: - scalar: string - - name: servicePort - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - default: {} -- name: io.k8s.api.extensions.v1beta1.IngressRule - map: - fields: - - name: host - type: - scalar: string - - name: http - type: - namedType: io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue -- name: io.k8s.api.extensions.v1beta1.IngressSpec - map: - fields: - - name: backend - type: - namedType: io.k8s.api.extensions.v1beta1.IngressBackend - - name: ingressClassName - type: - scalar: string - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IngressRule - elementRelationship: atomic - - name: tls - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IngressTLS - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.IngressStatus - map: - fields: - - name: loadBalancer - type: - namedType: io.k8s.api.core.v1.LoadBalancerStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.IngressTLS - map: - fields: - - name: hosts - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: secretName - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.NetworkPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicySpec - default: {} -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule - map: - fields: - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPort - elementRelationship: atomic - - name: to - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule - map: - fields: - - name: from - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer - elementRelationship: atomic - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPort - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer - map: - fields: - - name: ipBlock - type: - namedType: io.k8s.api.extensions.v1beta1.IPBlock - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: podSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyPort - map: - fields: - - name: endPort - type: - scalar: numeric - - name: port - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: protocol - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.NetworkPolicySpec - map: - fields: - - name: egress - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule - elementRelationship: atomic - - name: ingress - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule - elementRelationship: atomic - - name: podSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - default: {} - - name: policyTypes - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.PodSecurityPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec - default: {} -- name: io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec - map: - fields: - - name: allowPrivilegeEscalation - type: - scalar: boolean - - name: allowedCSIDrivers - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.AllowedCSIDriver - elementRelationship: atomic - - name: allowedCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: allowedFlexVolumes - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.AllowedFlexVolume - elementRelationship: atomic - - name: allowedHostPaths - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.AllowedHostPath - elementRelationship: atomic - - name: allowedProcMountTypes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: allowedUnsafeSysctls - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: defaultAddCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: defaultAllowPrivilegeEscalation - type: - scalar: boolean - - name: forbiddenSysctls - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: fsGroup - type: - namedType: io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions - default: {} - - name: hostIPC - type: - scalar: boolean - - name: hostNetwork - type: - scalar: boolean - - name: hostPID - type: - scalar: boolean - - name: hostPorts - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.HostPortRange - elementRelationship: atomic - - name: privileged - type: - scalar: boolean - - name: readOnlyRootFilesystem - type: - scalar: boolean - - name: requiredDropCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: runAsGroup - type: - namedType: io.k8s.api.extensions.v1beta1.RunAsGroupStrategyOptions - - name: runAsUser - type: - namedType: io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions - default: {} - - name: runtimeClass - type: - namedType: io.k8s.api.extensions.v1beta1.RuntimeClassStrategyOptions - - name: seLinux - type: - namedType: io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions - default: {} - - name: supplementalGroups - type: - namedType: io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions - default: {} - - name: volumes - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.ReplicaSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.ReplicaSetSpec + namedType: io.k8s.api.extensions.v1beta1.DeploymentSpec default: {} - name: status type: - namedType: io.k8s.api.extensions.v1beta1.ReplicaSetStatus + namedType: io.k8s.api.extensions.v1beta1.DeploymentStatus default: {} -- name: io.k8s.api.extensions.v1beta1.ReplicaSetCondition +- name: io.k8s.api.extensions.v1beta1.DeploymentCondition map: fields: - name: lastTransitionTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time default: {} + - name: lastUpdateTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} - name: message type: scalar: string @@ -8085,39 +7170,55 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.extensions.v1beta1.ReplicaSetSpec +- name: io.k8s.api.extensions.v1beta1.DeploymentSpec map: fields: - name: minReadySeconds type: scalar: numeric + - name: paused + type: + scalar: boolean + - name: progressDeadlineSeconds + type: + scalar: numeric - name: replicas type: scalar: numeric + - name: revisionHistoryLimit + type: + scalar: numeric + - name: rollbackTo + type: + namedType: io.k8s.api.extensions.v1beta1.RollbackConfig - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: strategy + type: + namedType: io.k8s.api.extensions.v1beta1.DeploymentStrategy + default: {} - name: template type: namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} -- name: io.k8s.api.extensions.v1beta1.ReplicaSetStatus +- name: io.k8s.api.extensions.v1beta1.DeploymentStatus map: fields: - name: availableReplicas type: scalar: numeric + - name: collisionCount + type: + scalar: numeric - name: conditions type: list: elementType: - namedType: io.k8s.api.extensions.v1beta1.ReplicaSetCondition + namedType: io.k8s.api.extensions.v1beta1.DeploymentCondition elementRelationship: associative keys: - type - - name: fullyLabeledReplicas - type: - scalar: numeric - name: observedGeneration type: scalar: numeric @@ -8127,32 +7228,22 @@ var schemaYAML = typed.YAMLObject(`types: - name: replicas type: scalar: numeric - default: 0 -- name: io.k8s.api.extensions.v1beta1.RollbackConfig - map: - fields: - - name: revision + - name: unavailableReplicas type: scalar: numeric -- name: io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable + - name: updatedReplicas type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.extensions.v1beta1.RollingUpdateDeployment + scalar: numeric +- name: io.k8s.api.extensions.v1beta1.DeploymentStrategy map: fields: - - name: maxSurge + - name: rollingUpdate type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable + namedType: io.k8s.api.extensions.v1beta1.RollingUpdateDeployment + - name: type type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.extensions.v1beta1.RunAsGroupStrategyOptions + scalar: string +- name: io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions map: fields: - name: ranges @@ -8164,62 +7255,243 @@ var schemaYAML = typed.YAMLObject(`types: - name: rule type: scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions +- name: io.k8s.api.extensions.v1beta1.HTTPIngressPath map: fields: - - name: ranges + - name: backend + type: + namedType: io.k8s.api.extensions.v1beta1.IngressBackend + default: {} + - name: path + type: + scalar: string + - name: pathType + type: + scalar: string +- name: io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue + map: + fields: + - name: paths type: list: elementType: - namedType: io.k8s.api.extensions.v1beta1.IDRange + namedType: io.k8s.api.extensions.v1beta1.HTTPIngressPath elementRelationship: atomic - - name: rule +- name: io.k8s.api.extensions.v1beta1.HostPortRange + map: + fields: + - name: max + type: + scalar: numeric + default: 0 + - name: min + type: + scalar: numeric + default: 0 +- name: io.k8s.api.extensions.v1beta1.IDRange + map: + fields: + - name: max + type: + scalar: numeric + default: 0 + - name: min + type: + scalar: numeric + default: 0 +- name: io.k8s.api.extensions.v1beta1.IPBlock + map: + fields: + - name: cidr type: scalar: string default: "" -- name: io.k8s.api.extensions.v1beta1.RuntimeClassStrategyOptions + - name: except + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.extensions.v1beta1.Ingress map: fields: - - name: allowedRuntimeClassNames + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.extensions.v1beta1.IngressSpec + default: {} + - name: status + type: + namedType: io.k8s.api.extensions.v1beta1.IngressStatus + default: {} +- name: io.k8s.api.extensions.v1beta1.IngressBackend + map: + fields: + - name: resource + type: + namedType: io.k8s.api.core.v1.TypedLocalObjectReference + - name: serviceName + type: + scalar: string + - name: servicePort + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + default: {} +- name: io.k8s.api.extensions.v1beta1.IngressRule + map: + fields: + - name: host + type: + scalar: string + - name: http + type: + namedType: io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue +- name: io.k8s.api.extensions.v1beta1.IngressSpec + map: + fields: + - name: backend + type: + namedType: io.k8s.api.extensions.v1beta1.IngressBackend + - name: ingressClassName + type: + scalar: string + - name: rules + type: + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.IngressRule + elementRelationship: atomic + - name: tls + type: + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.IngressTLS + elementRelationship: atomic +- name: io.k8s.api.extensions.v1beta1.IngressStatus + map: + fields: + - name: loadBalancer + type: + namedType: io.k8s.api.core.v1.LoadBalancerStatus + default: {} +- name: io.k8s.api.extensions.v1beta1.IngressTLS + map: + fields: + - name: hosts type: list: elementType: scalar: string elementRelationship: atomic - - name: defaultRuntimeClassName + - name: secretName type: scalar: string -- name: io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions +- name: io.k8s.api.extensions.v1beta1.NetworkPolicy + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicySpec + default: {} +- name: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule + map: + fields: + - name: ports + type: + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPort + elementRelationship: atomic + - name: to + type: + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer + elementRelationship: atomic +- name: io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule + map: + fields: + - name: from + type: + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer + elementRelationship: atomic + - name: ports + type: + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPort + elementRelationship: atomic +- name: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer + map: + fields: + - name: ipBlock + type: + namedType: io.k8s.api.extensions.v1beta1.IPBlock + - name: namespaceSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: podSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: io.k8s.api.extensions.v1beta1.NetworkPolicyPort map: fields: - - name: rule + - name: endPort type: - scalar: string - default: "" - - name: seLinuxOptions + scalar: numeric + - name: port type: - namedType: io.k8s.api.core.v1.SELinuxOptions -- name: io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: protocol + type: + scalar: string +- name: io.k8s.api.extensions.v1beta1.NetworkPolicySpec map: fields: - - name: ranges + - name: egress type: list: elementType: - namedType: io.k8s.api.extensions.v1beta1.IDRange + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule elementRelationship: atomic - - name: rule + - name: ingress type: - scalar: string -- name: io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod - map: - fields: - - name: type + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule + elementRelationship: atomic + - name: podSelector type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchema + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + default: {} + - name: policyTypes + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.extensions.v1beta1.PodSecurityPolicy map: fields: - name: apiVersion @@ -8234,132 +7506,121 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaSpec - default: {} - - name: status - type: - namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaStatus - default: {} -- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + namedType: io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec default: {} - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaSpec +- name: io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec map: fields: - - name: distinguisherMethod - type: - namedType: io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod - - name: matchingPrecedence - type: - scalar: numeric - default: 0 - - name: priorityLevelConfiguration + - name: allowPrivilegeEscalation type: - namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationReference - default: {} - - name: rules + scalar: boolean + - name: allowedCSIDrivers type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.PolicyRulesWithSubjects + namedType: io.k8s.api.extensions.v1beta1.AllowedCSIDriver elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaStatus - map: - fields: - - name: conditions + - name: allowedCapabilities type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.flowcontrol.v1alpha1.GroupSubject - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1alpha1.LimitResponse - map: - fields: - - name: queuing + scalar: string + elementRelationship: atomic + - name: allowedFlexVolumes type: - namedType: io.k8s.api.flowcontrol.v1alpha1.QueuingConfiguration - - name: type + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.AllowedFlexVolume + elementRelationship: atomic + - name: allowedHostPaths type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: queuing - discriminatorValue: Queuing -- name: io.k8s.api.flowcontrol.v1alpha1.LimitedPriorityLevelConfiguration - map: - fields: - - name: assuredConcurrencyShares + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.AllowedHostPath + elementRelationship: atomic + - name: allowedProcMountTypes type: - scalar: numeric - default: 0 - - name: limitResponse + list: + elementType: + scalar: string + elementRelationship: atomic + - name: allowedUnsafeSysctls type: - namedType: io.k8s.api.flowcontrol.v1alpha1.LimitResponse - default: {} -- name: io.k8s.api.flowcontrol.v1alpha1.NonResourcePolicyRule - map: - fields: - - name: nonResourceURLs + list: + elementType: + scalar: string + elementRelationship: atomic + - name: defaultAddCapabilities type: list: elementType: scalar: string - elementRelationship: associative - - name: verbs + elementRelationship: atomic + - name: defaultAllowPrivilegeEscalation + type: + scalar: boolean + - name: forbiddenSysctls type: list: elementType: scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1alpha1.PolicyRulesWithSubjects - map: - fields: - - name: nonResourceRules + elementRelationship: atomic + - name: fsGroup + type: + namedType: io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions + default: {} + - name: hostIPC + type: + scalar: boolean + - name: hostNetwork + type: + scalar: boolean + - name: hostPID + type: + scalar: boolean + - name: hostPorts type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.NonResourcePolicyRule + namedType: io.k8s.api.extensions.v1beta1.HostPortRange elementRelationship: atomic - - name: resourceRules + - name: privileged + type: + scalar: boolean + - name: readOnlyRootFilesystem + type: + scalar: boolean + - name: requiredDropCapabilities type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.ResourcePolicyRule + scalar: string elementRelationship: atomic - - name: subjects + - name: runAsGroup + type: + namedType: io.k8s.api.extensions.v1beta1.RunAsGroupStrategyOptions + - name: runAsUser + type: + namedType: io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions + default: {} + - name: runtimeClass + type: + namedType: io.k8s.api.extensions.v1beta1.RuntimeClassStrategyOptions + - name: seLinux + type: + namedType: io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions + default: {} + - name: supplementalGroups + type: + namedType: io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions + default: {} + - name: volumes type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.Subject + scalar: string elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfiguration +- name: io.k8s.api.extensions.v1beta1.ReplicaSet map: fields: - name: apiVersion @@ -8374,13 +7635,13 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationSpec + namedType: io.k8s.api.extensions.v1beta1.ReplicaSetSpec default: {} - name: status type: - namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationStatus + namedType: io.k8s.api.extensions.v1beta1.ReplicaSetStatus default: {} -- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationCondition +- name: io.k8s.api.extensions.v1beta1.ReplicaSetCondition map: fields: - name: lastTransitionTime @@ -8396,138 +7657,146 @@ var schemaYAML = typed.YAMLObject(`types: - name: status type: scalar: string + default: "" - name: type type: scalar: string -- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationReference - map: - fields: - - name: name - type: - scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationSpec +- name: io.k8s.api.extensions.v1beta1.ReplicaSetSpec map: fields: - - name: limited + - name: minReadySeconds type: - namedType: io.k8s.api.flowcontrol.v1alpha1.LimitedPriorityLevelConfiguration - - name: type + scalar: numeric + - name: replicas type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: limited - discriminatorValue: Limited -- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationStatus + scalar: numeric + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: template + type: + namedType: io.k8s.api.core.v1.PodTemplateSpec + default: {} +- name: io.k8s.api.extensions.v1beta1.ReplicaSetStatus map: fields: + - name: availableReplicas + type: + scalar: numeric - name: conditions type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationCondition + namedType: io.k8s.api.extensions.v1beta1.ReplicaSetCondition elementRelationship: associative keys: - type -- name: io.k8s.api.flowcontrol.v1alpha1.QueuingConfiguration - map: - fields: - - name: handSize + - name: fullyLabeledReplicas type: scalar: numeric - default: 0 - - name: queueLengthLimit + - name: observedGeneration type: scalar: numeric - default: 0 - - name: queues + - name: readyReplicas + type: + scalar: numeric + - name: replicas type: scalar: numeric default: 0 -- name: io.k8s.api.flowcontrol.v1alpha1.ResourcePolicyRule +- name: io.k8s.api.extensions.v1beta1.RollbackConfig map: fields: - - name: apiGroups + - name: revision type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: clusterScope + scalar: numeric +- name: io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet + map: + fields: + - name: maxSurge type: - scalar: boolean - - name: namespaces + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: maxUnavailable type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: resources + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString +- name: io.k8s.api.extensions.v1beta1.RollingUpdateDeployment + map: + fields: + - name: maxSurge type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: maxUnavailable type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1alpha1.ServiceAccountSubject + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString +- name: io.k8s.api.extensions.v1beta1.RunAsGroupStrategyOptions map: fields: - - name: name + - name: ranges type: - scalar: string - default: "" - - name: namespace + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.IDRange + elementRelationship: atomic + - name: rule type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1alpha1.Subject +- name: io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions map: fields: - - name: group + - name: ranges type: - namedType: io.k8s.api.flowcontrol.v1alpha1.GroupSubject - - name: kind + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.IDRange + elementRelationship: atomic + - name: rule type: scalar: string default: "" - - name: serviceAccount +- name: io.k8s.api.extensions.v1beta1.RuntimeClassStrategyOptions + map: + fields: + - name: allowedRuntimeClassNames type: - namedType: io.k8s.api.flowcontrol.v1alpha1.ServiceAccountSubject - - name: user + list: + elementType: + scalar: string + elementRelationship: atomic + - name: defaultRuntimeClassName type: - namedType: io.k8s.api.flowcontrol.v1alpha1.UserSubject - unions: - - discriminator: kind - fields: - - fieldName: group - discriminatorValue: Group - - fieldName: serviceAccount - discriminatorValue: ServiceAccount - - fieldName: user - discriminatorValue: User -- name: io.k8s.api.flowcontrol.v1alpha1.UserSubject + scalar: string +- name: io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions map: fields: - - name: name + - name: rule type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1beta1.FlowDistinguisherMethod + - name: seLinuxOptions + type: + namedType: io.k8s.api.core.v1.SELinuxOptions +- name: io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions + map: + fields: + - name: ranges + type: + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.IDRange + elementRelationship: atomic + - name: rule + type: + scalar: string +- name: io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod map: fields: - name: type type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1beta1.FlowSchema +- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchema map: fields: - name: apiVersion @@ -8542,13 +7811,13 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.flowcontrol.v1beta1.FlowSchemaSpec + namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaSpec default: {} - name: status type: - namedType: io.k8s.api.flowcontrol.v1beta1.FlowSchemaStatus + namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaStatus default: {} -- name: io.k8s.api.flowcontrol.v1beta1.FlowSchemaCondition +- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaCondition map: fields: - name: lastTransitionTime @@ -8567,50 +7836,50 @@ var schemaYAML = typed.YAMLObject(`types: - name: type type: scalar: string -- name: io.k8s.api.flowcontrol.v1beta1.FlowSchemaSpec +- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaSpec map: fields: - name: distinguisherMethod type: - namedType: io.k8s.api.flowcontrol.v1beta1.FlowDistinguisherMethod + namedType: io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod - name: matchingPrecedence type: scalar: numeric default: 0 - name: priorityLevelConfiguration type: - namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationReference + namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationReference default: {} - name: rules type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.PolicyRulesWithSubjects + namedType: io.k8s.api.flowcontrol.v1alpha1.PolicyRulesWithSubjects elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1beta1.FlowSchemaStatus +- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaStatus map: fields: - name: conditions type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.FlowSchemaCondition + namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaCondition elementRelationship: associative keys: - type -- name: io.k8s.api.flowcontrol.v1beta1.GroupSubject +- name: io.k8s.api.flowcontrol.v1alpha1.GroupSubject map: fields: - name: name type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1beta1.LimitResponse +- name: io.k8s.api.flowcontrol.v1alpha1.LimitResponse map: fields: - name: queuing type: - namedType: io.k8s.api.flowcontrol.v1beta1.QueuingConfiguration + namedType: io.k8s.api.flowcontrol.v1alpha1.QueuingConfiguration - name: type type: scalar: string @@ -8620,7 +7889,7 @@ var schemaYAML = typed.YAMLObject(`types: fields: - fieldName: queuing discriminatorValue: Queuing -- name: io.k8s.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration +- name: io.k8s.api.flowcontrol.v1alpha1.LimitedPriorityLevelConfiguration map: fields: - name: assuredConcurrencyShares @@ -8629,9 +7898,9 @@ var schemaYAML = typed.YAMLObject(`types: default: 0 - name: limitResponse type: - namedType: io.k8s.api.flowcontrol.v1beta1.LimitResponse + namedType: io.k8s.api.flowcontrol.v1alpha1.LimitResponse default: {} -- name: io.k8s.api.flowcontrol.v1beta1.NonResourcePolicyRule +- name: io.k8s.api.flowcontrol.v1alpha1.NonResourcePolicyRule map: fields: - name: nonResourceURLs @@ -8646,28 +7915,28 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1beta1.PolicyRulesWithSubjects +- name: io.k8s.api.flowcontrol.v1alpha1.PolicyRulesWithSubjects map: fields: - name: nonResourceRules type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.NonResourcePolicyRule + namedType: io.k8s.api.flowcontrol.v1alpha1.NonResourcePolicyRule elementRelationship: atomic - name: resourceRules type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.ResourcePolicyRule + namedType: io.k8s.api.flowcontrol.v1alpha1.ResourcePolicyRule elementRelationship: atomic - name: subjects type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.Subject + namedType: io.k8s.api.flowcontrol.v1alpha1.Subject elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration +- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfiguration map: fields: - name: apiVersion @@ -8682,13 +7951,13 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec + namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationSpec default: {} - name: status type: - namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus + namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationStatus default: {} -- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationCondition +- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationCondition map: fields: - name: lastTransitionTime @@ -8707,19 +7976,19 @@ var schemaYAML = typed.YAMLObject(`types: - name: type type: scalar: string -- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationReference +- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationReference map: fields: - name: name type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec +- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationSpec map: fields: - name: limited type: - namedType: io.k8s.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration + namedType: io.k8s.api.flowcontrol.v1alpha1.LimitedPriorityLevelConfiguration - name: type type: scalar: string @@ -8729,18 +7998,18 @@ var schemaYAML = typed.YAMLObject(`types: fields: - fieldName: limited discriminatorValue: Limited -- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus +- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationStatus map: fields: - name: conditions type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationCondition + namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationCondition elementRelationship: associative keys: - type -- name: io.k8s.api.flowcontrol.v1beta1.QueuingConfiguration +- name: io.k8s.api.flowcontrol.v1alpha1.QueuingConfiguration map: fields: - name: handSize @@ -8755,7 +8024,7 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: numeric default: 0 -- name: io.k8s.api.flowcontrol.v1beta1.ResourcePolicyRule +- name: io.k8s.api.flowcontrol.v1alpha1.ResourcePolicyRule map: fields: - name: apiGroups @@ -8785,7 +8054,7 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject +- name: io.k8s.api.flowcontrol.v1alpha1.ServiceAccountSubject map: fields: - name: name @@ -8796,22 +8065,22 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1beta1.Subject +- name: io.k8s.api.flowcontrol.v1alpha1.Subject map: fields: - name: group type: - namedType: io.k8s.api.flowcontrol.v1beta1.GroupSubject + namedType: io.k8s.api.flowcontrol.v1alpha1.GroupSubject - name: kind type: scalar: string default: "" - name: serviceAccount type: - namedType: io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject + namedType: io.k8s.api.flowcontrol.v1alpha1.ServiceAccountSubject - name: user type: - namedType: io.k8s.api.flowcontrol.v1beta1.UserSubject + namedType: io.k8s.api.flowcontrol.v1alpha1.UserSubject unions: - discriminator: kind fields: @@ -8821,21 +8090,21 @@ var schemaYAML = typed.YAMLObject(`types: discriminatorValue: ServiceAccount - fieldName: user discriminatorValue: User -- name: io.k8s.api.flowcontrol.v1beta1.UserSubject +- name: io.k8s.api.flowcontrol.v1alpha1.UserSubject map: fields: - name: name type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1beta2.FlowDistinguisherMethod +- name: io.k8s.api.flowcontrol.v1beta1.FlowDistinguisherMethod map: fields: - name: type type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1beta2.FlowSchema +- name: io.k8s.api.flowcontrol.v1beta1.FlowSchema map: fields: - name: apiVersion @@ -8850,13 +8119,13 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec + namedType: io.k8s.api.flowcontrol.v1beta1.FlowSchemaSpec default: {} - name: status type: - namedType: io.k8s.api.flowcontrol.v1beta2.FlowSchemaStatus + namedType: io.k8s.api.flowcontrol.v1beta1.FlowSchemaStatus default: {} -- name: io.k8s.api.flowcontrol.v1beta2.FlowSchemaCondition +- name: io.k8s.api.flowcontrol.v1beta1.FlowSchemaCondition map: fields: - name: lastTransitionTime @@ -8875,50 +8144,50 @@ var schemaYAML = typed.YAMLObject(`types: - name: type type: scalar: string -- name: io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec +- name: io.k8s.api.flowcontrol.v1beta1.FlowSchemaSpec map: fields: - name: distinguisherMethod type: - namedType: io.k8s.api.flowcontrol.v1beta2.FlowDistinguisherMethod + namedType: io.k8s.api.flowcontrol.v1beta1.FlowDistinguisherMethod - name: matchingPrecedence type: scalar: numeric default: 0 - name: priorityLevelConfiguration type: - namedType: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationReference + namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationReference default: {} - name: rules type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.PolicyRulesWithSubjects + namedType: io.k8s.api.flowcontrol.v1beta1.PolicyRulesWithSubjects elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1beta2.FlowSchemaStatus +- name: io.k8s.api.flowcontrol.v1beta1.FlowSchemaStatus map: fields: - name: conditions type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.FlowSchemaCondition + namedType: io.k8s.api.flowcontrol.v1beta1.FlowSchemaCondition elementRelationship: associative keys: - type -- name: io.k8s.api.flowcontrol.v1beta2.GroupSubject +- name: io.k8s.api.flowcontrol.v1beta1.GroupSubject map: fields: - name: name type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1beta2.LimitResponse +- name: io.k8s.api.flowcontrol.v1beta1.LimitResponse map: fields: - name: queuing type: - namedType: io.k8s.api.flowcontrol.v1beta2.QueuingConfiguration + namedType: io.k8s.api.flowcontrol.v1beta1.QueuingConfiguration - name: type type: scalar: string @@ -8928,7 +8197,7 @@ var schemaYAML = typed.YAMLObject(`types: fields: - fieldName: queuing discriminatorValue: Queuing -- name: io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration +- name: io.k8s.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration map: fields: - name: assuredConcurrencyShares @@ -8937,9 +8206,9 @@ var schemaYAML = typed.YAMLObject(`types: default: 0 - name: limitResponse type: - namedType: io.k8s.api.flowcontrol.v1beta2.LimitResponse + namedType: io.k8s.api.flowcontrol.v1beta1.LimitResponse default: {} -- name: io.k8s.api.flowcontrol.v1beta2.NonResourcePolicyRule +- name: io.k8s.api.flowcontrol.v1beta1.NonResourcePolicyRule map: fields: - name: nonResourceURLs @@ -8954,28 +8223,28 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1beta2.PolicyRulesWithSubjects +- name: io.k8s.api.flowcontrol.v1beta1.PolicyRulesWithSubjects map: fields: - name: nonResourceRules type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.NonResourcePolicyRule + namedType: io.k8s.api.flowcontrol.v1beta1.NonResourcePolicyRule elementRelationship: atomic - name: resourceRules type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule + namedType: io.k8s.api.flowcontrol.v1beta1.ResourcePolicyRule elementRelationship: atomic - name: subjects type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.Subject + namedType: io.k8s.api.flowcontrol.v1beta1.Subject elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration +- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration map: fields: - name: apiVersion @@ -8990,13 +8259,13 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationSpec + namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec default: {} - name: status type: - namedType: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationStatus + namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus default: {} -- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationCondition +- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationCondition map: fields: - name: lastTransitionTime @@ -9015,19 +8284,19 @@ var schemaYAML = typed.YAMLObject(`types: - name: type type: scalar: string -- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationReference +- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationReference map: fields: - name: name type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationSpec +- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec map: fields: - name: limited type: - namedType: io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration + namedType: io.k8s.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration - name: type type: scalar: string @@ -9037,18 +8306,18 @@ var schemaYAML = typed.YAMLObject(`types: fields: - fieldName: limited discriminatorValue: Limited -- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationStatus +- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus map: fields: - name: conditions type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationCondition + namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationCondition elementRelationship: associative keys: - type -- name: io.k8s.api.flowcontrol.v1beta2.QueuingConfiguration +- name: io.k8s.api.flowcontrol.v1beta1.QueuingConfiguration map: fields: - name: handSize @@ -9063,7 +8332,7 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: numeric default: 0 -- name: io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule +- name: io.k8s.api.flowcontrol.v1beta1.ResourcePolicyRule map: fields: - name: apiGroups @@ -9093,7 +8362,7 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1beta2.ServiceAccountSubject +- name: io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject map: fields: - name: name @@ -9104,22 +8373,22 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1beta2.Subject +- name: io.k8s.api.flowcontrol.v1beta1.Subject map: fields: - name: group type: - namedType: io.k8s.api.flowcontrol.v1beta2.GroupSubject + namedType: io.k8s.api.flowcontrol.v1beta1.GroupSubject - name: kind type: scalar: string default: "" - name: serviceAccount type: - namedType: io.k8s.api.flowcontrol.v1beta2.ServiceAccountSubject + namedType: io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject - name: user type: - namedType: io.k8s.api.flowcontrol.v1beta2.UserSubject + namedType: io.k8s.api.flowcontrol.v1beta1.UserSubject unions: - discriminator: kind fields: @@ -9129,13 +8398,33 @@ var schemaYAML = typed.YAMLObject(`types: discriminatorValue: ServiceAccount - fieldName: user discriminatorValue: User -- name: io.k8s.api.flowcontrol.v1beta2.UserSubject +- name: io.k8s.api.flowcontrol.v1beta1.UserSubject map: fields: - name: name type: scalar: string default: "" +- name: io.k8s.api.flowcontrol.v1beta2.FlowSchema + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable - name: io.k8s.api.imagepolicy.v1alpha1.ImageReview map: fields: diff --git a/staging/src/k8s.io/client-go/kubernetes/clientset.go b/staging/src/k8s.io/client-go/kubernetes/clientset.go index 3e512a7c2e977..a6efb88878e4c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/clientset.go +++ b/staging/src/k8s.io/client-go/kubernetes/clientset.go @@ -72,6 +72,33 @@ import ( flowcontrol "k8s.io/client-go/util/flowcontrol" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface AdmissionregistrationV1() admissionregistrationv1.AdmissionregistrationV1Interface @@ -124,6 +151,13 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient admissionregistrationV1 *admissionregistrationv1.AdmissionregistrationV1Client admissionregistrationV1beta1 *admissionregistrationv1beta1.AdmissionregistrationV1beta1Client @@ -174,227 +208,227 @@ type Clientset struct { // AdmissionregistrationV1 retrieves the AdmissionregistrationV1Client func (c *Clientset) AdmissionregistrationV1() admissionregistrationv1.AdmissionregistrationV1Interface { - return c.admissionregistrationV1 + return admissionregistrationv1.NewWithCluster(c.admissionregistrationV1.RESTClient(), c.cluster) } // AdmissionregistrationV1beta1 retrieves the AdmissionregistrationV1beta1Client func (c *Clientset) AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface { - return c.admissionregistrationV1beta1 + return admissionregistrationv1beta1.NewWithCluster(c.admissionregistrationV1beta1.RESTClient(), c.cluster) } // InternalV1alpha1 retrieves the InternalV1alpha1Client func (c *Clientset) InternalV1alpha1() internalv1alpha1.InternalV1alpha1Interface { - return c.internalV1alpha1 + return internalv1alpha1.NewWithCluster(c.internalV1alpha1.RESTClient(), c.cluster) } // AppsV1 retrieves the AppsV1Client func (c *Clientset) AppsV1() appsv1.AppsV1Interface { - return c.appsV1 + return appsv1.NewWithCluster(c.appsV1.RESTClient(), c.cluster) } // AppsV1beta1 retrieves the AppsV1beta1Client func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { - return c.appsV1beta1 + return appsv1beta1.NewWithCluster(c.appsV1beta1.RESTClient(), c.cluster) } // AppsV1beta2 retrieves the AppsV1beta2Client func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface { - return c.appsV1beta2 + return appsv1beta2.NewWithCluster(c.appsV1beta2.RESTClient(), c.cluster) } // AuthenticationV1 retrieves the AuthenticationV1Client func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface { - return c.authenticationV1 + return authenticationv1.NewWithCluster(c.authenticationV1.RESTClient(), c.cluster) } // AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { - return c.authenticationV1beta1 + return authenticationv1beta1.NewWithCluster(c.authenticationV1beta1.RESTClient(), c.cluster) } // AuthorizationV1 retrieves the AuthorizationV1Client func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface { - return c.authorizationV1 + return authorizationv1.NewWithCluster(c.authorizationV1.RESTClient(), c.cluster) } // AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { - return c.authorizationV1beta1 + return authorizationv1beta1.NewWithCluster(c.authorizationV1beta1.RESTClient(), c.cluster) } // AutoscalingV1 retrieves the AutoscalingV1Client func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { - return c.autoscalingV1 + return autoscalingv1.NewWithCluster(c.autoscalingV1.RESTClient(), c.cluster) } // AutoscalingV2 retrieves the AutoscalingV2Client func (c *Clientset) AutoscalingV2() autoscalingv2.AutoscalingV2Interface { - return c.autoscalingV2 + return autoscalingv2.NewWithCluster(c.autoscalingV2.RESTClient(), c.cluster) } // AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface { - return c.autoscalingV2beta1 + return autoscalingv2beta1.NewWithCluster(c.autoscalingV2beta1.RESTClient(), c.cluster) } // AutoscalingV2beta2 retrieves the AutoscalingV2beta2Client func (c *Clientset) AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface { - return c.autoscalingV2beta2 + return autoscalingv2beta2.NewWithCluster(c.autoscalingV2beta2.RESTClient(), c.cluster) } // BatchV1 retrieves the BatchV1Client func (c *Clientset) BatchV1() batchv1.BatchV1Interface { - return c.batchV1 + return batchv1.NewWithCluster(c.batchV1.RESTClient(), c.cluster) } // BatchV1beta1 retrieves the BatchV1beta1Client func (c *Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { - return c.batchV1beta1 + return batchv1beta1.NewWithCluster(c.batchV1beta1.RESTClient(), c.cluster) } // CertificatesV1 retrieves the CertificatesV1Client func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface { - return c.certificatesV1 + return certificatesv1.NewWithCluster(c.certificatesV1.RESTClient(), c.cluster) } // CertificatesV1beta1 retrieves the CertificatesV1beta1Client func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { - return c.certificatesV1beta1 + return certificatesv1beta1.NewWithCluster(c.certificatesV1beta1.RESTClient(), c.cluster) } // CoordinationV1beta1 retrieves the CoordinationV1beta1Client func (c *Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { - return c.coordinationV1beta1 + return coordinationv1beta1.NewWithCluster(c.coordinationV1beta1.RESTClient(), c.cluster) } // CoordinationV1 retrieves the CoordinationV1Client func (c *Clientset) CoordinationV1() coordinationv1.CoordinationV1Interface { - return c.coordinationV1 + return coordinationv1.NewWithCluster(c.coordinationV1.RESTClient(), c.cluster) } // CoreV1 retrieves the CoreV1Client func (c *Clientset) CoreV1() corev1.CoreV1Interface { - return c.coreV1 + return corev1.NewWithCluster(c.coreV1.RESTClient(), c.cluster) } // DiscoveryV1 retrieves the DiscoveryV1Client func (c *Clientset) DiscoveryV1() discoveryv1.DiscoveryV1Interface { - return c.discoveryV1 + return discoveryv1.NewWithCluster(c.discoveryV1.RESTClient(), c.cluster) } // DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { - return c.discoveryV1beta1 + return discoveryv1beta1.NewWithCluster(c.discoveryV1beta1.RESTClient(), c.cluster) } // EventsV1 retrieves the EventsV1Client func (c *Clientset) EventsV1() eventsv1.EventsV1Interface { - return c.eventsV1 + return eventsv1.NewWithCluster(c.eventsV1.RESTClient(), c.cluster) } // EventsV1beta1 retrieves the EventsV1beta1Client func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { - return c.eventsV1beta1 + return eventsv1beta1.NewWithCluster(c.eventsV1beta1.RESTClient(), c.cluster) } // ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { - return c.extensionsV1beta1 + return extensionsv1beta1.NewWithCluster(c.extensionsV1beta1.RESTClient(), c.cluster) } // FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1Client func (c *Clientset) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { - return c.flowcontrolV1alpha1 + return flowcontrolv1alpha1.NewWithCluster(c.flowcontrolV1alpha1.RESTClient(), c.cluster) } // FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client func (c *Clientset) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { - return c.flowcontrolV1beta1 + return flowcontrolv1beta1.NewWithCluster(c.flowcontrolV1beta1.RESTClient(), c.cluster) } // FlowcontrolV1beta2 retrieves the FlowcontrolV1beta2Client func (c *Clientset) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { - return c.flowcontrolV1beta2 + return flowcontrolv1beta2.NewWithCluster(c.flowcontrolV1beta2.RESTClient(), c.cluster) } // NetworkingV1 retrieves the NetworkingV1Client func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { - return c.networkingV1 + return networkingv1.NewWithCluster(c.networkingV1.RESTClient(), c.cluster) } // NetworkingV1beta1 retrieves the NetworkingV1beta1Client func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { - return c.networkingV1beta1 + return networkingv1beta1.NewWithCluster(c.networkingV1beta1.RESTClient(), c.cluster) } // NodeV1 retrieves the NodeV1Client func (c *Clientset) NodeV1() nodev1.NodeV1Interface { - return c.nodeV1 + return nodev1.NewWithCluster(c.nodeV1.RESTClient(), c.cluster) } // NodeV1alpha1 retrieves the NodeV1alpha1Client func (c *Clientset) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { - return c.nodeV1alpha1 + return nodev1alpha1.NewWithCluster(c.nodeV1alpha1.RESTClient(), c.cluster) } // NodeV1beta1 retrieves the NodeV1beta1Client func (c *Clientset) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { - return c.nodeV1beta1 + return nodev1beta1.NewWithCluster(c.nodeV1beta1.RESTClient(), c.cluster) } // PolicyV1 retrieves the PolicyV1Client func (c *Clientset) PolicyV1() policyv1.PolicyV1Interface { - return c.policyV1 + return policyv1.NewWithCluster(c.policyV1.RESTClient(), c.cluster) } // PolicyV1beta1 retrieves the PolicyV1beta1Client func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { - return c.policyV1beta1 + return policyv1beta1.NewWithCluster(c.policyV1beta1.RESTClient(), c.cluster) } // RbacV1 retrieves the RbacV1Client func (c *Clientset) RbacV1() rbacv1.RbacV1Interface { - return c.rbacV1 + return rbacv1.NewWithCluster(c.rbacV1.RESTClient(), c.cluster) } // RbacV1beta1 retrieves the RbacV1beta1Client func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { - return c.rbacV1beta1 + return rbacv1beta1.NewWithCluster(c.rbacV1beta1.RESTClient(), c.cluster) } // RbacV1alpha1 retrieves the RbacV1alpha1Client func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { - return c.rbacV1alpha1 + return rbacv1alpha1.NewWithCluster(c.rbacV1alpha1.RESTClient(), c.cluster) } // SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { - return c.schedulingV1alpha1 + return schedulingv1alpha1.NewWithCluster(c.schedulingV1alpha1.RESTClient(), c.cluster) } // SchedulingV1beta1 retrieves the SchedulingV1beta1Client func (c *Clientset) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { - return c.schedulingV1beta1 + return schedulingv1beta1.NewWithCluster(c.schedulingV1beta1.RESTClient(), c.cluster) } // SchedulingV1 retrieves the SchedulingV1Client func (c *Clientset) SchedulingV1() schedulingv1.SchedulingV1Interface { - return c.schedulingV1 + return schedulingv1.NewWithCluster(c.schedulingV1.RESTClient(), c.cluster) } // StorageV1beta1 retrieves the StorageV1beta1Client func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { - return c.storageV1beta1 + return storagev1beta1.NewWithCluster(c.storageV1beta1.RESTClient(), c.cluster) } // StorageV1 retrieves the StorageV1Client func (c *Clientset) StorageV1() storagev1.StorageV1Interface { - return c.storageV1 + return storagev1.NewWithCluster(c.storageV1.RESTClient(), c.cluster) } // StorageV1alpha1 retrieves the StorageV1alpha1Client func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { - return c.storageV1alpha1 + return storagev1alpha1.NewWithCluster(c.storageV1alpha1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -435,7 +469,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.admissionregistrationV1, err = admissionregistrationv1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -622,7 +656,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -637,7 +671,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.admissionregistrationV1 = admissionregistrationv1.New(c) cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.New(c) cs.internalV1alpha1 = internalv1alpha1.New(c) @@ -685,5 +719,5 @@ func New(c rest.Interface) *Clientset { cs.storageV1alpha1 = storagev1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go index 10848bed17a76..157f6d4dbb870 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go @@ -35,6 +35,7 @@ type AdmissionregistrationV1Interface interface { // AdmissionregistrationV1Client is used to interact with features provided by the admissionregistration.k8s.io group. type AdmissionregistrationV1Client struct { restClient rest.Interface + cluster string } func (c *AdmissionregistrationV1Client) MutatingWebhookConfigurations() MutatingWebhookConfigurationInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*Admissionregistrati if err != nil { return nil, err } - return &AdmissionregistrationV1Client{client}, nil + return &AdmissionregistrationV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new AdmissionregistrationV1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *AdmissionregistrationV1Client { // New creates a new AdmissionregistrationV1Client for the given RESTClient. func New(c rest.Interface) *AdmissionregistrationV1Client { - return &AdmissionregistrationV1Client{c} + return &AdmissionregistrationV1Client{restClient: c} +} + +// NewWithCluster creates a new AdmissionregistrationV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AdmissionregistrationV1Client { + return &AdmissionregistrationV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go index edbc826d19d19..6b838cf0b7491 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -55,13 +55,15 @@ type MutatingWebhookConfigurationInterface interface { // mutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface type mutatingWebhookConfigurations struct { - client rest.Interface + client rest.Interface + cluster string } // newMutatingWebhookConfigurations returns a MutatingWebhookConfigurations func newMutatingWebhookConfigurations(c *AdmissionregistrationV1Client) *mutatingWebhookConfigurations { return &mutatingWebhookConfigurations{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newMutatingWebhookConfigurations(c *AdmissionregistrationV1Client) *mutatin func (c *mutatingWebhookConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Get(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts metav1.Li } result = &v1.MutatingWebhookConfigurationList{} err = c.client.Get(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts metav1.L func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.CreateOptions) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Post(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Body(mutatingWebhookConfiguration). @@ -123,6 +128,7 @@ func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebh func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.UpdateOptions) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Put(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). Name(mutatingWebhookConfiguration.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebh // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. func (c *mutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, op timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, op func (c *mutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *mutatingWebhookConfigurations) Apply(ctx context.Context, mutatingWebho } result = &v1.MutatingWebhookConfiguration{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go index 065e3c8341474..cde065f5fba39 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go @@ -55,13 +55,15 @@ type ValidatingWebhookConfigurationInterface interface { // validatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface type validatingWebhookConfigurations struct { - client rest.Interface + client rest.Interface + cluster string } // newValidatingWebhookConfigurations returns a ValidatingWebhookConfigurations func newValidatingWebhookConfigurations(c *AdmissionregistrationV1Client) *validatingWebhookConfigurations { return &validatingWebhookConfigurations{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newValidatingWebhookConfigurations(c *AdmissionregistrationV1Client) *valid func (c *validatingWebhookConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Get(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *validatingWebhookConfigurations) List(ctx context.Context, opts metav1. } result = &v1.ValidatingWebhookConfigurationList{} err = c.client.Get(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts metav1 func (c *validatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.CreateOptions) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Post(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Body(validatingWebhookConfiguration). @@ -123,6 +128,7 @@ func (c *validatingWebhookConfigurations) Create(ctx context.Context, validating func (c *validatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.UpdateOptions) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Put(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). Name(validatingWebhookConfiguration.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *validatingWebhookConfigurations) Update(ctx context.Context, validating // Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. func (c *validatingWebhookConfigurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, func (c *validatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *validatingWebhookConfigurations) Apply(ctx context.Context, validatingW } result = &v1.ValidatingWebhookConfiguration{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go index 8fda84b1d282e..a2ac0eac702df 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go @@ -35,6 +35,7 @@ type AdmissionregistrationV1beta1Interface interface { // AdmissionregistrationV1beta1Client is used to interact with features provided by the admissionregistration.k8s.io group. type AdmissionregistrationV1beta1Client struct { restClient rest.Interface + cluster string } func (c *AdmissionregistrationV1beta1Client) MutatingWebhookConfigurations() MutatingWebhookConfigurationInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*Admissionregistrati if err != nil { return nil, err } - return &AdmissionregistrationV1beta1Client{client}, nil + return &AdmissionregistrationV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new AdmissionregistrationV1beta1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *AdmissionregistrationV1beta1Client { // New creates a new AdmissionregistrationV1beta1Client for the given RESTClient. func New(c rest.Interface) *AdmissionregistrationV1beta1Client { - return &AdmissionregistrationV1beta1Client{c} + return &AdmissionregistrationV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new AdmissionregistrationV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AdmissionregistrationV1beta1Client { + return &AdmissionregistrationV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index ca6bb8bd503c5..294254dd0a857 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -55,13 +55,15 @@ type MutatingWebhookConfigurationInterface interface { // mutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface type mutatingWebhookConfigurations struct { - client rest.Interface + client rest.Interface + cluster string } // newMutatingWebhookConfigurations returns a MutatingWebhookConfigurations func newMutatingWebhookConfigurations(c *AdmissionregistrationV1beta1Client) *mutatingWebhookConfigurations { return &mutatingWebhookConfigurations{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newMutatingWebhookConfigurations(c *AdmissionregistrationV1beta1Client) *mu func (c *mutatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Get(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOp } result = &v1beta1.MutatingWebhookConfigurationList{} err = c.client.Get(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListO func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Post(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Body(mutatingWebhookConfiguration). @@ -123,6 +128,7 @@ func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebh func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Put(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). Name(mutatingWebhookConfiguration.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebh // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. func (c *mutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, op timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, op func (c *mutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *mutatingWebhookConfigurations) Apply(ctx context.Context, mutatingWebho } result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 5ba5974d7aa7d..8774ba172afb7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -55,13 +55,15 @@ type ValidatingWebhookConfigurationInterface interface { // validatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface type validatingWebhookConfigurations struct { - client rest.Interface + client rest.Interface + cluster string } // newValidatingWebhookConfigurations returns a ValidatingWebhookConfigurations func newValidatingWebhookConfigurations(c *AdmissionregistrationV1beta1Client) *validatingWebhookConfigurations { return &validatingWebhookConfigurations{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newValidatingWebhookConfigurations(c *AdmissionregistrationV1beta1Client) * func (c *validatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Get(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *validatingWebhookConfigurations) List(ctx context.Context, opts v1.List } result = &v1beta1.ValidatingWebhookConfigurationList{} err = c.client.Get(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts v1.Lis func (c *validatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Post(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Body(validatingWebhookConfiguration). @@ -123,6 +128,7 @@ func (c *validatingWebhookConfigurations) Create(ctx context.Context, validating func (c *validatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Put(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). Name(validatingWebhookConfiguration.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *validatingWebhookConfigurations) Update(ctx context.Context, validating // Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. func (c *validatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, func (c *validatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *validatingWebhookConfigurations) Apply(ctx context.Context, validatingW } result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/apiserverinternal_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/apiserverinternal_client.go index 1794cb941de33..d3700af25d026 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/apiserverinternal_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/apiserverinternal_client.go @@ -34,6 +34,7 @@ type InternalV1alpha1Interface interface { // InternalV1alpha1Client is used to interact with features provided by the internal.apiserver.k8s.io group. type InternalV1alpha1Client struct { restClient rest.Interface + cluster string } func (c *InternalV1alpha1Client) StorageVersions() StorageVersionInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*InternalV1alpha1Cli if err != nil { return nil, err } - return &InternalV1alpha1Client{client}, nil + return &InternalV1alpha1Client{restClient: client}, nil } // NewForConfigOrDie creates a new InternalV1alpha1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *InternalV1alpha1Client { // New creates a new InternalV1alpha1Client for the given RESTClient. func New(c rest.Interface) *InternalV1alpha1Client { - return &InternalV1alpha1Client{c} + return &InternalV1alpha1Client{restClient: c} +} + +// NewWithCluster creates a new InternalV1alpha1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *InternalV1alpha1Client { + return &InternalV1alpha1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go b/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go index 18789c7f82a31..dcb2d877ef676 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go @@ -57,13 +57,15 @@ type StorageVersionInterface interface { // storageVersions implements StorageVersionInterface type storageVersions struct { - client rest.Interface + client rest.Interface + cluster string } // newStorageVersions returns a StorageVersions func newStorageVersions(c *InternalV1alpha1Client) *storageVersions { return &storageVersions{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newStorageVersions(c *InternalV1alpha1Client) *storageVersions { func (c *storageVersions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StorageVersion, err error) { result = &v1alpha1.StorageVersion{} err = c.client.Get(). + Cluster(c.cluster). Resource("storageversions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *storageVersions) List(ctx context.Context, opts v1.ListOptions) (result } result = &v1alpha1.StorageVersionList{} err = c.client.Get(). + Cluster(c.cluster). Resource("storageversions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *storageVersions) Watch(ctx context.Context, opts v1.ListOptions) (watch func (c *storageVersions) Create(ctx context.Context, storageVersion *v1alpha1.StorageVersion, opts v1.CreateOptions) (result *v1alpha1.StorageVersion, err error) { result = &v1alpha1.StorageVersion{} err = c.client.Post(). + Cluster(c.cluster). Resource("storageversions"). VersionedParams(&opts, scheme.ParameterCodec). Body(storageVersion). @@ -125,6 +130,7 @@ func (c *storageVersions) Create(ctx context.Context, storageVersion *v1alpha1.S func (c *storageVersions) Update(ctx context.Context, storageVersion *v1alpha1.StorageVersion, opts v1.UpdateOptions) (result *v1alpha1.StorageVersion, err error) { result = &v1alpha1.StorageVersion{} err = c.client.Put(). + Cluster(c.cluster). Resource("storageversions"). Name(storageVersion.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *storageVersions) Update(ctx context.Context, storageVersion *v1alpha1.S func (c *storageVersions) UpdateStatus(ctx context.Context, storageVersion *v1alpha1.StorageVersion, opts v1.UpdateOptions) (result *v1alpha1.StorageVersion, err error) { result = &v1alpha1.StorageVersion{} err = c.client.Put(). + Cluster(c.cluster). Resource("storageversions"). Name(storageVersion.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *storageVersions) UpdateStatus(ctx context.Context, storageVersion *v1al // Delete takes name of the storageVersion and deletes it. Returns an error if one occurs. func (c *storageVersions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("storageversions"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *storageVersions) DeleteCollection(ctx context.Context, opts v1.DeleteOp timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("storageversions"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *storageVersions) DeleteCollection(ctx context.Context, opts v1.DeleteOp func (c *storageVersions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageVersion, err error) { result = &v1alpha1.StorageVersion{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("storageversions"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *storageVersions) Apply(ctx context.Context, storageVersion *apiserverin } result = &v1alpha1.StorageVersion{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("storageversions"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *storageVersions) ApplyStatus(ctx context.Context, storageVersion *apise result = &v1alpha1.StorageVersion{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("storageversions"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go index 397542eeb49dc..6907a8fc19eb1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go @@ -38,6 +38,7 @@ type AppsV1Interface interface { // AppsV1Client is used to interact with features provided by the apps group. type AppsV1Client struct { restClient rest.Interface + cluster string } func (c *AppsV1Client) ControllerRevisions(namespace string) ControllerRevisionInterface { @@ -86,7 +87,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AppsV1Client, error if err != nil { return nil, err } - return &AppsV1Client{client}, nil + return &AppsV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new AppsV1Client for the given config and @@ -101,7 +102,12 @@ func NewForConfigOrDie(c *rest.Config) *AppsV1Client { // New creates a new AppsV1Client for the given RESTClient. func New(c rest.Interface) *AppsV1Client { - return &AppsV1Client{c} + return &AppsV1Client{restClient: c} +} + +// NewWithCluster creates a new AppsV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AppsV1Client { + return &AppsV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go index f4b198265d6f5..35051de61e76a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go @@ -55,15 +55,17 @@ type ControllerRevisionInterface interface { // controllerRevisions implements ControllerRevisionInterface type controllerRevisions struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newControllerRevisions returns a ControllerRevisions func newControllerRevisions(c *AppsV1Client, namespace string) *controllerRevisions { return &controllerRevisions{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newControllerRevisions(c *AppsV1Client, namespace string) *controllerRevisi func (c *controllerRevisions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(name). @@ -88,6 +91,7 @@ func (c *controllerRevisions) List(ctx context.Context, opts metav1.ListOptions) } result = &v1.ControllerRevisionList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *controllerRevisions) Watch(ctx context.Context, opts metav1.ListOptions func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.CreateOptions) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1 func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.UpdateOptions) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(controllerRevision.Name). @@ -142,6 +148,7 @@ func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1 // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. func (c *controllerRevisions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(name). @@ -157,6 +164,7 @@ func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts metav1. timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts metav1. func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(name). @@ -197,6 +206,7 @@ func (c *controllerRevisions) Apply(ctx context.Context, controllerRevision *app } result = &v1.ControllerRevision{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go index 53e5392879191..79582ac174914 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go @@ -57,15 +57,17 @@ type DaemonSetInterface interface { // daemonSets implements DaemonSetInterface type daemonSets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newDaemonSets returns a DaemonSets func newDaemonSets(c *AppsV1Client, namespace string) *daemonSets { return &daemonSets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newDaemonSets(c *AppsV1Client, namespace string) *daemonSets { func (c *daemonSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(name). @@ -90,6 +93,7 @@ func (c *daemonSets) List(ctx context.Context, opts metav1.ListOptions) (result } result = &v1.DaemonSetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *daemonSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch. func (c *daemonSets) Create(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.CreateOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *daemonSets) Create(ctx context.Context, daemonSet *v1.DaemonSet, opts m func (c *daemonSets) Update(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). @@ -146,6 +152,7 @@ func (c *daemonSets) Update(ctx context.Context, daemonSet *v1.DaemonSet, opts m func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). @@ -160,6 +167,7 @@ func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. func (c *daemonSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(name). @@ -175,6 +183,7 @@ func (c *daemonSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOpt timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *daemonSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOpt func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(name). @@ -215,6 +225,7 @@ func (c *daemonSets) Apply(ctx context.Context, daemonSet *appsv1.DaemonSetApply } result = &v1.DaemonSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(*name). @@ -244,6 +255,7 @@ func (c *daemonSets) ApplyStatus(ctx context.Context, daemonSet *appsv1.DaemonSe result = &v1.DaemonSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go index ccc2049ff7f4e..aa6a9b92de39b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go @@ -63,15 +63,17 @@ type DeploymentInterface interface { // deployments implements DeploymentInterface type deployments struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newDeployments returns a Deployments func newDeployments(c *AppsV1Client, namespace string) *deployments { return &deployments{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -79,6 +81,7 @@ func newDeployments(c *AppsV1Client, namespace string) *deployments { func (c *deployments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -96,6 +99,7 @@ func (c *deployments) List(ctx context.Context, opts metav1.ListOptions) (result } result = &v1.DeploymentList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). @@ -124,6 +128,7 @@ func (c *deployments) Watch(ctx context.Context, opts metav1.ListOptions) (watch func (c *deployments) Create(ctx context.Context, deployment *v1.Deployment, opts metav1.CreateOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). @@ -137,6 +142,7 @@ func (c *deployments) Create(ctx context.Context, deployment *v1.Deployment, opt func (c *deployments) Update(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). @@ -152,6 +158,7 @@ func (c *deployments) Update(ctx context.Context, deployment *v1.Deployment, opt func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). @@ -166,6 +173,7 @@ func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1.Deploymen // Delete takes name of the deployment and deletes it. Returns an error if one occurs. func (c *deployments) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -181,6 +189,7 @@ func (c *deployments) DeleteCollection(ctx context.Context, opts metav1.DeleteOp timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -194,6 +203,7 @@ func (c *deployments) DeleteCollection(ctx context.Context, opts metav1.DeleteOp func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -221,6 +231,7 @@ func (c *deployments) Apply(ctx context.Context, deployment *appsv1.DeploymentAp } result = &v1.Deployment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(*name). @@ -250,6 +261,7 @@ func (c *deployments) ApplyStatus(ctx context.Context, deployment *appsv1.Deploy result = &v1.Deployment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(*name). @@ -265,6 +277,7 @@ func (c *deployments) ApplyStatus(ctx context.Context, deployment *appsv1.Deploy func (c *deployments) GetScale(ctx context.Context, deploymentName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deploymentName). @@ -279,6 +292,7 @@ func (c *deployments) GetScale(ctx context.Context, deploymentName string, optio func (c *deployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deploymentName). @@ -304,6 +318,7 @@ func (c *deployments) ApplyScale(ctx context.Context, deploymentName string, sca result = &autoscalingv1.Scale{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deploymentName). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go index 917ed521f4f3b..218230f7731e9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go @@ -63,15 +63,17 @@ type ReplicaSetInterface interface { // replicaSets implements ReplicaSetInterface type replicaSets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newReplicaSets returns a ReplicaSets func newReplicaSets(c *AppsV1Client, namespace string) *replicaSets { return &replicaSets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -79,6 +81,7 @@ func newReplicaSets(c *AppsV1Client, namespace string) *replicaSets { func (c *replicaSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(name). @@ -96,6 +99,7 @@ func (c *replicaSets) List(ctx context.Context, opts metav1.ListOptions) (result } result = &v1.ReplicaSetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -124,6 +128,7 @@ func (c *replicaSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch func (c *replicaSets) Create(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.CreateOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -137,6 +142,7 @@ func (c *replicaSets) Create(ctx context.Context, replicaSet *v1.ReplicaSet, opt func (c *replicaSets) Update(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). @@ -152,6 +158,7 @@ func (c *replicaSets) Update(ctx context.Context, replicaSet *v1.ReplicaSet, opt func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). @@ -166,6 +173,7 @@ func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSe // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. func (c *replicaSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(name). @@ -181,6 +189,7 @@ func (c *replicaSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOp timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -194,6 +203,7 @@ func (c *replicaSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOp func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(name). @@ -221,6 +231,7 @@ func (c *replicaSets) Apply(ctx context.Context, replicaSet *appsv1.ReplicaSetAp } result = &v1.ReplicaSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(*name). @@ -250,6 +261,7 @@ func (c *replicaSets) ApplyStatus(ctx context.Context, replicaSet *appsv1.Replic result = &v1.ReplicaSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(*name). @@ -265,6 +277,7 @@ func (c *replicaSets) ApplyStatus(ctx context.Context, replicaSet *appsv1.Replic func (c *replicaSets) GetScale(ctx context.Context, replicaSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSetName). @@ -279,6 +292,7 @@ func (c *replicaSets) GetScale(ctx context.Context, replicaSetName string, optio func (c *replicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSetName). @@ -304,6 +318,7 @@ func (c *replicaSets) ApplyScale(ctx context.Context, replicaSetName string, sca result = &autoscalingv1.Scale{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSetName). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go index d1fbb915d82d0..8c703da0344bc 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go @@ -63,15 +63,17 @@ type StatefulSetInterface interface { // statefulSets implements StatefulSetInterface type statefulSets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newStatefulSets returns a StatefulSets func newStatefulSets(c *AppsV1Client, namespace string) *statefulSets { return &statefulSets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -79,6 +81,7 @@ func newStatefulSets(c *AppsV1Client, namespace string) *statefulSets { func (c *statefulSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(name). @@ -96,6 +99,7 @@ func (c *statefulSets) List(ctx context.Context, opts metav1.ListOptions) (resul } result = &v1.StatefulSetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -124,6 +128,7 @@ func (c *statefulSets) Watch(ctx context.Context, opts metav1.ListOptions) (watc func (c *statefulSets) Create(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.CreateOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -137,6 +142,7 @@ func (c *statefulSets) Create(ctx context.Context, statefulSet *v1.StatefulSet, func (c *statefulSets) Update(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). @@ -152,6 +158,7 @@ func (c *statefulSets) Update(ctx context.Context, statefulSet *v1.StatefulSet, func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). @@ -166,6 +173,7 @@ func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1.Statefu // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. func (c *statefulSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(name). @@ -181,6 +189,7 @@ func (c *statefulSets) DeleteCollection(ctx context.Context, opts metav1.DeleteO timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -194,6 +203,7 @@ func (c *statefulSets) DeleteCollection(ctx context.Context, opts metav1.DeleteO func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(name). @@ -221,6 +231,7 @@ func (c *statefulSets) Apply(ctx context.Context, statefulSet *appsv1.StatefulSe } result = &v1.StatefulSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(*name). @@ -250,6 +261,7 @@ func (c *statefulSets) ApplyStatus(ctx context.Context, statefulSet *appsv1.Stat result = &v1.StatefulSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(*name). @@ -265,6 +277,7 @@ func (c *statefulSets) ApplyStatus(ctx context.Context, statefulSet *appsv1.Stat func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSetName). @@ -279,6 +292,7 @@ func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, opt func (c *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSetName). @@ -304,6 +318,7 @@ func (c *statefulSets) ApplyScale(ctx context.Context, statefulSetName string, s result = &autoscalingv1.Scale{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSetName). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go index 6b7148c5a8693..742fb3a99cc00 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go @@ -36,6 +36,7 @@ type AppsV1beta1Interface interface { // AppsV1beta1Client is used to interact with features provided by the apps group. type AppsV1beta1Client struct { restClient rest.Interface + cluster string } func (c *AppsV1beta1Client) ControllerRevisions(namespace string) ControllerRevisionInterface { @@ -76,7 +77,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AppsV1beta1Client, if err != nil { return nil, err } - return &AppsV1beta1Client{client}, nil + return &AppsV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new AppsV1beta1Client for the given config and @@ -91,7 +92,12 @@ func NewForConfigOrDie(c *rest.Config) *AppsV1beta1Client { // New creates a new AppsV1beta1Client for the given RESTClient. func New(c rest.Interface) *AppsV1beta1Client { - return &AppsV1beta1Client{c} + return &AppsV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new AppsV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AppsV1beta1Client { + return &AppsV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go index 0c3f49ba149c7..47afe6701cc1d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go @@ -55,15 +55,17 @@ type ControllerRevisionInterface interface { // controllerRevisions implements ControllerRevisionInterface type controllerRevisions struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newControllerRevisions returns a ControllerRevisions func newControllerRevisions(c *AppsV1beta1Client, namespace string) *controllerRevisions { return &controllerRevisions{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newControllerRevisions(c *AppsV1beta1Client, namespace string) *controllerR func (c *controllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(name). @@ -88,6 +91,7 @@ func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (re } result = &v1beta1.ControllerRevisionList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (w func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1 func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(controllerRevision.Name). @@ -142,6 +148,7 @@ func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1 // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. func (c *controllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(name). @@ -157,6 +164,7 @@ func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts v1.Dele timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts v1.Dele func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(name). @@ -197,6 +206,7 @@ func (c *controllerRevisions) Apply(ctx context.Context, controllerRevision *app } result = &v1beta1.ControllerRevision{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go index 281758c4351b6..58ece3e64da32 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go @@ -57,15 +57,17 @@ type DeploymentInterface interface { // deployments implements DeploymentInterface type deployments struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newDeployments returns a Deployments func newDeployments(c *AppsV1beta1Client, namespace string) *deployments { return &deployments{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newDeployments(c *AppsV1beta1Client, namespace string) *deployments { func (c *deployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -90,6 +93,7 @@ func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1 } result = &v1beta1.DeploymentList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). @@ -146,6 +152,7 @@ func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). @@ -160,6 +167,7 @@ func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Depl // Delete takes name of the deployment and deletes it. Returns an error if one occurs. func (c *deployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -175,6 +183,7 @@ func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOption timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOption func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -215,6 +225,7 @@ func (c *deployments) Apply(ctx context.Context, deployment *appsv1beta1.Deploym } result = &v1beta1.Deployment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(*name). @@ -244,6 +255,7 @@ func (c *deployments) ApplyStatus(ctx context.Context, deployment *appsv1beta1.D result = &v1beta1.Deployment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go index 3f1aebcffb344..ca99278cb7f54 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go @@ -57,15 +57,17 @@ type StatefulSetInterface interface { // statefulSets implements StatefulSetInterface type statefulSets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newStatefulSets returns a StatefulSets func newStatefulSets(c *AppsV1beta1Client, namespace string) *statefulSets { return &statefulSets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newStatefulSets(c *AppsV1beta1Client, namespace string) *statefulSets { func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(name). @@ -90,6 +93,7 @@ func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v } result = &v1beta1.StatefulSetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.In func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta1.Stateful func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). @@ -146,6 +152,7 @@ func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta1.Stateful func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). @@ -160,6 +167,7 @@ func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.St // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. func (c *statefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(name). @@ -175,6 +183,7 @@ func (c *statefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptio timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *statefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptio func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(name). @@ -215,6 +225,7 @@ func (c *statefulSets) Apply(ctx context.Context, statefulSet *appsv1beta1.State } result = &v1beta1.StatefulSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(*name). @@ -244,6 +255,7 @@ func (c *statefulSets) ApplyStatus(ctx context.Context, statefulSet *appsv1beta1 result = &v1beta1.StatefulSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go index 968abc56f8040..4f0403c21b6f8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go @@ -38,6 +38,7 @@ type AppsV1beta2Interface interface { // AppsV1beta2Client is used to interact with features provided by the apps group. type AppsV1beta2Client struct { restClient rest.Interface + cluster string } func (c *AppsV1beta2Client) ControllerRevisions(namespace string) ControllerRevisionInterface { @@ -86,7 +87,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AppsV1beta2Client, if err != nil { return nil, err } - return &AppsV1beta2Client{client}, nil + return &AppsV1beta2Client{restClient: client}, nil } // NewForConfigOrDie creates a new AppsV1beta2Client for the given config and @@ -101,7 +102,12 @@ func NewForConfigOrDie(c *rest.Config) *AppsV1beta2Client { // New creates a new AppsV1beta2Client for the given RESTClient. func New(c rest.Interface) *AppsV1beta2Client { - return &AppsV1beta2Client{c} + return &AppsV1beta2Client{restClient: c} +} + +// NewWithCluster creates a new AppsV1beta2Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AppsV1beta2Client { + return &AppsV1beta2Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go index e1643277a6266..4cabd04715a48 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go @@ -55,15 +55,17 @@ type ControllerRevisionInterface interface { // controllerRevisions implements ControllerRevisionInterface type controllerRevisions struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newControllerRevisions returns a ControllerRevisions func newControllerRevisions(c *AppsV1beta2Client, namespace string) *controllerRevisions { return &controllerRevisions{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newControllerRevisions(c *AppsV1beta2Client, namespace string) *controllerR func (c *controllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(name). @@ -88,6 +91,7 @@ func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (re } result = &v1beta2.ControllerRevisionList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (w func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1 func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(controllerRevision.Name). @@ -142,6 +148,7 @@ func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1 // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. func (c *controllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(name). @@ -157,6 +164,7 @@ func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts v1.Dele timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts v1.Dele func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(name). @@ -197,6 +206,7 @@ func (c *controllerRevisions) Apply(ctx context.Context, controllerRevision *app } result = &v1beta2.ControllerRevision{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go index 1391df87d2166..5c6b1d9ee96bb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go @@ -57,15 +57,17 @@ type DaemonSetInterface interface { // daemonSets implements DaemonSetInterface type daemonSets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newDaemonSets returns a DaemonSets func newDaemonSets(c *AppsV1beta2Client, namespace string) *daemonSets { return &daemonSets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newDaemonSets(c *AppsV1beta2Client, namespace string) *daemonSets { func (c *daemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(name). @@ -90,6 +93,7 @@ func (c *daemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1b } result = &v1beta2.DaemonSetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, o func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). @@ -146,6 +152,7 @@ func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, o func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). @@ -160,6 +167,7 @@ func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.Daemon // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. func (c *daemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(name). @@ -175,6 +183,7 @@ func (c *daemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *daemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(name). @@ -215,6 +225,7 @@ func (c *daemonSets) Apply(ctx context.Context, daemonSet *appsv1beta2.DaemonSet } result = &v1beta2.DaemonSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(*name). @@ -244,6 +255,7 @@ func (c *daemonSets) ApplyStatus(ctx context.Context, daemonSet *appsv1beta2.Dae result = &v1beta2.DaemonSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go index 5bda0d92c11ad..ee9c75084d290 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go @@ -57,15 +57,17 @@ type DeploymentInterface interface { // deployments implements DeploymentInterface type deployments struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newDeployments returns a Deployments func newDeployments(c *AppsV1beta2Client, namespace string) *deployments { return &deployments{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newDeployments(c *AppsV1beta2Client, namespace string) *deployments { func (c *deployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -90,6 +93,7 @@ func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1 } result = &v1beta2.DeploymentList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int func (c *deployments) Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *deployments) Create(ctx context.Context, deployment *v1beta2.Deployment func (c *deployments) Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). @@ -146,6 +152,7 @@ func (c *deployments) Update(ctx context.Context, deployment *v1beta2.Deployment func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). @@ -160,6 +167,7 @@ func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Depl // Delete takes name of the deployment and deletes it. Returns an error if one occurs. func (c *deployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -175,6 +183,7 @@ func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOption timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOption func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -215,6 +225,7 @@ func (c *deployments) Apply(ctx context.Context, deployment *appsv1beta2.Deploym } result = &v1beta2.Deployment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(*name). @@ -244,6 +255,7 @@ func (c *deployments) ApplyStatus(ctx context.Context, deployment *appsv1beta2.D result = &v1beta2.Deployment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go index 988d898f79b63..42cbb96024140 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go @@ -57,15 +57,17 @@ type ReplicaSetInterface interface { // replicaSets implements ReplicaSetInterface type replicaSets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newReplicaSets returns a ReplicaSets func newReplicaSets(c *AppsV1beta2Client, namespace string) *replicaSets { return &replicaSets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newReplicaSets(c *AppsV1beta2Client, namespace string) *replicaSets { func (c *replicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(name). @@ -90,6 +93,7 @@ func (c *replicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1 } result = &v1beta2.ReplicaSetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *replicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). @@ -146,6 +152,7 @@ func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). @@ -160,6 +167,7 @@ func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.Repl // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. func (c *replicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(name). @@ -175,6 +183,7 @@ func (c *replicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOption timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *replicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOption func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(name). @@ -215,6 +225,7 @@ func (c *replicaSets) Apply(ctx context.Context, replicaSet *appsv1beta2.Replica } result = &v1beta2.ReplicaSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(*name). @@ -244,6 +255,7 @@ func (c *replicaSets) ApplyStatus(ctx context.Context, replicaSet *appsv1beta2.R result = &v1beta2.ReplicaSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go index 0416675d6d89f..4db00b0c59c6d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go @@ -61,15 +61,17 @@ type StatefulSetInterface interface { // statefulSets implements StatefulSetInterface type statefulSets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newStatefulSets returns a StatefulSets func newStatefulSets(c *AppsV1beta2Client, namespace string) *statefulSets { return &statefulSets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -77,6 +79,7 @@ func newStatefulSets(c *AppsV1beta2Client, namespace string) *statefulSets { func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(name). @@ -94,6 +97,7 @@ func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v } result = &v1beta2.StatefulSetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -122,6 +126,7 @@ func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.In func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +140,7 @@ func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta2.Stateful func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). @@ -150,6 +156,7 @@ func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta2.Stateful func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). @@ -164,6 +171,7 @@ func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.St // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. func (c *statefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(name). @@ -179,6 +187,7 @@ func (c *statefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptio timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -192,6 +201,7 @@ func (c *statefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptio func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(name). @@ -219,6 +229,7 @@ func (c *statefulSets) Apply(ctx context.Context, statefulSet *appsv1beta2.State } result = &v1beta2.StatefulSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(*name). @@ -248,6 +259,7 @@ func (c *statefulSets) ApplyStatus(ctx context.Context, statefulSet *appsv1beta2 result = &v1beta2.StatefulSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(*name). @@ -263,6 +275,7 @@ func (c *statefulSets) ApplyStatus(ctx context.Context, statefulSet *appsv1beta2 func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) { result = &v1beta2.Scale{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSetName). @@ -277,6 +290,7 @@ func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, opt func (c *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale, opts v1.UpdateOptions) (result *v1beta2.Scale, err error) { result = &v1beta2.Scale{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSetName). @@ -302,6 +316,7 @@ func (c *statefulSets) ApplyScale(ctx context.Context, statefulSetName string, s result = &v1beta2.Scale{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). Name(statefulSetName). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go index aea9d0e133e5a..28ed1b51bf370 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go @@ -34,6 +34,7 @@ type AuthenticationV1Interface interface { // AuthenticationV1Client is used to interact with features provided by the authentication.k8s.io group. type AuthenticationV1Client struct { restClient rest.Interface + cluster string } func (c *AuthenticationV1Client) TokenReviews() TokenReviewInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AuthenticationV1Cli if err != nil { return nil, err } - return &AuthenticationV1Client{client}, nil + return &AuthenticationV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new AuthenticationV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *AuthenticationV1Client { // New creates a new AuthenticationV1Client for the given RESTClient. func New(c rest.Interface) *AuthenticationV1Client { - return &AuthenticationV1Client{c} + return &AuthenticationV1Client{restClient: c} +} + +// NewWithCluster creates a new AuthenticationV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AuthenticationV1Client { + return &AuthenticationV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go index ca7cd47d26b9a..ee54d3fe40aba 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go @@ -41,13 +41,15 @@ type TokenReviewInterface interface { // tokenReviews implements TokenReviewInterface type tokenReviews struct { - client rest.Interface + client rest.Interface + cluster string } // newTokenReviews returns a TokenReviews func newTokenReviews(c *AuthenticationV1Client) *tokenReviews { return &tokenReviews{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -55,6 +57,7 @@ func newTokenReviews(c *AuthenticationV1Client) *tokenReviews { func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (result *v1.TokenReview, err error) { result = &v1.TokenReview{} err = c.client.Post(). + Cluster(c.cluster). Resource("tokenreviews"). VersionedParams(&opts, scheme.ParameterCodec). Body(tokenReview). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go index 218cb60c31744..780f0df20319f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go @@ -34,6 +34,7 @@ type AuthenticationV1beta1Interface interface { // AuthenticationV1beta1Client is used to interact with features provided by the authentication.k8s.io group. type AuthenticationV1beta1Client struct { restClient rest.Interface + cluster string } func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AuthenticationV1bet if err != nil { return nil, err } - return &AuthenticationV1beta1Client{client}, nil + return &AuthenticationV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new AuthenticationV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *AuthenticationV1beta1Client { // New creates a new AuthenticationV1beta1Client for the given RESTClient. func New(c rest.Interface) *AuthenticationV1beta1Client { - return &AuthenticationV1beta1Client{c} + return &AuthenticationV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new AuthenticationV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AuthenticationV1beta1Client { + return &AuthenticationV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go index 5da122433735a..71cc16984ad02 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go @@ -41,13 +41,15 @@ type TokenReviewInterface interface { // tokenReviews implements TokenReviewInterface type tokenReviews struct { - client rest.Interface + client rest.Interface + cluster string } // newTokenReviews returns a TokenReviews func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews { return &tokenReviews{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -55,6 +57,7 @@ func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews { func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (result *v1beta1.TokenReview, err error) { result = &v1beta1.TokenReview{} err = c.client.Post(). + Cluster(c.cluster). Resource("tokenreviews"). VersionedParams(&opts, scheme.ParameterCodec). Body(tokenReview). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go index edfc90346a0d9..a71fc0b05aef4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go @@ -37,6 +37,7 @@ type AuthorizationV1Interface interface { // AuthorizationV1Client is used to interact with features provided by the authorization.k8s.io group. type AuthorizationV1Client struct { restClient rest.Interface + cluster string } func (c *AuthorizationV1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface { @@ -81,7 +82,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AuthorizationV1Clie if err != nil { return nil, err } - return &AuthorizationV1Client{client}, nil + return &AuthorizationV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new AuthorizationV1Client for the given config and @@ -96,7 +97,12 @@ func NewForConfigOrDie(c *rest.Config) *AuthorizationV1Client { // New creates a new AuthorizationV1Client for the given RESTClient. func New(c rest.Interface) *AuthorizationV1Client { - return &AuthorizationV1Client{c} + return &AuthorizationV1Client{restClient: c} +} + +// NewWithCluster creates a new AuthorizationV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AuthorizationV1Client { + return &AuthorizationV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go index 84b2efe166fb0..82a4f7507c1a5 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go @@ -41,15 +41,17 @@ type LocalSubjectAccessReviewInterface interface { // localSubjectAccessReviews implements LocalSubjectAccessReviewInterface type localSubjectAccessReviews struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *localSubjectAccessReviews { return &localSubjectAccessReviews{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -57,6 +59,7 @@ func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *l func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *v1.LocalSubjectAccessReview, err error) { result = &v1.LocalSubjectAccessReview{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("localsubjectaccessreviews"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go index 2006196c11ced..2a402ee4ce324 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go @@ -41,13 +41,15 @@ type SelfSubjectAccessReviewInterface interface { // selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface type selfSubjectAccessReviews struct { - client rest.Interface + client rest.Interface + cluster string } // newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessReviews { return &selfSubjectAccessReviews{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -55,6 +57,7 @@ func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessRev func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SelfSubjectAccessReview, err error) { result = &v1.SelfSubjectAccessReview{} err = c.client.Post(). + Cluster(c.cluster). Resource("selfsubjectaccessreviews"). VersionedParams(&opts, scheme.ParameterCodec). Body(selfSubjectAccessReview). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go index 25d99f7b5255a..4c177308e0e5a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go @@ -41,13 +41,15 @@ type SelfSubjectRulesReviewInterface interface { // selfSubjectRulesReviews implements SelfSubjectRulesReviewInterface type selfSubjectRulesReviews struct { - client rest.Interface + client rest.Interface + cluster string } // newSelfSubjectRulesReviews returns a SelfSubjectRulesReviews func newSelfSubjectRulesReviews(c *AuthorizationV1Client) *selfSubjectRulesReviews { return &selfSubjectRulesReviews{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -55,6 +57,7 @@ func newSelfSubjectRulesReviews(c *AuthorizationV1Client) *selfSubjectRulesRevie func (c *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (result *v1.SelfSubjectRulesReview, err error) { result = &v1.SelfSubjectRulesReview{} err = c.client.Post(). + Cluster(c.cluster). Resource("selfsubjectrulesreviews"). VersionedParams(&opts, scheme.ParameterCodec). Body(selfSubjectRulesReview). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go index 8ac0566a2e6b5..a87cb060f76a4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go @@ -41,13 +41,15 @@ type SubjectAccessReviewInterface interface { // subjectAccessReviews implements SubjectAccessReviewInterface type subjectAccessReviews struct { - client rest.Interface + client rest.Interface + cluster string } // newSubjectAccessReviews returns a SubjectAccessReviews func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews { return &subjectAccessReviews{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -55,6 +57,7 @@ func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews { func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReview, err error) { result = &v1.SubjectAccessReview{} err = c.client.Post(). + Cluster(c.cluster). Resource("subjectaccessreviews"). VersionedParams(&opts, scheme.ParameterCodec). Body(subjectAccessReview). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go index 23b0edf272f67..f39e40e590ca4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go @@ -37,6 +37,7 @@ type AuthorizationV1beta1Interface interface { // AuthorizationV1beta1Client is used to interact with features provided by the authorization.k8s.io group. type AuthorizationV1beta1Client struct { restClient rest.Interface + cluster string } func (c *AuthorizationV1beta1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface { @@ -81,7 +82,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AuthorizationV1beta if err != nil { return nil, err } - return &AuthorizationV1beta1Client{client}, nil + return &AuthorizationV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new AuthorizationV1beta1Client for the given config and @@ -96,7 +97,12 @@ func NewForConfigOrDie(c *rest.Config) *AuthorizationV1beta1Client { // New creates a new AuthorizationV1beta1Client for the given RESTClient. func New(c rest.Interface) *AuthorizationV1beta1Client { - return &AuthorizationV1beta1Client{c} + return &AuthorizationV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new AuthorizationV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AuthorizationV1beta1Client { + return &AuthorizationV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go index 78584ba9458a2..c83ce3139ca3a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go @@ -41,15 +41,17 @@ type LocalSubjectAccessReviewInterface interface { // localSubjectAccessReviews implements LocalSubjectAccessReviewInterface type localSubjectAccessReviews struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews func newLocalSubjectAccessReviews(c *AuthorizationV1beta1Client, namespace string) *localSubjectAccessReviews { return &localSubjectAccessReviews{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -57,6 +59,7 @@ func newLocalSubjectAccessReviews(c *AuthorizationV1beta1Client, namespace strin func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.LocalSubjectAccessReview, err error) { result = &v1beta1.LocalSubjectAccessReview{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("localsubjectaccessreviews"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go index 0286c93fe6a19..35fb0e49b305d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go @@ -41,13 +41,15 @@ type SelfSubjectAccessReviewInterface interface { // selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface type selfSubjectAccessReviews struct { - client rest.Interface + client rest.Interface + cluster string } // newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews func newSelfSubjectAccessReviews(c *AuthorizationV1beta1Client) *selfSubjectAccessReviews { return &selfSubjectAccessReviews{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -55,6 +57,7 @@ func newSelfSubjectAccessReviews(c *AuthorizationV1beta1Client) *selfSubjectAcce func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectAccessReview, err error) { result = &v1beta1.SelfSubjectAccessReview{} err = c.client.Post(). + Cluster(c.cluster). Resource("selfsubjectaccessreviews"). VersionedParams(&opts, scheme.ParameterCodec). Body(selfSubjectAccessReview). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go index d772973ec6e84..b98afa5210cd1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go @@ -41,13 +41,15 @@ type SelfSubjectRulesReviewInterface interface { // selfSubjectRulesReviews implements SelfSubjectRulesReviewInterface type selfSubjectRulesReviews struct { - client rest.Interface + client rest.Interface + cluster string } // newSelfSubjectRulesReviews returns a SelfSubjectRulesReviews func newSelfSubjectRulesReviews(c *AuthorizationV1beta1Client) *selfSubjectRulesReviews { return &selfSubjectRulesReviews{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -55,6 +57,7 @@ func newSelfSubjectRulesReviews(c *AuthorizationV1beta1Client) *selfSubjectRules func (c *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectRulesReview, err error) { result = &v1beta1.SelfSubjectRulesReview{} err = c.client.Post(). + Cluster(c.cluster). Resource("selfsubjectrulesreviews"). VersionedParams(&opts, scheme.ParameterCodec). Body(selfSubjectRulesReview). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go index aebe8398c0f41..86ffa7f23a637 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go @@ -41,13 +41,15 @@ type SubjectAccessReviewInterface interface { // subjectAccessReviews implements SubjectAccessReviewInterface type subjectAccessReviews struct { - client rest.Interface + client rest.Interface + cluster string } // newSubjectAccessReviews returns a SubjectAccessReviews func newSubjectAccessReviews(c *AuthorizationV1beta1Client) *subjectAccessReviews { return &subjectAccessReviews{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -55,6 +57,7 @@ func newSubjectAccessReviews(c *AuthorizationV1beta1Client) *subjectAccessReview func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SubjectAccessReview, err error) { result = &v1beta1.SubjectAccessReview{} err = c.client.Post(). + Cluster(c.cluster). Resource("subjectaccessreviews"). VersionedParams(&opts, scheme.ParameterCodec). Body(subjectAccessReview). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go index f3a2752cbbea1..96943109e8e2c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go @@ -34,6 +34,7 @@ type AutoscalingV1Interface interface { // AutoscalingV1Client is used to interact with features provided by the autoscaling group. type AutoscalingV1Client struct { restClient rest.Interface + cluster string } func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AutoscalingV1Client if err != nil { return nil, err } - return &AutoscalingV1Client{client}, nil + return &AutoscalingV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new AutoscalingV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client { // New creates a new AutoscalingV1Client for the given RESTClient. func New(c rest.Interface) *AutoscalingV1Client { - return &AutoscalingV1Client{c} + return &AutoscalingV1Client{restClient: c} +} + +// NewWithCluster creates a new AutoscalingV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AutoscalingV1Client { + return &AutoscalingV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go index 19afde66db5f6..240b1413c70c1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -57,15 +57,17 @@ type HorizontalPodAutoscalerInterface interface { // horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface type horizontalPodAutoscalers struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *horizontalPodAutoscalers { return &horizontalPodAutoscalers{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *hori func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -90,6 +93,7 @@ func (c *horizontalPodAutoscalers) List(ctx context.Context, opts metav1.ListOpt } result = &v1.HorizontalPodAutoscalerList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts metav1.ListOp func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.CreateOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAuto func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). @@ -146,6 +152,7 @@ func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAuto func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). @@ -160,6 +167,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalP // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -175,6 +183,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts me timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts me func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -215,6 +225,7 @@ func (c *horizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodAutos } result = &v1.HorizontalPodAutoscaler{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(*name). @@ -244,6 +255,7 @@ func (c *horizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizontalPo result = &v1.HorizontalPodAutoscaler{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/autoscaling_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/autoscaling_client.go index 04d5d0f949851..c70b7d896d4e4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/autoscaling_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/autoscaling_client.go @@ -34,6 +34,7 @@ type AutoscalingV2Interface interface { // AutoscalingV2Client is used to interact with features provided by the autoscaling group. type AutoscalingV2Client struct { restClient rest.Interface + cluster string } func (c *AutoscalingV2Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AutoscalingV2Client if err != nil { return nil, err } - return &AutoscalingV2Client{client}, nil + return &AutoscalingV2Client{restClient: client}, nil } // NewForConfigOrDie creates a new AutoscalingV2Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *AutoscalingV2Client { // New creates a new AutoscalingV2Client for the given RESTClient. func New(c rest.Interface) *AutoscalingV2Client { - return &AutoscalingV2Client{c} + return &AutoscalingV2Client{restClient: c} +} + +// NewWithCluster creates a new AutoscalingV2Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AutoscalingV2Client { + return &AutoscalingV2Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go index 3a077d71dae59..7630e1a55051a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go @@ -57,15 +57,17 @@ type HorizontalPodAutoscalerInterface interface { // horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface type horizontalPodAutoscalers struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers func newHorizontalPodAutoscalers(c *AutoscalingV2Client, namespace string) *horizontalPodAutoscalers { return &horizontalPodAutoscalers{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newHorizontalPodAutoscalers(c *AutoscalingV2Client, namespace string) *hori func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.HorizontalPodAutoscaler, err error) { result = &v2.HorizontalPodAutoscaler{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -90,6 +93,7 @@ func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions } result = &v2.HorizontalPodAutoscalerList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOption func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2.HorizontalPodAutoscaler, err error) { result = &v2.HorizontalPodAutoscaler{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAuto func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2.HorizontalPodAutoscaler, err error) { result = &v2.HorizontalPodAutoscaler{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). @@ -146,6 +152,7 @@ func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAuto func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2.HorizontalPodAutoscaler, err error) { result = &v2.HorizontalPodAutoscaler{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). @@ -160,6 +167,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalP // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -175,6 +183,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1 timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1 func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.HorizontalPodAutoscaler, err error) { result = &v2.HorizontalPodAutoscaler{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -215,6 +225,7 @@ func (c *horizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodAutos } result = &v2.HorizontalPodAutoscaler{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(*name). @@ -244,6 +255,7 @@ func (c *horizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizontalPo result = &v2.HorizontalPodAutoscaler{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go index d1dde5ed1b70e..faf0da43a7bdc 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go @@ -34,6 +34,7 @@ type AutoscalingV2beta1Interface interface { // AutoscalingV2beta1Client is used to interact with features provided by the autoscaling group. type AutoscalingV2beta1Client struct { restClient rest.Interface + cluster string } func (c *AutoscalingV2beta1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AutoscalingV2beta1C if err != nil { return nil, err } - return &AutoscalingV2beta1Client{client}, nil + return &AutoscalingV2beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new AutoscalingV2beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *AutoscalingV2beta1Client { // New creates a new AutoscalingV2beta1Client for the given RESTClient. func New(c rest.Interface) *AutoscalingV2beta1Client { - return &AutoscalingV2beta1Client{c} + return &AutoscalingV2beta1Client{restClient: c} +} + +// NewWithCluster creates a new AutoscalingV2beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AutoscalingV2beta1Client { + return &AutoscalingV2beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go index 5080912a12479..eecb1eb1d54e9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -57,15 +57,17 @@ type HorizontalPodAutoscalerInterface interface { // horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface type horizontalPodAutoscalers struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers func newHorizontalPodAutoscalers(c *AutoscalingV2beta1Client, namespace string) *horizontalPodAutoscalers { return &horizontalPodAutoscalers{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newHorizontalPodAutoscalers(c *AutoscalingV2beta1Client, namespace string) func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -90,6 +93,7 @@ func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions } result = &v2beta1.HorizontalPodAutoscalerList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOption func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAuto func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). @@ -146,6 +152,7 @@ func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAuto func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). @@ -160,6 +167,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalP // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -175,6 +183,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1 timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1 func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -215,6 +225,7 @@ func (c *horizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodAutos } result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(*name). @@ -244,6 +255,7 @@ func (c *horizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizontalPo result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/autoscaling_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/autoscaling_client.go index cae1b4e43a5b2..8375d57244e29 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/autoscaling_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/autoscaling_client.go @@ -34,6 +34,7 @@ type AutoscalingV2beta2Interface interface { // AutoscalingV2beta2Client is used to interact with features provided by the autoscaling group. type AutoscalingV2beta2Client struct { restClient rest.Interface + cluster string } func (c *AutoscalingV2beta2Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AutoscalingV2beta2C if err != nil { return nil, err } - return &AutoscalingV2beta2Client{client}, nil + return &AutoscalingV2beta2Client{restClient: client}, nil } // NewForConfigOrDie creates a new AutoscalingV2beta2Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *AutoscalingV2beta2Client { // New creates a new AutoscalingV2beta2Client for the given RESTClient. func New(c rest.Interface) *AutoscalingV2beta2Client { - return &AutoscalingV2beta2Client{c} + return &AutoscalingV2beta2Client{restClient: c} +} + +// NewWithCluster creates a new AutoscalingV2beta2Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *AutoscalingV2beta2Client { + return &AutoscalingV2beta2Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go index 0ddb9108b3a07..f76715ae7a308 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -57,15 +57,17 @@ type HorizontalPodAutoscalerInterface interface { // horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface type horizontalPodAutoscalers struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers func newHorizontalPodAutoscalers(c *AutoscalingV2beta2Client, namespace string) *horizontalPodAutoscalers { return &horizontalPodAutoscalers{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newHorizontalPodAutoscalers(c *AutoscalingV2beta2Client, namespace string) func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -90,6 +93,7 @@ func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions } result = &v2beta2.HorizontalPodAutoscalerList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOption func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAuto func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). @@ -146,6 +152,7 @@ func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAuto func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). @@ -160,6 +167,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalP // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -175,6 +183,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1 timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1 func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). @@ -215,6 +225,7 @@ func (c *horizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodAutos } result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(*name). @@ -244,6 +255,7 @@ func (c *horizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizontalPo result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go index eee144f71196c..f721806beb4e1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go @@ -35,6 +35,7 @@ type BatchV1Interface interface { // BatchV1Client is used to interact with features provided by the batch group. type BatchV1Client struct { restClient rest.Interface + cluster string } func (c *BatchV1Client) CronJobs(namespace string) CronJobInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*BatchV1Client, erro if err != nil { return nil, err } - return &BatchV1Client{client}, nil + return &BatchV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new BatchV1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *BatchV1Client { // New creates a new BatchV1Client for the given RESTClient. func New(c rest.Interface) *BatchV1Client { - return &BatchV1Client{c} + return &BatchV1Client{restClient: c} +} + +// NewWithCluster creates a new BatchV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *BatchV1Client { + return &BatchV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go index 9250263215e41..eb24973f2fbab 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go @@ -57,15 +57,17 @@ type CronJobInterface interface { // cronJobs implements CronJobInterface type cronJobs struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newCronJobs returns a CronJobs func newCronJobs(c *BatchV1Client, namespace string) *cronJobs { return &cronJobs{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newCronJobs(c *BatchV1Client, namespace string) *cronJobs { func (c *cronJobs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CronJob, err error) { result = &v1.CronJob{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(name). @@ -90,6 +93,7 @@ func (c *cronJobs) List(ctx context.Context, opts metav1.ListOptions) (result *v } result = &v1.CronJobList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *cronJobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In func (c *cronJobs) Create(ctx context.Context, cronJob *v1.CronJob, opts metav1.CreateOptions) (result *v1.CronJob, err error) { result = &v1.CronJob{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *cronJobs) Create(ctx context.Context, cronJob *v1.CronJob, opts metav1. func (c *cronJobs) Update(ctx context.Context, cronJob *v1.CronJob, opts metav1.UpdateOptions) (result *v1.CronJob, err error) { result = &v1.CronJob{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). @@ -146,6 +152,7 @@ func (c *cronJobs) Update(ctx context.Context, cronJob *v1.CronJob, opts metav1. func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v1.CronJob, opts metav1.UpdateOptions) (result *v1.CronJob, err error) { result = &v1.CronJob{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). @@ -160,6 +167,7 @@ func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v1.CronJob, opts m // Delete takes name of the cronJob and deletes it. Returns an error if one occurs. func (c *cronJobs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(name). @@ -175,6 +183,7 @@ func (c *cronJobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptio timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *cronJobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptio func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CronJob, err error) { result = &v1.CronJob{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(name). @@ -215,6 +225,7 @@ func (c *cronJobs) Apply(ctx context.Context, cronJob *batchv1.CronJobApplyConfi } result = &v1.CronJob{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(*name). @@ -244,6 +255,7 @@ func (c *cronJobs) ApplyStatus(ctx context.Context, cronJob *batchv1.CronJobAppl result = &v1.CronJob{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go index c076c80af2a7d..fb9e5679bf28c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go @@ -57,15 +57,17 @@ type JobInterface interface { // jobs implements JobInterface type jobs struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newJobs returns a Jobs func newJobs(c *BatchV1Client, namespace string) *jobs { return &jobs{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newJobs(c *BatchV1Client, namespace string) *jobs { func (c *jobs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). Name(name). @@ -90,6 +93,7 @@ func (c *jobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.Jo } result = &v1.JobList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *jobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interf func (c *jobs) Create(ctx context.Context, job *v1.Job, opts metav1.CreateOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *jobs) Create(ctx context.Context, job *v1.Job, opts metav1.CreateOption func (c *jobs) Update(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). Name(job.Name). @@ -146,6 +152,7 @@ func (c *jobs) Update(ctx context.Context, job *v1.Job, opts metav1.UpdateOption func (c *jobs) UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). Name(job.Name). @@ -160,6 +167,7 @@ func (c *jobs) UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.Update // Delete takes name of the job and deletes it. Returns an error if one occurs. func (c *jobs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). Name(name). @@ -175,6 +183,7 @@ func (c *jobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *jobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, func (c *jobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). Name(name). @@ -215,6 +225,7 @@ func (c *jobs) Apply(ctx context.Context, job *batchv1.JobApplyConfiguration, op } result = &v1.Job{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). Name(*name). @@ -244,6 +255,7 @@ func (c *jobs) ApplyStatus(ctx context.Context, job *batchv1.JobApplyConfigurati result = &v1.Job{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go index ebbf063ec2313..4db17dbf47f2f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go @@ -34,6 +34,7 @@ type BatchV1beta1Interface interface { // BatchV1beta1Client is used to interact with features provided by the batch group. type BatchV1beta1Client struct { restClient rest.Interface + cluster string } func (c *BatchV1beta1Client) CronJobs(namespace string) CronJobInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*BatchV1beta1Client, if err != nil { return nil, err } - return &BatchV1beta1Client{client}, nil + return &BatchV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new BatchV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *BatchV1beta1Client { // New creates a new BatchV1beta1Client for the given RESTClient. func New(c rest.Interface) *BatchV1beta1Client { - return &BatchV1beta1Client{c} + return &BatchV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new BatchV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *BatchV1beta1Client { + return &BatchV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go index d687339ae9d15..4cc25e4de14de 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go @@ -57,15 +57,17 @@ type CronJobInterface interface { // cronJobs implements CronJobInterface type cronJobs struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newCronJobs returns a CronJobs func newCronJobs(c *BatchV1beta1Client, namespace string) *cronJobs { return &cronJobs{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newCronJobs(c *BatchV1beta1Client, namespace string) *cronJobs { func (c *cronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(name). @@ -90,6 +93,7 @@ func (c *cronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1bet } result = &v1beta1.CronJobList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *cronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf func (c *cronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.CreateOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *cronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1 func (c *cronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). @@ -146,6 +152,7 @@ func (c *cronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1 func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). @@ -160,6 +167,7 @@ func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, o // Delete takes name of the cronJob and deletes it. Returns an error if one occurs. func (c *cronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(name). @@ -175,6 +183,7 @@ func (c *cronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *cronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(name). @@ -215,6 +225,7 @@ func (c *cronJobs) Apply(ctx context.Context, cronJob *batchv1beta1.CronJobApply } result = &v1beta1.CronJob{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(*name). @@ -244,6 +255,7 @@ func (c *cronJobs) ApplyStatus(ctx context.Context, cronJob *batchv1beta1.CronJo result = &v1beta1.CronJob{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificates_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificates_client.go index 6d87c539eb4bf..29049d34ffed4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificates_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificates_client.go @@ -34,6 +34,7 @@ type CertificatesV1Interface interface { // CertificatesV1Client is used to interact with features provided by the certificates.k8s.io group. type CertificatesV1Client struct { restClient rest.Interface + cluster string } func (c *CertificatesV1Client) CertificateSigningRequests() CertificateSigningRequestInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CertificatesV1Clien if err != nil { return nil, err } - return &CertificatesV1Client{client}, nil + return &CertificatesV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new CertificatesV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *CertificatesV1Client { // New creates a new CertificatesV1Client for the given RESTClient. func New(c rest.Interface) *CertificatesV1Client { - return &CertificatesV1Client{c} + return &CertificatesV1Client{restClient: c} +} + +// NewWithCluster creates a new CertificatesV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *CertificatesV1Client { + return &CertificatesV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go index 0d6b68b29623c..b7d5ae2143dfd 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go @@ -59,13 +59,15 @@ type CertificateSigningRequestInterface interface { // certificateSigningRequests implements CertificateSigningRequestInterface type certificateSigningRequests struct { - client rest.Interface + client rest.Interface + cluster string } // newCertificateSigningRequests returns a CertificateSigningRequests func newCertificateSigningRequests(c *CertificatesV1Client) *certificateSigningRequests { return &certificateSigningRequests{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -73,6 +75,7 @@ func newCertificateSigningRequests(c *CertificatesV1Client) *certificateSigningR func (c *certificateSigningRequests) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CertificateSigningRequest, err error) { result = &v1.CertificateSigningRequest{} err = c.client.Get(). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -89,6 +92,7 @@ func (c *certificateSigningRequests) List(ctx context.Context, opts metav1.ListO } result = &v1.CertificateSigningRequestList{} err = c.client.Get(). + Cluster(c.cluster). Resource("certificatesigningrequests"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -115,6 +119,7 @@ func (c *certificateSigningRequests) Watch(ctx context.Context, opts metav1.List func (c *certificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.CreateOptions) (result *v1.CertificateSigningRequest, err error) { result = &v1.CertificateSigningRequest{} err = c.client.Post(). + Cluster(c.cluster). Resource("certificatesigningrequests"). VersionedParams(&opts, scheme.ParameterCodec). Body(certificateSigningRequest). @@ -127,6 +132,7 @@ func (c *certificateSigningRequests) Create(ctx context.Context, certificateSign func (c *certificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (result *v1.CertificateSigningRequest, err error) { result = &v1.CertificateSigningRequest{} err = c.client.Put(). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -141,6 +147,7 @@ func (c *certificateSigningRequests) Update(ctx context.Context, certificateSign func (c *certificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (result *v1.CertificateSigningRequest, err error) { result = &v1.CertificateSigningRequest{} err = c.client.Put(). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). SubResource("status"). @@ -154,6 +161,7 @@ func (c *certificateSigningRequests) UpdateStatus(ctx context.Context, certifica // Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. func (c *certificateSigningRequests) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(name). Body(&opts). @@ -168,6 +176,7 @@ func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, opts timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("certificatesigningrequests"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -180,6 +189,7 @@ func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, opts func (c *certificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CertificateSigningRequest, err error) { result = &v1.CertificateSigningRequest{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(name). SubResource(subresources...). @@ -206,6 +216,7 @@ func (c *certificateSigningRequests) Apply(ctx context.Context, certificateSigni } result = &v1.CertificateSigningRequest{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -234,6 +245,7 @@ func (c *certificateSigningRequests) ApplyStatus(ctx context.Context, certificat result = &v1.CertificateSigningRequest{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(*name). SubResource("status"). @@ -248,6 +260,7 @@ func (c *certificateSigningRequests) ApplyStatus(ctx context.Context, certificat func (c *certificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequestName string, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (result *v1.CertificateSigningRequest, err error) { result = &v1.CertificateSigningRequest{} err = c.client.Put(). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(certificateSigningRequestName). SubResource("approval"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go index fa97b441de2ac..f1eb68f002d92 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go @@ -34,6 +34,7 @@ type CertificatesV1beta1Interface interface { // CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group. type CertificatesV1beta1Client struct { restClient rest.Interface + cluster string } func (c *CertificatesV1beta1Client) CertificateSigningRequests() CertificateSigningRequestInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CertificatesV1beta1 if err != nil { return nil, err } - return &CertificatesV1beta1Client{client}, nil + return &CertificatesV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new CertificatesV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *CertificatesV1beta1Client { // New creates a new CertificatesV1beta1Client for the given RESTClient. func New(c rest.Interface) *CertificatesV1beta1Client { - return &CertificatesV1beta1Client{c} + return &CertificatesV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new CertificatesV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *CertificatesV1beta1Client { + return &CertificatesV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go index ec0b9d266fc25..d230d43d8bc69 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go @@ -57,13 +57,15 @@ type CertificateSigningRequestInterface interface { // certificateSigningRequests implements CertificateSigningRequestInterface type certificateSigningRequests struct { - client rest.Interface + client rest.Interface + cluster string } // newCertificateSigningRequests returns a CertificateSigningRequests func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSigningRequests { return &certificateSigningRequests{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSig func (c *certificateSigningRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Get(). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *certificateSigningRequests) List(ctx context.Context, opts v1.ListOptio } result = &v1beta1.CertificateSigningRequestList{} err = c.client.Get(). + Cluster(c.cluster). Resource("certificatesigningrequests"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *certificateSigningRequests) Watch(ctx context.Context, opts v1.ListOpti func (c *certificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.CreateOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Post(). + Cluster(c.cluster). Resource("certificatesigningrequests"). VersionedParams(&opts, scheme.ParameterCodec). Body(certificateSigningRequest). @@ -125,6 +130,7 @@ func (c *certificateSigningRequests) Create(ctx context.Context, certificateSign func (c *certificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *certificateSigningRequests) Update(ctx context.Context, certificateSign func (c *certificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *certificateSigningRequests) UpdateStatus(ctx context.Context, certifica // Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. func (c *certificateSigningRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, opts timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("certificatesigningrequests"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, opts func (c *certificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *certificateSigningRequests) Apply(ctx context.Context, certificateSigni } result = &v1beta1.CertificateSigningRequest{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *certificateSigningRequests) ApplyStatus(ctx context.Context, certificat result = &v1beta1.CertificateSigningRequest{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("certificatesigningrequests"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/coordination_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/coordination_client.go index e19469d530f97..d3c6ff362f58e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/coordination_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/coordination_client.go @@ -34,6 +34,7 @@ type CoordinationV1Interface interface { // CoordinationV1Client is used to interact with features provided by the coordination.k8s.io group. type CoordinationV1Client struct { restClient rest.Interface + cluster string } func (c *CoordinationV1Client) Leases(namespace string) LeaseInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CoordinationV1Clien if err != nil { return nil, err } - return &CoordinationV1Client{client}, nil + return &CoordinationV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new CoordinationV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *CoordinationV1Client { // New creates a new CoordinationV1Client for the given RESTClient. func New(c rest.Interface) *CoordinationV1Client { - return &CoordinationV1Client{c} + return &CoordinationV1Client{restClient: c} +} + +// NewWithCluster creates a new CoordinationV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *CoordinationV1Client { + return &CoordinationV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go index 9e6b169a8117b..15f8e3282597f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go @@ -55,15 +55,17 @@ type LeaseInterface interface { // leases implements LeaseInterface type leases struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newLeases returns a Leases func newLeases(c *CoordinationV1Client, namespace string) *leases { return &leases{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newLeases(c *CoordinationV1Client, namespace string) *leases { func (c *leases) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). Name(name). @@ -88,6 +91,7 @@ func (c *leases) List(ctx context.Context, opts metav1.ListOptions) (result *v1. } result = &v1.LeaseList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *leases) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inte func (c *leases) Create(ctx context.Context, lease *v1.Lease, opts metav1.CreateOptions) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *leases) Create(ctx context.Context, lease *v1.Lease, opts metav1.Create func (c *leases) Update(ctx context.Context, lease *v1.Lease, opts metav1.UpdateOptions) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). Name(lease.Name). @@ -142,6 +148,7 @@ func (c *leases) Update(ctx context.Context, lease *v1.Lease, opts metav1.Update // Delete takes name of the lease and deletes it. Returns an error if one occurs. func (c *leases) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). Name(name). @@ -157,6 +164,7 @@ func (c *leases) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *leases) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions func (c *leases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). Name(name). @@ -197,6 +206,7 @@ func (c *leases) Apply(ctx context.Context, lease *coordinationv1.LeaseApplyConf } result = &v1.Lease{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/coordination_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/coordination_client.go index 27d674e239e51..0ab52cad4ce3d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/coordination_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/coordination_client.go @@ -34,6 +34,7 @@ type CoordinationV1beta1Interface interface { // CoordinationV1beta1Client is used to interact with features provided by the coordination.k8s.io group. type CoordinationV1beta1Client struct { restClient rest.Interface + cluster string } func (c *CoordinationV1beta1Client) Leases(namespace string) LeaseInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CoordinationV1beta1 if err != nil { return nil, err } - return &CoordinationV1beta1Client{client}, nil + return &CoordinationV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new CoordinationV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *CoordinationV1beta1Client { // New creates a new CoordinationV1beta1Client for the given RESTClient. func New(c rest.Interface) *CoordinationV1beta1Client { - return &CoordinationV1beta1Client{c} + return &CoordinationV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new CoordinationV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *CoordinationV1beta1Client { + return &CoordinationV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go index 1bbd57bdd1f99..267ed39e1bd98 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go @@ -55,15 +55,17 @@ type LeaseInterface interface { // leases implements LeaseInterface type leases struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newLeases returns a Leases func newLeases(c *CoordinationV1beta1Client, namespace string) *leases { return &leases{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newLeases(c *CoordinationV1beta1Client, namespace string) *leases { func (c *leases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). Name(name). @@ -88,6 +91,7 @@ func (c *leases) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1 } result = &v1beta1.LeaseList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *leases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interfac func (c *leases) Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *leases) Create(ctx context.Context, lease *v1beta1.Lease, opts v1.Creat func (c *leases) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). Name(lease.Name). @@ -142,6 +148,7 @@ func (c *leases) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.Updat // Delete takes name of the lease and deletes it. Returns an error if one occurs. func (c *leases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). Name(name). @@ -157,6 +164,7 @@ func (c *leases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, li timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *leases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, li func (c *leases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). Name(name). @@ -197,6 +206,7 @@ func (c *leases) Apply(ctx context.Context, lease *coordinationv1beta1.LeaseAppl } result = &v1beta1.Lease{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go index 0fef56429d3f2..5dfce894d261a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go @@ -55,13 +55,15 @@ type ComponentStatusInterface interface { // componentStatuses implements ComponentStatusInterface type componentStatuses struct { - client rest.Interface + client rest.Interface + cluster string } // newComponentStatuses returns a ComponentStatuses func newComponentStatuses(c *CoreV1Client) *componentStatuses { return &componentStatuses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newComponentStatuses(c *CoreV1Client) *componentStatuses { func (c *componentStatuses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Get(). + Cluster(c.cluster). Resource("componentstatuses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *componentStatuses) List(ctx context.Context, opts metav1.ListOptions) ( } result = &v1.ComponentStatusList{} err = c.client.Get(). + Cluster(c.cluster). Resource("componentstatuses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *componentStatuses) Watch(ctx context.Context, opts metav1.ListOptions) func (c *componentStatuses) Create(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.CreateOptions) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Post(). + Cluster(c.cluster). Resource("componentstatuses"). VersionedParams(&opts, scheme.ParameterCodec). Body(componentStatus). @@ -123,6 +128,7 @@ func (c *componentStatuses) Create(ctx context.Context, componentStatus *v1.Comp func (c *componentStatuses) Update(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.UpdateOptions) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Put(). + Cluster(c.cluster). Resource("componentstatuses"). Name(componentStatus.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *componentStatuses) Update(ctx context.Context, componentStatus *v1.Comp // Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. func (c *componentStatuses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("componentstatuses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *componentStatuses) DeleteCollection(ctx context.Context, opts metav1.De timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("componentstatuses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *componentStatuses) DeleteCollection(ctx context.Context, opts metav1.De func (c *componentStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("componentstatuses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *componentStatuses) Apply(ctx context.Context, componentStatus *corev1.C } result = &v1.ComponentStatus{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("componentstatuses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go index b68177720bffe..5391e3eb710e5 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go @@ -55,15 +55,17 @@ type ConfigMapInterface interface { // configMaps implements ConfigMapInterface type configMaps struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newConfigMaps returns a ConfigMaps func newConfigMaps(c *CoreV1Client, namespace string) *configMaps { return &configMaps{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newConfigMaps(c *CoreV1Client, namespace string) *configMaps { func (c *configMaps) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("configmaps"). Name(name). @@ -88,6 +91,7 @@ func (c *configMaps) List(ctx context.Context, opts metav1.ListOptions) (result } result = &v1.ConfigMapList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("configmaps"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *configMaps) Watch(ctx context.Context, opts metav1.ListOptions) (watch. func (c *configMaps) Create(ctx context.Context, configMap *v1.ConfigMap, opts metav1.CreateOptions) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("configmaps"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *configMaps) Create(ctx context.Context, configMap *v1.ConfigMap, opts m func (c *configMaps) Update(ctx context.Context, configMap *v1.ConfigMap, opts metav1.UpdateOptions) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("configmaps"). Name(configMap.Name). @@ -142,6 +148,7 @@ func (c *configMaps) Update(ctx context.Context, configMap *v1.ConfigMap, opts m // Delete takes name of the configMap and deletes it. Returns an error if one occurs. func (c *configMaps) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("configmaps"). Name(name). @@ -157,6 +164,7 @@ func (c *configMaps) DeleteCollection(ctx context.Context, opts metav1.DeleteOpt timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("configmaps"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *configMaps) DeleteCollection(ctx context.Context, opts metav1.DeleteOpt func (c *configMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("configmaps"). Name(name). @@ -197,6 +206,7 @@ func (c *configMaps) Apply(ctx context.Context, configMap *corev1.ConfigMapApply } result = &v1.ConfigMap{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("configmaps"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go index 6e59e4cc6b41c..3592002b76cc3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go @@ -49,6 +49,7 @@ type CoreV1Interface interface { // CoreV1Client is used to interact with features provided by the group. type CoreV1Client struct { restClient rest.Interface + cluster string } func (c *CoreV1Client) ComponentStatuses() ComponentStatusInterface { @@ -141,7 +142,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CoreV1Client, error if err != nil { return nil, err } - return &CoreV1Client{client}, nil + return &CoreV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new CoreV1Client for the given config and @@ -156,7 +157,12 @@ func NewForConfigOrDie(c *rest.Config) *CoreV1Client { // New creates a new CoreV1Client for the given RESTClient. func New(c rest.Interface) *CoreV1Client { - return &CoreV1Client{c} + return &CoreV1Client{restClient: c} +} + +// NewWithCluster creates a new CoreV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *CoreV1Client { + return &CoreV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go index cdf464b0695dd..45ffae0dfb50a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go @@ -55,15 +55,17 @@ type EndpointsInterface interface { // endpoints implements EndpointsInterface type endpoints struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newEndpoints returns a Endpoints func newEndpoints(c *CoreV1Client, namespace string) *endpoints { return &endpoints{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newEndpoints(c *CoreV1Client, namespace string) *endpoints { func (c *endpoints) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpoints"). Name(name). @@ -88,6 +91,7 @@ func (c *endpoints) List(ctx context.Context, opts metav1.ListOptions) (result * } result = &v1.EndpointsList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpoints"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *endpoints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I func (c *endpoints) Create(ctx context.Context, endpoints *v1.Endpoints, opts metav1.CreateOptions) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpoints"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *endpoints) Create(ctx context.Context, endpoints *v1.Endpoints, opts me func (c *endpoints) Update(ctx context.Context, endpoints *v1.Endpoints, opts metav1.UpdateOptions) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpoints"). Name(endpoints.Name). @@ -142,6 +148,7 @@ func (c *endpoints) Update(ctx context.Context, endpoints *v1.Endpoints, opts me // Delete takes name of the endpoints and deletes it. Returns an error if one occurs. func (c *endpoints) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpoints"). Name(name). @@ -157,6 +164,7 @@ func (c *endpoints) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpoints"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *endpoints) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti func (c *endpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("endpoints"). Name(name). @@ -197,6 +206,7 @@ func (c *endpoints) Apply(ctx context.Context, endpoints *corev1.EndpointsApplyC } result = &v1.Endpoints{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("endpoints"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go index 8274d85ffe25e..fc3716a21dd73 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go @@ -55,15 +55,17 @@ type EventInterface interface { // events implements EventInterface type events struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newEvents returns a Events func newEvents(c *CoreV1Client, namespace string) *events { return &events{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newEvents(c *CoreV1Client, namespace string) *events { func (c *events) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(name). @@ -88,6 +91,7 @@ func (c *events) List(ctx context.Context, opts metav1.ListOptions) (result *v1. } result = &v1.EventList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *events) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inte func (c *events) Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *events) Create(ctx context.Context, event *v1.Event, opts metav1.Create func (c *events) Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(event.Name). @@ -142,6 +148,7 @@ func (c *events) Update(ctx context.Context, event *v1.Event, opts metav1.Update // Delete takes name of the event and deletes it. Returns an error if one occurs. func (c *events) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(name). @@ -157,6 +164,7 @@ func (c *events) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *events) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(name). @@ -197,6 +206,7 @@ func (c *events) Apply(ctx context.Context, event *corev1.EventApplyConfiguratio } result = &v1.Event{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go index e6883b607c742..14dfc4977f0ae 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go @@ -55,15 +55,17 @@ type LimitRangeInterface interface { // limitRanges implements LimitRangeInterface type limitRanges struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newLimitRanges returns a LimitRanges func newLimitRanges(c *CoreV1Client, namespace string) *limitRanges { return &limitRanges{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newLimitRanges(c *CoreV1Client, namespace string) *limitRanges { func (c *limitRanges) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("limitranges"). Name(name). @@ -88,6 +91,7 @@ func (c *limitRanges) List(ctx context.Context, opts metav1.ListOptions) (result } result = &v1.LimitRangeList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("limitranges"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *limitRanges) Watch(ctx context.Context, opts metav1.ListOptions) (watch func (c *limitRanges) Create(ctx context.Context, limitRange *v1.LimitRange, opts metav1.CreateOptions) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("limitranges"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *limitRanges) Create(ctx context.Context, limitRange *v1.LimitRange, opt func (c *limitRanges) Update(ctx context.Context, limitRange *v1.LimitRange, opts metav1.UpdateOptions) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("limitranges"). Name(limitRange.Name). @@ -142,6 +148,7 @@ func (c *limitRanges) Update(ctx context.Context, limitRange *v1.LimitRange, opt // Delete takes name of the limitRange and deletes it. Returns an error if one occurs. func (c *limitRanges) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("limitranges"). Name(name). @@ -157,6 +164,7 @@ func (c *limitRanges) DeleteCollection(ctx context.Context, opts metav1.DeleteOp timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("limitranges"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *limitRanges) DeleteCollection(ctx context.Context, opts metav1.DeleteOp func (c *limitRanges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("limitranges"). Name(name). @@ -197,6 +206,7 @@ func (c *limitRanges) Apply(ctx context.Context, limitRange *corev1.LimitRangeAp } result = &v1.LimitRange{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("limitranges"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go index 06c77b4c458a4..0bc63fb0c1844 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go @@ -56,13 +56,15 @@ type NamespaceInterface interface { // namespaces implements NamespaceInterface type namespaces struct { - client rest.Interface + client rest.Interface + cluster string } // newNamespaces returns a Namespaces func newNamespaces(c *CoreV1Client) *namespaces { return &namespaces{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -70,6 +72,7 @@ func newNamespaces(c *CoreV1Client) *namespaces { func (c *namespaces) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Get(). + Cluster(c.cluster). Resource("namespaces"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -86,6 +89,7 @@ func (c *namespaces) List(ctx context.Context, opts metav1.ListOptions) (result } result = &v1.NamespaceList{} err = c.client.Get(). + Cluster(c.cluster). Resource("namespaces"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -112,6 +116,7 @@ func (c *namespaces) Watch(ctx context.Context, opts metav1.ListOptions) (watch. func (c *namespaces) Create(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Post(). + Cluster(c.cluster). Resource("namespaces"). VersionedParams(&opts, scheme.ParameterCodec). Body(namespace). @@ -124,6 +129,7 @@ func (c *namespaces) Create(ctx context.Context, namespace *v1.Namespace, opts m func (c *namespaces) Update(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Put(). + Cluster(c.cluster). Resource("namespaces"). Name(namespace.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -138,6 +144,7 @@ func (c *namespaces) Update(ctx context.Context, namespace *v1.Namespace, opts m func (c *namespaces) UpdateStatus(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Put(). + Cluster(c.cluster). Resource("namespaces"). Name(namespace.Name). SubResource("status"). @@ -151,6 +158,7 @@ func (c *namespaces) UpdateStatus(ctx context.Context, namespace *v1.Namespace, // Delete takes name of the namespace and deletes it. Returns an error if one occurs. func (c *namespaces) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("namespaces"). Name(name). Body(&opts). @@ -162,6 +170,7 @@ func (c *namespaces) Delete(ctx context.Context, name string, opts metav1.Delete func (c *namespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("namespaces"). Name(name). SubResource(subresources...). @@ -188,6 +197,7 @@ func (c *namespaces) Apply(ctx context.Context, namespace *corev1.NamespaceApply } result = &v1.Namespace{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("namespaces"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -216,6 +226,7 @@ func (c *namespaces) ApplyStatus(ctx context.Context, namespace *corev1.Namespac result = &v1.Namespace{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("namespaces"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go index d9725b2f95e9b..cd6ac6a9def0e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go @@ -57,13 +57,15 @@ type NodeInterface interface { // nodes implements NodeInterface type nodes struct { - client rest.Interface + client rest.Interface + cluster string } // newNodes returns a Nodes func newNodes(c *CoreV1Client) *nodes { return &nodes{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newNodes(c *CoreV1Client) *nodes { func (c *nodes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Get(). + Cluster(c.cluster). Resource("nodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *nodes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.N } result = &v1.NodeList{} err = c.client.Get(). + Cluster(c.cluster). Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *nodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inter func (c *nodes) Create(ctx context.Context, node *v1.Node, opts metav1.CreateOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Post(). + Cluster(c.cluster). Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Body(node). @@ -125,6 +130,7 @@ func (c *nodes) Create(ctx context.Context, node *v1.Node, opts metav1.CreateOpt func (c *nodes) Update(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Put(). + Cluster(c.cluster). Resource("nodes"). Name(node.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *nodes) Update(ctx context.Context, node *v1.Node, opts metav1.UpdateOpt func (c *nodes) UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Put(). + Cluster(c.cluster). Resource("nodes"). Name(node.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *nodes) UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.Upd // Delete takes name of the node and deletes it. Returns an error if one occurs. func (c *nodes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("nodes"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *nodes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("nodes"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *nodes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, func (c *nodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("nodes"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *nodes) Apply(ctx context.Context, node *corev1.NodeApplyConfiguration, } result = &v1.Node{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("nodes"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *nodes) ApplyStatus(ctx context.Context, node *corev1.NodeApplyConfigura result = &v1.Node{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("nodes"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go index a8e22959771f1..1c5153983988e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go @@ -57,13 +57,15 @@ type PersistentVolumeInterface interface { // persistentVolumes implements PersistentVolumeInterface type persistentVolumes struct { - client rest.Interface + client rest.Interface + cluster string } // newPersistentVolumes returns a PersistentVolumes func newPersistentVolumes(c *CoreV1Client) *persistentVolumes { return &persistentVolumes{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newPersistentVolumes(c *CoreV1Client) *persistentVolumes { func (c *persistentVolumes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Get(). + Cluster(c.cluster). Resource("persistentvolumes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *persistentVolumes) List(ctx context.Context, opts metav1.ListOptions) ( } result = &v1.PersistentVolumeList{} err = c.client.Get(). + Cluster(c.cluster). Resource("persistentvolumes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *persistentVolumes) Watch(ctx context.Context, opts metav1.ListOptions) func (c *persistentVolumes) Create(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.CreateOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Post(). + Cluster(c.cluster). Resource("persistentvolumes"). VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolume). @@ -125,6 +130,7 @@ func (c *persistentVolumes) Create(ctx context.Context, persistentVolume *v1.Per func (c *persistentVolumes) Update(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.UpdateOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Put(). + Cluster(c.cluster). Resource("persistentvolumes"). Name(persistentVolume.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *persistentVolumes) Update(ctx context.Context, persistentVolume *v1.Per func (c *persistentVolumes) UpdateStatus(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.UpdateOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Put(). + Cluster(c.cluster). Resource("persistentvolumes"). Name(persistentVolume.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *persistentVolumes) UpdateStatus(ctx context.Context, persistentVolume * // Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. func (c *persistentVolumes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("persistentvolumes"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *persistentVolumes) DeleteCollection(ctx context.Context, opts metav1.De timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("persistentvolumes"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *persistentVolumes) DeleteCollection(ctx context.Context, opts metav1.De func (c *persistentVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("persistentvolumes"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *persistentVolumes) Apply(ctx context.Context, persistentVolume *corev1. } result = &v1.PersistentVolume{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("persistentvolumes"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *persistentVolumes) ApplyStatus(ctx context.Context, persistentVolume *c result = &v1.PersistentVolume{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("persistentvolumes"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go index 2e7f4fb44f6cf..a2eeb795d2a2b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go @@ -57,15 +57,17 @@ type PersistentVolumeClaimInterface interface { // persistentVolumeClaims implements PersistentVolumeClaimInterface type persistentVolumeClaims struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newPersistentVolumeClaims returns a PersistentVolumeClaims func newPersistentVolumeClaims(c *CoreV1Client, namespace string) *persistentVolumeClaims { return &persistentVolumeClaims{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newPersistentVolumeClaims(c *CoreV1Client, namespace string) *persistentVol func (c *persistentVolumeClaims) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(name). @@ -90,6 +93,7 @@ func (c *persistentVolumeClaims) List(ctx context.Context, opts metav1.ListOptio } result = &v1.PersistentVolumeClaimList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *persistentVolumeClaims) Watch(ctx context.Context, opts metav1.ListOpti func (c *persistentVolumeClaims) Create(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.CreateOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *persistentVolumeClaims) Create(ctx context.Context, persistentVolumeCla func (c *persistentVolumeClaims) Update(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(persistentVolumeClaim.Name). @@ -146,6 +152,7 @@ func (c *persistentVolumeClaims) Update(ctx context.Context, persistentVolumeCla func (c *persistentVolumeClaims) UpdateStatus(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(persistentVolumeClaim.Name). @@ -160,6 +167,7 @@ func (c *persistentVolumeClaims) UpdateStatus(ctx context.Context, persistentVol // Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. func (c *persistentVolumeClaims) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(name). @@ -175,6 +183,7 @@ func (c *persistentVolumeClaims) DeleteCollection(ctx context.Context, opts meta timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *persistentVolumeClaims) DeleteCollection(ctx context.Context, opts meta func (c *persistentVolumeClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(name). @@ -215,6 +225,7 @@ func (c *persistentVolumeClaims) Apply(ctx context.Context, persistentVolumeClai } result = &v1.PersistentVolumeClaim{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(*name). @@ -244,6 +255,7 @@ func (c *persistentVolumeClaims) ApplyStatus(ctx context.Context, persistentVolu result = &v1.PersistentVolumeClaim{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go index 63122cf3fb47a..d3bfa895a4b2a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go @@ -59,15 +59,17 @@ type PodInterface interface { // pods implements PodInterface type pods struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newPods returns a Pods func newPods(c *CoreV1Client, namespace string) *pods { return &pods{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -75,6 +77,7 @@ func newPods(c *CoreV1Client, namespace string) *pods { func (c *pods) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). Name(name). @@ -92,6 +95,7 @@ func (c *pods) List(ctx context.Context, opts metav1.ListOptions) (result *v1.Po } result = &v1.PodList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). @@ -120,6 +124,7 @@ func (c *pods) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interf func (c *pods) Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). @@ -133,6 +138,7 @@ func (c *pods) Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOption func (c *pods) Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). Name(pod.Name). @@ -148,6 +154,7 @@ func (c *pods) Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOption func (c *pods) UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). Name(pod.Name). @@ -162,6 +169,7 @@ func (c *pods) UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.Update // Delete takes name of the pod and deletes it. Returns an error if one occurs. func (c *pods) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). Name(name). @@ -177,6 +185,7 @@ func (c *pods) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -190,6 +199,7 @@ func (c *pods) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, func (c *pods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). Name(name). @@ -217,6 +227,7 @@ func (c *pods) Apply(ctx context.Context, pod *corev1.PodApplyConfiguration, opt } result = &v1.Pod{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). Name(*name). @@ -246,6 +257,7 @@ func (c *pods) ApplyStatus(ctx context.Context, pod *corev1.PodApplyConfiguratio result = &v1.Pod{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). Name(*name). @@ -261,6 +273,7 @@ func (c *pods) ApplyStatus(ctx context.Context, pod *corev1.PodApplyConfiguratio func (c *pods) UpdateEphemeralContainers(ctx context.Context, podName string, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). Name(podName). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go index ff90fc0e629d1..ae6b989a1d19f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go @@ -55,15 +55,17 @@ type PodTemplateInterface interface { // podTemplates implements PodTemplateInterface type podTemplates struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newPodTemplates returns a PodTemplates func newPodTemplates(c *CoreV1Client, namespace string) *podTemplates { return &podTemplates{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newPodTemplates(c *CoreV1Client, namespace string) *podTemplates { func (c *podTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("podtemplates"). Name(name). @@ -88,6 +91,7 @@ func (c *podTemplates) List(ctx context.Context, opts metav1.ListOptions) (resul } result = &v1.PodTemplateList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("podtemplates"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *podTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watc func (c *podTemplates) Create(ctx context.Context, podTemplate *v1.PodTemplate, opts metav1.CreateOptions) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("podtemplates"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *podTemplates) Create(ctx context.Context, podTemplate *v1.PodTemplate, func (c *podTemplates) Update(ctx context.Context, podTemplate *v1.PodTemplate, opts metav1.UpdateOptions) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("podtemplates"). Name(podTemplate.Name). @@ -142,6 +148,7 @@ func (c *podTemplates) Update(ctx context.Context, podTemplate *v1.PodTemplate, // Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. func (c *podTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("podtemplates"). Name(name). @@ -157,6 +164,7 @@ func (c *podTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteO timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("podtemplates"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *podTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteO func (c *podTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("podtemplates"). Name(name). @@ -197,6 +206,7 @@ func (c *podTemplates) Apply(ctx context.Context, podTemplate *corev1.PodTemplat } result = &v1.PodTemplate{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("podtemplates"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go index 49c75d967bb55..86c5d415135ff 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go @@ -61,15 +61,17 @@ type ReplicationControllerInterface interface { // replicationControllers implements ReplicationControllerInterface type replicationControllers struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newReplicationControllers returns a ReplicationControllers func newReplicationControllers(c *CoreV1Client, namespace string) *replicationControllers { return &replicationControllers{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -77,6 +79,7 @@ func newReplicationControllers(c *CoreV1Client, namespace string) *replicationCo func (c *replicationControllers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). Name(name). @@ -94,6 +97,7 @@ func (c *replicationControllers) List(ctx context.Context, opts metav1.ListOptio } result = &v1.ReplicationControllerList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). VersionedParams(&opts, scheme.ParameterCodec). @@ -122,6 +126,7 @@ func (c *replicationControllers) Watch(ctx context.Context, opts metav1.ListOpti func (c *replicationControllers) Create(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.CreateOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +140,7 @@ func (c *replicationControllers) Create(ctx context.Context, replicationControll func (c *replicationControllers) Update(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.UpdateOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). Name(replicationController.Name). @@ -150,6 +156,7 @@ func (c *replicationControllers) Update(ctx context.Context, replicationControll func (c *replicationControllers) UpdateStatus(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.UpdateOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). Name(replicationController.Name). @@ -164,6 +171,7 @@ func (c *replicationControllers) UpdateStatus(ctx context.Context, replicationCo // Delete takes name of the replicationController and deletes it. Returns an error if one occurs. func (c *replicationControllers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). Name(name). @@ -179,6 +187,7 @@ func (c *replicationControllers) DeleteCollection(ctx context.Context, opts meta timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -192,6 +201,7 @@ func (c *replicationControllers) DeleteCollection(ctx context.Context, opts meta func (c *replicationControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). Name(name). @@ -219,6 +229,7 @@ func (c *replicationControllers) Apply(ctx context.Context, replicationControlle } result = &v1.ReplicationController{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). Name(*name). @@ -248,6 +259,7 @@ func (c *replicationControllers) ApplyStatus(ctx context.Context, replicationCon result = &v1.ReplicationController{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). Name(*name). @@ -263,6 +275,7 @@ func (c *replicationControllers) ApplyStatus(ctx context.Context, replicationCon func (c *replicationControllers) GetScale(ctx context.Context, replicationControllerName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). Name(replicationControllerName). @@ -277,6 +290,7 @@ func (c *replicationControllers) GetScale(ctx context.Context, replicationContro func (c *replicationControllers) UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). Name(replicationControllerName). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go index 8444d164edda3..7bf6b9b30b856 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go @@ -57,15 +57,17 @@ type ResourceQuotaInterface interface { // resourceQuotas implements ResourceQuotaInterface type resourceQuotas struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newResourceQuotas returns a ResourceQuotas func newResourceQuotas(c *CoreV1Client, namespace string) *resourceQuotas { return &resourceQuotas{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newResourceQuotas(c *CoreV1Client, namespace string) *resourceQuotas { func (c *resourceQuotas) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). Name(name). @@ -90,6 +93,7 @@ func (c *resourceQuotas) List(ctx context.Context, opts metav1.ListOptions) (res } result = &v1.ResourceQuotaList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *resourceQuotas) Watch(ctx context.Context, opts metav1.ListOptions) (wa func (c *resourceQuotas) Create(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.CreateOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *resourceQuotas) Create(ctx context.Context, resourceQuota *v1.ResourceQ func (c *resourceQuotas) Update(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.UpdateOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). Name(resourceQuota.Name). @@ -146,6 +152,7 @@ func (c *resourceQuotas) Update(ctx context.Context, resourceQuota *v1.ResourceQ func (c *resourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.UpdateOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). Name(resourceQuota.Name). @@ -160,6 +167,7 @@ func (c *resourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *v1.Res // Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. func (c *resourceQuotas) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). Name(name). @@ -175,6 +183,7 @@ func (c *resourceQuotas) DeleteCollection(ctx context.Context, opts metav1.Delet timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *resourceQuotas) DeleteCollection(ctx context.Context, opts metav1.Delet func (c *resourceQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). Name(name). @@ -215,6 +225,7 @@ func (c *resourceQuotas) Apply(ctx context.Context, resourceQuota *corev1.Resour } result = &v1.ResourceQuota{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). Name(*name). @@ -244,6 +255,7 @@ func (c *resourceQuotas) ApplyStatus(ctx context.Context, resourceQuota *corev1. result = &v1.ResourceQuota{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go index 4aba330381db0..00b83b4f3c87b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go @@ -55,15 +55,17 @@ type SecretInterface interface { // secrets implements SecretInterface type secrets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newSecrets returns a Secrets func newSecrets(c *CoreV1Client, namespace string) *secrets { return &secrets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newSecrets(c *CoreV1Client, namespace string) *secrets { func (c *secrets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("secrets"). Name(name). @@ -88,6 +91,7 @@ func (c *secrets) List(ctx context.Context, opts metav1.ListOptions) (result *v1 } result = &v1.SecretList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("secrets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *secrets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Int func (c *secrets) Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("secrets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *secrets) Create(ctx context.Context, secret *v1.Secret, opts metav1.Cre func (c *secrets) Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("secrets"). Name(secret.Name). @@ -142,6 +148,7 @@ func (c *secrets) Update(ctx context.Context, secret *v1.Secret, opts metav1.Upd // Delete takes name of the secret and deletes it. Returns an error if one occurs. func (c *secrets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("secrets"). Name(name). @@ -157,6 +164,7 @@ func (c *secrets) DeleteCollection(ctx context.Context, opts metav1.DeleteOption timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("secrets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *secrets) DeleteCollection(ctx context.Context, opts metav1.DeleteOption func (c *secrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("secrets"). Name(name). @@ -197,6 +206,7 @@ func (c *secrets) Apply(ctx context.Context, secret *corev1.SecretApplyConfigura } result = &v1.Secret{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("secrets"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go index 3fe22ba444580..bc4385e140bb9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go @@ -56,15 +56,17 @@ type ServiceInterface interface { // services implements ServiceInterface type services struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newServices returns a Services func newServices(c *CoreV1Client, namespace string) *services { return &services{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -72,6 +74,7 @@ func newServices(c *CoreV1Client, namespace string) *services { func (c *services) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("services"). Name(name). @@ -89,6 +92,7 @@ func (c *services) List(ctx context.Context, opts metav1.ListOptions) (result *v } result = &v1.ServiceList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). @@ -117,6 +121,7 @@ func (c *services) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In func (c *services) Create(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). @@ -130,6 +135,7 @@ func (c *services) Create(ctx context.Context, service *v1.Service, opts metav1. func (c *services) Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("services"). Name(service.Name). @@ -145,6 +151,7 @@ func (c *services) Update(ctx context.Context, service *v1.Service, opts metav1. func (c *services) UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("services"). Name(service.Name). @@ -159,6 +166,7 @@ func (c *services) UpdateStatus(ctx context.Context, service *v1.Service, opts m // Delete takes name of the service and deletes it. Returns an error if one occurs. func (c *services) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("services"). Name(name). @@ -171,6 +179,7 @@ func (c *services) Delete(ctx context.Context, name string, opts metav1.DeleteOp func (c *services) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("services"). Name(name). @@ -198,6 +207,7 @@ func (c *services) Apply(ctx context.Context, service *corev1.ServiceApplyConfig } result = &v1.Service{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("services"). Name(*name). @@ -227,6 +237,7 @@ func (c *services) ApplyStatus(ctx context.Context, service *corev1.ServiceApply result = &v1.Service{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("services"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go index bdf589b96084b..0e537222c36cf 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go @@ -58,15 +58,17 @@ type ServiceAccountInterface interface { // serviceAccounts implements ServiceAccountInterface type serviceAccounts struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newServiceAccounts returns a ServiceAccounts func newServiceAccounts(c *CoreV1Client, namespace string) *serviceAccounts { return &serviceAccounts{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -74,6 +76,7 @@ func newServiceAccounts(c *CoreV1Client, namespace string) *serviceAccounts { func (c *serviceAccounts) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("serviceaccounts"). Name(name). @@ -91,6 +94,7 @@ func (c *serviceAccounts) List(ctx context.Context, opts metav1.ListOptions) (re } result = &v1.ServiceAccountList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("serviceaccounts"). VersionedParams(&opts, scheme.ParameterCodec). @@ -119,6 +123,7 @@ func (c *serviceAccounts) Watch(ctx context.Context, opts metav1.ListOptions) (w func (c *serviceAccounts) Create(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.CreateOptions) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("serviceaccounts"). VersionedParams(&opts, scheme.ParameterCodec). @@ -132,6 +137,7 @@ func (c *serviceAccounts) Create(ctx context.Context, serviceAccount *v1.Service func (c *serviceAccounts) Update(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.UpdateOptions) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("serviceaccounts"). Name(serviceAccount.Name). @@ -145,6 +151,7 @@ func (c *serviceAccounts) Update(ctx context.Context, serviceAccount *v1.Service // Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. func (c *serviceAccounts) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("serviceaccounts"). Name(name). @@ -160,6 +167,7 @@ func (c *serviceAccounts) DeleteCollection(ctx context.Context, opts metav1.Dele timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("serviceaccounts"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -173,6 +181,7 @@ func (c *serviceAccounts) DeleteCollection(ctx context.Context, opts metav1.Dele func (c *serviceAccounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("serviceaccounts"). Name(name). @@ -200,6 +209,7 @@ func (c *serviceAccounts) Apply(ctx context.Context, serviceAccount *corev1.Serv } result = &v1.ServiceAccount{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("serviceaccounts"). Name(*name). @@ -214,6 +224,7 @@ func (c *serviceAccounts) Apply(ctx context.Context, serviceAccount *corev1.Serv func (c *serviceAccounts) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest, opts metav1.CreateOptions) (result *authenticationv1.TokenRequest, err error) { result = &authenticationv1.TokenRequest{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("serviceaccounts"). Name(serviceAccountName). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/discovery_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/discovery_client.go index 9041443b38a3f..a80fdbe602a8d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/discovery_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/discovery_client.go @@ -34,6 +34,7 @@ type DiscoveryV1Interface interface { // DiscoveryV1Client is used to interact with features provided by the discovery.k8s.io group. type DiscoveryV1Client struct { restClient rest.Interface + cluster string } func (c *DiscoveryV1Client) EndpointSlices(namespace string) EndpointSliceInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*DiscoveryV1Client, if err != nil { return nil, err } - return &DiscoveryV1Client{client}, nil + return &DiscoveryV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new DiscoveryV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *DiscoveryV1Client { // New creates a new DiscoveryV1Client for the given RESTClient. func New(c rest.Interface) *DiscoveryV1Client { - return &DiscoveryV1Client{c} + return &DiscoveryV1Client{restClient: c} +} + +// NewWithCluster creates a new DiscoveryV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *DiscoveryV1Client { + return &DiscoveryV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go index 63e616b033bfa..8a03531eff9f7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go @@ -55,15 +55,17 @@ type EndpointSliceInterface interface { // endpointSlices implements EndpointSliceInterface type endpointSlices struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newEndpointSlices returns a EndpointSlices func newEndpointSlices(c *DiscoveryV1Client, namespace string) *endpointSlices { return &endpointSlices{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newEndpointSlices(c *DiscoveryV1Client, namespace string) *endpointSlices { func (c *endpointSlices) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.EndpointSlice, err error) { result = &v1.EndpointSlice{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). Name(name). @@ -88,6 +91,7 @@ func (c *endpointSlices) List(ctx context.Context, opts metav1.ListOptions) (res } result = &v1.EndpointSliceList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *endpointSlices) Watch(ctx context.Context, opts metav1.ListOptions) (wa func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.CreateOptions) (result *v1.EndpointSlice, err error) { result = &v1.EndpointSlice{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1.EndpointS func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.UpdateOptions) (result *v1.EndpointSlice, err error) { result = &v1.EndpointSlice{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). Name(endpointSlice.Name). @@ -142,6 +148,7 @@ func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1.EndpointS // Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. func (c *endpointSlices) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). Name(name). @@ -157,6 +164,7 @@ func (c *endpointSlices) DeleteCollection(ctx context.Context, opts metav1.Delet timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *endpointSlices) DeleteCollection(ctx context.Context, opts metav1.Delet func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.EndpointSlice, err error) { result = &v1.EndpointSlice{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). Name(name). @@ -197,6 +206,7 @@ func (c *endpointSlices) Apply(ctx context.Context, endpointSlice *discoveryv1.E } result = &v1.EndpointSlice{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/discovery_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/discovery_client.go index 193d5e9ebb69a..e76b0451298b5 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/discovery_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/discovery_client.go @@ -34,6 +34,7 @@ type DiscoveryV1beta1Interface interface { // DiscoveryV1beta1Client is used to interact with features provided by the discovery.k8s.io group. type DiscoveryV1beta1Client struct { restClient rest.Interface + cluster string } func (c *DiscoveryV1beta1Client) EndpointSlices(namespace string) EndpointSliceInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*DiscoveryV1beta1Cli if err != nil { return nil, err } - return &DiscoveryV1beta1Client{client}, nil + return &DiscoveryV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new DiscoveryV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *DiscoveryV1beta1Client { // New creates a new DiscoveryV1beta1Client for the given RESTClient. func New(c rest.Interface) *DiscoveryV1beta1Client { - return &DiscoveryV1beta1Client{c} + return &DiscoveryV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new DiscoveryV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *DiscoveryV1beta1Client { + return &DiscoveryV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go index 2ade833029608..35650fafef06d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go @@ -55,15 +55,17 @@ type EndpointSliceInterface interface { // endpointSlices implements EndpointSliceInterface type endpointSlices struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newEndpointSlices returns a EndpointSlices func newEndpointSlices(c *DiscoveryV1beta1Client, namespace string) *endpointSlices { return &endpointSlices{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newEndpointSlices(c *DiscoveryV1beta1Client, namespace string) *endpointSli func (c *endpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). Name(name). @@ -88,6 +91,7 @@ func (c *endpointSlices) List(ctx context.Context, opts v1.ListOptions) (result } result = &v1beta1.EndpointSliceList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *endpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch. func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.Endp func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). Name(endpointSlice.Name). @@ -142,6 +148,7 @@ func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.Endp // Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. func (c *endpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). Name(name). @@ -157,6 +164,7 @@ func (c *endpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOpt timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *endpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOpt func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). Name(name). @@ -197,6 +206,7 @@ func (c *endpointSlices) Apply(ctx context.Context, endpointSlice *discoveryv1be } result = &v1beta1.EndpointSlice{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go index c9f2bbed5019e..095fcd638cc23 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go @@ -55,15 +55,17 @@ type EventInterface interface { // events implements EventInterface type events struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newEvents returns a Events func newEvents(c *EventsV1Client, namespace string) *events { return &events{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newEvents(c *EventsV1Client, namespace string) *events { func (c *events) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(name). @@ -88,6 +91,7 @@ func (c *events) List(ctx context.Context, opts metav1.ListOptions) (result *v1. } result = &v1.EventList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *events) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inte func (c *events) Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *events) Create(ctx context.Context, event *v1.Event, opts metav1.Create func (c *events) Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(event.Name). @@ -142,6 +148,7 @@ func (c *events) Update(ctx context.Context, event *v1.Event, opts metav1.Update // Delete takes name of the event and deletes it. Returns an error if one occurs. func (c *events) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(name). @@ -157,6 +164,7 @@ func (c *events) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *events) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(name). @@ -197,6 +206,7 @@ func (c *events) Apply(ctx context.Context, event *eventsv1.EventApplyConfigurat } result = &v1.Event{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/events_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/events_client.go index 8c73918d1c5ba..3617bd0f68052 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/events_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/events_client.go @@ -34,6 +34,7 @@ type EventsV1Interface interface { // EventsV1Client is used to interact with features provided by the events.k8s.io group. type EventsV1Client struct { restClient rest.Interface + cluster string } func (c *EventsV1Client) Events(namespace string) EventInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*EventsV1Client, err if err != nil { return nil, err } - return &EventsV1Client{client}, nil + return &EventsV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new EventsV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *EventsV1Client { // New creates a new EventsV1Client for the given RESTClient. func New(c rest.Interface) *EventsV1Client { - return &EventsV1Client{c} + return &EventsV1Client{restClient: c} +} + +// NewWithCluster creates a new EventsV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *EventsV1Client { + return &EventsV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go index dfdf8b897930f..e75ddac18e880 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go @@ -55,15 +55,17 @@ type EventInterface interface { // events implements EventInterface type events struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newEvents returns a Events func newEvents(c *EventsV1beta1Client, namespace string) *events { return &events{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newEvents(c *EventsV1beta1Client, namespace string) *events { func (c *events) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(name). @@ -88,6 +91,7 @@ func (c *events) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1 } result = &v1beta1.EventList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *events) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interfac func (c *events) Create(ctx context.Context, event *v1beta1.Event, opts v1.CreateOptions) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *events) Create(ctx context.Context, event *v1beta1.Event, opts v1.Creat func (c *events) Update(ctx context.Context, event *v1beta1.Event, opts v1.UpdateOptions) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(event.Name). @@ -142,6 +148,7 @@ func (c *events) Update(ctx context.Context, event *v1beta1.Event, opts v1.Updat // Delete takes name of the event and deletes it. Returns an error if one occurs. func (c *events) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(name). @@ -157,6 +164,7 @@ func (c *events) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, li timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *events) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, li func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(name). @@ -197,6 +206,7 @@ func (c *events) Apply(ctx context.Context, event *eventsv1beta1.EventApplyConfi } result = &v1beta1.Event{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go index 66506bf88e92c..2c1b3bc925f19 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go @@ -34,6 +34,7 @@ type EventsV1beta1Interface interface { // EventsV1beta1Client is used to interact with features provided by the events.k8s.io group. type EventsV1beta1Client struct { restClient rest.Interface + cluster string } func (c *EventsV1beta1Client) Events(namespace string) EventInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*EventsV1beta1Client if err != nil { return nil, err } - return &EventsV1beta1Client{client}, nil + return &EventsV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new EventsV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *EventsV1beta1Client { // New creates a new EventsV1beta1Client for the given RESTClient. func New(c rest.Interface) *EventsV1beta1Client { - return &EventsV1beta1Client{c} + return &EventsV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new EventsV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *EventsV1beta1Client { + return &EventsV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go index ffe219fdaac63..9c0349b2e01b1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go @@ -57,15 +57,17 @@ type DaemonSetInterface interface { // daemonSets implements DaemonSetInterface type daemonSets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newDaemonSets returns a DaemonSets func newDaemonSets(c *ExtensionsV1beta1Client, namespace string) *daemonSets { return &daemonSets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newDaemonSets(c *ExtensionsV1beta1Client, namespace string) *daemonSets { func (c *daemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(name). @@ -90,6 +93,7 @@ func (c *daemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1b } result = &v1beta1.DaemonSetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.CreateOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSet, o func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). @@ -146,6 +152,7 @@ func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSet, o func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). @@ -160,6 +167,7 @@ func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta1.Daemon // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. func (c *daemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(name). @@ -175,6 +183,7 @@ func (c *daemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *daemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(name). @@ -215,6 +225,7 @@ func (c *daemonSets) Apply(ctx context.Context, daemonSet *extensionsv1beta1.Dae } result = &v1beta1.DaemonSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(*name). @@ -244,6 +255,7 @@ func (c *daemonSets) ApplyStatus(ctx context.Context, daemonSet *extensionsv1bet result = &v1beta1.DaemonSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go index c41d8dbc2609b..14e35134bad59 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go @@ -61,15 +61,17 @@ type DeploymentInterface interface { // deployments implements DeploymentInterface type deployments struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newDeployments returns a Deployments func newDeployments(c *ExtensionsV1beta1Client, namespace string) *deployments { return &deployments{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -77,6 +79,7 @@ func newDeployments(c *ExtensionsV1beta1Client, namespace string) *deployments { func (c *deployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -94,6 +97,7 @@ func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1 } result = &v1beta1.DeploymentList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). @@ -122,6 +126,7 @@ func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +140,7 @@ func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). @@ -150,6 +156,7 @@ func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). @@ -164,6 +171,7 @@ func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Depl // Delete takes name of the deployment and deletes it. Returns an error if one occurs. func (c *deployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -179,6 +187,7 @@ func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOption timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -192,6 +201,7 @@ func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOption func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(name). @@ -219,6 +229,7 @@ func (c *deployments) Apply(ctx context.Context, deployment *extensionsv1beta1.D } result = &v1beta1.Deployment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(*name). @@ -248,6 +259,7 @@ func (c *deployments) ApplyStatus(ctx context.Context, deployment *extensionsv1b result = &v1beta1.Deployment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(*name). @@ -263,6 +275,7 @@ func (c *deployments) ApplyStatus(ctx context.Context, deployment *extensionsv1b func (c *deployments) GetScale(ctx context.Context, deploymentName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deploymentName). @@ -277,6 +290,7 @@ func (c *deployments) GetScale(ctx context.Context, deploymentName string, optio func (c *deployments) UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deploymentName). @@ -302,6 +316,7 @@ func (c *deployments) ApplyScale(ctx context.Context, deploymentName string, sca result = &v1beta1.Scale{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). Name(deploymentName). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go index 827b514df6f46..0d0767d1a039e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go @@ -39,6 +39,7 @@ type ExtensionsV1beta1Interface interface { // ExtensionsV1beta1Client is used to interact with features provided by the extensions group. type ExtensionsV1beta1Client struct { restClient rest.Interface + cluster string } func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface { @@ -91,7 +92,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ExtensionsV1beta1Cl if err != nil { return nil, err } - return &ExtensionsV1beta1Client{client}, nil + return &ExtensionsV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and @@ -106,7 +107,12 @@ func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client { // New creates a new ExtensionsV1beta1Client for the given RESTClient. func New(c rest.Interface) *ExtensionsV1beta1Client { - return &ExtensionsV1beta1Client{c} + return &ExtensionsV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new ExtensionsV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ExtensionsV1beta1Client { + return &ExtensionsV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go index dd4012cc23320..b6eaa5030b512 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go @@ -57,15 +57,17 @@ type IngressInterface interface { // ingresses implements IngressInterface type ingresses struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newIngresses returns a Ingresses func newIngresses(c *ExtensionsV1beta1Client, namespace string) *ingresses { return &ingresses{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newIngresses(c *ExtensionsV1beta1Client, namespace string) *ingresses { func (c *ingresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(name). @@ -90,6 +93,7 @@ func (c *ingresses) List(ctx context.Context, opts v1.ListOptions) (result *v1be } result = &v1beta1.IngressList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *ingresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). @@ -146,6 +152,7 @@ func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). @@ -160,6 +167,7 @@ func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, // Delete takes name of the ingress and deletes it. Returns an error if one occurs. func (c *ingresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(name). @@ -175,6 +183,7 @@ func (c *ingresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *ingresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(name). @@ -215,6 +225,7 @@ func (c *ingresses) Apply(ctx context.Context, ingress *extensionsv1beta1.Ingres } result = &v1beta1.Ingress{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(*name). @@ -244,6 +255,7 @@ func (c *ingresses) ApplyStatus(ctx context.Context, ingress *extensionsv1beta1. result = &v1beta1.Ingress{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go index 978b26db0337f..1ea6c4df2dbc6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go @@ -55,15 +55,17 @@ type NetworkPolicyInterface interface { // networkPolicies implements NetworkPolicyInterface type networkPolicies struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newNetworkPolicies returns a NetworkPolicies func newNetworkPolicies(c *ExtensionsV1beta1Client, namespace string) *networkPolicies { return &networkPolicies{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newNetworkPolicies(c *ExtensionsV1beta1Client, namespace string) *networkPo func (c *networkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). Name(name). @@ -88,6 +91,7 @@ func (c *networkPolicies) List(ctx context.Context, opts v1.ListOptions) (result } result = &v1beta1.NetworkPolicyList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *networkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.Net func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). Name(networkPolicy.Name). @@ -142,6 +148,7 @@ func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.Net // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *networkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). Name(name). @@ -157,6 +164,7 @@ func (c *networkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOp timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *networkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOp func (c *networkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). Name(name). @@ -197,6 +206,7 @@ func (c *networkPolicies) Apply(ctx context.Context, networkPolicy *extensionsv1 } result = &v1beta1.NetworkPolicy{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go index 3f38c3133d6a6..6887024331991 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go @@ -55,13 +55,15 @@ type PodSecurityPolicyInterface interface { // podSecurityPolicies implements PodSecurityPolicyInterface type podSecurityPolicies struct { - client rest.Interface + client rest.Interface + cluster string } // newPodSecurityPolicies returns a PodSecurityPolicies func newPodSecurityPolicies(c *ExtensionsV1beta1Client) *podSecurityPolicies { return &podSecurityPolicies{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newPodSecurityPolicies(c *ExtensionsV1beta1Client) *podSecurityPolicies { func (c *podSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Get(). + Cluster(c.cluster). Resource("podsecuritypolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *podSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (re } result = &v1beta1.PodSecurityPolicyList{} err = c.client.Get(). + Cluster(c.cluster). Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (w func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Post(). + Cluster(c.cluster). Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Body(podSecurityPolicy). @@ -123,6 +128,7 @@ func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1b func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Put(). + Cluster(c.cluster). Resource("podsecuritypolicies"). Name(podSecurityPolicy.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1b // Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. func (c *podSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("podsecuritypolicies"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.Dele timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("podsecuritypolicies"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.Dele func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("podsecuritypolicies"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *podSecurityPolicies) Apply(ctx context.Context, podSecurityPolicy *exte } result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("podsecuritypolicies"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go index 3c907a3a048f9..eb8b8ba22c7f3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go @@ -61,15 +61,17 @@ type ReplicaSetInterface interface { // replicaSets implements ReplicaSetInterface type replicaSets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newReplicaSets returns a ReplicaSets func newReplicaSets(c *ExtensionsV1beta1Client, namespace string) *replicaSets { return &replicaSets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -77,6 +79,7 @@ func newReplicaSets(c *ExtensionsV1beta1Client, namespace string) *replicaSets { func (c *replicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(name). @@ -94,6 +97,7 @@ func (c *replicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1 } result = &v1beta1.ReplicaSetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -122,6 +126,7 @@ func (c *replicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.CreateOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +140,7 @@ func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). @@ -150,6 +156,7 @@ func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). @@ -164,6 +171,7 @@ func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta1.Repl // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. func (c *replicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(name). @@ -179,6 +187,7 @@ func (c *replicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOption timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -192,6 +201,7 @@ func (c *replicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOption func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(name). @@ -219,6 +229,7 @@ func (c *replicaSets) Apply(ctx context.Context, replicaSet *extensionsv1beta1.R } result = &v1beta1.ReplicaSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(*name). @@ -248,6 +259,7 @@ func (c *replicaSets) ApplyStatus(ctx context.Context, replicaSet *extensionsv1b result = &v1beta1.ReplicaSet{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(*name). @@ -263,6 +275,7 @@ func (c *replicaSets) ApplyStatus(ctx context.Context, replicaSet *extensionsv1b func (c *replicaSets) GetScale(ctx context.Context, replicaSetName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSetName). @@ -277,6 +290,7 @@ func (c *replicaSets) GetScale(ctx context.Context, replicaSetName string, optio func (c *replicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSetName). @@ -302,6 +316,7 @@ func (c *replicaSets) ApplyScale(ctx context.Context, replicaSetName string, sca result = &v1beta1.Scale{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). Name(replicaSetName). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowcontrol_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowcontrol_client.go index c6f2d940560ad..3111bf37f72d5 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowcontrol_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowcontrol_client.go @@ -35,6 +35,7 @@ type FlowcontrolV1alpha1Interface interface { // FlowcontrolV1alpha1Client is used to interact with features provided by the flowcontrol.apiserver.k8s.io group. type FlowcontrolV1alpha1Client struct { restClient rest.Interface + cluster string } func (c *FlowcontrolV1alpha1Client) FlowSchemas() FlowSchemaInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FlowcontrolV1alpha1 if err != nil { return nil, err } - return &FlowcontrolV1alpha1Client{client}, nil + return &FlowcontrolV1alpha1Client{restClient: client}, nil } // NewForConfigOrDie creates a new FlowcontrolV1alpha1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1alpha1Client { // New creates a new FlowcontrolV1alpha1Client for the given RESTClient. func New(c rest.Interface) *FlowcontrolV1alpha1Client { - return &FlowcontrolV1alpha1Client{c} + return &FlowcontrolV1alpha1Client{restClient: c} +} + +// NewWithCluster creates a new FlowcontrolV1alpha1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *FlowcontrolV1alpha1Client { + return &FlowcontrolV1alpha1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go index 95baf825191e5..ee7d6ade1d41f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go @@ -57,13 +57,15 @@ type FlowSchemaInterface interface { // flowSchemas implements FlowSchemaInterface type flowSchemas struct { - client rest.Interface + client rest.Interface + cluster string } // newFlowSchemas returns a FlowSchemas func newFlowSchemas(c *FlowcontrolV1alpha1Client) *flowSchemas { return &flowSchemas{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newFlowSchemas(c *FlowcontrolV1alpha1Client) *flowSchemas { func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Get(). + Cluster(c.cluster). Resource("flowschemas"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1 } result = &v1alpha1.FlowSchemaList{} err = c.client.Get(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Post(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Body(flowSchema). @@ -125,6 +130,7 @@ func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchem func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Put(). + Cluster(c.cluster). Resource("flowschemas"). Name(flowSchema.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchem func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Put(). + Cluster(c.cluster). Resource("flowschemas"). Name(flowSchema.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.Flo // Delete takes name of the flowSchema and deletes it. Returns an error if one occurs. func (c *flowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("flowschemas"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *flowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOption timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *flowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOption func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("flowschemas"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *flowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1alpha1 } result = &v1alpha1.FlowSchema{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("flowschemas"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *flowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1 result = &v1alpha1.FlowSchema{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("flowschemas"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go index 327b727c1820c..7b9b91cba9534 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -57,13 +57,15 @@ type PriorityLevelConfigurationInterface interface { // priorityLevelConfigurations implements PriorityLevelConfigurationInterface type priorityLevelConfigurations struct { - client rest.Interface + client rest.Interface + cluster string } // newPriorityLevelConfigurations returns a PriorityLevelConfigurations func newPriorityLevelConfigurations(c *FlowcontrolV1alpha1Client) *priorityLevelConfigurations { return &priorityLevelConfigurations{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newPriorityLevelConfigurations(c *FlowcontrolV1alpha1Client) *priorityLevel func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Get(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOpti } result = &v1alpha1.PriorityLevelConfigurationList{} err = c.client.Get(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOpt func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Post(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Body(priorityLevelConfiguration). @@ -125,6 +130,7 @@ func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelC func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Put(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelC func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Put(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priority // Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs. func (c *priorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *priorityLevelConfigurations) Apply(ctx context.Context, priorityLevelCo } result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *priorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityL result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowcontrol_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowcontrol_client.go index c29cfca95730c..58a80de261583 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowcontrol_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowcontrol_client.go @@ -35,6 +35,7 @@ type FlowcontrolV1beta1Interface interface { // FlowcontrolV1beta1Client is used to interact with features provided by the flowcontrol.apiserver.k8s.io group. type FlowcontrolV1beta1Client struct { restClient rest.Interface + cluster string } func (c *FlowcontrolV1beta1Client) FlowSchemas() FlowSchemaInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FlowcontrolV1beta1C if err != nil { return nil, err } - return &FlowcontrolV1beta1Client{client}, nil + return &FlowcontrolV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new FlowcontrolV1beta1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1beta1Client { // New creates a new FlowcontrolV1beta1Client for the given RESTClient. func New(c rest.Interface) *FlowcontrolV1beta1Client { - return &FlowcontrolV1beta1Client{c} + return &FlowcontrolV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new FlowcontrolV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *FlowcontrolV1beta1Client { + return &FlowcontrolV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go index a9d38becf9bfd..3ba9f3a050115 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go @@ -57,13 +57,15 @@ type FlowSchemaInterface interface { // flowSchemas implements FlowSchemaInterface type flowSchemas struct { - client rest.Interface + client rest.Interface + cluster string } // newFlowSchemas returns a FlowSchemas func newFlowSchemas(c *FlowcontrolV1beta1Client) *flowSchemas { return &flowSchemas{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newFlowSchemas(c *FlowcontrolV1beta1Client) *flowSchemas { func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.FlowSchema, err error) { result = &v1beta1.FlowSchema{} err = c.client.Get(). + Cluster(c.cluster). Resource("flowschemas"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1 } result = &v1beta1.FlowSchemaList{} err = c.client.Get(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.CreateOptions) (result *v1beta1.FlowSchema, err error) { result = &v1beta1.FlowSchema{} err = c.client.Post(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Body(flowSchema). @@ -125,6 +130,7 @@ func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1beta1.FlowSchema func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.UpdateOptions) (result *v1beta1.FlowSchema, err error) { result = &v1beta1.FlowSchema{} err = c.client.Put(). + Cluster(c.cluster). Resource("flowschemas"). Name(flowSchema.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1beta1.FlowSchema func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.UpdateOptions) (result *v1beta1.FlowSchema, err error) { result = &v1beta1.FlowSchema{} err = c.client.Put(). + Cluster(c.cluster). Resource("flowschemas"). Name(flowSchema.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1beta1.Flow // Delete takes name of the flowSchema and deletes it. Returns an error if one occurs. func (c *flowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("flowschemas"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *flowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOption timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *flowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOption func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.FlowSchema, err error) { result = &v1beta1.FlowSchema{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("flowschemas"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *flowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1beta1. } result = &v1beta1.FlowSchema{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("flowschemas"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *flowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1 result = &v1beta1.FlowSchema{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("flowschemas"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go index 41f35cbccd349..36f2fa37b4346 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go @@ -57,13 +57,15 @@ type PriorityLevelConfigurationInterface interface { // priorityLevelConfigurations implements PriorityLevelConfigurationInterface type priorityLevelConfigurations struct { - client rest.Interface + client rest.Interface + cluster string } // newPriorityLevelConfigurations returns a PriorityLevelConfigurations func newPriorityLevelConfigurations(c *FlowcontrolV1beta1Client) *priorityLevelConfigurations { return &priorityLevelConfigurations{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newPriorityLevelConfigurations(c *FlowcontrolV1beta1Client) *priorityLevelC func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PriorityLevelConfiguration, err error) { result = &v1beta1.PriorityLevelConfiguration{} err = c.client.Get(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOpti } result = &v1beta1.PriorityLevelConfigurationList{} err = c.client.Get(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOpt func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1beta1.PriorityLevelConfiguration, err error) { result = &v1beta1.PriorityLevelConfiguration{} err = c.client.Post(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Body(priorityLevelConfiguration). @@ -125,6 +130,7 @@ func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelC func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1beta1.PriorityLevelConfiguration, err error) { result = &v1beta1.PriorityLevelConfiguration{} err = c.client.Put(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelC func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1beta1.PriorityLevelConfiguration, err error) { result = &v1beta1.PriorityLevelConfiguration{} err = c.client.Put(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priority // Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs. func (c *priorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityLevelConfiguration, err error) { result = &v1beta1.PriorityLevelConfiguration{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *priorityLevelConfigurations) Apply(ctx context.Context, priorityLevelCo } result = &v1beta1.PriorityLevelConfiguration{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *priorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityL result = &v1beta1.PriorityLevelConfiguration{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowcontrol_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowcontrol_client.go index f3cca4fc7536f..b24382fcdb19a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowcontrol_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowcontrol_client.go @@ -35,6 +35,7 @@ type FlowcontrolV1beta2Interface interface { // FlowcontrolV1beta2Client is used to interact with features provided by the flowcontrol.apiserver.k8s.io group. type FlowcontrolV1beta2Client struct { restClient rest.Interface + cluster string } func (c *FlowcontrolV1beta2Client) FlowSchemas() FlowSchemaInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FlowcontrolV1beta2C if err != nil { return nil, err } - return &FlowcontrolV1beta2Client{client}, nil + return &FlowcontrolV1beta2Client{restClient: client}, nil } // NewForConfigOrDie creates a new FlowcontrolV1beta2Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1beta2Client { // New creates a new FlowcontrolV1beta2Client for the given RESTClient. func New(c rest.Interface) *FlowcontrolV1beta2Client { - return &FlowcontrolV1beta2Client{c} + return &FlowcontrolV1beta2Client{restClient: c} +} + +// NewWithCluster creates a new FlowcontrolV1beta2Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *FlowcontrolV1beta2Client { + return &FlowcontrolV1beta2Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go index 3a1f12b6a28d6..8d91dadc282f0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go @@ -57,13 +57,15 @@ type FlowSchemaInterface interface { // flowSchemas implements FlowSchemaInterface type flowSchemas struct { - client rest.Interface + client rest.Interface + cluster string } // newFlowSchemas returns a FlowSchemas func newFlowSchemas(c *FlowcontrolV1beta2Client) *flowSchemas { return &flowSchemas{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newFlowSchemas(c *FlowcontrolV1beta2Client) *flowSchemas { func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.FlowSchema, err error) { result = &v1beta2.FlowSchema{} err = c.client.Get(). + Cluster(c.cluster). Resource("flowschemas"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1 } result = &v1beta2.FlowSchemaList{} err = c.client.Get(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1beta2.FlowSchema, opts v1.CreateOptions) (result *v1beta2.FlowSchema, err error) { result = &v1beta2.FlowSchema{} err = c.client.Post(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Body(flowSchema). @@ -125,6 +130,7 @@ func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1beta2.FlowSchema func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1beta2.FlowSchema, opts v1.UpdateOptions) (result *v1beta2.FlowSchema, err error) { result = &v1beta2.FlowSchema{} err = c.client.Put(). + Cluster(c.cluster). Resource("flowschemas"). Name(flowSchema.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1beta2.FlowSchema func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1beta2.FlowSchema, opts v1.UpdateOptions) (result *v1beta2.FlowSchema, err error) { result = &v1beta2.FlowSchema{} err = c.client.Put(). + Cluster(c.cluster). Resource("flowschemas"). Name(flowSchema.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1beta2.Flow // Delete takes name of the flowSchema and deletes it. Returns an error if one occurs. func (c *flowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("flowschemas"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *flowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOption timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *flowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOption func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.FlowSchema, err error) { result = &v1beta2.FlowSchema{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("flowschemas"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *flowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1beta2. } result = &v1beta2.FlowSchema{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("flowschemas"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *flowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1 result = &v1beta2.FlowSchema{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("flowschemas"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go index f028869f172d1..4906675b2898c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go @@ -57,13 +57,15 @@ type PriorityLevelConfigurationInterface interface { // priorityLevelConfigurations implements PriorityLevelConfigurationInterface type priorityLevelConfigurations struct { - client rest.Interface + client rest.Interface + cluster string } // newPriorityLevelConfigurations returns a PriorityLevelConfigurations func newPriorityLevelConfigurations(c *FlowcontrolV1beta2Client) *priorityLevelConfigurations { return &priorityLevelConfigurations{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newPriorityLevelConfigurations(c *FlowcontrolV1beta2Client) *priorityLevelC func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.PriorityLevelConfiguration, err error) { result = &v1beta2.PriorityLevelConfiguration{} err = c.client.Get(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOpti } result = &v1beta2.PriorityLevelConfigurationList{} err = c.client.Get(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOpt func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1beta2.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1beta2.PriorityLevelConfiguration, err error) { result = &v1beta2.PriorityLevelConfiguration{} err = c.client.Post(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Body(priorityLevelConfiguration). @@ -125,6 +130,7 @@ func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelC func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1beta2.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1beta2.PriorityLevelConfiguration, err error) { result = &v1beta2.PriorityLevelConfiguration{} err = c.client.Put(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelC func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1beta2.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1beta2.PriorityLevelConfiguration, err error) { result = &v1beta2.PriorityLevelConfiguration{} err = c.client.Put(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priority // Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs. func (c *priorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.PriorityLevelConfiguration, err error) { result = &v1beta2.PriorityLevelConfiguration{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *priorityLevelConfigurations) Apply(ctx context.Context, priorityLevelCo } result = &v1beta2.PriorityLevelConfiguration{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *priorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityL result = &v1beta2.PriorityLevelConfiguration{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go index 9923d6cbae133..6acba47207c91 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go @@ -57,15 +57,17 @@ type IngressInterface interface { // ingresses implements IngressInterface type ingresses struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newIngresses returns a Ingresses func newIngresses(c *NetworkingV1Client, namespace string) *ingresses { return &ingresses{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newIngresses(c *NetworkingV1Client, namespace string) *ingresses { func (c *ingresses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Ingress, err error) { result = &v1.Ingress{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(name). @@ -90,6 +93,7 @@ func (c *ingresses) List(ctx context.Context, opts metav1.ListOptions) (result * } result = &v1.IngressList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *ingresses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I func (c *ingresses) Create(ctx context.Context, ingress *v1.Ingress, opts metav1.CreateOptions) (result *v1.Ingress, err error) { result = &v1.Ingress{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *ingresses) Create(ctx context.Context, ingress *v1.Ingress, opts metav1 func (c *ingresses) Update(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (result *v1.Ingress, err error) { result = &v1.Ingress{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). @@ -146,6 +152,7 @@ func (c *ingresses) Update(ctx context.Context, ingress *v1.Ingress, opts metav1 func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (result *v1.Ingress, err error) { result = &v1.Ingress{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). @@ -160,6 +167,7 @@ func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1.Ingress, opts // Delete takes name of the ingress and deletes it. Returns an error if one occurs. func (c *ingresses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(name). @@ -175,6 +183,7 @@ func (c *ingresses) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *ingresses) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Ingress, err error) { result = &v1.Ingress{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(name). @@ -215,6 +225,7 @@ func (c *ingresses) Apply(ctx context.Context, ingress *networkingv1.IngressAppl } result = &v1.Ingress{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(*name). @@ -244,6 +255,7 @@ func (c *ingresses) ApplyStatus(ctx context.Context, ingress *networkingv1.Ingre result = &v1.Ingress{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go index 16c8e48bf0ba7..d99f83fe22d11 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go @@ -55,13 +55,15 @@ type IngressClassInterface interface { // ingressClasses implements IngressClassInterface type ingressClasses struct { - client rest.Interface + client rest.Interface + cluster string } // newIngressClasses returns a IngressClasses func newIngressClasses(c *NetworkingV1Client) *ingressClasses { return &ingressClasses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newIngressClasses(c *NetworkingV1Client) *ingressClasses { func (c *ingressClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IngressClass, err error) { result = &v1.IngressClass{} err = c.client.Get(). + Cluster(c.cluster). Resource("ingressclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *ingressClasses) List(ctx context.Context, opts metav1.ListOptions) (res } result = &v1.IngressClassList{} err = c.client.Get(). + Cluster(c.cluster). Resource("ingressclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *ingressClasses) Watch(ctx context.Context, opts metav1.ListOptions) (wa func (c *ingressClasses) Create(ctx context.Context, ingressClass *v1.IngressClass, opts metav1.CreateOptions) (result *v1.IngressClass, err error) { result = &v1.IngressClass{} err = c.client.Post(). + Cluster(c.cluster). Resource("ingressclasses"). VersionedParams(&opts, scheme.ParameterCodec). Body(ingressClass). @@ -123,6 +128,7 @@ func (c *ingressClasses) Create(ctx context.Context, ingressClass *v1.IngressCla func (c *ingressClasses) Update(ctx context.Context, ingressClass *v1.IngressClass, opts metav1.UpdateOptions) (result *v1.IngressClass, err error) { result = &v1.IngressClass{} err = c.client.Put(). + Cluster(c.cluster). Resource("ingressclasses"). Name(ingressClass.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *ingressClasses) Update(ctx context.Context, ingressClass *v1.IngressCla // Delete takes name of the ingressClass and deletes it. Returns an error if one occurs. func (c *ingressClasses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("ingressclasses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *ingressClasses) DeleteCollection(ctx context.Context, opts metav1.Delet timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("ingressclasses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *ingressClasses) DeleteCollection(ctx context.Context, opts metav1.Delet func (c *ingressClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressClass, err error) { result = &v1.IngressClass{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("ingressclasses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *ingressClasses) Apply(ctx context.Context, ingressClass *networkingv1.I } result = &v1.IngressClass{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("ingressclasses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go index 3b72a7ae92976..3568ba9eb6758 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go @@ -36,6 +36,7 @@ type NetworkingV1Interface interface { // NetworkingV1Client is used to interact with features provided by the networking.k8s.io group. type NetworkingV1Client struct { restClient rest.Interface + cluster string } func (c *NetworkingV1Client) Ingresses(namespace string) IngressInterface { @@ -76,7 +77,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NetworkingV1Client, if err != nil { return nil, err } - return &NetworkingV1Client{client}, nil + return &NetworkingV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new NetworkingV1Client for the given config and @@ -91,7 +92,12 @@ func NewForConfigOrDie(c *rest.Config) *NetworkingV1Client { // New creates a new NetworkingV1Client for the given RESTClient. func New(c rest.Interface) *NetworkingV1Client { - return &NetworkingV1Client{c} + return &NetworkingV1Client{restClient: c} +} + +// NewWithCluster creates a new NetworkingV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *NetworkingV1Client { + return &NetworkingV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go index d7454ce14525b..58f6ad58646c8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go @@ -55,15 +55,17 @@ type NetworkPolicyInterface interface { // networkPolicies implements NetworkPolicyInterface type networkPolicies struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newNetworkPolicies returns a NetworkPolicies func newNetworkPolicies(c *NetworkingV1Client, namespace string) *networkPolicies { return &networkPolicies{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newNetworkPolicies(c *NetworkingV1Client, namespace string) *networkPolicie func (c *networkPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). Name(name). @@ -88,6 +91,7 @@ func (c *networkPolicies) List(ctx context.Context, opts metav1.ListOptions) (re } result = &v1.NetworkPolicyList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *networkPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (w func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1.NetworkP func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). Name(networkPolicy.Name). @@ -142,6 +148,7 @@ func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1.NetworkP // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *networkPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). Name(name). @@ -157,6 +164,7 @@ func (c *networkPolicies) DeleteCollection(ctx context.Context, opts metav1.Dele timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *networkPolicies) DeleteCollection(ctx context.Context, opts metav1.Dele func (c *networkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). Name(name). @@ -197,6 +206,7 @@ func (c *networkPolicies) Apply(ctx context.Context, networkPolicy *networkingv1 } result = &v1.NetworkPolicy{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go index b309281afaae5..09317be029de2 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go @@ -57,15 +57,17 @@ type IngressInterface interface { // ingresses implements IngressInterface type ingresses struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newIngresses returns a Ingresses func newIngresses(c *NetworkingV1beta1Client, namespace string) *ingresses { return &ingresses{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newIngresses(c *NetworkingV1beta1Client, namespace string) *ingresses { func (c *ingresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(name). @@ -90,6 +93,7 @@ func (c *ingresses) List(ctx context.Context, opts v1.ListOptions) (result *v1be } result = &v1beta1.IngressList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *ingresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). @@ -146,6 +152,7 @@ func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). @@ -160,6 +167,7 @@ func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, // Delete takes name of the ingress and deletes it. Returns an error if one occurs. func (c *ingresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(name). @@ -175,6 +183,7 @@ func (c *ingresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *ingresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(name). @@ -215,6 +225,7 @@ func (c *ingresses) Apply(ctx context.Context, ingress *networkingv1beta1.Ingres } result = &v1beta1.Ingress{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(*name). @@ -244,6 +255,7 @@ func (c *ingresses) ApplyStatus(ctx context.Context, ingress *networkingv1beta1. result = &v1beta1.Ingress{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go index 50ccdfdbbaf72..dc62afc69f0f4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go @@ -55,13 +55,15 @@ type IngressClassInterface interface { // ingressClasses implements IngressClassInterface type ingressClasses struct { - client rest.Interface + client rest.Interface + cluster string } // newIngressClasses returns a IngressClasses func newIngressClasses(c *NetworkingV1beta1Client) *ingressClasses { return &ingressClasses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newIngressClasses(c *NetworkingV1beta1Client) *ingressClasses { func (c *ingressClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.IngressClass, err error) { result = &v1beta1.IngressClass{} err = c.client.Get(). + Cluster(c.cluster). Resource("ingressclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *ingressClasses) List(ctx context.Context, opts v1.ListOptions) (result } result = &v1beta1.IngressClassList{} err = c.client.Get(). + Cluster(c.cluster). Resource("ingressclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *ingressClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. func (c *ingressClasses) Create(ctx context.Context, ingressClass *v1beta1.IngressClass, opts v1.CreateOptions) (result *v1beta1.IngressClass, err error) { result = &v1beta1.IngressClass{} err = c.client.Post(). + Cluster(c.cluster). Resource("ingressclasses"). VersionedParams(&opts, scheme.ParameterCodec). Body(ingressClass). @@ -123,6 +128,7 @@ func (c *ingressClasses) Create(ctx context.Context, ingressClass *v1beta1.Ingre func (c *ingressClasses) Update(ctx context.Context, ingressClass *v1beta1.IngressClass, opts v1.UpdateOptions) (result *v1beta1.IngressClass, err error) { result = &v1beta1.IngressClass{} err = c.client.Put(). + Cluster(c.cluster). Resource("ingressclasses"). Name(ingressClass.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *ingressClasses) Update(ctx context.Context, ingressClass *v1beta1.Ingre // Delete takes name of the ingressClass and deletes it. Returns an error if one occurs. func (c *ingressClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("ingressclasses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *ingressClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOpt timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("ingressclasses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *ingressClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOpt func (c *ingressClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.IngressClass, err error) { result = &v1beta1.IngressClass{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("ingressclasses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *ingressClasses) Apply(ctx context.Context, ingressClass *networkingv1be } result = &v1beta1.IngressClass{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("ingressclasses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go index 851634ed0f9a1..8701e443f6e23 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go @@ -35,6 +35,7 @@ type NetworkingV1beta1Interface interface { // NetworkingV1beta1Client is used to interact with features provided by the networking.k8s.io group. type NetworkingV1beta1Client struct { restClient rest.Interface + cluster string } func (c *NetworkingV1beta1Client) Ingresses(namespace string) IngressInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NetworkingV1beta1Cl if err != nil { return nil, err } - return &NetworkingV1beta1Client{client}, nil + return &NetworkingV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new NetworkingV1beta1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *NetworkingV1beta1Client { // New creates a new NetworkingV1beta1Client for the given RESTClient. func New(c rest.Interface) *NetworkingV1beta1Client { - return &NetworkingV1beta1Client{c} + return &NetworkingV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new NetworkingV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *NetworkingV1beta1Client { + return &NetworkingV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/node_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/node_client.go index 844f9fc70fefa..b0cd7a8721b5d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/node_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/node_client.go @@ -34,6 +34,7 @@ type NodeV1Interface interface { // NodeV1Client is used to interact with features provided by the node.k8s.io group. type NodeV1Client struct { restClient rest.Interface + cluster string } func (c *NodeV1Client) RuntimeClasses() RuntimeClassInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NodeV1Client, error if err != nil { return nil, err } - return &NodeV1Client{client}, nil + return &NodeV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new NodeV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *NodeV1Client { // New creates a new NodeV1Client for the given RESTClient. func New(c rest.Interface) *NodeV1Client { - return &NodeV1Client{c} + return &NodeV1Client{restClient: c} +} + +// NewWithCluster creates a new NodeV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *NodeV1Client { + return &NodeV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go index 5ec38b203e3d4..6172d1c4c1f51 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go @@ -55,13 +55,15 @@ type RuntimeClassInterface interface { // runtimeClasses implements RuntimeClassInterface type runtimeClasses struct { - client rest.Interface + client rest.Interface + cluster string } // newRuntimeClasses returns a RuntimeClasses func newRuntimeClasses(c *NodeV1Client) *runtimeClasses { return &runtimeClasses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newRuntimeClasses(c *NodeV1Client) *runtimeClasses { func (c *runtimeClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.RuntimeClass, err error) { result = &v1.RuntimeClass{} err = c.client.Get(). + Cluster(c.cluster). Resource("runtimeclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *runtimeClasses) List(ctx context.Context, opts metav1.ListOptions) (res } result = &v1.RuntimeClassList{} err = c.client.Get(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *runtimeClasses) Watch(ctx context.Context, opts metav1.ListOptions) (wa func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1.RuntimeClass, opts metav1.CreateOptions) (result *v1.RuntimeClass, err error) { result = &v1.RuntimeClass{} err = c.client.Post(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). @@ -123,6 +128,7 @@ func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1.RuntimeCla func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1.RuntimeClass, opts metav1.UpdateOptions) (result *v1.RuntimeClass, err error) { result = &v1.RuntimeClass{} err = c.client.Put(). + Cluster(c.cluster). Resource("runtimeclasses"). Name(runtimeClass.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1.RuntimeCla // Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs. func (c *runtimeClasses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("runtimeclasses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *runtimeClasses) DeleteCollection(ctx context.Context, opts metav1.Delet timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *runtimeClasses) DeleteCollection(ctx context.Context, opts metav1.Delet func (c *runtimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RuntimeClass, err error) { result = &v1.RuntimeClass{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("runtimeclasses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *runtimeClasses) Apply(ctx context.Context, runtimeClass *nodev1.Runtime } result = &v1.RuntimeClass{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("runtimeclasses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/node_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/node_client.go index 2a197d58e6475..110b5f611a6df 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/node_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/node_client.go @@ -34,6 +34,7 @@ type NodeV1alpha1Interface interface { // NodeV1alpha1Client is used to interact with features provided by the node.k8s.io group. type NodeV1alpha1Client struct { restClient rest.Interface + cluster string } func (c *NodeV1alpha1Client) RuntimeClasses() RuntimeClassInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NodeV1alpha1Client, if err != nil { return nil, err } - return &NodeV1alpha1Client{client}, nil + return &NodeV1alpha1Client{restClient: client}, nil } // NewForConfigOrDie creates a new NodeV1alpha1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *NodeV1alpha1Client { // New creates a new NodeV1alpha1Client for the given RESTClient. func New(c rest.Interface) *NodeV1alpha1Client { - return &NodeV1alpha1Client{c} + return &NodeV1alpha1Client{restClient: c} +} + +// NewWithCluster creates a new NodeV1alpha1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *NodeV1alpha1Client { + return &NodeV1alpha1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go index 039a7ace15902..3854f57452a94 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go @@ -55,13 +55,15 @@ type RuntimeClassInterface interface { // runtimeClasses implements RuntimeClassInterface type runtimeClasses struct { - client rest.Interface + client rest.Interface + cluster string } // newRuntimeClasses returns a RuntimeClasses func newRuntimeClasses(c *NodeV1alpha1Client) *runtimeClasses { return &runtimeClasses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newRuntimeClasses(c *NodeV1alpha1Client) *runtimeClasses { func (c *runtimeClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Get(). + Cluster(c.cluster). Resource("runtimeclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *runtimeClasses) List(ctx context.Context, opts v1.ListOptions) (result } result = &v1alpha1.RuntimeClassList{} err = c.client.Get(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *runtimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.CreateOptions) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Post(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). @@ -123,6 +128,7 @@ func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1.Runt func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.UpdateOptions) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Put(). + Cluster(c.cluster). Resource("runtimeclasses"). Name(runtimeClass.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1alpha1.Runt // Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs. func (c *runtimeClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("runtimeclasses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *runtimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOpt timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *runtimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOpt func (c *runtimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("runtimeclasses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *runtimeClasses) Apply(ctx context.Context, runtimeClass *nodev1alpha1.R } result = &v1alpha1.RuntimeClass{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("runtimeclasses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/node_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/node_client.go index 4f6802ffaca56..066d851afaf02 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/node_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/node_client.go @@ -34,6 +34,7 @@ type NodeV1beta1Interface interface { // NodeV1beta1Client is used to interact with features provided by the node.k8s.io group. type NodeV1beta1Client struct { restClient rest.Interface + cluster string } func (c *NodeV1beta1Client) RuntimeClasses() RuntimeClassInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NodeV1beta1Client, if err != nil { return nil, err } - return &NodeV1beta1Client{client}, nil + return &NodeV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new NodeV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *NodeV1beta1Client { // New creates a new NodeV1beta1Client for the given RESTClient. func New(c rest.Interface) *NodeV1beta1Client { - return &NodeV1beta1Client{c} + return &NodeV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new NodeV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *NodeV1beta1Client { + return &NodeV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go index f8990adf1ee44..2091a82051845 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go @@ -55,13 +55,15 @@ type RuntimeClassInterface interface { // runtimeClasses implements RuntimeClassInterface type runtimeClasses struct { - client rest.Interface + client rest.Interface + cluster string } // newRuntimeClasses returns a RuntimeClasses func newRuntimeClasses(c *NodeV1beta1Client) *runtimeClasses { return &runtimeClasses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newRuntimeClasses(c *NodeV1beta1Client) *runtimeClasses { func (c *runtimeClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Get(). + Cluster(c.cluster). Resource("runtimeclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *runtimeClasses) List(ctx context.Context, opts v1.ListOptions) (result } result = &v1beta1.RuntimeClassList{} err = c.client.Get(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *runtimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.CreateOptions) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Post(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). @@ -123,6 +128,7 @@ func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.Runti func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.UpdateOptions) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Put(). + Cluster(c.cluster). Resource("runtimeclasses"). Name(runtimeClass.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1beta1.Runti // Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs. func (c *runtimeClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("runtimeclasses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *runtimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOpt timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *runtimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOpt func (c *runtimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("runtimeclasses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *runtimeClasses) Apply(ctx context.Context, runtimeClass *nodev1beta1.Ru } result = &v1beta1.RuntimeClass{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("runtimeclasses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/eviction.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/eviction.go index cd1aac9c29a33..0748ddcbfcec7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/eviction.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/eviction.go @@ -35,14 +35,16 @@ type EvictionInterface interface { // evictions implements EvictionInterface type evictions struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newEvictions returns a Evictions func newEvictions(c *PolicyV1Client, namespace string) *evictions { return &evictions{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go index 58db3acf9ec69..f41c423c56f2d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go @@ -57,15 +57,17 @@ type PodDisruptionBudgetInterface interface { // podDisruptionBudgets implements PodDisruptionBudgetInterface type podDisruptionBudgets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newPodDisruptionBudgets returns a PodDisruptionBudgets func newPodDisruptionBudgets(c *PolicyV1Client, namespace string) *podDisruptionBudgets { return &podDisruptionBudgets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newPodDisruptionBudgets(c *PolicyV1Client, namespace string) *podDisruption func (c *podDisruptionBudgets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PodDisruptionBudget, err error) { result = &v1.PodDisruptionBudget{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(name). @@ -90,6 +93,7 @@ func (c *podDisruptionBudgets) List(ctx context.Context, opts metav1.ListOptions } result = &v1.PodDisruptionBudgetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *podDisruptionBudgets) Watch(ctx context.Context, opts metav1.ListOption func (c *podDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget *v1.PodDisruptionBudget, opts metav1.CreateOptions) (result *v1.PodDisruptionBudget, err error) { result = &v1.PodDisruptionBudget{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *podDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget * func (c *podDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget *v1.PodDisruptionBudget, opts metav1.UpdateOptions) (result *v1.PodDisruptionBudget, err error) { result = &v1.PodDisruptionBudget{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(podDisruptionBudget.Name). @@ -146,6 +152,7 @@ func (c *podDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget * func (c *podDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBudget *v1.PodDisruptionBudget, opts metav1.UpdateOptions) (result *v1.PodDisruptionBudget, err error) { result = &v1.PodDisruptionBudget{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(podDisruptionBudget.Name). @@ -160,6 +167,7 @@ func (c *podDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBu // Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. func (c *podDisruptionBudgets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(name). @@ -175,6 +183,7 @@ func (c *podDisruptionBudgets) DeleteCollection(ctx context.Context, opts metav1 timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *podDisruptionBudgets) DeleteCollection(ctx context.Context, opts metav1 func (c *podDisruptionBudgets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PodDisruptionBudget, err error) { result = &v1.PodDisruptionBudget{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(name). @@ -215,6 +225,7 @@ func (c *podDisruptionBudgets) Apply(ctx context.Context, podDisruptionBudget *p } result = &v1.PodDisruptionBudget{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(*name). @@ -244,6 +255,7 @@ func (c *podDisruptionBudgets) ApplyStatus(ctx context.Context, podDisruptionBud result = &v1.PodDisruptionBudget{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/policy_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/policy_client.go index 9bfd98aa9f3d0..1528bffdb9de0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/policy_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/policy_client.go @@ -35,6 +35,7 @@ type PolicyV1Interface interface { // PolicyV1Client is used to interact with features provided by the policy group. type PolicyV1Client struct { restClient rest.Interface + cluster string } func (c *PolicyV1Client) Evictions(namespace string) EvictionInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PolicyV1Client, err if err != nil { return nil, err } - return &PolicyV1Client{client}, nil + return &PolicyV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new PolicyV1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *PolicyV1Client { // New creates a new PolicyV1Client for the given RESTClient. func New(c rest.Interface) *PolicyV1Client { - return &PolicyV1Client{c} + return &PolicyV1Client{restClient: c} +} + +// NewWithCluster creates a new PolicyV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *PolicyV1Client { + return &PolicyV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go index 12e8e76edc279..0fe763f7f4609 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go @@ -35,14 +35,16 @@ type EvictionInterface interface { // evictions implements EvictionInterface type evictions struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newEvictions returns a Evictions func newEvictions(c *PolicyV1beta1Client, namespace string) *evictions { return &evictions{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go index 1687289921338..0fea923f4a0d2 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go @@ -57,15 +57,17 @@ type PodDisruptionBudgetInterface interface { // podDisruptionBudgets implements PodDisruptionBudgetInterface type podDisruptionBudgets struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newPodDisruptionBudgets returns a PodDisruptionBudgets func newPodDisruptionBudgets(c *PolicyV1beta1Client, namespace string) *podDisruptionBudgets { return &podDisruptionBudgets{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -73,6 +75,7 @@ func newPodDisruptionBudgets(c *PolicyV1beta1Client, namespace string) *podDisru func (c *podDisruptionBudgets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(name). @@ -90,6 +93,7 @@ func (c *podDisruptionBudgets) List(ctx context.Context, opts v1.ListOptions) (r } result = &v1beta1.PodDisruptionBudgetList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -118,6 +122,7 @@ func (c *podDisruptionBudgets) Watch(ctx context.Context, opts v1.ListOptions) ( func (c *podDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.CreateOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +136,7 @@ func (c *podDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget * func (c *podDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(podDisruptionBudget.Name). @@ -146,6 +152,7 @@ func (c *podDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget * func (c *podDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(podDisruptionBudget.Name). @@ -160,6 +167,7 @@ func (c *podDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBu // Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. func (c *podDisruptionBudgets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(name). @@ -175,6 +183,7 @@ func (c *podDisruptionBudgets) DeleteCollection(ctx context.Context, opts v1.Del timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -188,6 +197,7 @@ func (c *podDisruptionBudgets) DeleteCollection(ctx context.Context, opts v1.Del func (c *podDisruptionBudgets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(name). @@ -215,6 +225,7 @@ func (c *podDisruptionBudgets) Apply(ctx context.Context, podDisruptionBudget *p } result = &v1beta1.PodDisruptionBudget{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(*name). @@ -244,6 +255,7 @@ func (c *podDisruptionBudgets) ApplyStatus(ctx context.Context, podDisruptionBud result = &v1beta1.PodDisruptionBudget{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go index 944b61de47fd6..dfd4bd7f3f881 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go @@ -55,13 +55,15 @@ type PodSecurityPolicyInterface interface { // podSecurityPolicies implements PodSecurityPolicyInterface type podSecurityPolicies struct { - client rest.Interface + client rest.Interface + cluster string } // newPodSecurityPolicies returns a PodSecurityPolicies func newPodSecurityPolicies(c *PolicyV1beta1Client) *podSecurityPolicies { return &podSecurityPolicies{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newPodSecurityPolicies(c *PolicyV1beta1Client) *podSecurityPolicies { func (c *podSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Get(). + Cluster(c.cluster). Resource("podsecuritypolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *podSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (re } result = &v1beta1.PodSecurityPolicyList{} err = c.client.Get(). + Cluster(c.cluster). Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (w func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Post(). + Cluster(c.cluster). Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Body(podSecurityPolicy). @@ -123,6 +128,7 @@ func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1b func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Put(). + Cluster(c.cluster). Resource("podsecuritypolicies"). Name(podSecurityPolicy.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1b // Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. func (c *podSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("podsecuritypolicies"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.Dele timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("podsecuritypolicies"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.Dele func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("podsecuritypolicies"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *podSecurityPolicies) Apply(ctx context.Context, podSecurityPolicy *poli } result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("podsecuritypolicies"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go index 5b65c9c0aa1f0..bc223e399cf52 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go @@ -36,6 +36,7 @@ type PolicyV1beta1Interface interface { // PolicyV1beta1Client is used to interact with features provided by the policy group. type PolicyV1beta1Client struct { restClient rest.Interface + cluster string } func (c *PolicyV1beta1Client) Evictions(namespace string) EvictionInterface { @@ -76,7 +77,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PolicyV1beta1Client if err != nil { return nil, err } - return &PolicyV1beta1Client{client}, nil + return &PolicyV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new PolicyV1beta1Client for the given config and @@ -91,7 +92,12 @@ func NewForConfigOrDie(c *rest.Config) *PolicyV1beta1Client { // New creates a new PolicyV1beta1Client for the given RESTClient. func New(c rest.Interface) *PolicyV1beta1Client { - return &PolicyV1beta1Client{c} + return &PolicyV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new PolicyV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *PolicyV1beta1Client { + return &PolicyV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go index 000d737f0ff22..b3c5b5de76589 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go @@ -55,13 +55,15 @@ type ClusterRoleInterface interface { // clusterRoles implements ClusterRoleInterface type clusterRoles struct { - client rest.Interface + client rest.Interface + cluster string } // newClusterRoles returns a ClusterRoles func newClusterRoles(c *RbacV1Client) *clusterRoles { return &clusterRoles{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newClusterRoles(c *RbacV1Client) *clusterRoles { func (c *clusterRoles) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterroles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *clusterRoles) List(ctx context.Context, opts metav1.ListOptions) (resul } result = &v1.ClusterRoleList{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *clusterRoles) Watch(ctx context.Context, opts metav1.ListOptions) (watc func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.CreateOptions) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Post(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). @@ -123,6 +128,7 @@ func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1.ClusterRole, func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.UpdateOptions) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Put(). + Cluster(c.cluster). Resource("clusterroles"). Name(clusterRole.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1.ClusterRole, // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. func (c *clusterRoles) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("clusterroles"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *clusterRoles) DeleteCollection(ctx context.Context, opts metav1.DeleteO timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *clusterRoles) DeleteCollection(ctx context.Context, opts metav1.DeleteO func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("clusterroles"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *clusterRoles) Apply(ctx context.Context, clusterRole *rbacv1.ClusterRol } result = &v1.ClusterRole{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("clusterroles"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go index 31db43d984800..f3427314e875d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go @@ -55,13 +55,15 @@ type ClusterRoleBindingInterface interface { // clusterRoleBindings implements ClusterRoleBindingInterface type clusterRoleBindings struct { - client rest.Interface + client rest.Interface + cluster string } // newClusterRoleBindings returns a ClusterRoleBindings func newClusterRoleBindings(c *RbacV1Client) *clusterRoleBindings { return &clusterRoleBindings{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newClusterRoleBindings(c *RbacV1Client) *clusterRoleBindings { func (c *clusterRoleBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *clusterRoleBindings) List(ctx context.Context, opts metav1.ListOptions) } result = &v1.ClusterRoleBindingList{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *clusterRoleBindings) Watch(ctx context.Context, opts metav1.ListOptions func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.CreateOptions) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Post(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). @@ -123,6 +128,7 @@ func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1 func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.UpdateOptions) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Put(). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1 // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. func (c *clusterRoleBindings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, opts metav1. timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, opts metav1. func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *clusterRoleBindings) Apply(ctx context.Context, clusterRoleBinding *rba } result = &v1.ClusterRoleBinding{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go index a02f0357d947d..1fe541b98177a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go @@ -37,6 +37,7 @@ type RbacV1Interface interface { // RbacV1Client is used to interact with features provided by the rbac.authorization.k8s.io group. type RbacV1Client struct { restClient rest.Interface + cluster string } func (c *RbacV1Client) ClusterRoles() ClusterRoleInterface { @@ -81,7 +82,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*RbacV1Client, error if err != nil { return nil, err } - return &RbacV1Client{client}, nil + return &RbacV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new RbacV1Client for the given config and @@ -96,7 +97,12 @@ func NewForConfigOrDie(c *rest.Config) *RbacV1Client { // New creates a new RbacV1Client for the given RESTClient. func New(c rest.Interface) *RbacV1Client { - return &RbacV1Client{c} + return &RbacV1Client{restClient: c} +} + +// NewWithCluster creates a new RbacV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *RbacV1Client { + return &RbacV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go index 93810a3ffaad0..f0535e979e68c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go @@ -55,15 +55,17 @@ type RoleInterface interface { // roles implements RoleInterface type roles struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newRoles returns a Roles func newRoles(c *RbacV1Client, namespace string) *roles { return &roles{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newRoles(c *RbacV1Client, namespace string) *roles { func (c *roles) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(name). @@ -88,6 +91,7 @@ func (c *roles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.R } result = &v1.RoleList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *roles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inter func (c *roles) Create(ctx context.Context, role *v1.Role, opts metav1.CreateOptions) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *roles) Create(ctx context.Context, role *v1.Role, opts metav1.CreateOpt func (c *roles) Update(ctx context.Context, role *v1.Role, opts metav1.UpdateOptions) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(role.Name). @@ -142,6 +148,7 @@ func (c *roles) Update(ctx context.Context, role *v1.Role, opts metav1.UpdateOpt // Delete takes name of the role and deletes it. Returns an error if one occurs. func (c *roles) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(name). @@ -157,6 +164,7 @@ func (c *roles) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *roles) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(name). @@ -197,6 +206,7 @@ func (c *roles) Apply(ctx context.Context, role *rbacv1.RoleApplyConfiguration, } result = &v1.Role{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go index 2ace938604903..f1468955f177d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go @@ -55,15 +55,17 @@ type RoleBindingInterface interface { // roleBindings implements RoleBindingInterface type roleBindings struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newRoleBindings returns a RoleBindings func newRoleBindings(c *RbacV1Client, namespace string) *roleBindings { return &roleBindings{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newRoleBindings(c *RbacV1Client, namespace string) *roleBindings { func (c *roleBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(name). @@ -88,6 +91,7 @@ func (c *roleBindings) List(ctx context.Context, opts metav1.ListOptions) (resul } result = &v1.RoleBindingList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *roleBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watc func (c *roleBindings) Create(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.CreateOptions) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *roleBindings) Create(ctx context.Context, roleBinding *v1.RoleBinding, func (c *roleBindings) Update(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.UpdateOptions) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(roleBinding.Name). @@ -142,6 +148,7 @@ func (c *roleBindings) Update(ctx context.Context, roleBinding *v1.RoleBinding, // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. func (c *roleBindings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(name). @@ -157,6 +164,7 @@ func (c *roleBindings) DeleteCollection(ctx context.Context, opts metav1.DeleteO timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *roleBindings) DeleteCollection(ctx context.Context, opts metav1.DeleteO func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(name). @@ -197,6 +206,7 @@ func (c *roleBindings) Apply(ctx context.Context, roleBinding *rbacv1.RoleBindin } result = &v1.RoleBinding{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go index d6d30e99ef86a..6af02d7ca425f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go @@ -55,13 +55,15 @@ type ClusterRoleInterface interface { // clusterRoles implements ClusterRoleInterface type clusterRoles struct { - client rest.Interface + client rest.Interface + cluster string } // newClusterRoles returns a ClusterRoles func newClusterRoles(c *RbacV1alpha1Client) *clusterRoles { return &clusterRoles{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newClusterRoles(c *RbacV1alpha1Client) *clusterRoles { func (c *clusterRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterroles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *clusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *v } result = &v1alpha1.ClusterRoleList{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *clusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.In func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.CreateOptions) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Post(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). @@ -123,6 +128,7 @@ func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1alpha1.Cluster func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.UpdateOptions) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Put(). + Cluster(c.cluster). Resource("clusterroles"). Name(clusterRole.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1alpha1.Cluster // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. func (c *clusterRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("clusterroles"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *clusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptio timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *clusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptio func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("clusterroles"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *clusterRoles) Apply(ctx context.Context, clusterRole *rbacv1alpha1.Clus } result = &v1alpha1.ClusterRole{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("clusterroles"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go index 2eded92ac2b2e..cf3365b5c0e8c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go @@ -55,13 +55,15 @@ type ClusterRoleBindingInterface interface { // clusterRoleBindings implements ClusterRoleBindingInterface type clusterRoleBindings struct { - client rest.Interface + client rest.Interface + cluster string } // newClusterRoleBindings returns a ClusterRoleBindings func newClusterRoleBindings(c *RbacV1alpha1Client) *clusterRoleBindings { return &clusterRoleBindings{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newClusterRoleBindings(c *RbacV1alpha1Client) *clusterRoleBindings { func (c *clusterRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *clusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (re } result = &v1alpha1.ClusterRoleBindingList{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *clusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (w func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Post(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). @@ -123,6 +128,7 @@ func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1 func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Put(). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1 // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. func (c *clusterRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.Dele timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.Dele func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *clusterRoleBindings) Apply(ctx context.Context, clusterRoleBinding *rba } result = &v1alpha1.ClusterRoleBinding{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go index cc5b309e909d4..083c5ba8ee3a4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go @@ -37,6 +37,7 @@ type RbacV1alpha1Interface interface { // RbacV1alpha1Client is used to interact with features provided by the rbac.authorization.k8s.io group. type RbacV1alpha1Client struct { restClient rest.Interface + cluster string } func (c *RbacV1alpha1Client) ClusterRoles() ClusterRoleInterface { @@ -81,7 +82,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*RbacV1alpha1Client, if err != nil { return nil, err } - return &RbacV1alpha1Client{client}, nil + return &RbacV1alpha1Client{restClient: client}, nil } // NewForConfigOrDie creates a new RbacV1alpha1Client for the given config and @@ -96,7 +97,12 @@ func NewForConfigOrDie(c *rest.Config) *RbacV1alpha1Client { // New creates a new RbacV1alpha1Client for the given RESTClient. func New(c rest.Interface) *RbacV1alpha1Client { - return &RbacV1alpha1Client{c} + return &RbacV1alpha1Client{restClient: c} +} + +// NewWithCluster creates a new RbacV1alpha1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *RbacV1alpha1Client { + return &RbacV1alpha1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go index 43c16fde74f62..f15537621d369 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go @@ -55,15 +55,17 @@ type RoleInterface interface { // roles implements RoleInterface type roles struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newRoles returns a Roles func newRoles(c *RbacV1alpha1Client, namespace string) *roles { return &roles{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newRoles(c *RbacV1alpha1Client, namespace string) *roles { func (c *roles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(name). @@ -88,6 +91,7 @@ func (c *roles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1 } result = &v1alpha1.RoleList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *roles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface func (c *roles) Create(ctx context.Context, role *v1alpha1.Role, opts v1.CreateOptions) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *roles) Create(ctx context.Context, role *v1alpha1.Role, opts v1.CreateO func (c *roles) Update(ctx context.Context, role *v1alpha1.Role, opts v1.UpdateOptions) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(role.Name). @@ -142,6 +148,7 @@ func (c *roles) Update(ctx context.Context, role *v1alpha1.Role, opts v1.UpdateO // Delete takes name of the role and deletes it. Returns an error if one occurs. func (c *roles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(name). @@ -157,6 +164,7 @@ func (c *roles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, lis timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *roles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, lis func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(name). @@ -197,6 +206,7 @@ func (c *roles) Apply(ctx context.Context, role *rbacv1alpha1.RoleApplyConfigura } result = &v1alpha1.Role{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go index 3129c9b4e8a6d..ec85f52f2a91d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go @@ -55,15 +55,17 @@ type RoleBindingInterface interface { // roleBindings implements RoleBindingInterface type roleBindings struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newRoleBindings returns a RoleBindings func newRoleBindings(c *RbacV1alpha1Client, namespace string) *roleBindings { return &roleBindings{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newRoleBindings(c *RbacV1alpha1Client, namespace string) *roleBindings { func (c *roleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(name). @@ -88,6 +91,7 @@ func (c *roleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v } result = &v1alpha1.RoleBindingList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *roleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.In func (c *roleBindings) Create(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.CreateOptions) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *roleBindings) Create(ctx context.Context, roleBinding *v1alpha1.RoleBin func (c *roleBindings) Update(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.UpdateOptions) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(roleBinding.Name). @@ -142,6 +148,7 @@ func (c *roleBindings) Update(ctx context.Context, roleBinding *v1alpha1.RoleBin // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. func (c *roleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(name). @@ -157,6 +164,7 @@ func (c *roleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptio timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *roleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptio func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(name). @@ -197,6 +206,7 @@ func (c *roleBindings) Apply(ctx context.Context, roleBinding *rbacv1alpha1.Role } result = &v1alpha1.RoleBinding{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go index a3d67f0315e0e..230d7ca3740ac 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go @@ -55,13 +55,15 @@ type ClusterRoleInterface interface { // clusterRoles implements ClusterRoleInterface type clusterRoles struct { - client rest.Interface + client rest.Interface + cluster string } // newClusterRoles returns a ClusterRoles func newClusterRoles(c *RbacV1beta1Client) *clusterRoles { return &clusterRoles{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newClusterRoles(c *RbacV1beta1Client) *clusterRoles { func (c *clusterRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterroles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *clusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *v } result = &v1beta1.ClusterRoleList{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *clusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.In func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.CreateOptions) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Post(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). @@ -123,6 +128,7 @@ func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1beta1.ClusterR func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.UpdateOptions) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Put(). + Cluster(c.cluster). Resource("clusterroles"). Name(clusterRole.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1beta1.ClusterR // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. func (c *clusterRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("clusterroles"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *clusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptio timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *clusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptio func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("clusterroles"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *clusterRoles) Apply(ctx context.Context, clusterRole *rbacv1beta1.Clust } result = &v1beta1.ClusterRole{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("clusterroles"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go index ae39cbb9ae6a7..a7cd7280ca9f9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go @@ -55,13 +55,15 @@ type ClusterRoleBindingInterface interface { // clusterRoleBindings implements ClusterRoleBindingInterface type clusterRoleBindings struct { - client rest.Interface + client rest.Interface + cluster string } // newClusterRoleBindings returns a ClusterRoleBindings func newClusterRoleBindings(c *RbacV1beta1Client) *clusterRoleBindings { return &clusterRoleBindings{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newClusterRoleBindings(c *RbacV1beta1Client) *clusterRoleBindings { func (c *clusterRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *clusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (re } result = &v1beta1.ClusterRoleBindingList{} err = c.client.Get(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *clusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (w func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Post(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). @@ -123,6 +128,7 @@ func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1 func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Put(). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1 // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. func (c *clusterRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.Dele timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.Dele func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *clusterRoleBindings) Apply(ctx context.Context, clusterRoleBinding *rba } result = &v1beta1.ClusterRoleBinding{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("clusterrolebindings"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go index 8dac5c1d4bae9..3182280113bed 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go @@ -37,6 +37,7 @@ type RbacV1beta1Interface interface { // RbacV1beta1Client is used to interact with features provided by the rbac.authorization.k8s.io group. type RbacV1beta1Client struct { restClient rest.Interface + cluster string } func (c *RbacV1beta1Client) ClusterRoles() ClusterRoleInterface { @@ -81,7 +82,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*RbacV1beta1Client, if err != nil { return nil, err } - return &RbacV1beta1Client{client}, nil + return &RbacV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new RbacV1beta1Client for the given config and @@ -96,7 +97,12 @@ func NewForConfigOrDie(c *rest.Config) *RbacV1beta1Client { // New creates a new RbacV1beta1Client for the given RESTClient. func New(c rest.Interface) *RbacV1beta1Client { - return &RbacV1beta1Client{c} + return &RbacV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new RbacV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *RbacV1beta1Client { + return &RbacV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go index e789e42fe76aa..8a027775b6769 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go @@ -55,15 +55,17 @@ type RoleInterface interface { // roles implements RoleInterface type roles struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newRoles returns a Roles func newRoles(c *RbacV1beta1Client, namespace string) *roles { return &roles{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newRoles(c *RbacV1beta1Client, namespace string) *roles { func (c *roles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(name). @@ -88,6 +91,7 @@ func (c *roles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1. } result = &v1beta1.RoleList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *roles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface func (c *roles) Create(ctx context.Context, role *v1beta1.Role, opts v1.CreateOptions) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *roles) Create(ctx context.Context, role *v1beta1.Role, opts v1.CreateOp func (c *roles) Update(ctx context.Context, role *v1beta1.Role, opts v1.UpdateOptions) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(role.Name). @@ -142,6 +148,7 @@ func (c *roles) Update(ctx context.Context, role *v1beta1.Role, opts v1.UpdateOp // Delete takes name of the role and deletes it. Returns an error if one occurs. func (c *roles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(name). @@ -157,6 +164,7 @@ func (c *roles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, lis timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *roles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, lis func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(name). @@ -197,6 +206,7 @@ func (c *roles) Apply(ctx context.Context, role *rbacv1beta1.RoleApplyConfigurat } result = &v1beta1.Role{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go index 1461ba3b6ebb6..d99c7a5804042 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go @@ -55,15 +55,17 @@ type RoleBindingInterface interface { // roleBindings implements RoleBindingInterface type roleBindings struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newRoleBindings returns a RoleBindings func newRoleBindings(c *RbacV1beta1Client, namespace string) *roleBindings { return &roleBindings{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newRoleBindings(c *RbacV1beta1Client, namespace string) *roleBindings { func (c *roleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(name). @@ -88,6 +91,7 @@ func (c *roleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v } result = &v1beta1.RoleBindingList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *roleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.In func (c *roleBindings) Create(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.CreateOptions) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *roleBindings) Create(ctx context.Context, roleBinding *v1beta1.RoleBind func (c *roleBindings) Update(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.UpdateOptions) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(roleBinding.Name). @@ -142,6 +148,7 @@ func (c *roleBindings) Update(ctx context.Context, roleBinding *v1beta1.RoleBind // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. func (c *roleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(name). @@ -157,6 +164,7 @@ func (c *roleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptio timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *roleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptio func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(name). @@ -197,6 +206,7 @@ func (c *roleBindings) Apply(ctx context.Context, roleBinding *rbacv1beta1.RoleB } result = &v1beta1.RoleBinding{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go index c68ec5da414d4..ed05337588fa2 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go @@ -55,13 +55,15 @@ type PriorityClassInterface interface { // priorityClasses implements PriorityClassInterface type priorityClasses struct { - client rest.Interface + client rest.Interface + cluster string } // newPriorityClasses returns a PriorityClasses func newPriorityClasses(c *SchedulingV1Client) *priorityClasses { return &priorityClasses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newPriorityClasses(c *SchedulingV1Client) *priorityClasses { func (c *priorityClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Get(). + Cluster(c.cluster). Resource("priorityclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *priorityClasses) List(ctx context.Context, opts metav1.ListOptions) (re } result = &v1.PriorityClassList{} err = c.client.Get(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *priorityClasses) Watch(ctx context.Context, opts metav1.ListOptions) (w func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1.PriorityClass, opts metav1.CreateOptions) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Post(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). @@ -123,6 +128,7 @@ func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1.Priority func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1.PriorityClass, opts metav1.UpdateOptions) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Put(). + Cluster(c.cluster). Resource("priorityclasses"). Name(priorityClass.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1.Priority // Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. func (c *priorityClasses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("priorityclasses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *priorityClasses) DeleteCollection(ctx context.Context, opts metav1.Dele timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *priorityClasses) DeleteCollection(ctx context.Context, opts metav1.Dele func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("priorityclasses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *priorityClasses) Apply(ctx context.Context, priorityClass *schedulingv1 } result = &v1.PriorityClass{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("priorityclasses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/scheduling_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/scheduling_client.go index 11fc4b9f39f49..19a1daf352662 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/scheduling_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/scheduling_client.go @@ -34,6 +34,7 @@ type SchedulingV1Interface interface { // SchedulingV1Client is used to interact with features provided by the scheduling.k8s.io group. type SchedulingV1Client struct { restClient rest.Interface + cluster string } func (c *SchedulingV1Client) PriorityClasses() PriorityClassInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SchedulingV1Client, if err != nil { return nil, err } - return &SchedulingV1Client{client}, nil + return &SchedulingV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new SchedulingV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *SchedulingV1Client { // New creates a new SchedulingV1Client for the given RESTClient. func New(c rest.Interface) *SchedulingV1Client { - return &SchedulingV1Client{c} + return &SchedulingV1Client{restClient: c} +} + +// NewWithCluster creates a new SchedulingV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *SchedulingV1Client { + return &SchedulingV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go index a9b8c19c78a03..5d72c0f03d0f4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go @@ -55,13 +55,15 @@ type PriorityClassInterface interface { // priorityClasses implements PriorityClassInterface type priorityClasses struct { - client rest.Interface + client rest.Interface + cluster string } // newPriorityClasses returns a PriorityClasses func newPriorityClasses(c *SchedulingV1alpha1Client) *priorityClasses { return &priorityClasses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newPriorityClasses(c *SchedulingV1alpha1Client) *priorityClasses { func (c *priorityClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Get(). + Cluster(c.cluster). Resource("priorityclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *priorityClasses) List(ctx context.Context, opts v1.ListOptions) (result } result = &v1alpha1.PriorityClassList{} err = c.client.Get(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *priorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.CreateOptions) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Post(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). @@ -123,6 +128,7 @@ func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1alpha1.Pr func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.UpdateOptions) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Put(). + Cluster(c.cluster). Resource("priorityclasses"). Name(priorityClass.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1alpha1.Pr // Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. func (c *priorityClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("priorityclasses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *priorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOp timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *priorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOp func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("priorityclasses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *priorityClasses) Apply(ctx context.Context, priorityClass *schedulingv1 } result = &v1alpha1.PriorityClass{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("priorityclasses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go index 47fb774a37e38..24f18c77bcef6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go @@ -34,6 +34,7 @@ type SchedulingV1alpha1Interface interface { // SchedulingV1alpha1Client is used to interact with features provided by the scheduling.k8s.io group. type SchedulingV1alpha1Client struct { restClient rest.Interface + cluster string } func (c *SchedulingV1alpha1Client) PriorityClasses() PriorityClassInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SchedulingV1alpha1C if err != nil { return nil, err } - return &SchedulingV1alpha1Client{client}, nil + return &SchedulingV1alpha1Client{restClient: client}, nil } // NewForConfigOrDie creates a new SchedulingV1alpha1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *SchedulingV1alpha1Client { // New creates a new SchedulingV1alpha1Client for the given RESTClient. func New(c rest.Interface) *SchedulingV1alpha1Client { - return &SchedulingV1alpha1Client{c} + return &SchedulingV1alpha1Client{restClient: c} +} + +// NewWithCluster creates a new SchedulingV1alpha1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *SchedulingV1alpha1Client { + return &SchedulingV1alpha1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go index 155476e4c7270..451e7194306ca 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go @@ -55,13 +55,15 @@ type PriorityClassInterface interface { // priorityClasses implements PriorityClassInterface type priorityClasses struct { - client rest.Interface + client rest.Interface + cluster string } // newPriorityClasses returns a PriorityClasses func newPriorityClasses(c *SchedulingV1beta1Client) *priorityClasses { return &priorityClasses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newPriorityClasses(c *SchedulingV1beta1Client) *priorityClasses { func (c *priorityClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Get(). + Cluster(c.cluster). Resource("priorityclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *priorityClasses) List(ctx context.Context, opts v1.ListOptions) (result } result = &v1beta1.PriorityClassList{} err = c.client.Get(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *priorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.CreateOptions) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Post(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). @@ -123,6 +128,7 @@ func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1beta1.Pri func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.UpdateOptions) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Put(). + Cluster(c.cluster). Resource("priorityclasses"). Name(priorityClass.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1beta1.Pri // Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. func (c *priorityClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("priorityclasses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *priorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOp timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *priorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOp func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("priorityclasses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *priorityClasses) Apply(ctx context.Context, priorityClass *schedulingv1 } result = &v1beta1.PriorityClass{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("priorityclasses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/scheduling_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/scheduling_client.go index dbaf69414166e..d33f5be119f61 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/scheduling_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/scheduling_client.go @@ -34,6 +34,7 @@ type SchedulingV1beta1Interface interface { // SchedulingV1beta1Client is used to interact with features provided by the scheduling.k8s.io group. type SchedulingV1beta1Client struct { restClient rest.Interface + cluster string } func (c *SchedulingV1beta1Client) PriorityClasses() PriorityClassInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SchedulingV1beta1Cl if err != nil { return nil, err } - return &SchedulingV1beta1Client{client}, nil + return &SchedulingV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new SchedulingV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *SchedulingV1beta1Client { // New creates a new SchedulingV1beta1Client for the given RESTClient. func New(c rest.Interface) *SchedulingV1beta1Client { - return &SchedulingV1beta1Client{c} + return &SchedulingV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new SchedulingV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *SchedulingV1beta1Client { + return &SchedulingV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go index d9dc4151e2183..32cd8c7823b6d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go @@ -55,13 +55,15 @@ type CSIDriverInterface interface { // cSIDrivers implements CSIDriverInterface type cSIDrivers struct { - client rest.Interface + client rest.Interface + cluster string } // newCSIDrivers returns a CSIDrivers func newCSIDrivers(c *StorageV1Client) *cSIDrivers { return &cSIDrivers{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newCSIDrivers(c *StorageV1Client) *cSIDrivers { func (c *cSIDrivers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CSIDriver, err error) { result = &v1.CSIDriver{} err = c.client.Get(). + Cluster(c.cluster). Resource("csidrivers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *cSIDrivers) List(ctx context.Context, opts metav1.ListOptions) (result } result = &v1.CSIDriverList{} err = c.client.Get(). + Cluster(c.cluster). Resource("csidrivers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *cSIDrivers) Watch(ctx context.Context, opts metav1.ListOptions) (watch. func (c *cSIDrivers) Create(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.CreateOptions) (result *v1.CSIDriver, err error) { result = &v1.CSIDriver{} err = c.client.Post(). + Cluster(c.cluster). Resource("csidrivers"). VersionedParams(&opts, scheme.ParameterCodec). Body(cSIDriver). @@ -123,6 +128,7 @@ func (c *cSIDrivers) Create(ctx context.Context, cSIDriver *v1.CSIDriver, opts m func (c *cSIDrivers) Update(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.UpdateOptions) (result *v1.CSIDriver, err error) { result = &v1.CSIDriver{} err = c.client.Put(). + Cluster(c.cluster). Resource("csidrivers"). Name(cSIDriver.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *cSIDrivers) Update(ctx context.Context, cSIDriver *v1.CSIDriver, opts m // Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. func (c *cSIDrivers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("csidrivers"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *cSIDrivers) DeleteCollection(ctx context.Context, opts metav1.DeleteOpt timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("csidrivers"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *cSIDrivers) DeleteCollection(ctx context.Context, opts metav1.DeleteOpt func (c *cSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSIDriver, err error) { result = &v1.CSIDriver{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("csidrivers"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *cSIDrivers) Apply(ctx context.Context, cSIDriver *storagev1.CSIDriverAp } result = &v1.CSIDriver{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("csidrivers"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go index 17dbc8c1c8f29..27cac2fa0625e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go @@ -55,13 +55,15 @@ type CSINodeInterface interface { // cSINodes implements CSINodeInterface type cSINodes struct { - client rest.Interface + client rest.Interface + cluster string } // newCSINodes returns a CSINodes func newCSINodes(c *StorageV1Client) *cSINodes { return &cSINodes{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newCSINodes(c *StorageV1Client) *cSINodes { func (c *cSINodes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Get(). + Cluster(c.cluster). Resource("csinodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *cSINodes) List(ctx context.Context, opts metav1.ListOptions) (result *v } result = &v1.CSINodeList{} err = c.client.Get(). + Cluster(c.cluster). Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *cSINodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In func (c *cSINodes) Create(ctx context.Context, cSINode *v1.CSINode, opts metav1.CreateOptions) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Post(). + Cluster(c.cluster). Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Body(cSINode). @@ -123,6 +128,7 @@ func (c *cSINodes) Create(ctx context.Context, cSINode *v1.CSINode, opts metav1. func (c *cSINodes) Update(ctx context.Context, cSINode *v1.CSINode, opts metav1.UpdateOptions) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Put(). + Cluster(c.cluster). Resource("csinodes"). Name(cSINode.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *cSINodes) Update(ctx context.Context, cSINode *v1.CSINode, opts metav1. // Delete takes name of the cSINode and deletes it. Returns an error if one occurs. func (c *cSINodes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("csinodes"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *cSINodes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptio timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("csinodes"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *cSINodes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptio func (c *cSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("csinodes"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *cSINodes) Apply(ctx context.Context, cSINode *storagev1.CSINodeApplyCon } result = &v1.CSINode{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("csinodes"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go index b31862f439a3f..3cf14c08a00c1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go @@ -37,6 +37,7 @@ type StorageV1Interface interface { // StorageV1Client is used to interact with features provided by the storage.k8s.io group. type StorageV1Client struct { restClient rest.Interface + cluster string } func (c *StorageV1Client) CSIDrivers() CSIDriverInterface { @@ -81,7 +82,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*StorageV1Client, er if err != nil { return nil, err } - return &StorageV1Client{client}, nil + return &StorageV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new StorageV1Client for the given config and @@ -96,7 +97,12 @@ func NewForConfigOrDie(c *rest.Config) *StorageV1Client { // New creates a new StorageV1Client for the given RESTClient. func New(c rest.Interface) *StorageV1Client { - return &StorageV1Client{c} + return &StorageV1Client{restClient: c} +} + +// NewWithCluster creates a new StorageV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *StorageV1Client { + return &StorageV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go index 8e97d90a0f335..03ae6c4daebb7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go @@ -55,13 +55,15 @@ type StorageClassInterface interface { // storageClasses implements StorageClassInterface type storageClasses struct { - client rest.Interface + client rest.Interface + cluster string } // newStorageClasses returns a StorageClasses func newStorageClasses(c *StorageV1Client) *storageClasses { return &storageClasses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newStorageClasses(c *StorageV1Client) *storageClasses { func (c *storageClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Get(). + Cluster(c.cluster). Resource("storageclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *storageClasses) List(ctx context.Context, opts metav1.ListOptions) (res } result = &v1.StorageClassList{} err = c.client.Get(). + Cluster(c.cluster). Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *storageClasses) Watch(ctx context.Context, opts metav1.ListOptions) (wa func (c *storageClasses) Create(ctx context.Context, storageClass *v1.StorageClass, opts metav1.CreateOptions) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Post(). + Cluster(c.cluster). Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Body(storageClass). @@ -123,6 +128,7 @@ func (c *storageClasses) Create(ctx context.Context, storageClass *v1.StorageCla func (c *storageClasses) Update(ctx context.Context, storageClass *v1.StorageClass, opts metav1.UpdateOptions) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Put(). + Cluster(c.cluster). Resource("storageclasses"). Name(storageClass.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *storageClasses) Update(ctx context.Context, storageClass *v1.StorageCla // Delete takes name of the storageClass and deletes it. Returns an error if one occurs. func (c *storageClasses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("storageclasses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *storageClasses) DeleteCollection(ctx context.Context, opts metav1.Delet timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("storageclasses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *storageClasses) DeleteCollection(ctx context.Context, opts metav1.Delet func (c *storageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("storageclasses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *storageClasses) Apply(ctx context.Context, storageClass *storagev1.Stor } result = &v1.StorageClass{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("storageclasses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go index c1dbec84f478a..e2045d2b076da 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go @@ -57,13 +57,15 @@ type VolumeAttachmentInterface interface { // volumeAttachments implements VolumeAttachmentInterface type volumeAttachments struct { - client rest.Interface + client rest.Interface + cluster string } // newVolumeAttachments returns a VolumeAttachments func newVolumeAttachments(c *StorageV1Client) *volumeAttachments { return &volumeAttachments{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newVolumeAttachments(c *StorageV1Client) *volumeAttachments { func (c *volumeAttachments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Get(). + Cluster(c.cluster). Resource("volumeattachments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *volumeAttachments) List(ctx context.Context, opts metav1.ListOptions) ( } result = &v1.VolumeAttachmentList{} err = c.client.Get(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *volumeAttachments) Watch(ctx context.Context, opts metav1.ListOptions) func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.CreateOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Post(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). @@ -125,6 +130,7 @@ func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1.Vol func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Put(). + Cluster(c.cluster). Resource("volumeattachments"). Name(volumeAttachment.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1.Vol func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Put(). + Cluster(c.cluster). Resource("volumeattachments"). Name(volumeAttachment.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment * // Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. func (c *volumeAttachments) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("volumeattachments"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *volumeAttachments) DeleteCollection(ctx context.Context, opts metav1.De timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *volumeAttachments) DeleteCollection(ctx context.Context, opts metav1.De func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("volumeattachments"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *volumeAttachments) Apply(ctx context.Context, volumeAttachment *storage } result = &v1.VolumeAttachment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("volumeattachments"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *volumeAttachments) ApplyStatus(ctx context.Context, volumeAttachment *s result = &v1.VolumeAttachment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("volumeattachments"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go index bf5d64dddcb28..bd9fc1ffd6045 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go @@ -55,15 +55,17 @@ type CSIStorageCapacityInterface interface { // cSIStorageCapacities implements CSIStorageCapacityInterface type cSIStorageCapacities struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newCSIStorageCapacities returns a CSIStorageCapacities func newCSIStorageCapacities(c *StorageV1alpha1Client, namespace string) *cSIStorageCapacities { return &cSIStorageCapacities{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newCSIStorageCapacities(c *StorageV1alpha1Client, namespace string) *cSISto func (c *cSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CSIStorageCapacity, err error) { result = &v1alpha1.CSIStorageCapacity{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). Name(name). @@ -88,6 +91,7 @@ func (c *cSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (r } result = &v1alpha1.CSIStorageCapacityList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *cSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) ( func (c *cSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.CreateOptions) (result *v1alpha1.CSIStorageCapacity, err error) { result = &v1alpha1.CSIStorageCapacity{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *cSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v func (c *cSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.UpdateOptions) (result *v1alpha1.CSIStorageCapacity, err error) { result = &v1alpha1.CSIStorageCapacity{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). Name(cSIStorageCapacity.Name). @@ -142,6 +148,7 @@ func (c *cSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v // Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. func (c *cSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). Name(name). @@ -157,6 +164,7 @@ func (c *cSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.Del timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *cSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.Del func (c *cSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CSIStorageCapacity, err error) { result = &v1alpha1.CSIStorageCapacity{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). Name(name). @@ -197,6 +206,7 @@ func (c *cSIStorageCapacities) Apply(ctx context.Context, cSIStorageCapacity *st } result = &v1alpha1.CSIStorageCapacity{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go index c9bf11d766c37..e4582482d52b0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go @@ -35,6 +35,7 @@ type StorageV1alpha1Interface interface { // StorageV1alpha1Client is used to interact with features provided by the storage.k8s.io group. type StorageV1alpha1Client struct { restClient rest.Interface + cluster string } func (c *StorageV1alpha1Client) CSIStorageCapacities(namespace string) CSIStorageCapacityInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*StorageV1alpha1Clie if err != nil { return nil, err } - return &StorageV1alpha1Client{client}, nil + return &StorageV1alpha1Client{restClient: client}, nil } // NewForConfigOrDie creates a new StorageV1alpha1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *StorageV1alpha1Client { // New creates a new StorageV1alpha1Client for the given RESTClient. func New(c rest.Interface) *StorageV1alpha1Client { - return &StorageV1alpha1Client{c} + return &StorageV1alpha1Client{restClient: c} +} + +// NewWithCluster creates a new StorageV1alpha1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *StorageV1alpha1Client { + return &StorageV1alpha1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go index 58abb748f9e49..24472655e0a29 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go @@ -57,13 +57,15 @@ type VolumeAttachmentInterface interface { // volumeAttachments implements VolumeAttachmentInterface type volumeAttachments struct { - client rest.Interface + client rest.Interface + cluster string } // newVolumeAttachments returns a VolumeAttachments func newVolumeAttachments(c *StorageV1alpha1Client) *volumeAttachments { return &volumeAttachments{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newVolumeAttachments(c *StorageV1alpha1Client) *volumeAttachments { func (c *volumeAttachments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Get(). + Cluster(c.cluster). Resource("volumeattachments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *volumeAttachments) List(ctx context.Context, opts v1.ListOptions) (resu } result = &v1alpha1.VolumeAttachmentList{} err = c.client.Get(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *volumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (wat func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.CreateOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Post(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). @@ -125,6 +130,7 @@ func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1alph func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Put(). + Cluster(c.cluster). Resource("volumeattachments"). Name(volumeAttachment.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1alph func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Put(). + Cluster(c.cluster). Resource("volumeattachments"). Name(volumeAttachment.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment * // Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. func (c *volumeAttachments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("volumeattachments"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *volumeAttachments) DeleteCollection(ctx context.Context, opts v1.Delete timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *volumeAttachments) DeleteCollection(ctx context.Context, opts v1.Delete func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("volumeattachments"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *volumeAttachments) Apply(ctx context.Context, volumeAttachment *storage } result = &v1alpha1.VolumeAttachment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("volumeattachments"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *volumeAttachments) ApplyStatus(ctx context.Context, volumeAttachment *s result = &v1alpha1.VolumeAttachment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("volumeattachments"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go index 04e677db05966..c5a26cb30e32f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go @@ -55,13 +55,15 @@ type CSIDriverInterface interface { // cSIDrivers implements CSIDriverInterface type cSIDrivers struct { - client rest.Interface + client rest.Interface + cluster string } // newCSIDrivers returns a CSIDrivers func newCSIDrivers(c *StorageV1beta1Client) *cSIDrivers { return &cSIDrivers{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newCSIDrivers(c *StorageV1beta1Client) *cSIDrivers { func (c *cSIDrivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Get(). + Cluster(c.cluster). Resource("csidrivers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *cSIDrivers) List(ctx context.Context, opts v1.ListOptions) (result *v1b } result = &v1beta1.CSIDriverList{} err = c.client.Get(). + Cluster(c.cluster). Resource("csidrivers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *cSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte func (c *cSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.CreateOptions) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Post(). + Cluster(c.cluster). Resource("csidrivers"). VersionedParams(&opts, scheme.ParameterCodec). Body(cSIDriver). @@ -123,6 +128,7 @@ func (c *cSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver, o func (c *cSIDrivers) Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.UpdateOptions) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Put(). + Cluster(c.cluster). Resource("csidrivers"). Name(cSIDriver.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *cSIDrivers) Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver, o // Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. func (c *cSIDrivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("csidrivers"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *cSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("csidrivers"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *cSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions func (c *cSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("csidrivers"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *cSIDrivers) Apply(ctx context.Context, cSIDriver *storagev1beta1.CSIDri } result = &v1beta1.CSIDriver{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("csidrivers"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go index c3760b5ce5cf1..05457762027f7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go @@ -55,13 +55,15 @@ type CSINodeInterface interface { // cSINodes implements CSINodeInterface type cSINodes struct { - client rest.Interface + client rest.Interface + cluster string } // newCSINodes returns a CSINodes func newCSINodes(c *StorageV1beta1Client) *cSINodes { return &cSINodes{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newCSINodes(c *StorageV1beta1Client) *cSINodes { func (c *cSINodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Get(). + Cluster(c.cluster). Resource("csinodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *cSINodes) List(ctx context.Context, opts v1.ListOptions) (result *v1bet } result = &v1beta1.CSINodeList{} err = c.client.Get(). + Cluster(c.cluster). Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *cSINodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf func (c *cSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.CreateOptions) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Post(). + Cluster(c.cluster). Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Body(cSINode). @@ -123,6 +128,7 @@ func (c *cSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode, opts v1 func (c *cSINodes) Update(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.UpdateOptions) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Put(). + Cluster(c.cluster). Resource("csinodes"). Name(cSINode.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *cSINodes) Update(ctx context.Context, cSINode *v1beta1.CSINode, opts v1 // Delete takes name of the cSINode and deletes it. Returns an error if one occurs. func (c *cSINodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("csinodes"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *cSINodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("csinodes"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *cSINodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, func (c *cSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("csinodes"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *cSINodes) Apply(ctx context.Context, cSINode *storagev1beta1.CSINodeApp } result = &v1beta1.CSINode{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("csinodes"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go index 98ba936dc44a7..c007714b09943 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go @@ -55,15 +55,17 @@ type CSIStorageCapacityInterface interface { // cSIStorageCapacities implements CSIStorageCapacityInterface type cSIStorageCapacities struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newCSIStorageCapacities returns a CSIStorageCapacities func newCSIStorageCapacities(c *StorageV1beta1Client, namespace string) *cSIStorageCapacities { return &cSIStorageCapacities{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -71,6 +73,7 @@ func newCSIStorageCapacities(c *StorageV1beta1Client, namespace string) *cSIStor func (c *cSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CSIStorageCapacity, err error) { result = &v1beta1.CSIStorageCapacity{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). Name(name). @@ -88,6 +91,7 @@ func (c *cSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (r } result = &v1beta1.CSIStorageCapacityList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). VersionedParams(&opts, scheme.ParameterCodec). @@ -116,6 +120,7 @@ func (c *cSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) ( func (c *cSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v1beta1.CSIStorageCapacity, opts v1.CreateOptions) (result *v1beta1.CSIStorageCapacity, err error) { result = &v1beta1.CSIStorageCapacity{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). VersionedParams(&opts, scheme.ParameterCodec). @@ -129,6 +134,7 @@ func (c *cSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v func (c *cSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v1beta1.CSIStorageCapacity, opts v1.UpdateOptions) (result *v1beta1.CSIStorageCapacity, err error) { result = &v1beta1.CSIStorageCapacity{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). Name(cSIStorageCapacity.Name). @@ -142,6 +148,7 @@ func (c *cSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v // Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. func (c *cSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). Name(name). @@ -157,6 +164,7 @@ func (c *cSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.Del timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -170,6 +178,7 @@ func (c *cSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.Del func (c *cSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSIStorageCapacity, err error) { result = &v1beta1.CSIStorageCapacity{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). Name(name). @@ -197,6 +206,7 @@ func (c *cSIStorageCapacities) Apply(ctx context.Context, cSIStorageCapacity *st } result = &v1beta1.CSIStorageCapacity{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). Name(*name). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go index 4c7604bd2960e..a4c2bddddabd0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go @@ -38,6 +38,7 @@ type StorageV1beta1Interface interface { // StorageV1beta1Client is used to interact with features provided by the storage.k8s.io group. type StorageV1beta1Client struct { restClient rest.Interface + cluster string } func (c *StorageV1beta1Client) CSIDrivers() CSIDriverInterface { @@ -86,7 +87,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*StorageV1beta1Clien if err != nil { return nil, err } - return &StorageV1beta1Client{client}, nil + return &StorageV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new StorageV1beta1Client for the given config and @@ -101,7 +102,12 @@ func NewForConfigOrDie(c *rest.Config) *StorageV1beta1Client { // New creates a new StorageV1beta1Client for the given RESTClient. func New(c rest.Interface) *StorageV1beta1Client { - return &StorageV1beta1Client{c} + return &StorageV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new StorageV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *StorageV1beta1Client { + return &StorageV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go index 9b4ef231c898c..6122ea513c740 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go @@ -55,13 +55,15 @@ type StorageClassInterface interface { // storageClasses implements StorageClassInterface type storageClasses struct { - client rest.Interface + client rest.Interface + cluster string } // newStorageClasses returns a StorageClasses func newStorageClasses(c *StorageV1beta1Client) *storageClasses { return &storageClasses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -69,6 +71,7 @@ func newStorageClasses(c *StorageV1beta1Client) *storageClasses { func (c *storageClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Get(). + Cluster(c.cluster). Resource("storageclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -85,6 +88,7 @@ func (c *storageClasses) List(ctx context.Context, opts v1.ListOptions) (result } result = &v1beta1.StorageClassList{} err = c.client.Get(). + Cluster(c.cluster). Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -111,6 +115,7 @@ func (c *storageClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. func (c *storageClasses) Create(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.CreateOptions) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Post(). + Cluster(c.cluster). Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Body(storageClass). @@ -123,6 +128,7 @@ func (c *storageClasses) Create(ctx context.Context, storageClass *v1beta1.Stora func (c *storageClasses) Update(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.UpdateOptions) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Put(). + Cluster(c.cluster). Resource("storageclasses"). Name(storageClass.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -135,6 +141,7 @@ func (c *storageClasses) Update(ctx context.Context, storageClass *v1beta1.Stora // Delete takes name of the storageClass and deletes it. Returns an error if one occurs. func (c *storageClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("storageclasses"). Name(name). Body(&opts). @@ -149,6 +156,7 @@ func (c *storageClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOpt timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("storageclasses"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -161,6 +169,7 @@ func (c *storageClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOpt func (c *storageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("storageclasses"). Name(name). SubResource(subresources...). @@ -187,6 +196,7 @@ func (c *storageClasses) Apply(ctx context.Context, storageClass *storagev1beta1 } result = &v1beta1.StorageClass{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("storageclasses"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go index 35a8b64fcc304..8fc3b41e8b7b7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go @@ -57,13 +57,15 @@ type VolumeAttachmentInterface interface { // volumeAttachments implements VolumeAttachmentInterface type volumeAttachments struct { - client rest.Interface + client rest.Interface + cluster string } // newVolumeAttachments returns a VolumeAttachments func newVolumeAttachments(c *StorageV1beta1Client) *volumeAttachments { return &volumeAttachments{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newVolumeAttachments(c *StorageV1beta1Client) *volumeAttachments { func (c *volumeAttachments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Get(). + Cluster(c.cluster). Resource("volumeattachments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *volumeAttachments) List(ctx context.Context, opts v1.ListOptions) (resu } result = &v1beta1.VolumeAttachmentList{} err = c.client.Get(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *volumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (wat func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.CreateOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Post(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). @@ -125,6 +130,7 @@ func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1beta func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Put(). + Cluster(c.cluster). Resource("volumeattachments"). Name(volumeAttachment.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1beta func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Put(). + Cluster(c.cluster). Resource("volumeattachments"). Name(volumeAttachment.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment * // Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. func (c *volumeAttachments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("volumeattachments"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *volumeAttachments) DeleteCollection(ctx context.Context, opts v1.Delete timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *volumeAttachments) DeleteCollection(ctx context.Context, opts v1.Delete func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("volumeattachments"). Name(name). SubResource(subresources...). @@ -204,6 +214,7 @@ func (c *volumeAttachments) Apply(ctx context.Context, volumeAttachment *storage } result = &v1beta1.VolumeAttachment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("volumeattachments"). Name(*name). VersionedParams(&patchOpts, scheme.ParameterCodec). @@ -232,6 +243,7 @@ func (c *volumeAttachments) ApplyStatus(ctx context.Context, volumeAttachment *s result = &v1beta1.VolumeAttachment{} err = c.client.Patch(types.ApplyPatchType). + Cluster(c.cluster). Resource("volumeattachments"). Name(*name). SubResource("status"). diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/clientset.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/clientset.go index 3c1c4816631de..1f729c63631eb 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/clientset.go @@ -28,6 +28,33 @@ import ( examplegroupv1 "k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface ExampleGroupV1() examplegroupv1.ExampleGroupV1Interface @@ -36,13 +63,20 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient exampleGroupV1 *examplegroupv1.ExampleGroupV1Client } // ExampleGroupV1 retrieves the ExampleGroupV1Client func (c *Clientset) ExampleGroupV1() examplegroupv1.ExampleGroupV1Interface { - return c.exampleGroupV1 + return examplegroupv1.NewWithCluster(c.exampleGroupV1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -83,7 +117,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.exampleGroupV1, err = examplegroupv1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -94,7 +128,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -109,9 +143,9 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.exampleGroupV1 = examplegroupv1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go index ef7af1aeed3c3..3a59a5dbbfa93 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go @@ -56,13 +56,15 @@ type ClusterTestTypeInterface interface { // clusterTestTypes implements ClusterTestTypeInterface type clusterTestTypes struct { - client rest.Interface + client rest.Interface + cluster string } // newClusterTestTypes returns a ClusterTestTypes func newClusterTestTypes(c *ExampleGroupV1Client) *clusterTestTypes { return &clusterTestTypes{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -70,6 +72,7 @@ func newClusterTestTypes(c *ExampleGroupV1Client) *clusterTestTypes { func (c *clusterTestTypes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -86,6 +89,7 @@ func (c *clusterTestTypes) List(ctx context.Context, opts metav1.ListOptions) (r } result = &v1.ClusterTestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -112,6 +116,7 @@ func (c *clusterTestTypes) Watch(ctx context.Context, opts metav1.ListOptions) ( func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.CreateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Post(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). @@ -124,6 +129,7 @@ func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.Clust func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestType.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -138,6 +144,7 @@ func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.Clust func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestType.Name). SubResource("status"). @@ -151,6 +158,7 @@ func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1 // Delete takes name of the clusterTestType and deletes it. Returns an error if one occurs. func (c *clusterTestTypes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(name). Body(&opts). @@ -165,6 +173,7 @@ func (c *clusterTestTypes) DeleteCollection(ctx context.Context, opts metav1.Del timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -177,6 +186,7 @@ func (c *clusterTestTypes) DeleteCollection(ctx context.Context, opts metav1.Del func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("clustertesttypes"). Name(name). SubResource(subresources...). @@ -191,6 +201,7 @@ func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.Patc func (c *clusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). @@ -204,6 +215,7 @@ func (c *clusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName str func (c *clusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/example_client.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/example_client.go index 448851e5196c0..c47ccd9d39366 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/example_client.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/example_client.go @@ -35,6 +35,7 @@ type ExampleGroupV1Interface interface { // ExampleGroupV1Client is used to interact with features provided by the example-group.hyphens.code-generator.k8s.io group. type ExampleGroupV1Client struct { restClient rest.Interface + cluster string } func (c *ExampleGroupV1Client) ClusterTestTypes() ClusterTestTypeInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ExampleGroupV1Clien if err != nil { return nil, err } - return &ExampleGroupV1Client{client}, nil + return &ExampleGroupV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new ExampleGroupV1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *ExampleGroupV1Client { // New creates a new ExampleGroupV1Client for the given RESTClient. func New(c rest.Interface) *ExampleGroupV1Client { - return &ExampleGroupV1Client{c} + return &ExampleGroupV1Client{restClient: c} +} + +// NewWithCluster creates a new ExampleGroupV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ExampleGroupV1Client { + return &ExampleGroupV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go index fdeaf3f9d4922..d86f428fa1e6a 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go @@ -52,15 +52,17 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newTestTypes returns a TestTypes func newTestTypes(c *ExampleGroupV1Client, namespace string) *testTypes { return &testTypes{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newTestTypes(c *ExampleGroupV1Client, namespace string) *testTypes { func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -85,6 +88,7 @@ func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result * } result = &v1.TestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -141,6 +147,7 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -155,6 +162,7 @@ func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opt // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *testTypes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -170,6 +178,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/clientset.go b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/clientset.go index 718039652c673..b3c5482f43bb5 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/clientset.go @@ -28,6 +28,33 @@ import ( examplev1 "k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface ExampleV1() examplev1.ExampleV1Interface @@ -36,13 +63,20 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient exampleV1 *examplev1.ExampleV1Client } // ExampleV1 retrieves the ExampleV1Client func (c *Clientset) ExampleV1() examplev1.ExampleV1Interface { - return c.exampleV1 + return examplev1.NewWithCluster(c.exampleV1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -83,7 +117,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.exampleV1, err = examplev1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -94,7 +128,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -109,9 +143,9 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.exampleV1 = examplev1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go index f4bb703a934de..8f4cefd576c8a 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go @@ -57,13 +57,15 @@ type ClusterTestTypeInterface interface { // clusterTestTypes implements ClusterTestTypeInterface type clusterTestTypes struct { - client rest.Interface + client rest.Interface + cluster string } // newClusterTestTypes returns a ClusterTestTypes func newClusterTestTypes(c *ExampleV1Client) *clusterTestTypes { return &clusterTestTypes{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -71,6 +73,7 @@ func newClusterTestTypes(c *ExampleV1Client) *clusterTestTypes { func (c *clusterTestTypes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -87,6 +90,7 @@ func (c *clusterTestTypes) List(ctx context.Context, opts metav1.ListOptions) (r } result = &v1.ClusterTestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -113,6 +117,7 @@ func (c *clusterTestTypes) Watch(ctx context.Context, opts metav1.ListOptions) ( func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.CreateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Post(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). @@ -125,6 +130,7 @@ func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.Clust func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestType.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -139,6 +145,7 @@ func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.Clust func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestType.Name). SubResource("status"). @@ -152,6 +159,7 @@ func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1 // Delete takes name of the clusterTestType and deletes it. Returns an error if one occurs. func (c *clusterTestTypes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(name). Body(&opts). @@ -166,6 +174,7 @@ func (c *clusterTestTypes) DeleteCollection(ctx context.Context, opts metav1.Del timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -178,6 +187,7 @@ func (c *clusterTestTypes) DeleteCollection(ctx context.Context, opts metav1.Del func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("clustertesttypes"). Name(name). SubResource(subresources...). @@ -192,6 +202,7 @@ func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.Patc func (c *clusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). @@ -205,6 +216,7 @@ func (c *clusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName str func (c *clusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). @@ -219,6 +231,7 @@ func (c *clusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName func (c *clusterTestTypes) CreateScale(ctx context.Context, clusterTestTypeName string, scale *autoscalingv1.Scale, opts metav1.CreateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Post(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/example_client.go b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/example_client.go index 4b3ddf8092a2f..0bb715534d2ec 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/example_client.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/example_client.go @@ -35,6 +35,7 @@ type ExampleV1Interface interface { // ExampleV1Client is used to interact with features provided by the example.crd.code-generator.k8s.io group. type ExampleV1Client struct { restClient rest.Interface + cluster string } func (c *ExampleV1Client) ClusterTestTypes() ClusterTestTypeInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ExampleV1Client, er if err != nil { return nil, err } - return &ExampleV1Client{client}, nil + return &ExampleV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new ExampleV1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *ExampleV1Client { // New creates a new ExampleV1Client for the given RESTClient. func New(c rest.Interface) *ExampleV1Client { - return &ExampleV1Client{c} + return &ExampleV1Client{restClient: c} +} + +// NewWithCluster creates a new ExampleV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ExampleV1Client { + return &ExampleV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go index 138e5d9a1e0fe..bc06776849b7b 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go @@ -52,15 +52,17 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newTestTypes returns a TestTypes func newTestTypes(c *ExampleV1Client, namespace string) *testTypes { return &testTypes{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newTestTypes(c *ExampleV1Client, namespace string) *testTypes { func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -85,6 +88,7 @@ func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result * } result = &v1.TestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -141,6 +147,7 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -155,6 +162,7 @@ func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opt // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *testTypes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -170,6 +178,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/clientset.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/clientset.go index b9108feeb7dc6..cd6e308d82ba6 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/clientset.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/clientset.go @@ -30,6 +30,33 @@ import ( thirdexampleinternalversion "k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface Example() exampleinternalversion.ExampleInterface @@ -40,6 +67,13 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient example *exampleinternalversion.ExampleClient secondExample *secondexampleinternalversion.SecondExampleClient @@ -48,17 +82,17 @@ type Clientset struct { // Example retrieves the ExampleClient func (c *Clientset) Example() exampleinternalversion.ExampleInterface { - return c.example + return exampleinternalversion.NewWithCluster(c.example.RESTClient(), c.cluster) } // SecondExample retrieves the SecondExampleClient func (c *Clientset) SecondExample() secondexampleinternalversion.SecondExampleInterface { - return c.secondExample + return secondexampleinternalversion.NewWithCluster(c.secondExample.RESTClient(), c.cluster) } // ThirdExample retrieves the ThirdExampleClient func (c *Clientset) ThirdExample() thirdexampleinternalversion.ThirdExampleInterface { - return c.thirdExample + return thirdexampleinternalversion.NewWithCluster(c.thirdExample.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -99,7 +133,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.example, err = exampleinternalversion.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -118,7 +152,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -133,11 +167,11 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.example = exampleinternalversion.New(c) cs.secondExample = secondexampleinternalversion.New(c) cs.thirdExample = thirdexampleinternalversion.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go index 03d43f3a40862..19047e38e0a0a 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go @@ -33,6 +33,7 @@ type ExampleInterface interface { // ExampleClient is used to interact with features provided by the example.apiserver.code-generator.k8s.io group. type ExampleClient struct { restClient rest.Interface + cluster string } func (c *ExampleClient) TestTypes(namespace string) TestTypeInterface { @@ -65,7 +66,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ExampleClient, erro if err != nil { return nil, err } - return &ExampleClient{client}, nil + return &ExampleClient{restClient: client}, nil } // NewForConfigOrDie creates a new ExampleClient for the given config and @@ -80,7 +81,12 @@ func NewForConfigOrDie(c *rest.Config) *ExampleClient { // New creates a new ExampleClient for the given RESTClient. func New(c rest.Interface) *ExampleClient { - return &ExampleClient{c} + return &ExampleClient{restClient: c} +} + +// NewWithCluster creates a new ExampleClient for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ExampleClient { + return &ExampleClient{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go index 3a5b42bf0c94e..1d862384dfb6a 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go @@ -52,15 +52,17 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newTestTypes returns a TestTypes func newTestTypes(c *ExampleClient, namespace string) *testTypes { return &testTypes{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newTestTypes(c *ExampleClient, namespace string) *testTypes { func (c *testTypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *example.TestType, err error) { result = &example.TestType{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -85,6 +88,7 @@ func (c *testTypes) List(ctx context.Context, opts v1.ListOptions) (result *exam } result = &example.TestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *testTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter func (c *testTypes) Create(ctx context.Context, testType *example.TestType, opts v1.CreateOptions) (result *example.TestType, err error) { result = &example.TestType{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *testTypes) Create(ctx context.Context, testType *example.TestType, opts func (c *testTypes) Update(ctx context.Context, testType *example.TestType, opts v1.UpdateOptions) (result *example.TestType, err error) { result = &example.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -141,6 +147,7 @@ func (c *testTypes) Update(ctx context.Context, testType *example.TestType, opts func (c *testTypes) UpdateStatus(ctx context.Context, testType *example.TestType, opts v1.UpdateOptions) (result *example.TestType, err error) { result = &example.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -155,6 +162,7 @@ func (c *testTypes) UpdateStatus(ctx context.Context, testType *example.TestType // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *testTypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -170,6 +178,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example.TestType, err error) { result = &example.TestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go index 8a09b45904127..158272969e4bd 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go @@ -33,6 +33,7 @@ type SecondExampleInterface interface { // SecondExampleClient is used to interact with features provided by the example.test.apiserver.code-generator.k8s.io group. type SecondExampleClient struct { restClient rest.Interface + cluster string } func (c *SecondExampleClient) TestTypes() TestTypeInterface { @@ -65,7 +66,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SecondExampleClient if err != nil { return nil, err } - return &SecondExampleClient{client}, nil + return &SecondExampleClient{restClient: client}, nil } // NewForConfigOrDie creates a new SecondExampleClient for the given config and @@ -80,7 +81,12 @@ func NewForConfigOrDie(c *rest.Config) *SecondExampleClient { // New creates a new SecondExampleClient for the given RESTClient. func New(c rest.Interface) *SecondExampleClient { - return &SecondExampleClient{c} + return &SecondExampleClient{restClient: c} +} + +// NewWithCluster creates a new SecondExampleClient for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *SecondExampleClient { + return &SecondExampleClient{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go index a83450383a5bf..c935a99f2ce09 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go @@ -52,13 +52,15 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client rest.Interface + client rest.Interface + cluster string } // newTestTypes returns a TestTypes func newTestTypes(c *SecondExampleClient) *testTypes { return &testTypes{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -66,6 +68,7 @@ func newTestTypes(c *SecondExampleClient) *testTypes { func (c *testTypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *example2.TestType, err error) { result = &example2.TestType{} err = c.client.Get(). + Cluster(c.cluster). Resource("testtypes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -82,6 +85,7 @@ func (c *testTypes) List(ctx context.Context, opts v1.ListOptions) (result *exam } result = &example2.TestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -108,6 +112,7 @@ func (c *testTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter func (c *testTypes) Create(ctx context.Context, testType *example2.TestType, opts v1.CreateOptions) (result *example2.TestType, err error) { result = &example2.TestType{} err = c.client.Post(). + Cluster(c.cluster). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). Body(testType). @@ -120,6 +125,7 @@ func (c *testTypes) Create(ctx context.Context, testType *example2.TestType, opt func (c *testTypes) Update(ctx context.Context, testType *example2.TestType, opts v1.UpdateOptions) (result *example2.TestType, err error) { result = &example2.TestType{} err = c.client.Put(). + Cluster(c.cluster). Resource("testtypes"). Name(testType.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -134,6 +140,7 @@ func (c *testTypes) Update(ctx context.Context, testType *example2.TestType, opt func (c *testTypes) UpdateStatus(ctx context.Context, testType *example2.TestType, opts v1.UpdateOptions) (result *example2.TestType, err error) { result = &example2.TestType{} err = c.client.Put(). + Cluster(c.cluster). Resource("testtypes"). Name(testType.Name). SubResource("status"). @@ -147,6 +154,7 @@ func (c *testTypes) UpdateStatus(ctx context.Context, testType *example2.TestTyp // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *testTypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("testtypes"). Name(name). Body(&opts). @@ -161,6 +169,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("testtypes"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -173,6 +182,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example2.TestType, err error) { result = &example2.TestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("testtypes"). Name(name). SubResource(subresources...). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/example3.io_client.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/example3.io_client.go index 375506d08b5ed..380a539f8a619 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/example3.io_client.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/example3.io_client.go @@ -33,6 +33,7 @@ type ThirdExampleInterface interface { // ThirdExampleClient is used to interact with features provided by the example.dots.apiserver.code-generator.k8s.io group. type ThirdExampleClient struct { restClient rest.Interface + cluster string } func (c *ThirdExampleClient) TestTypes(namespace string) TestTypeInterface { @@ -65,7 +66,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ThirdExampleClient, if err != nil { return nil, err } - return &ThirdExampleClient{client}, nil + return &ThirdExampleClient{restClient: client}, nil } // NewForConfigOrDie creates a new ThirdExampleClient for the given config and @@ -80,7 +81,12 @@ func NewForConfigOrDie(c *rest.Config) *ThirdExampleClient { // New creates a new ThirdExampleClient for the given RESTClient. func New(c rest.Interface) *ThirdExampleClient { - return &ThirdExampleClient{c} + return &ThirdExampleClient{restClient: c} +} + +// NewWithCluster creates a new ThirdExampleClient for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ThirdExampleClient { + return &ThirdExampleClient{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go index e24d29fd52cc3..11008eeda9ede 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go @@ -52,15 +52,17 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newTestTypes returns a TestTypes func newTestTypes(c *ThirdExampleClient, namespace string) *testTypes { return &testTypes{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newTestTypes(c *ThirdExampleClient, namespace string) *testTypes { func (c *testTypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *example3io.TestType, err error) { result = &example3io.TestType{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -85,6 +88,7 @@ func (c *testTypes) List(ctx context.Context, opts v1.ListOptions) (result *exam } result = &example3io.TestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *testTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter func (c *testTypes) Create(ctx context.Context, testType *example3io.TestType, opts v1.CreateOptions) (result *example3io.TestType, err error) { result = &example3io.TestType{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *testTypes) Create(ctx context.Context, testType *example3io.TestType, o func (c *testTypes) Update(ctx context.Context, testType *example3io.TestType, opts v1.UpdateOptions) (result *example3io.TestType, err error) { result = &example3io.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -141,6 +147,7 @@ func (c *testTypes) Update(ctx context.Context, testType *example3io.TestType, o func (c *testTypes) UpdateStatus(ctx context.Context, testType *example3io.TestType, opts v1.UpdateOptions) (result *example3io.TestType, err error) { result = &example3io.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -155,6 +162,7 @@ func (c *testTypes) UpdateStatus(ctx context.Context, testType *example3io.TestT // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *testTypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -170,6 +178,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example3io.TestType, err error) { result = &example3io.TestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/clientset.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/clientset.go index eb535065289e6..e7e74db1cb60b 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/clientset.go @@ -30,6 +30,33 @@ import ( thirdexamplev1 "k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface ExampleV1() examplev1.ExampleV1Interface @@ -40,6 +67,13 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient exampleV1 *examplev1.ExampleV1Client secondExampleV1 *secondexamplev1.SecondExampleV1Client @@ -48,17 +82,17 @@ type Clientset struct { // ExampleV1 retrieves the ExampleV1Client func (c *Clientset) ExampleV1() examplev1.ExampleV1Interface { - return c.exampleV1 + return examplev1.NewWithCluster(c.exampleV1.RESTClient(), c.cluster) } // SecondExampleV1 retrieves the SecondExampleV1Client func (c *Clientset) SecondExampleV1() secondexamplev1.SecondExampleV1Interface { - return c.secondExampleV1 + return secondexamplev1.NewWithCluster(c.secondExampleV1.RESTClient(), c.cluster) } // ThirdExampleV1 retrieves the ThirdExampleV1Client func (c *Clientset) ThirdExampleV1() thirdexamplev1.ThirdExampleV1Interface { - return c.thirdExampleV1 + return thirdexamplev1.NewWithCluster(c.thirdExampleV1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -99,7 +133,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.exampleV1, err = examplev1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -118,7 +152,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -133,11 +167,11 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.exampleV1 = examplev1.New(c) cs.secondExampleV1 = secondexamplev1.New(c) cs.thirdExampleV1 = thirdexamplev1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/example_client.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/example_client.go index d6ce711fc2548..27fed4e5d9b65 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/example_client.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/example_client.go @@ -34,6 +34,7 @@ type ExampleV1Interface interface { // ExampleV1Client is used to interact with features provided by the example.apiserver.code-generator.k8s.io group. type ExampleV1Client struct { restClient rest.Interface + cluster string } func (c *ExampleV1Client) TestTypes(namespace string) TestTypeInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ExampleV1Client, er if err != nil { return nil, err } - return &ExampleV1Client{client}, nil + return &ExampleV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new ExampleV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *ExampleV1Client { // New creates a new ExampleV1Client for the given RESTClient. func New(c rest.Interface) *ExampleV1Client { - return &ExampleV1Client{c} + return &ExampleV1Client{restClient: c} +} + +// NewWithCluster creates a new ExampleV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ExampleV1Client { + return &ExampleV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go index 450e107a4efd6..d2b8e530f293d 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go @@ -52,15 +52,17 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newTestTypes returns a TestTypes func newTestTypes(c *ExampleV1Client, namespace string) *testTypes { return &testTypes{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newTestTypes(c *ExampleV1Client, namespace string) *testTypes { func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -85,6 +88,7 @@ func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result * } result = &v1.TestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -141,6 +147,7 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -155,6 +162,7 @@ func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opt // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *testTypes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -170,6 +178,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go index 7c7b66d9561db..6c14ad0c0e07c 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go @@ -34,6 +34,7 @@ type SecondExampleV1Interface interface { // SecondExampleV1Client is used to interact with features provided by the example.test.apiserver.code-generator.k8s.io group. type SecondExampleV1Client struct { restClient rest.Interface + cluster string } func (c *SecondExampleV1Client) TestTypes(namespace string) TestTypeInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SecondExampleV1Clie if err != nil { return nil, err } - return &SecondExampleV1Client{client}, nil + return &SecondExampleV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new SecondExampleV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *SecondExampleV1Client { // New creates a new SecondExampleV1Client for the given RESTClient. func New(c rest.Interface) *SecondExampleV1Client { - return &SecondExampleV1Client{c} + return &SecondExampleV1Client{restClient: c} +} + +// NewWithCluster creates a new SecondExampleV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *SecondExampleV1Client { + return &SecondExampleV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go index da6ea8676b0d2..6b65c1e3598da 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go @@ -52,15 +52,17 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newTestTypes returns a TestTypes func newTestTypes(c *SecondExampleV1Client, namespace string) *testTypes { return &testTypes{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newTestTypes(c *SecondExampleV1Client, namespace string) *testTypes { func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -85,6 +88,7 @@ func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result * } result = &v1.TestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -141,6 +147,7 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -155,6 +162,7 @@ func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opt // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *testTypes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -170,6 +178,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/example3.io_client.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/example3.io_client.go index a1e03a4645a6e..816572ac6c617 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/example3.io_client.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/example3.io_client.go @@ -34,6 +34,7 @@ type ThirdExampleV1Interface interface { // ThirdExampleV1Client is used to interact with features provided by the example.dots.apiserver.code-generator.k8s.io group. type ThirdExampleV1Client struct { restClient rest.Interface + cluster string } func (c *ThirdExampleV1Client) TestTypes(namespace string) TestTypeInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ThirdExampleV1Clien if err != nil { return nil, err } - return &ThirdExampleV1Client{client}, nil + return &ThirdExampleV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new ThirdExampleV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *ThirdExampleV1Client { // New creates a new ThirdExampleV1Client for the given RESTClient. func New(c rest.Interface) *ThirdExampleV1Client { - return &ThirdExampleV1Client{c} + return &ThirdExampleV1Client{restClient: c} +} + +// NewWithCluster creates a new ThirdExampleV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ThirdExampleV1Client { + return &ThirdExampleV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go index a4067ea72b054..e91d3532e4562 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go @@ -52,15 +52,17 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newTestTypes returns a TestTypes func newTestTypes(c *ThirdExampleV1Client, namespace string) *testTypes { return &testTypes{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newTestTypes(c *ThirdExampleV1Client, namespace string) *testTypes { func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -85,6 +88,7 @@ func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result * } result = &v1.TestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -141,6 +147,7 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -155,6 +162,7 @@ func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opt // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *testTypes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -170,6 +178,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/clientset.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/clientset.go index a13fc472b0f6c..d682b659e1b78 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/clientset.go @@ -29,6 +29,33 @@ import ( secondexamplev1 "k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface ExampleV1() examplev1.ExampleV1Interface @@ -38,6 +65,13 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient exampleV1 *examplev1.ExampleV1Client secondExampleV1 *secondexamplev1.SecondExampleV1Client @@ -45,12 +79,12 @@ type Clientset struct { // ExampleV1 retrieves the ExampleV1Client func (c *Clientset) ExampleV1() examplev1.ExampleV1Interface { - return c.exampleV1 + return examplev1.NewWithCluster(c.exampleV1.RESTClient(), c.cluster) } // SecondExampleV1 retrieves the SecondExampleV1Client func (c *Clientset) SecondExampleV1() secondexamplev1.SecondExampleV1Interface { - return c.secondExampleV1 + return secondexamplev1.NewWithCluster(c.secondExampleV1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -91,7 +125,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.exampleV1, err = examplev1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -106,7 +140,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -121,10 +155,10 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.exampleV1 = examplev1.New(c) cs.secondExampleV1 = secondexamplev1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go index e6dd1ace7146e..6fd6c4e29c961 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go @@ -56,13 +56,15 @@ type ClusterTestTypeInterface interface { // clusterTestTypes implements ClusterTestTypeInterface type clusterTestTypes struct { - client rest.Interface + client rest.Interface + cluster string } // newClusterTestTypes returns a ClusterTestTypes func newClusterTestTypes(c *ExampleV1Client) *clusterTestTypes { return &clusterTestTypes{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -70,6 +72,7 @@ func newClusterTestTypes(c *ExampleV1Client) *clusterTestTypes { func (c *clusterTestTypes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -86,6 +89,7 @@ func (c *clusterTestTypes) List(ctx context.Context, opts metav1.ListOptions) (r } result = &v1.ClusterTestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -112,6 +116,7 @@ func (c *clusterTestTypes) Watch(ctx context.Context, opts metav1.ListOptions) ( func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.CreateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Post(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). @@ -124,6 +129,7 @@ func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.Clust func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestType.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -138,6 +144,7 @@ func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.Clust func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestType.Name). SubResource("status"). @@ -151,6 +158,7 @@ func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1 // Delete takes name of the clusterTestType and deletes it. Returns an error if one occurs. func (c *clusterTestTypes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(name). Body(&opts). @@ -165,6 +173,7 @@ func (c *clusterTestTypes) DeleteCollection(ctx context.Context, opts metav1.Del timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -177,6 +186,7 @@ func (c *clusterTestTypes) DeleteCollection(ctx context.Context, opts metav1.Del func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("clustertesttypes"). Name(name). SubResource(subresources...). @@ -191,6 +201,7 @@ func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.Patc func (c *clusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). @@ -204,6 +215,7 @@ func (c *clusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName str func (c *clusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). + Cluster(c.cluster). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/example_client.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/example_client.go index fe1210416fb19..b266f940a3dfa 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/example_client.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/example_client.go @@ -35,6 +35,7 @@ type ExampleV1Interface interface { // ExampleV1Client is used to interact with features provided by the example.crd.code-generator.k8s.io group. type ExampleV1Client struct { restClient rest.Interface + cluster string } func (c *ExampleV1Client) ClusterTestTypes() ClusterTestTypeInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ExampleV1Client, er if err != nil { return nil, err } - return &ExampleV1Client{client}, nil + return &ExampleV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new ExampleV1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *ExampleV1Client { // New creates a new ExampleV1Client for the given RESTClient. func New(c rest.Interface) *ExampleV1Client { - return &ExampleV1Client{c} + return &ExampleV1Client{restClient: c} +} + +// NewWithCluster creates a new ExampleV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ExampleV1Client { + return &ExampleV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go index cb2f196564202..6daa768839d32 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go @@ -52,15 +52,17 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newTestTypes returns a TestTypes func newTestTypes(c *ExampleV1Client, namespace string) *testTypes { return &testTypes{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newTestTypes(c *ExampleV1Client, namespace string) *testTypes { func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -85,6 +88,7 @@ func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result * } result = &v1.TestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -141,6 +147,7 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -155,6 +162,7 @@ func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opt // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *testTypes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -170,6 +178,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/example2_client.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/example2_client.go index e771449297ff4..21a9e750511df 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/example2_client.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/example2_client.go @@ -34,6 +34,7 @@ type SecondExampleV1Interface interface { // SecondExampleV1Client is used to interact with features provided by the example.test.crd.code-generator.k8s.io group. type SecondExampleV1Client struct { restClient rest.Interface + cluster string } func (c *SecondExampleV1Client) TestTypes(namespace string) TestTypeInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SecondExampleV1Clie if err != nil { return nil, err } - return &SecondExampleV1Client{client}, nil + return &SecondExampleV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new SecondExampleV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *SecondExampleV1Client { // New creates a new SecondExampleV1Client for the given RESTClient. func New(c rest.Interface) *SecondExampleV1Client { - return &SecondExampleV1Client{c} + return &SecondExampleV1Client{restClient: c} +} + +// NewWithCluster creates a new SecondExampleV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *SecondExampleV1Client { + return &SecondExampleV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go index bc11f4b767b54..0e5064877b519 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go @@ -52,15 +52,17 @@ type TestTypeInterface interface { // testTypes implements TestTypeInterface type testTypes struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newTestTypes returns a TestTypes func newTestTypes(c *SecondExampleV1Client, namespace string) *testTypes { return &testTypes{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newTestTypes(c *SecondExampleV1Client, namespace string) *testTypes { func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -85,6 +88,7 @@ func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result * } result = &v1.TestTypeList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -141,6 +147,7 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts meta func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). @@ -155,6 +162,7 @@ func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opt // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *testTypes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). @@ -170,6 +178,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *testTypes) DeleteCollection(ctx context.Context, opts metav1.DeleteOpti func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). Name(name). diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go index 7ba462f44efb1..d3be6dd5d617e 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go @@ -29,6 +29,33 @@ import ( apiregistrationv1beta1 "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface ApiregistrationV1beta1() apiregistrationv1beta1.ApiregistrationV1beta1Interface @@ -38,6 +65,13 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient apiregistrationV1beta1 *apiregistrationv1beta1.ApiregistrationV1beta1Client apiregistrationV1 *apiregistrationv1.ApiregistrationV1Client @@ -45,12 +79,12 @@ type Clientset struct { // ApiregistrationV1beta1 retrieves the ApiregistrationV1beta1Client func (c *Clientset) ApiregistrationV1beta1() apiregistrationv1beta1.ApiregistrationV1beta1Interface { - return c.apiregistrationV1beta1 + return apiregistrationv1beta1.NewWithCluster(c.apiregistrationV1beta1.RESTClient(), c.cluster) } // ApiregistrationV1 retrieves the ApiregistrationV1Client func (c *Clientset) ApiregistrationV1() apiregistrationv1.ApiregistrationV1Interface { - return c.apiregistrationV1 + return apiregistrationv1.NewWithCluster(c.apiregistrationV1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -91,7 +125,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.apiregistrationV1beta1, err = apiregistrationv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -106,7 +140,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -121,10 +155,10 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.apiregistrationV1beta1 = apiregistrationv1beta1.New(c) cs.apiregistrationV1 = apiregistrationv1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiregistration_client.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiregistration_client.go index f6dc74aa93571..87b93b186d1b8 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiregistration_client.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiregistration_client.go @@ -34,6 +34,7 @@ type ApiregistrationV1Interface interface { // ApiregistrationV1Client is used to interact with features provided by the apiregistration.k8s.io group. type ApiregistrationV1Client struct { restClient rest.Interface + cluster string } func (c *ApiregistrationV1Client) APIServices() APIServiceInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ApiregistrationV1Cl if err != nil { return nil, err } - return &ApiregistrationV1Client{client}, nil + return &ApiregistrationV1Client{restClient: client}, nil } // NewForConfigOrDie creates a new ApiregistrationV1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *ApiregistrationV1Client { // New creates a new ApiregistrationV1Client for the given RESTClient. func New(c rest.Interface) *ApiregistrationV1Client { - return &ApiregistrationV1Client{c} + return &ApiregistrationV1Client{restClient: c} +} + +// NewWithCluster creates a new ApiregistrationV1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ApiregistrationV1Client { + return &ApiregistrationV1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go index 25bf6ea44b9ac..d7effa62bbc0b 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go @@ -52,13 +52,15 @@ type APIServiceInterface interface { // aPIServices implements APIServiceInterface type aPIServices struct { - client rest.Interface + client rest.Interface + cluster string } // newAPIServices returns a APIServices func newAPIServices(c *ApiregistrationV1Client) *aPIServices { return &aPIServices{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -66,6 +68,7 @@ func newAPIServices(c *ApiregistrationV1Client) *aPIServices { func (c *aPIServices) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.APIService, err error) { result = &v1.APIService{} err = c.client.Get(). + Cluster(c.cluster). Resource("apiservices"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -82,6 +85,7 @@ func (c *aPIServices) List(ctx context.Context, opts metav1.ListOptions) (result } result = &v1.APIServiceList{} err = c.client.Get(). + Cluster(c.cluster). Resource("apiservices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -108,6 +112,7 @@ func (c *aPIServices) Watch(ctx context.Context, opts metav1.ListOptions) (watch func (c *aPIServices) Create(ctx context.Context, aPIService *v1.APIService, opts metav1.CreateOptions) (result *v1.APIService, err error) { result = &v1.APIService{} err = c.client.Post(). + Cluster(c.cluster). Resource("apiservices"). VersionedParams(&opts, scheme.ParameterCodec). Body(aPIService). @@ -120,6 +125,7 @@ func (c *aPIServices) Create(ctx context.Context, aPIService *v1.APIService, opt func (c *aPIServices) Update(ctx context.Context, aPIService *v1.APIService, opts metav1.UpdateOptions) (result *v1.APIService, err error) { result = &v1.APIService{} err = c.client.Put(). + Cluster(c.cluster). Resource("apiservices"). Name(aPIService.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -134,6 +140,7 @@ func (c *aPIServices) Update(ctx context.Context, aPIService *v1.APIService, opt func (c *aPIServices) UpdateStatus(ctx context.Context, aPIService *v1.APIService, opts metav1.UpdateOptions) (result *v1.APIService, err error) { result = &v1.APIService{} err = c.client.Put(). + Cluster(c.cluster). Resource("apiservices"). Name(aPIService.Name). SubResource("status"). @@ -147,6 +154,7 @@ func (c *aPIServices) UpdateStatus(ctx context.Context, aPIService *v1.APIServic // Delete takes name of the aPIService and deletes it. Returns an error if one occurs. func (c *aPIServices) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("apiservices"). Name(name). Body(&opts). @@ -161,6 +169,7 @@ func (c *aPIServices) DeleteCollection(ctx context.Context, opts metav1.DeleteOp timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("apiservices"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -173,6 +182,7 @@ func (c *aPIServices) DeleteCollection(ctx context.Context, opts metav1.DeleteOp func (c *aPIServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.APIService, err error) { result = &v1.APIService{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("apiservices"). Name(name). SubResource(subresources...). diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiregistration_client.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiregistration_client.go index de1e781ba80c3..c2fe017cc5dad 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiregistration_client.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiregistration_client.go @@ -34,6 +34,7 @@ type ApiregistrationV1beta1Interface interface { // ApiregistrationV1beta1Client is used to interact with features provided by the apiregistration.k8s.io group. type ApiregistrationV1beta1Client struct { restClient rest.Interface + cluster string } func (c *ApiregistrationV1beta1Client) APIServices() APIServiceInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ApiregistrationV1be if err != nil { return nil, err } - return &ApiregistrationV1beta1Client{client}, nil + return &ApiregistrationV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new ApiregistrationV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *ApiregistrationV1beta1Client { // New creates a new ApiregistrationV1beta1Client for the given RESTClient. func New(c rest.Interface) *ApiregistrationV1beta1Client { - return &ApiregistrationV1beta1Client{c} + return &ApiregistrationV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new ApiregistrationV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *ApiregistrationV1beta1Client { + return &ApiregistrationV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go index a5e76412e1d53..9ec81977ac729 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go @@ -52,13 +52,15 @@ type APIServiceInterface interface { // aPIServices implements APIServiceInterface type aPIServices struct { - client rest.Interface + client rest.Interface + cluster string } // newAPIServices returns a APIServices func newAPIServices(c *ApiregistrationV1beta1Client) *aPIServices { return &aPIServices{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -66,6 +68,7 @@ func newAPIServices(c *ApiregistrationV1beta1Client) *aPIServices { func (c *aPIServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.APIService, err error) { result = &v1beta1.APIService{} err = c.client.Get(). + Cluster(c.cluster). Resource("apiservices"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -82,6 +85,7 @@ func (c *aPIServices) List(ctx context.Context, opts v1.ListOptions) (result *v1 } result = &v1beta1.APIServiceList{} err = c.client.Get(). + Cluster(c.cluster). Resource("apiservices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -108,6 +112,7 @@ func (c *aPIServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int func (c *aPIServices) Create(ctx context.Context, aPIService *v1beta1.APIService, opts v1.CreateOptions) (result *v1beta1.APIService, err error) { result = &v1beta1.APIService{} err = c.client.Post(). + Cluster(c.cluster). Resource("apiservices"). VersionedParams(&opts, scheme.ParameterCodec). Body(aPIService). @@ -120,6 +125,7 @@ func (c *aPIServices) Create(ctx context.Context, aPIService *v1beta1.APIService func (c *aPIServices) Update(ctx context.Context, aPIService *v1beta1.APIService, opts v1.UpdateOptions) (result *v1beta1.APIService, err error) { result = &v1beta1.APIService{} err = c.client.Put(). + Cluster(c.cluster). Resource("apiservices"). Name(aPIService.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -134,6 +140,7 @@ func (c *aPIServices) Update(ctx context.Context, aPIService *v1beta1.APIService func (c *aPIServices) UpdateStatus(ctx context.Context, aPIService *v1beta1.APIService, opts v1.UpdateOptions) (result *v1beta1.APIService, err error) { result = &v1beta1.APIService{} err = c.client.Put(). + Cluster(c.cluster). Resource("apiservices"). Name(aPIService.Name). SubResource("status"). @@ -147,6 +154,7 @@ func (c *aPIServices) UpdateStatus(ctx context.Context, aPIService *v1beta1.APIS // Delete takes name of the aPIService and deletes it. Returns an error if one occurs. func (c *aPIServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("apiservices"). Name(name). Body(&opts). @@ -161,6 +169,7 @@ func (c *aPIServices) DeleteCollection(ctx context.Context, opts v1.DeleteOption timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("apiservices"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -173,6 +182,7 @@ func (c *aPIServices) DeleteCollection(ctx context.Context, opts v1.DeleteOption func (c *aPIServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.APIService, err error) { result = &v1beta1.APIService{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("apiservices"). Name(name). SubResource(subresources...). diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/clientset.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/clientset.go index 3141a8b450e73..deb66ae8d6a73 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/clientset.go @@ -29,6 +29,33 @@ import ( metricsv1beta1 "k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface MetricsV1alpha1() metricsv1alpha1.MetricsV1alpha1Interface @@ -38,6 +65,13 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient metricsV1alpha1 *metricsv1alpha1.MetricsV1alpha1Client metricsV1beta1 *metricsv1beta1.MetricsV1beta1Client @@ -45,12 +79,12 @@ type Clientset struct { // MetricsV1alpha1 retrieves the MetricsV1alpha1Client func (c *Clientset) MetricsV1alpha1() metricsv1alpha1.MetricsV1alpha1Interface { - return c.metricsV1alpha1 + return metricsv1alpha1.NewWithCluster(c.metricsV1alpha1.RESTClient(), c.cluster) } // MetricsV1beta1 retrieves the MetricsV1beta1Client func (c *Clientset) MetricsV1beta1() metricsv1beta1.MetricsV1beta1Interface { - return c.metricsV1beta1 + return metricsv1beta1.NewWithCluster(c.metricsV1beta1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -91,7 +125,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.metricsV1alpha1, err = metricsv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -106,7 +140,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -121,10 +155,10 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.metricsV1alpha1 = metricsv1alpha1.New(c) cs.metricsV1beta1 = metricsv1beta1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/metrics_client.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/metrics_client.go index efc23042d4761..ae6a132234b6e 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/metrics_client.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/metrics_client.go @@ -35,6 +35,7 @@ type MetricsV1alpha1Interface interface { // MetricsV1alpha1Client is used to interact with features provided by the metrics.k8s.io group. type MetricsV1alpha1Client struct { restClient rest.Interface + cluster string } func (c *MetricsV1alpha1Client) NodeMetricses() NodeMetricsInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*MetricsV1alpha1Clie if err != nil { return nil, err } - return &MetricsV1alpha1Client{client}, nil + return &MetricsV1alpha1Client{restClient: client}, nil } // NewForConfigOrDie creates a new MetricsV1alpha1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *MetricsV1alpha1Client { // New creates a new MetricsV1alpha1Client for the given RESTClient. func New(c rest.Interface) *MetricsV1alpha1Client { - return &MetricsV1alpha1Client{c} + return &MetricsV1alpha1Client{restClient: c} +} + +// NewWithCluster creates a new MetricsV1alpha1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *MetricsV1alpha1Client { + return &MetricsV1alpha1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go index d79163ddb816f..72424d5c2d539 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go @@ -45,13 +45,15 @@ type NodeMetricsInterface interface { // nodeMetricses implements NodeMetricsInterface type nodeMetricses struct { - client rest.Interface + client rest.Interface + cluster string } // newNodeMetricses returns a NodeMetricses func newNodeMetricses(c *MetricsV1alpha1Client) *nodeMetricses { return &nodeMetricses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -59,6 +61,7 @@ func newNodeMetricses(c *MetricsV1alpha1Client) *nodeMetricses { func (c *nodeMetricses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.NodeMetrics, err error) { result = &v1alpha1.NodeMetrics{} err = c.client.Get(). + Cluster(c.cluster). Resource("nodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -75,6 +78,7 @@ func (c *nodeMetricses) List(ctx context.Context, opts v1.ListOptions) (result * } result = &v1alpha1.NodeMetricsList{} err = c.client.Get(). + Cluster(c.cluster). Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go index 49d57c8e887ee..981ea29cdfecf 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go @@ -45,15 +45,17 @@ type PodMetricsInterface interface { // podMetricses implements PodMetricsInterface type podMetricses struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newPodMetricses returns a PodMetricses func newPodMetricses(c *MetricsV1alpha1Client, namespace string) *podMetricses { return &podMetricses{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -61,6 +63,7 @@ func newPodMetricses(c *MetricsV1alpha1Client, namespace string) *podMetricses { func (c *podMetricses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodMetrics, err error) { result = &v1alpha1.PodMetrics{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). Name(name). @@ -78,6 +81,7 @@ func (c *podMetricses) List(ctx context.Context, opts v1.ListOptions) (result *v } result = &v1alpha1.PodMetricsList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/metrics_client.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/metrics_client.go index 7a02cea2e5efd..15f77207e08be 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/metrics_client.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/metrics_client.go @@ -35,6 +35,7 @@ type MetricsV1beta1Interface interface { // MetricsV1beta1Client is used to interact with features provided by the metrics.k8s.io group. type MetricsV1beta1Client struct { restClient rest.Interface + cluster string } func (c *MetricsV1beta1Client) NodeMetricses() NodeMetricsInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*MetricsV1beta1Clien if err != nil { return nil, err } - return &MetricsV1beta1Client{client}, nil + return &MetricsV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new MetricsV1beta1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *MetricsV1beta1Client { // New creates a new MetricsV1beta1Client for the given RESTClient. func New(c rest.Interface) *MetricsV1beta1Client { - return &MetricsV1beta1Client{c} + return &MetricsV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new MetricsV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *MetricsV1beta1Client { + return &MetricsV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go index a312221ed25ae..1d8df993e9ad7 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go @@ -45,13 +45,15 @@ type NodeMetricsInterface interface { // nodeMetricses implements NodeMetricsInterface type nodeMetricses struct { - client rest.Interface + client rest.Interface + cluster string } // newNodeMetricses returns a NodeMetricses func newNodeMetricses(c *MetricsV1beta1Client) *nodeMetricses { return &nodeMetricses{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -59,6 +61,7 @@ func newNodeMetricses(c *MetricsV1beta1Client) *nodeMetricses { func (c *nodeMetricses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.NodeMetrics, err error) { result = &v1beta1.NodeMetrics{} err = c.client.Get(). + Cluster(c.cluster). Resource("nodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -75,6 +78,7 @@ func (c *nodeMetricses) List(ctx context.Context, opts v1.ListOptions) (result * } result = &v1beta1.NodeMetricsList{} err = c.client.Get(). + Cluster(c.cluster). Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go index e66c377c25bae..6cbe8bb28edc8 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go @@ -45,15 +45,17 @@ type PodMetricsInterface interface { // podMetricses implements PodMetricsInterface type podMetricses struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newPodMetricses returns a PodMetricses func newPodMetricses(c *MetricsV1beta1Client, namespace string) *podMetricses { return &podMetricses{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -61,6 +63,7 @@ func newPodMetricses(c *MetricsV1beta1Client, namespace string) *podMetricses { func (c *podMetricses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodMetrics, err error) { result = &v1beta1.PodMetrics{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). Name(name). @@ -78,6 +81,7 @@ func (c *podMetricses) List(ctx context.Context, opts v1.ListOptions) (result *v } result = &v1beta1.PodMetricsList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/clientset.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/clientset.go index 09fa5721140fc..9093986de37c6 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/clientset.go @@ -29,6 +29,33 @@ import ( wardlev1beta1 "k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface WardleV1alpha1() wardlev1alpha1.WardleV1alpha1Interface @@ -38,6 +65,13 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient wardleV1alpha1 *wardlev1alpha1.WardleV1alpha1Client wardleV1beta1 *wardlev1beta1.WardleV1beta1Client @@ -45,12 +79,12 @@ type Clientset struct { // WardleV1alpha1 retrieves the WardleV1alpha1Client func (c *Clientset) WardleV1alpha1() wardlev1alpha1.WardleV1alpha1Interface { - return c.wardleV1alpha1 + return wardlev1alpha1.NewWithCluster(c.wardleV1alpha1.RESTClient(), c.cluster) } // WardleV1beta1 retrieves the WardleV1beta1Client func (c *Clientset) WardleV1beta1() wardlev1beta1.WardleV1beta1Interface { - return c.wardleV1beta1 + return wardlev1beta1.NewWithCluster(c.wardleV1beta1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -91,7 +125,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.wardleV1alpha1, err = wardlev1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -106,7 +140,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -121,10 +155,10 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.wardleV1alpha1 = wardlev1alpha1.New(c) cs.wardleV1beta1 = wardlev1beta1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go index d2d9df76c65fb..b900dd800f7b7 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go @@ -51,13 +51,15 @@ type FischerInterface interface { // fischers implements FischerInterface type fischers struct { - client rest.Interface + client rest.Interface + cluster string } // newFischers returns a Fischers func newFischers(c *WardleV1alpha1Client) *fischers { return &fischers{ - client: c.RESTClient(), + client: c.RESTClient(), + cluster: c.cluster, } } @@ -65,6 +67,7 @@ func newFischers(c *WardleV1alpha1Client) *fischers { func (c *fischers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Fischer, err error) { result = &v1alpha1.Fischer{} err = c.client.Get(). + Cluster(c.cluster). Resource("fischers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). @@ -81,6 +84,7 @@ func (c *fischers) List(ctx context.Context, opts v1.ListOptions) (result *v1alp } result = &v1alpha1.FischerList{} err = c.client.Get(). + Cluster(c.cluster). Resource("fischers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). @@ -107,6 +111,7 @@ func (c *fischers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf func (c *fischers) Create(ctx context.Context, fischer *v1alpha1.Fischer, opts v1.CreateOptions) (result *v1alpha1.Fischer, err error) { result = &v1alpha1.Fischer{} err = c.client.Post(). + Cluster(c.cluster). Resource("fischers"). VersionedParams(&opts, scheme.ParameterCodec). Body(fischer). @@ -119,6 +124,7 @@ func (c *fischers) Create(ctx context.Context, fischer *v1alpha1.Fischer, opts v func (c *fischers) Update(ctx context.Context, fischer *v1alpha1.Fischer, opts v1.UpdateOptions) (result *v1alpha1.Fischer, err error) { result = &v1alpha1.Fischer{} err = c.client.Put(). + Cluster(c.cluster). Resource("fischers"). Name(fischer.Name). VersionedParams(&opts, scheme.ParameterCodec). @@ -131,6 +137,7 @@ func (c *fischers) Update(ctx context.Context, fischer *v1alpha1.Fischer, opts v // Delete takes name of the fischer and deletes it. Returns an error if one occurs. func (c *fischers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Resource("fischers"). Name(name). Body(&opts). @@ -145,6 +152,7 @@ func (c *fischers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Resource("fischers"). VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). @@ -157,6 +165,7 @@ func (c *fischers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, func (c *fischers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Fischer, err error) { result = &v1alpha1.Fischer{} err = c.client.Patch(pt). + Cluster(c.cluster). Resource("fischers"). Name(name). SubResource(subresources...). diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go index 30b1f5c297c91..03bb24f759329 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go @@ -52,15 +52,17 @@ type FlunderInterface interface { // flunders implements FlunderInterface type flunders struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newFlunders returns a Flunders func newFlunders(c *WardleV1alpha1Client, namespace string) *flunders { return &flunders{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newFlunders(c *WardleV1alpha1Client, namespace string) *flunders { func (c *flunders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Flunder, err error) { result = &v1alpha1.Flunder{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). Name(name). @@ -85,6 +88,7 @@ func (c *flunders) List(ctx context.Context, opts v1.ListOptions) (result *v1alp } result = &v1alpha1.FlunderList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *flunders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf func (c *flunders) Create(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.CreateOptions) (result *v1alpha1.Flunder, err error) { result = &v1alpha1.Flunder{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *flunders) Create(ctx context.Context, flunder *v1alpha1.Flunder, opts v func (c *flunders) Update(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.UpdateOptions) (result *v1alpha1.Flunder, err error) { result = &v1alpha1.Flunder{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). Name(flunder.Name). @@ -141,6 +147,7 @@ func (c *flunders) Update(ctx context.Context, flunder *v1alpha1.Flunder, opts v func (c *flunders) UpdateStatus(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.UpdateOptions) (result *v1alpha1.Flunder, err error) { result = &v1alpha1.Flunder{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). Name(flunder.Name). @@ -155,6 +162,7 @@ func (c *flunders) UpdateStatus(ctx context.Context, flunder *v1alpha1.Flunder, // Delete takes name of the flunder and deletes it. Returns an error if one occurs. func (c *flunders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). Name(name). @@ -170,6 +178,7 @@ func (c *flunders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *flunders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, func (c *flunders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Flunder, err error) { result = &v1alpha1.Flunder{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). Name(name). diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/wardle_client.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/wardle_client.go index f2ef02895c3f0..2d0c5f11abca0 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/wardle_client.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/wardle_client.go @@ -35,6 +35,7 @@ type WardleV1alpha1Interface interface { // WardleV1alpha1Client is used to interact with features provided by the wardle.example.com group. type WardleV1alpha1Client struct { restClient rest.Interface + cluster string } func (c *WardleV1alpha1Client) Fischers() FischerInterface { @@ -71,7 +72,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*WardleV1alpha1Clien if err != nil { return nil, err } - return &WardleV1alpha1Client{client}, nil + return &WardleV1alpha1Client{restClient: client}, nil } // NewForConfigOrDie creates a new WardleV1alpha1Client for the given config and @@ -86,7 +87,12 @@ func NewForConfigOrDie(c *rest.Config) *WardleV1alpha1Client { // New creates a new WardleV1alpha1Client for the given RESTClient. func New(c rest.Interface) *WardleV1alpha1Client { - return &WardleV1alpha1Client{c} + return &WardleV1alpha1Client{restClient: c} +} + +// NewWithCluster creates a new WardleV1alpha1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *WardleV1alpha1Client { + return &WardleV1alpha1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go index 9afcb3a17d51d..0bb6c0f03c626 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go @@ -52,15 +52,17 @@ type FlunderInterface interface { // flunders implements FlunderInterface type flunders struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newFlunders returns a Flunders func newFlunders(c *WardleV1beta1Client, namespace string) *flunders { return &flunders{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newFlunders(c *WardleV1beta1Client, namespace string) *flunders { func (c *flunders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Flunder, err error) { result = &v1beta1.Flunder{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). Name(name). @@ -85,6 +88,7 @@ func (c *flunders) List(ctx context.Context, opts v1.ListOptions) (result *v1bet } result = &v1beta1.FlunderList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *flunders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf func (c *flunders) Create(ctx context.Context, flunder *v1beta1.Flunder, opts v1.CreateOptions) (result *v1beta1.Flunder, err error) { result = &v1beta1.Flunder{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *flunders) Create(ctx context.Context, flunder *v1beta1.Flunder, opts v1 func (c *flunders) Update(ctx context.Context, flunder *v1beta1.Flunder, opts v1.UpdateOptions) (result *v1beta1.Flunder, err error) { result = &v1beta1.Flunder{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). Name(flunder.Name). @@ -141,6 +147,7 @@ func (c *flunders) Update(ctx context.Context, flunder *v1beta1.Flunder, opts v1 func (c *flunders) UpdateStatus(ctx context.Context, flunder *v1beta1.Flunder, opts v1.UpdateOptions) (result *v1beta1.Flunder, err error) { result = &v1beta1.Flunder{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). Name(flunder.Name). @@ -155,6 +162,7 @@ func (c *flunders) UpdateStatus(ctx context.Context, flunder *v1beta1.Flunder, o // Delete takes name of the flunder and deletes it. Returns an error if one occurs. func (c *flunders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). Name(name). @@ -170,6 +178,7 @@ func (c *flunders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *flunders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, func (c *flunders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Flunder, err error) { result = &v1beta1.Flunder{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). Name(name). diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/wardle_client.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/wardle_client.go index 43cb529377d0d..7b69d3ae8e622 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/wardle_client.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/wardle_client.go @@ -34,6 +34,7 @@ type WardleV1beta1Interface interface { // WardleV1beta1Client is used to interact with features provided by the wardle.example.com group. type WardleV1beta1Client struct { restClient rest.Interface + cluster string } func (c *WardleV1beta1Client) Flunders(namespace string) FlunderInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*WardleV1beta1Client if err != nil { return nil, err } - return &WardleV1beta1Client{client}, nil + return &WardleV1beta1Client{restClient: client}, nil } // NewForConfigOrDie creates a new WardleV1beta1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *WardleV1beta1Client { // New creates a new WardleV1beta1Client for the given RESTClient. func New(c rest.Interface) *WardleV1beta1Client { - return &WardleV1beta1Client{c} + return &WardleV1beta1Client{restClient: c} +} + +// NewWithCluster creates a new WardleV1beta1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *WardleV1beta1Client { + return &WardleV1beta1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { diff --git a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/clientset.go b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/clientset.go index 3b2d65659a34e..ed836f9816c33 100644 --- a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/clientset.go @@ -28,6 +28,33 @@ import ( samplecontrollerv1alpha1 "k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1" ) +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClientset +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &Clientset{ + scopedClientset: c.scopedClientset, + cluster: name, + } +} + +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClientset: cs.scopedClientset}, nil +} + type Interface interface { Discovery() discovery.DiscoveryInterface SamplecontrollerV1alpha1() samplecontrollerv1alpha1.SamplecontrollerV1alpha1Interface @@ -36,13 +63,20 @@ type Interface interface { // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { + *scopedClientset + cluster string +} + +// scopedClientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type scopedClientset struct { *discovery.DiscoveryClient samplecontrollerV1alpha1 *samplecontrollerv1alpha1.SamplecontrollerV1alpha1Client } // SamplecontrollerV1alpha1 retrieves the SamplecontrollerV1alpha1Client func (c *Clientset) SamplecontrollerV1alpha1() samplecontrollerv1alpha1.SamplecontrollerV1alpha1Interface { - return c.samplecontrollerV1alpha1 + return samplecontrollerv1alpha1.NewWithCluster(c.samplecontrollerV1alpha1.RESTClient(), c.cluster) } // Discovery retrieves the DiscoveryClient @@ -83,7 +117,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + var cs scopedClientset var err error cs.samplecontrollerV1alpha1, err = samplecontrollerv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -94,7 +128,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - return &cs, nil + return &Clientset{scopedClientset: &cs}, nil } // NewForConfigOrDie creates a new Clientset for the given config and @@ -109,9 +143,9 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { - var cs Clientset + var cs scopedClientset cs.samplecontrollerV1alpha1 = samplecontrollerv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs + return &Clientset{scopedClientset: &cs} } diff --git a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go index ab190b2fa73ab..4ce00687ac746 100644 --- a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go +++ b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go @@ -52,15 +52,17 @@ type FooInterface interface { // foos implements FooInterface type foos struct { - client rest.Interface - ns string + client rest.Interface + cluster string + ns string } // newFoos returns a Foos func newFoos(c *SamplecontrollerV1alpha1Client, namespace string) *foos { return &foos{ - client: c.RESTClient(), - ns: namespace, + client: c.RESTClient(), + cluster: c.cluster, + ns: namespace, } } @@ -68,6 +70,7 @@ func newFoos(c *SamplecontrollerV1alpha1Client, namespace string) *foos { func (c *foos) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Foo, err error) { result = &v1alpha1.Foo{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("foos"). Name(name). @@ -85,6 +88,7 @@ func (c *foos) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1. } result = &v1alpha1.FooList{} err = c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("foos"). VersionedParams(&opts, scheme.ParameterCodec). @@ -113,6 +117,7 @@ func (c *foos) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, func (c *foos) Create(ctx context.Context, foo *v1alpha1.Foo, opts v1.CreateOptions) (result *v1alpha1.Foo, err error) { result = &v1alpha1.Foo{} err = c.client.Post(). + Cluster(c.cluster). Namespace(c.ns). Resource("foos"). VersionedParams(&opts, scheme.ParameterCodec). @@ -126,6 +131,7 @@ func (c *foos) Create(ctx context.Context, foo *v1alpha1.Foo, opts v1.CreateOpti func (c *foos) Update(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (result *v1alpha1.Foo, err error) { result = &v1alpha1.Foo{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("foos"). Name(foo.Name). @@ -141,6 +147,7 @@ func (c *foos) Update(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOpti func (c *foos) UpdateStatus(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (result *v1alpha1.Foo, err error) { result = &v1alpha1.Foo{} err = c.client.Put(). + Cluster(c.cluster). Namespace(c.ns). Resource("foos"). Name(foo.Name). @@ -155,6 +162,7 @@ func (c *foos) UpdateStatus(ctx context.Context, foo *v1alpha1.Foo, opts v1.Upda // Delete takes name of the foo and deletes it. Returns an error if one occurs. func (c *foos) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("foos"). Name(name). @@ -170,6 +178,7 @@ func (c *foos) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, list timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). + Cluster(c.cluster). Namespace(c.ns). Resource("foos"). VersionedParams(&listOpts, scheme.ParameterCodec). @@ -183,6 +192,7 @@ func (c *foos) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, list func (c *foos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Foo, err error) { result = &v1alpha1.Foo{} err = c.client.Patch(pt). + Cluster(c.cluster). Namespace(c.ns). Resource("foos"). Name(name). diff --git a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/samplecontroller_client.go b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/samplecontroller_client.go index a4bdb0c721258..86e8c66a25306 100644 --- a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/samplecontroller_client.go +++ b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/samplecontroller_client.go @@ -34,6 +34,7 @@ type SamplecontrollerV1alpha1Interface interface { // SamplecontrollerV1alpha1Client is used to interact with features provided by the samplecontroller.k8s.io group. type SamplecontrollerV1alpha1Client struct { restClient rest.Interface + cluster string } func (c *SamplecontrollerV1alpha1Client) Foos(namespace string) FooInterface { @@ -66,7 +67,7 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SamplecontrollerV1a if err != nil { return nil, err } - return &SamplecontrollerV1alpha1Client{client}, nil + return &SamplecontrollerV1alpha1Client{restClient: client}, nil } // NewForConfigOrDie creates a new SamplecontrollerV1alpha1Client for the given config and @@ -81,7 +82,12 @@ func NewForConfigOrDie(c *rest.Config) *SamplecontrollerV1alpha1Client { // New creates a new SamplecontrollerV1alpha1Client for the given RESTClient. func New(c rest.Interface) *SamplecontrollerV1alpha1Client { - return &SamplecontrollerV1alpha1Client{c} + return &SamplecontrollerV1alpha1Client{restClient: c} +} + +// NewWithCluster creates a new SamplecontrollerV1alpha1Client for the given RESTClient and cluster. +func NewWithCluster(c rest.Interface, cluster string) *SamplecontrollerV1alpha1Client { + return &SamplecontrollerV1alpha1Client{restClient: c, cluster: cluster} } func setConfigDefaults(config *rest.Config) error { From 9b116afab60aca2390e244e3be249f84a13c6515 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Tue, 19 Oct 2021 12:06:04 -0700 Subject: [PATCH 39/87] e2e: add a kcp suite Signed-off-by: Steve Kuznetsov --- hack/run-kcp-e2e.sh | 26 + .../clientutils/multiclusterconfig.go | 13 +- pkg/genericcontrolplane/server.go | 2 +- staging/src/k8s.io/client-go/rest/request.go | 8 +- test/e2e/e2e.go | 1 + test/e2e/e2e_test.go | 1 + test/e2e/framework/framework.go | 45 +- test/e2e/framework/providers/kcp/kcp.go | 86 +++ test/e2e/framework/util.go | 18 +- test/e2e/kcpapimachinery/framework.go | 24 + test/e2e/kcpapimachinery/watch.go | 714 ++++++++++++++++++ test/e2e/kcpapimachinery/workflow.go | 111 +++ 12 files changed, 1024 insertions(+), 25 deletions(-) create mode 100755 hack/run-kcp-e2e.sh create mode 100644 test/e2e/framework/providers/kcp/kcp.go create mode 100644 test/e2e/kcpapimachinery/framework.go create mode 100644 test/e2e/kcpapimachinery/watch.go create mode 100644 test/e2e/kcpapimachinery/workflow.go diff --git a/hack/run-kcp-e2e.sh b/hack/run-kcp-e2e.sh new file mode 100755 index 0000000000000..b3ecdbc5a950e --- /dev/null +++ b/hack/run-kcp-e2e.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +time make WHAT=test/e2e/e2e.test + +kubeconfig="${WORKDIR}/.kcp2/data/admin.kubeconfig" + +## each of the single-cluster contexts passes normal e2e +for context in "admin" "user" "other"; do + _output/local/bin/linux/amd64/e2e.test --e2e-verify-service-account=false --ginkgo.focus "Watchers" \ + --kubeconfig "${kubeconfig}" --context "${context}" \ + --provider local +done + +# the multi-cluster list/watcher works with all the single-cluster contexts +_output/local/bin/linux/amd64/e2e.test --e2e-verify-service-account=false --ginkgo.focus "MultiClusterWorkflow" \ + --kubeconfig "${kubeconfig}" --context "admin" \ + --provider kcp \ + --kcp-multi-cluster-kubeconfig "${kubeconfig}" --kcp-multi-cluster-context "cross-cluster" \ + --kcp-secondary-kubeconfig "${kubeconfig}" --kcp-secondary-context "user" \ + --kcp-tertiary-kubeconfig "${kubeconfig}" --kcp-tertiary-context "other" \ + --kcp-clusterless-kubeconfig "${kubeconfig}" --kcp-clusterless-context "admin" diff --git a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go index 827288f519eeb..7592a62ba7438 100644 --- a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go +++ b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go @@ -42,7 +42,8 @@ import ( type multiClusterClientConfigRoundTripper struct { rt http.RoundTripper requestInfoResolver func() genericapirequest.RequestInfoResolver - enabledOn sets.String + enabledOn sets.String + disableSharding bool } // EnableMultiCluster allows uses a rountripper to hack the rest.Config used by @@ -53,7 +54,7 @@ type multiClusterClientConfigRoundTripper struct { // // This is a temporary hack and should be replaced by thoughtful and real support of logical clusters // in the client-go layer -func EnableMultiCluster(config *rest.Config, apiServerConfig *genericapiserver.Config, enabledOnResources ...string) { +func EnableMultiCluster(config *rest.Config, apiServerConfig *genericapiserver.Config, disableSharding bool, enabledOnResources ...string) { config.ContentConfig.ContentType = "application/json" config.Wrap(func(rt http.RoundTripper) http.RoundTripper { @@ -67,7 +68,8 @@ func EnableMultiCluster(config *rest.Config, apiServerConfig *genericapiserver.C return defaultResolver } }, - enabledOn: sets.NewString(enabledOnResources...), + enabledOn: sets.NewString(enabledOnResources...), + disableSharding: disableSharding, } }) } @@ -157,6 +159,9 @@ func (mcrt *multiClusterClientConfigRoundTripper) RoundTrip(req *http.Request) ( req.Header.Add("X-Kubernetes-Cluster", contextCluster.Name) } } - req.Header.Add("X-Kubernetes-Sharded-Request", "false") + if mcrt.disableSharding { + // let internal clients opt out of sharding for now + req.Header.Add("X-Kubernetes-Sharded-Request", "true") + } return mcrt.rt.RoundTrip(req) } diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 5170b2925436e..f89ed1759cedd 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -387,7 +387,7 @@ func BuildGenericConfig( kubeClientConfig := genericConfig.LoopbackClientConfig - clientutils.EnableMultiCluster(genericConfig.LoopbackClientConfig, genericConfig, "namespaces", "apiservices", "customresourcedefinitions") + clientutils.EnableMultiCluster(genericConfig.LoopbackClientConfig, genericConfig, true, "namespaces", "apiservices", "customresourcedefinitions") clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) if err != nil { diff --git a/staging/src/k8s.io/client-go/rest/request.go b/staging/src/k8s.io/client-go/rest/request.go index bf29526687452..ec42a1852b064 100644 --- a/staging/src/k8s.io/client-go/rest/request.go +++ b/staging/src/k8s.io/client-go/rest/request.go @@ -970,11 +970,13 @@ func (r *Request) newHTTPRequest(ctx context.Context) (*http.Request, error) { req = req.WithContext(ctx) req.Header = r.headers if r.debug { + klog.Info("v=== DELEGATED REQUEST ===v") v, e := httputil.DumpRequestOut(req, true) - klog.V(10).Info(string(v)) + klog.Info(string(v)) if e != nil { klog.Error(e) } + klog.Info("^=== DELEGATED REQUEST ===^") } return req, nil } @@ -1037,11 +1039,13 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp } resp, err := client.Do(req) if r.debug { + klog.Info("^v=== DELEGATED RESPONSE ===v") v, e := httputil.DumpResponse(resp, true) - klog.V(10).Info(string(v)) + klog.Info(string(v)) if e != nil { klog.Error(e) } + klog.Info("^=== DELEGATED RESPONSE ===^") } updateURLMetrics(ctx, r, resp, err) if err != nil { diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index 60028b7a1e3fb..75c36399f863c 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -57,6 +57,7 @@ import ( _ "k8s.io/kubernetes/test/e2e/framework/providers/aws" _ "k8s.io/kubernetes/test/e2e/framework/providers/azure" _ "k8s.io/kubernetes/test/e2e/framework/providers/gce" + _ "k8s.io/kubernetes/test/e2e/framework/providers/kcp" _ "k8s.io/kubernetes/test/e2e/framework/providers/kubemark" _ "k8s.io/kubernetes/test/e2e/framework/providers/openstack" _ "k8s.io/kubernetes/test/e2e/framework/providers/vsphere" diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 3d6bb5ceceb7f..f82433b4298ff 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -49,6 +49,7 @@ import ( _ "k8s.io/kubernetes/test/e2e/cloud" _ "k8s.io/kubernetes/test/e2e/common" _ "k8s.io/kubernetes/test/e2e/instrumentation" + _ "k8s.io/kubernetes/test/e2e/kcpapimachinery" _ "k8s.io/kubernetes/test/e2e/kubectl" _ "k8s.io/kubernetes/test/e2e/lifecycle" _ "k8s.io/kubernetes/test/e2e/lifecycle/bootstrap" diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 0b8f3491416e7..afd3efdb9c212 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -72,6 +72,10 @@ type Framework struct { clientConfig *rest.Config ClientSet clientset.Interface + MultiClusterClientSet clientset.Interface + SecondaryClientSet clientset.Interface + TertiaryClientSet clientset.Interface + ClusterlessClientSet clientset.ClusterInterface KubemarkExternalClusterClientSet clientset.Interface DynamicClient dynamic.Interface @@ -388,17 +392,21 @@ func (f *Framework) AfterEach() { // if delete-namespace is true and delete-namespace-on-failure is false, namespace will be preserved if test failed. if TestContext.DeleteNamespace && (TestContext.DeleteNamespaceOnFailure || !ginkgo.CurrentGinkgoTestDescription().Failed) { for _, ns := range f.namespacesToDelete { - ginkgo.By(fmt.Sprintf("Destroying namespace %q for this suite.", ns.Name)) - if err := f.ClientSet.CoreV1().Namespaces().Delete(context.TODO(), ns.Name, metav1.DeleteOptions{}); err != nil { - if !apierrors.IsNotFound(err) { - nsDeletionErrors[ns.Name] = err - - // Dump namespace if we are unable to delete the namespace and the dump was not already performed. - if !ginkgo.CurrentGinkgoTestDescription().Failed && TestContext.DumpLogsOnFailure { - DumpAllNamespaceInfo(f.ClientSet, ns.Name) + for i, client := range []clientset.Interface{f.ClientSet, f.SecondaryClientSet, f.TertiaryClientSet} { + if client != nil { + ginkgo.By(fmt.Sprintf("Destroying namespace %q for this suite.", ns.Name)) + if err := client.CoreV1().Namespaces().Delete(context.TODO(), ns.Name, metav1.DeleteOptions{}); err != nil { + if !apierrors.IsNotFound(err) { + nsDeletionErrors[fmt.Sprintf("%d-%s", i, ns.Name)] = err + + // Dump namespace if we are unable to delete the namespace and the dump was not already performed. + if !ginkgo.CurrentGinkgoTestDescription().Failed && TestContext.DumpLogsOnFailure { + DumpAllNamespaceInfo(client, ns.Name) + } + } else { + Logf("Namespace %v was already deleted", ns.Name) + } } - } else { - Logf("Namespace %v was already deleted", ns.Name) } } } @@ -519,6 +527,7 @@ func (f *Framework) CreateNamespace(baseName string, labels map[string]string) ( createTestingNS = CreateTestingNS } ns, err := createTestingNS(baseName, f.ClientSet, labels) + // check ns instead of err to see if it's nil as we may // fail to create serviceAccount in it. f.AddNamespacesToDelete(ns) @@ -526,8 +535,22 @@ func (f *Framework) CreateNamespace(baseName string, labels map[string]string) ( if err == nil && !f.SkipPrivilegedPSPBinding { CreatePrivilegedPSPBinding(f.ClientSet, ns.Name) } + for _, clientSet := range []clientset.Interface{f.SecondaryClientSet, f.TertiaryClientSet} { + if clientSet != nil { + ns, err = CreateSpecificTestingNS(func() string { + return ns.Name + }, clientSet, labels) + + if err == nil && !f.SkipPrivilegedPSPBinding { + CreatePrivilegedPSPBinding(clientSet, ns.Name) + } + if err != nil { + return ns, err + } + } + } - return ns, err + return ns, err // TODO: what do callers even need here if we create multiple? } // RecordFlakeIfError records flakeness info if error happens. diff --git a/test/e2e/framework/providers/kcp/kcp.go b/test/e2e/framework/providers/kcp/kcp.go new file mode 100644 index 0000000000000..9db2c380c7568 --- /dev/null +++ b/test/e2e/framework/providers/kcp/kcp.go @@ -0,0 +1,86 @@ +/* +Copyright 2018 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 kcp + +import ( + "flag" + "fmt" + + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/kubernetes/test/e2e/framework" +) + +var ( + kcpMultiClusterKubeconfig = flag.String(fmt.Sprintf("%s-%s", "kcp-multi-cluster", clientcmd.RecommendedConfigPathFlag), "", "Path to kubeconfig containing embedded authinfo for kcp multi-cluster client.") + kcpMultiClusterContext = flag.String(fmt.Sprintf("%s-context", "kcp-multi-cluster"), "", "Context within multi-cluster kubeconfig to use.") + + kcpSecondaryKubeconfig = flag.String(fmt.Sprintf("%s-%s", "kcp-secondary", clientcmd.RecommendedConfigPathFlag), "", "Path to kubeconfig containing embedded authinfo for kcp secondary client.") + kcpSecondaryContext = flag.String(fmt.Sprintf("%s-context", "kcp-secondary"), "", "Context within secondary kubeconfig to use.") + + kcpTertiaryKubeconfig = flag.String(fmt.Sprintf("%s-%s", "kcp-tertiary", clientcmd.RecommendedConfigPathFlag), "", "Path to kubeconfig containing embedded authinfo for kcp tertiary client.") + kcpTertiaryContext = flag.String(fmt.Sprintf("%s-context", "kcp-tertiary"), "", "Context within tertiary kubeconfig to use.") + + kcpClusterlessKubeconfig = flag.String(fmt.Sprintf("%s-%s", "kcp-clusterless", clientcmd.RecommendedConfigPathFlag), "", "Path to kubeconfig containing embedded authinfo for kcp clusterless client.") + kcpClusterlessContext = flag.String(fmt.Sprintf("%s-context", "kcp-clusterless"), "", "Context within clusterless kubeconfig to use.") +) + +func init() { + framework.RegisterProvider("kcp", newProvider) +} + +func newProvider() (framework.ProviderInterface, error) { + // Actual initialization happens when the e2e framework gets constructed. + return &Provider{}, nil +} + +// Provider is a structure to handle Kubemark cluster for e2e testing +type Provider struct { + framework.NullProvider +} + +func clientSetFor(kubeconfig, context string) clientset.Interface { + rawConfig, err := clientcmd.LoadFromFile(kubeconfig) + framework.ExpectNoError(err) + config, err := clientcmd.NewNonInteractiveClientConfig(*rawConfig, context, nil, nil).ClientConfig() + framework.ExpectNoError(err) + client, err := clientset.NewForConfig(config) + framework.ExpectNoError(err) + return client +} + +// FrameworkBeforeEach prepares clients, configurations etc. for e2e testing +func (p *Provider) FrameworkBeforeEach(f *framework.Framework) { + if *kcpMultiClusterKubeconfig != "" && *kcpMultiClusterContext != "" && f.MultiClusterClientSet == nil { + f.MultiClusterClientSet = clientSetFor(*kcpMultiClusterKubeconfig, *kcpMultiClusterContext) + } + if *kcpSecondaryKubeconfig != "" && *kcpSecondaryContext != "" && f.SecondaryClientSet == nil { + f.SecondaryClientSet = clientSetFor(*kcpSecondaryKubeconfig, *kcpSecondaryContext) + } + if *kcpTertiaryKubeconfig != "" && *kcpTertiaryContext != "" && f.TertiaryClientSet == nil { + f.TertiaryClientSet = clientSetFor(*kcpTertiaryKubeconfig, *kcpTertiaryContext) + } + if *kcpClusterlessKubeconfig != "" && *kcpClusterlessContext != "" && f.ClusterlessClientSet == nil { + rawConfig, err := clientcmd.LoadFromFile(*kcpClusterlessKubeconfig) + framework.ExpectNoError(err) + config, err := clientcmd.NewNonInteractiveClientConfig(*rawConfig, *kcpClusterlessContext, nil, nil).ClientConfig() + framework.ExpectNoError(err) + client, err := clientset.NewClusterForConfig(config) + framework.ExpectNoError(err) + f.ClusterlessClientSet = client + } +} diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 29d0fd2f2df38..1257536cc1bdb 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -324,19 +324,22 @@ func WaitForDefaultServiceAccountInNamespace(c clientset.Interface, namespace st // CreateTestingNS should be used by every test, note that we append a common prefix to the provided test name. // Please see NewFramework instead of using this directly. func CreateTestingNS(baseName string, c clientset.Interface, labels map[string]string) (*v1.Namespace, error) { + return CreateSpecificTestingNS(func() string { + return fmt.Sprintf("%v-%v", baseName, RandomSuffix()) + }, c, labels) +} + +// CreateSpecificTestingNS should be used by every test, note that we append a common prefix to the provided test name. +// Please see NewFramework instead of using this directly. +func CreateSpecificTestingNS(nameGenerator func() string, c clientset.Interface, labels map[string]string) (*v1.Namespace, error) { if labels == nil { labels = map[string]string{} } labels["e2e-run"] = string(RunID) - // We don't use ObjectMeta.GenerateName feature, as in case of API call - // failure we don't know whether the namespace was created and what is its - // name. - name := fmt.Sprintf("%v-%v", baseName, RandomSuffix()) - namespaceObj := &v1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: name, + Name: nameGenerator(), Namespace: "", Labels: labels, }, @@ -351,7 +354,7 @@ func CreateTestingNS(baseName string, c clientset.Interface, labels map[string]s if apierrors.IsAlreadyExists(err) { // regenerate on conflict Logf("Namespace name %q was already taken, generate a new name and retry", namespaceObj.Name) - namespaceObj.Name = fmt.Sprintf("%v-%v", baseName, RandomSuffix()) + namespaceObj.Name = nameGenerator() } else { Logf("Unexpected error while creating namespace: %v", err) } @@ -902,6 +905,7 @@ func dumpEventsInNamespace(eventsLister EventsLister, namespace string) { // DumpAllNamespaceInfo dumps events, pods and nodes information in the given namespace. func DumpAllNamespaceInfo(c clientset.Interface, namespace string) { + return dumpEventsInNamespace(func(opts metav1.ListOptions, ns string) (*v1.EventList, error) { return c.CoreV1().Events(ns).List(context.TODO(), opts) }, namespace) diff --git a/test/e2e/kcpapimachinery/framework.go b/test/e2e/kcpapimachinery/framework.go new file mode 100644 index 0000000000000..9631ca41e5203 --- /dev/null +++ b/test/e2e/kcpapimachinery/framework.go @@ -0,0 +1,24 @@ +/* +Copyright 2017 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 apimachinery + +import "github.com/onsi/ginkgo" + +// SIGDescribe annotates the test with the SIG label. +func SIGDescribe(text string, body func()) bool { + return ginkgo.Describe("[sig-api-machinery] "+text, body) +} diff --git a/test/e2e/kcpapimachinery/watch.go b/test/e2e/kcpapimachinery/watch.go new file mode 100644 index 0000000000000..5b7d6f412df5b --- /dev/null +++ b/test/e2e/kcpapimachinery/watch.go @@ -0,0 +1,714 @@ +/* +Copyright 2018 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 apimachinery + +import ( + "context" + "encoding/base64" + "encoding/json" + "fmt" + "k8s.io/kubernetes/pkg/genericcontrolplane" + "math/rand" + "sort" + "strconv" + "sync" + "time" + + "github.com/google/go-cmp/cmp" + v1 "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + clientset "k8s.io/client-go/kubernetes" + cachetools "k8s.io/client-go/tools/cache" + watchtools "k8s.io/client-go/tools/watch" + "k8s.io/kubernetes/test/e2e/framework" + + "github.com/onsi/ginkgo" +) + +const ( + watchConfigMapLabelKey = "watch-this-configmap" + watchConfigMapNamespaceLabelKey = "configmap-namespace" + + multipleWatchersLabelValueA = "multiple-watchers-A" + multipleWatchersLabelValueB = "multiple-watchers-B" + fromResourceVersionLabelValue = "from-resource-version" + watchRestartedLabelValue = "watch-closed-and-restarted" + toBeChangedLabelValue = "label-changed-and-restored" +) + +var _ = SIGDescribe("KCP MultiCluster", func() { + f := framework.NewDefaultFramework("watch") + + /* + Release: v1.11 + Testname: watch-configmaps-with-multiple-watchers + Description: Ensure that multiple watchers are able to receive all add, + update, and delete notifications on configmaps that match a label selector and do + not receive notifications for configmaps which do not match that label selector. + */ + framework.ConformanceIt("should observe add, update, and delete watch notifications on configmaps", func() { + if !framework.ProviderIs("kcp") { + return // TODO: how to skip? + } + ns := f.Namespace.Name + + ginkgo.By("creating a watch on configmaps with label A") + watchA, err := watchConfigMaps(f, "", multipleWatchersLabelValueA) + framework.ExpectNoError(err, "failed to create a watch on configmaps with label: %s", multipleWatchersLabelValueA) + + ginkgo.By("creating a watch on configmaps with label B") + watchB, err := watchConfigMaps(f, "", multipleWatchersLabelValueB) + framework.ExpectNoError(err, "failed to create a watch on configmaps with label: %s", multipleWatchersLabelValueB) + + ginkgo.By("creating a watch on configmaps with label A or B") + watchAB, err := watchConfigMaps(f, "", multipleWatchersLabelValueA, multipleWatchersLabelValueB) + framework.ExpectNoError(err, "failed to create a watch on configmaps with label %s or %s", multipleWatchersLabelValueA, multipleWatchersLabelValueB) + + for i, c := range []clientset.Interface{f.ClientSet, f.SecondaryClientSet, f.TertiaryClientSet} { + ginkgo.By(fmt.Sprintf("running with clientset %s", []string{"primary", "secondary", "tertiary"}[i])) + if c != nil { + testConfigMapA := &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "e2e-watch-test-configmap-a", + Labels: map[string]string{ + watchConfigMapNamespaceLabelKey: ns, + watchConfigMapLabelKey: multipleWatchersLabelValueA, + }, + }, + } + testConfigMapB := &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "e2e-watch-test-configmap-b", + Labels: map[string]string{ + watchConfigMapNamespaceLabelKey: ns, + watchConfigMapLabelKey: multipleWatchersLabelValueB, + }, + }, + } + + ginkgo.By("creating a configmap with label A and ensuring the correct watchers observe the notification") + testConfigMapA, err = c.CoreV1().ConfigMaps(ns).Create(context.TODO(), testConfigMapA, metav1.CreateOptions{}) + fmt.Printf("CREATE TYPEMETA: %#v\n", testConfigMapA.TypeMeta) + framework.ExpectNoError(err, "failed to create a configmap with label %s in namespace: %s", multipleWatchersLabelValueA, ns) + expectEvent(watchA, watch.Added, testConfigMapA) + expectEvent(watchAB, watch.Added, testConfigMapA) + expectNoEvent(watchB, watch.Added, testConfigMapA) + + ginkgo.By("modifying configmap A and ensuring the correct watchers observe the notification") + testConfigMapA, err = updateConfigMap(c, ns, testConfigMapA.GetName(), func(cm *v1.ConfigMap) { + setConfigMapData(cm, "mutation", "1") + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace: %s", testConfigMapA.GetName(), ns) + expectEvent(watchA, watch.Modified, testConfigMapA) + expectEvent(watchAB, watch.Modified, testConfigMapA) + expectNoEvent(watchB, watch.Modified, testConfigMapA) + + ginkgo.By("modifying configmap A again and ensuring the correct watchers observe the notification") + testConfigMapA, err = updateConfigMap(c, ns, testConfigMapA.GetName(), func(cm *v1.ConfigMap) { + setConfigMapData(cm, "mutation", "2") + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace: %s", testConfigMapA.GetName(), ns) + expectEvent(watchA, watch.Modified, testConfigMapA) + expectEvent(watchAB, watch.Modified, testConfigMapA) + expectNoEvent(watchB, watch.Modified, testConfigMapA) + + ginkgo.By("deleting configmap A and ensuring the correct watchers observe the notification") + err = c.CoreV1().ConfigMaps(ns).Delete(context.TODO(), testConfigMapA.GetName(), metav1.DeleteOptions{}) + framework.ExpectNoError(err, "failed to delete configmap %s in namespace: %s", testConfigMapA.GetName(), ns) + expectEvent(watchA, watch.Deleted, nil) + expectEvent(watchAB, watch.Deleted, nil) + expectNoEvent(watchB, watch.Deleted, nil) + + ginkgo.By("creating a configmap with label B and ensuring the correct watchers observe the notification") + testConfigMapB, err = c.CoreV1().ConfigMaps(ns).Create(context.TODO(), testConfigMapB, metav1.CreateOptions{}) + framework.ExpectNoError(err, "failed to create configmap %s in namespace: %s", testConfigMapB, ns) + expectEvent(watchB, watch.Added, testConfigMapB) + expectEvent(watchAB, watch.Added, testConfigMapB) + expectNoEvent(watchA, watch.Added, testConfigMapB) + + ginkgo.By("deleting configmap B and ensuring the correct watchers observe the notification") + err = c.CoreV1().ConfigMaps(ns).Delete(context.TODO(), testConfigMapB.GetName(), metav1.DeleteOptions{}) + framework.ExpectNoError(err, "failed to delete configmap %s in namespace: %s", testConfigMapB.GetName(), ns) + expectEvent(watchB, watch.Deleted, nil) + expectEvent(watchAB, watch.Deleted, nil) + expectNoEvent(watchA, watch.Deleted, nil) + } + } + }) + + /* + Release: v1.11 + Testname: watch-configmaps-from-resource-version + Description: Ensure that a watch can be opened from a particular resource version + in the past and only notifications happening after that resource version are observed. + */ + framework.ConformanceIt("should be able to start watching from a specific resource version", func() { + ns := f.Namespace.Name + + for i, c := range []clientset.Interface{f.ClientSet, f.SecondaryClientSet, f.TertiaryClientSet} { + ginkgo.By(fmt.Sprintf("running with clientset %s", []string{"primary", "secondary", "tertiary"}[i])) + if c != nil { + testConfigMap := &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "e2e-watch-test-resource-version", + Labels: map[string]string{ + watchConfigMapNamespaceLabelKey: ns, + watchConfigMapLabelKey: fromResourceVersionLabelValue, + }, + }, + } + + ginkgo.By("creating a new configmap") + testConfigMap, err := c.CoreV1().ConfigMaps(ns).Create(context.TODO(), testConfigMap, metav1.CreateOptions{}) + framework.ExpectNoError(err, "failed to create configmap %s in namespace: %s", testConfigMap.GetName(), ns) + + ginkgo.By("modifying the configmap once") + _, err = updateConfigMap(c, ns, testConfigMap.GetName(), func(cm *v1.ConfigMap) { + setConfigMapData(cm, "mutation", "1") + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace: %s", testConfigMap.GetName(), ns) + listAfterFirstUpdate, err := f.MultiClusterClientSet.CoreV1().ConfigMaps("").List(context.TODO(), metav1.ListOptions{}) + framework.ExpectNoError(err, "failed to list configmaps while getting current resource version") + fmt.Printf("GOT RESOURCE VERSION FROM LIST: %S", listAfterFirstUpdate.ListMeta.ResourceVersion) + + ginkgo.By("modifying the configmap a second time") + testConfigMapSecondUpdate, err := updateConfigMap(c, ns, testConfigMap.GetName(), func(cm *v1.ConfigMap) { + setConfigMapData(cm, "mutation", "2") + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace %s a second time", testConfigMap.GetName(), ns) + + ginkgo.By("deleting the configmap") + err = c.CoreV1().ConfigMaps(ns).Delete(context.TODO(), testConfigMap.GetName(), metav1.DeleteOptions{}) + framework.ExpectNoError(err, "failed to delete configmap %s in namespace: %s", testConfigMap.GetName(), ns) + + ginkgo.By("creating a watch on configmaps from the resource version returned by the first update") + testWatch, err := watchConfigMaps(f, listAfterFirstUpdate.ListMeta.ResourceVersion, fromResourceVersionLabelValue) + framework.ExpectNoError(err, "failed to create a watch on configmaps from the resource version %s returned by a list after the first update", listAfterFirstUpdate.ListMeta.ResourceVersion) + + ginkgo.By("Expecting to observe notifications for all changes to the configmap after the first update") + expectEvent(testWatch, watch.Modified, testConfigMapSecondUpdate) + expectEvent(testWatch, watch.Deleted, nil) + } + } + }) + + /* + Release: v1.11 + Testname: watch-configmaps-closed-and-restarted + Description: Ensure that a watch can be reopened from the last resource version + observed by the previous watch, and it will continue delivering notifications from + that point in time. + */ + framework.ConformanceIt("should be able to restart watching from the last resource version observed by the previous watch", func() { + ns := f.Namespace.Name + + for i, c := range []clientset.Interface{f.ClientSet, f.SecondaryClientSet, f.TertiaryClientSet} { + ginkgo.By(fmt.Sprintf("running with clientset %s", []string{"primary", "secondary", "tertiary"}[i])) + if c != nil { + configMapName := "e2e-watch-test-watch-closed" + testConfigMap := &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: configMapName, + Labels: map[string]string{ + watchConfigMapNamespaceLabelKey: ns, + watchConfigMapLabelKey: watchRestartedLabelValue, + }, + }, + } + + ginkgo.By("creating a watch on configmaps") + testWatchBroken, err := watchConfigMaps(f, "", watchRestartedLabelValue) + framework.ExpectNoError(err, "failed to create a watch on configmap with label: %s", watchRestartedLabelValue) + + ginkgo.By("creating a new configmap") + testConfigMap, err = c.CoreV1().ConfigMaps(ns).Create(context.TODO(), testConfigMap, metav1.CreateOptions{}) + framework.ExpectNoError(err, "failed to create configmap %s in namespace: %s", configMapName, ns) + + ginkgo.By("modifying the configmap once") + _, err = updateConfigMap(c, ns, testConfigMap.GetName(), func(cm *v1.ConfigMap) { + setConfigMapData(cm, "mutation", "1") + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace: %s", configMapName, ns) + + ginkgo.By("closing the watch once it receives two notifications") + expectEvent(testWatchBroken, watch.Added, testConfigMap) + lastEvent, ok := waitForEvent(testWatchBroken, watch.Modified, nil, 1*time.Minute) + if !ok { + framework.Failf("Timed out waiting for second watch notification") + } + testWatchBroken.Stop() + + ginkgo.By("modifying the configmap a second time, while the watch is closed") + testConfigMapSecondUpdate, err := updateConfigMap(c, ns, testConfigMap.GetName(), func(cm *v1.ConfigMap) { + setConfigMapData(cm, "mutation", "2") + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace %s a second time", configMapName, ns) + + ginkgo.By("creating a new watch on configmaps from the last resource version observed by the first watch") + lastEventConfigMap, ok := lastEvent.Object.(*v1.ConfigMap) + if !ok { + framework.Failf("Expected last notification to refer to a configmap but got: %v", lastEvent) + } + testWatchRestarted, err := watchConfigMaps(f, lastEventConfigMap.ObjectMeta.ResourceVersion, watchRestartedLabelValue) + framework.ExpectNoError(err, "failed to create a new watch on configmaps from the last resource version %s observed by the first watch", lastEventConfigMap.ObjectMeta.ResourceVersion) + + ginkgo.By("deleting the configmap") + err = c.CoreV1().ConfigMaps(ns).Delete(context.TODO(), testConfigMap.GetName(), metav1.DeleteOptions{}) + framework.ExpectNoError(err, "failed to delete configmap %s in namespace: %s", configMapName, ns) + + ginkgo.By("Expecting to observe notifications for all changes to the configmap since the first watch closed") + expectEvent(testWatchRestarted, watch.Modified, testConfigMapSecondUpdate) + expectEvent(testWatchRestarted, watch.Deleted, nil) + } + } + }) + + /* + Release: v1.11 + Testname: watch-configmaps-label-changed + Description: Ensure that a watched object stops meeting the requirements of + a watch's selector, the watch will observe a delete, and will not observe + notifications for that object until it meets the selector's requirements again. + */ + framework.ConformanceIt("should observe an object deletion if it stops meeting the requirements of the selector", func() { + ns := f.Namespace.Name + + ginkgo.By("creating a watch on configmaps with a certain label") + testWatch, err := watchConfigMaps(f, "", toBeChangedLabelValue) + framework.ExpectNoError(err, "failed to create a watch on configmap with label: %s", toBeChangedLabelValue) + + for i, c := range []clientset.Interface{f.ClientSet, f.SecondaryClientSet, f.TertiaryClientSet} { + ginkgo.By(fmt.Sprintf("running with clientset %s", []string{"primary", "secondary", "tertiary"}[i])) + if c != nil { + configMapName := "e2e-watch-test-label-changed" + testConfigMap := &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: configMapName, + Labels: map[string]string{ + watchConfigMapNamespaceLabelKey: ns, + watchConfigMapLabelKey: toBeChangedLabelValue, + }, + }, + } + + ginkgo.By("creating a new configmap") + testConfigMap, err = c.CoreV1().ConfigMaps(ns).Create(context.TODO(), testConfigMap, metav1.CreateOptions{}) + framework.ExpectNoError(err, "failed to create configmap %s in namespace: %s", configMapName, ns) + + ginkgo.By("modifying the configmap once") + testConfigMapFirstUpdate, err := updateConfigMap(c, ns, testConfigMap.GetName(), func(cm *v1.ConfigMap) { + setConfigMapData(cm, "mutation", "1") + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace: %s", configMapName, ns) + + ginkgo.By("changing the label value of the configmap") + _, err = updateConfigMap(c, ns, testConfigMap.GetName(), func(cm *v1.ConfigMap) { + cm.ObjectMeta.Labels[watchConfigMapLabelKey] = "wrong-value" + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace %s by changing label value", configMapName, ns) + + ginkgo.By("Expecting to observe a delete notification for the watched object") + expectEvent(testWatch, watch.Added, testConfigMap) + expectEvent(testWatch, watch.Modified, testConfigMapFirstUpdate) + expectEvent(testWatch, watch.Deleted, nil) + + ginkgo.By("modifying the configmap a second time") + testConfigMapSecondUpdate, err := updateConfigMap(c, ns, testConfigMap.GetName(), func(cm *v1.ConfigMap) { + setConfigMapData(cm, "mutation", "2") + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace %s a second time", configMapName, ns) + + ginkgo.By("Expecting not to observe a notification because the object no longer meets the selector's requirements") + expectNoEvent(testWatch, watch.Modified, testConfigMapSecondUpdate) + + ginkgo.By("changing the label value of the configmap back") + testConfigMapLabelRestored, err := updateConfigMap(c, ns, testConfigMap.GetName(), func(cm *v1.ConfigMap) { + cm.ObjectMeta.Labels[watchConfigMapLabelKey] = toBeChangedLabelValue + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace %s by changing label value back", configMapName, ns) + + ginkgo.By("modifying the configmap a third time") + testConfigMapThirdUpdate, err := updateConfigMap(c, ns, testConfigMap.GetName(), func(cm *v1.ConfigMap) { + setConfigMapData(cm, "mutation", "3") + }) + framework.ExpectNoError(err, "failed to update configmap %s in namespace %s a third time", configMapName, ns) + + ginkgo.By("deleting the configmap") + err = c.CoreV1().ConfigMaps(ns).Delete(context.TODO(), testConfigMap.GetName(), metav1.DeleteOptions{}) + framework.ExpectNoError(err, "failed to delete configmap %s in namespace: %s", configMapName, ns) + + ginkgo.By("Expecting to observe an add notification for the watched object when the label value was restored") + expectEvent(testWatch, watch.Added, testConfigMapLabelRestored) + expectEvent(testWatch, watch.Modified, testConfigMapThirdUpdate) + expectEvent(testWatch, watch.Deleted, nil) + } + } + }) + + /* + Release: v1.15 + Testname: watch-consistency + Description: Ensure that concurrent watches are consistent with each other by initiating an additional watch + for events received from the first watch, initiated at the resource version of the event, and checking that all + resource versions of all events match. Events are produced from writes on a background goroutine. + */ + framework.ConformanceIt("should receive events on concurrent watches in same order", func() { + ns := f.Namespace.Name + + iterations := 35 + totalIterations := 0 + + ginkgo.By("getting a starting resourceVersion") + configmaps, err := f.MultiClusterClientSet.CoreV1().ConfigMaps("").List(context.TODO(), metav1.ListOptions{}) + framework.ExpectNoError(err, "Failed to list configmaps") + resourceVersion := configmaps.ResourceVersion + + ginkgo.By("starting a background goroutine to produce watch events") + done := sync.WaitGroup{} + stopc := make(chan struct{}) + for i, c := range []clientset.Interface{f.ClientSet, f.SecondaryClientSet, f.TertiaryClientSet} { + ginkgo.By(fmt.Sprintf("running with clientset %s", []string{"primary", "secondary", "tertiary"}[i])) + if c != nil { + done.Add(1) + totalIterations += iterations + go func(c clientset.Interface) { + defer ginkgo.GinkgoRecover() + defer done.Done() + produceConfigMapEvents(c, ns, iterations, stopc, 5*time.Millisecond) + }(c) + } + } + + listWatcher := &cachetools.ListWatch{ + WatchFunc: func(listOptions metav1.ListOptions) (watch.Interface, error) { + opts := listOptions.DeepCopy() + opts.LabelSelector = metav1.FormatLabelSelector(&metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + // we can't do namespaced list/watch cross-cluster, and need this to be unique for parallelism... + { + Key: watchConfigMapNamespaceLabelKey, + Operator: metav1.LabelSelectorOpIn, + Values: []string{f.Namespace.Name}, + }, + }, + }) + return f.MultiClusterClientSet.CoreV1().ConfigMaps("").Watch(context.TODO(), listOptions) + }, + } + + done.Wait() + + ginkgo.By("creating watches starting from each resource version of the events produced and verifying they all receive resource versions from a given cluster in the same order") + simpleRvFor := func(e *v1.ConfigMap) int64 { + complexRv := ShardedResourceVersions{} + framework.ExpectNoError(complexRv.Decode(e.ResourceVersion), "decoding complex RV from watch event") + clusterName, _, err := genericcontrolplane.ParseClusterName(e.ObjectMeta.ClusterName) + framework.ExpectNoError(err, "parsing cluster name from watch event object") + simpleRv := int64(-1) + for _, item := range complexRv.ResourceVersions { + if item.Identifier == clusterName { + simpleRv = item.ResourceVersion + break + } + } + if simpleRv == -1 { + framework.Failf("could not find resource version for cluster %q in complex RV %#v", clusterName, complexRv) + } + return simpleRv + } + var resourceVersions []map[string][]int64 + wcs := []watch.Interface{} + for i := 0; i < totalIterations; i++ { + wc, err := watchtools.NewRetryWatcher(resourceVersion, listWatcher) + framework.ExpectNoError(err, "Failed to watch configmaps in the namespace %s", ns) + wcs = append(wcs, wc) + e := waitForNextConfigMapEvent(wcs[0]) + resourceVersions = append(resourceVersions, map[string][]int64{ + e.ObjectMeta.ClusterName: {simpleRvFor(e)}, + }) + resourceVersion = e.ResourceVersion + for j, wc := range wcs[1:] { + e := waitForNextConfigMapEvent(wc) + resourceVersions[j][e.ObjectMeta.ClusterName] = append(resourceVersions[j][e.ObjectMeta.ClusterName], simpleRvFor(e)) + } + } + for i, allRvs := range resourceVersions[1:] { + for cluster, rvs := range allRvs { + reference, seen := resourceVersions[0][cluster] + if !seen { + framework.Failf("watcher %d saw events for cluster %q, but the reference watcher did not!", i+1, cluster) + } + startingIndex := -1 + for j, item := range reference { + if item == rvs[0] { + startingIndex = j + } + } + if startingIndex == -1 { + fmt.Println(rvs) + fmt.Println(reference) + framework.Failf("watcher %d started seeing events for cluster %q at rv %q, but the reference watcher never saw that version!", i+1, cluster, rvs[0]) + } + if diff := cmp.Diff(rvs, reference[startingIndex:startingIndex+len(rvs)]); diff != "" { + framework.Failf("watcher %d got incorrect ordering for rvs for cluster %q: %v", i+1, cluster, diff) + } + + if !sort.SliceIsSorted(rvs, func(i, j int) bool { + return rvs[i] < rvs[j] + }) { + framework.Failf("watcher %d got out-of-order rvs for cluster %q: %v", i+1, cluster, rvs) + } + } + } + close(stopc) + for _, wc := range wcs { + wc.Stop() + } + }) +}) + +func watchConfigMaps(f *framework.Framework, resourceVersion string, labels ...string) (watch.Interface, error) { + c := f.MultiClusterClientSet + opts := metav1.ListOptions{ + ResourceVersion: resourceVersion, + LabelSelector: metav1.FormatLabelSelector(&metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: watchConfigMapLabelKey, + Operator: metav1.LabelSelectorOpIn, + Values: labels, + }, + // we can't do namespaced list/watch cross-cluster, and need this to be unique for parallelism... + { + Key: watchConfigMapNamespaceLabelKey, + Operator: metav1.LabelSelectorOpIn, + Values: []string{f.Namespace.Name}, + }, + }, + }), + } + return c.CoreV1().ConfigMaps("").Watch(context.TODO(), opts) +} + +func int64ptr(i int) *int64 { + i64 := int64(i) + return &i64 +} + +func setConfigMapData(cm *v1.ConfigMap, key, value string) { + if cm.Data == nil { + cm.Data = make(map[string]string) + } + cm.Data[key] = value +} + +func expectEvent(w watch.Interface, eventType watch.EventType, object runtime.Object) { + if event, ok := waitForEvent(w, eventType, object, 1*time.Minute); !ok { + framework.Failf("Timed out waiting for expected watch notification: %v", event) + } +} + +func expectNoEvent(w watch.Interface, eventType watch.EventType, object runtime.Object) { + if event, ok := waitForEvent(w, eventType, object, 10*time.Second); ok { + framework.Failf("Unexpected watch notification observed: %v", event) + } +} + +func waitForEvent(w watch.Interface, expectType watch.EventType, expectObject runtime.Object, duration time.Duration) (watch.Event, bool) { + stopTimer := time.NewTimer(duration) + defer stopTimer.Stop() + if expectObject != nil { + // simple (single-cluster) RV can't be compared to those on watch events without racing, so we remove it ... + expectObject = expectObject.DeepCopyObject() + if obj, ok := expectObject.(metav1.Common); ok { + obj.SetResourceVersion("") + } else { + framework.Failf("was passed %T and could not reset RV", expectObject) + } + } + for { + select { + case actual, ok := <-w.ResultChan(): + copied := actual.DeepCopy() + if ok { + framework.Logf("Got : %v %v", actual.Type, actual.Object) + if obj, ok := actual.Object.(metav1.Common); ok { + obj.SetResourceVersion("") + } else if actual.Object != nil { + framework.Failf("got %T and could not reset RV", actual.Object) + } + } else { + framework.Failf("Watch closed unexpectedly") + } + if expectType == actual.Type && (expectObject == nil || apiequality.Semantic.DeepEqual(expectObject, actual.Object)) { + return *copied, true + } else if expectType != actual.Type { + fmt.Printf("INCORRECT TYPE: %v != %v\n", expectType, actual.Type) + } else if expectObject == nil && actual.Object != nil { + fmt.Printf("EXPECTED NIL, GOT: %#v\n", actual.Object) + } else { + fmt.Printf("DIFF: %s\n", cmp.Diff(expectObject, actual.Object)) + } + case <-stopTimer.C: + expected := watch.Event{ + Type: expectType, + Object: expectObject, + } + return expected, false + } + } +} + +func waitForNextConfigMapEvent(watch watch.Interface) *v1.ConfigMap { + select { + case event, ok := <-watch.ResultChan(): + if !ok { + framework.Failf("Watch closed unexpectedly") + } + if configMap, ok := event.Object.(*v1.ConfigMap); ok { + return configMap + } + framework.Failf("expected config map, got %T", event.Object) + case <-time.After(10 * time.Second): + framework.Failf("timed out waiting for watch event") + } + return nil // should never happen +} + +const ( + createEvent = iota + updateEvent + deleteEvent +) + +func produceConfigMapEvents(c clientset.Interface, ns string, iterations int, stopc <-chan struct{}, minWaitBetweenEvents time.Duration) { + name := func(i int) string { + return fmt.Sprintf("cm-%d", i) + } + + existing := []int{} + tc := time.NewTicker(minWaitBetweenEvents) + defer tc.Stop() + var creates, updates, deletes int + i := 0 + for x := 0; x Date: Tue, 16 Nov 2021 13:53:38 -0800 Subject: [PATCH 40/87] HACK: disable service and enpoint informers kcp does not have these types, and starting these informers led to perma-faling messages in the controller logs as well as a failure for kcp to become ready, as the shared informers never synced Signed-off-by: Steve Kuznetsov --- .../pkg/apiserver/apiserver.go | 4 ++-- .../status/available_controller.go | 22 +++---------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go index c704ec76a86ac..6f09d501b4d79 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go @@ -278,8 +278,8 @@ func (c completedConfig) NewWithDelegate(delegationTarget genericapiserver.Deleg availableController, err := statuscontrollers.NewAvailableConditionController( informerFactory.Apiregistration().V1().APIServices(), - c.GenericConfig.SharedInformerFactory.Core().V1().Services(), - c.GenericConfig.SharedInformerFactory.Core().V1().Endpoints(), + nil, + nil, apiregistrationClient.ApiregistrationV1(), c.ExtraConfig.ProxyTransport, (func() ([]byte, []byte))(s.proxyCurrentCertKeyContent), diff --git a/staging/src/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go b/staging/src/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go index 9c89b313167fb..500d906a087b0 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go @@ -145,8 +145,8 @@ func tlsConfigKey(c *rest.Config) tlsCacheKey { // NewAvailableConditionController returns a new AvailableConditionController. func NewAvailableConditionController( apiServiceInformer informers.APIServiceInformer, - serviceInformer v1informers.ServiceInformer, - endpointsInformer v1informers.EndpointsInformer, + _ v1informers.ServiceInformer, + _ v1informers.EndpointsInformer, apiServiceClient apiregistrationclient.APIServicesGetter, proxyTransport *http.Transport, proxyCurrentCertKeyContent certKeyFunc, @@ -157,10 +157,6 @@ func NewAvailableConditionController( apiServiceClient: apiServiceClient, apiServiceLister: apiServiceInformer.Lister(), apiServiceSynced: apiServiceInformer.Informer().HasSynced, - serviceLister: serviceInformer.Lister(), - servicesSynced: serviceInformer.Informer().HasSynced, - endpointsLister: endpointsInformer.Lister(), - endpointsSynced: endpointsInformer.Informer().HasSynced, serviceResolver: serviceResolver, queue: workqueue.NewNamedRateLimitingQueue( // We want a fairly tight requeue time. The controller listens to the API, but because it relies on the routability of the @@ -197,18 +193,6 @@ func NewAvailableConditionController( }, 30*time.Second) - serviceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: c.addService, - UpdateFunc: c.updateService, - DeleteFunc: c.deleteService, - }) - - endpointsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: c.addEndpoints, - UpdateFunc: c.updateEndpoints, - DeleteFunc: c.deleteEndpoints, - }) - c.syncFn = c.sync // TODO: decouple from legacyregistry @@ -491,7 +475,7 @@ func (c *AvailableConditionController) Run(workers int, stopCh <-chan struct{}) klog.Info("Starting AvailableConditionController") defer klog.Info("Shutting down AvailableConditionController") - if !controllers.WaitForCacheSync("AvailableConditionController", stopCh, c.apiServiceSynced, c.servicesSynced, c.endpointsSynced) { + if !controllers.WaitForCacheSync("AvailableConditionController", stopCh, c.apiServiceSynced) { return } From 395903796b21445d415505f2f0bc7f31fbc14bb3 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Thu, 18 Nov 2021 09:11:12 -0800 Subject: [PATCH 41/87] HACK: etcd3: silence spam Signed-off-by: Steve Kuznetsov --- .../src/k8s.io/apiserver/pkg/storage/etcd3/store.go | 8 +------- .../k8s.io/apiserver/pkg/storage/etcd3/watcher.go | 12 +++--------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go index e486a4b779401..9c2d325a841ef 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -1065,13 +1065,10 @@ func decode(codec runtime.Codec, versioner storage.Versioner, value []byte, objP // The etcd key is ultimately the only thing that links us to a cluster if clusterName != "" { if s, ok := objPtr.(metav1.ObjectMetaAccessor); ok { - //klog.Infof("Setting ClusterName %s in appendListItem", clusterName) s.GetObjectMeta().SetClusterName(clusterName) } else if s, ok := objPtr.(metav1.Object); ok { - //klog.Infof("Setting ClusterName %s in appendListItem", clusterName) s.SetClusterName(clusterName) } else if s, ok := objPtr.(*unstructured.Unstructured); ok { - //klog.Infof("SUB: %s", clusterName) s.SetClusterName(clusterName) } else { klog.Warningf("Could not set ClusterName %s in appendListItem on object: %T", clusterName, objPtr) @@ -1101,16 +1098,13 @@ func appendListItem(v reflect.Value, data []byte, rev uint64, pred storage.Selec // The etcd key is ultimately the only thing that links us to a cluster if clusterName != "" { if s, ok := obj.(metav1.ObjectMetaAccessor); ok { - //klog.Infof("Setting ClusterName %s in appendListItem", clusterName) s.GetObjectMeta().SetClusterName(clusterName) } else if s, ok := obj.(metav1.Object); ok { - //klog.Infof("Setting ClusterName %s in appendListItem", clusterName) s.SetClusterName(clusterName) } else if s, ok := obj.(*unstructured.Unstructured); ok { - //klog.Infof("SUB: %s", clusterName) s.SetClusterName(clusterName) } else { - //klog.Infof("Could not set ClusterName %s in appendListItem on object: %T", clusterName, obj) + klog.Warningf("Could not set ClusterName %s in appendListItem on object: %T", clusterName, obj) } } else { klog.Errorf("Cluster should not be unknown") diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go index 34eae1e462a88..6fc9ba79a9d14 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go @@ -35,9 +35,9 @@ import ( utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" clientv3 "go.etcd.io/etcd/client/v3" - "k8s.io/klog/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/klog/v2" ) const ( @@ -457,16 +457,13 @@ func (wc *watchChan) prepareObjs(e *event) (curObj runtime.Object, oldObj runtim // The etcd key is ultimately the only thing that links us to a cluster if clusterName != "" { if s, ok := curObj.(metav1.ObjectMetaAccessor); ok { - klog.Infof("SUB: %s", clusterName) s.GetObjectMeta().SetClusterName(clusterName) } else if s, ok := curObj.(metav1.Object); ok { - klog.Infof("SUB: %s", clusterName) s.SetClusterName(clusterName) } else if s, ok := curObj.(*unstructured.Unstructured); ok { - klog.Infof("SUB: %s", clusterName) s.SetClusterName(clusterName) } else { - klog.Infof("NO SUB: %T %s", curObj, clusterName) + klog.Warningf("Could not set ClusterName %s in prepareObjs on object: %T", clusterName, curObj) } } else { klog.Errorf("Cluster should not be unknown") @@ -503,16 +500,13 @@ func (wc *watchChan) prepareObjs(e *event) (curObj runtime.Object, oldObj runtim // The etcd key is ultimately the only thing that links us to a cluster if clusterName != "" { if s, ok := oldObj.(metav1.ObjectMetaAccessor); ok { - klog.Infof("SUB: %s", clusterName) s.GetObjectMeta().SetClusterName(clusterName) } else if s, ok := oldObj.(metav1.Object); ok { - klog.Infof("SUB: %s", clusterName) s.SetClusterName(clusterName) } else if s, ok := oldObj.(*unstructured.Unstructured); ok { - klog.Infof("SUB: %s", clusterName) s.SetClusterName(clusterName) } else { - klog.Infof("NO SUB: %T %s", oldObj, clusterName) + klog.Warningf("Could not set ClusterName %s in prepareObjs on object: %T", clusterName, curObj) } } else { klog.Errorf("Cluster should not be unknown") From 60240c58958513fe507b5f0c23f0f74b7bec41f8 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Thu, 18 Nov 2021 09:24:17 -0800 Subject: [PATCH 42/87] HACK: remove more spam Signed-off-by: Steve Kuznetsov --- pkg/genericcontrolplane/server.go | 6 ++---- staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index f89ed1759cedd..3795633320753 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -174,11 +174,9 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan } // DAVID TODO: try to understand why adding the cluster returns nil here. The default openAPIService should work - controlPlaneSpec, etag, httpStatus, err := downloader.Download(kubeAPIServer.GenericAPIServer.Handler.Director, "") - klog.Infof(etag, httpStatus) + controlPlaneSpec, _, _, err := downloader.Download(kubeAPIServer.GenericAPIServer.Handler.Director, "") - crdSpecs, etag, httpStatus, err := downloader.Download(withCluster(apiExtensionsServer.GenericAPIServer.Handler.Director), "") - klog.Infof(etag, httpStatus) + crdSpecs, _, _, err := downloader.Download(withCluster(apiExtensionsServer.GenericAPIServer.Handler.Director), "") mergedSpecs, err := builder.MergeSpecs(controlPlaneSpec, crdSpecs) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go index 9c2d325a841ef..0ea27ee16abf1 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -930,8 +930,7 @@ func (s *store) watch(ctx context.Context, key string, opts storage.ListOptions, clusterName = "*" extractClusterSegmentFromKey = true } - - klog.Infof("DEBUG: key=%s willExtractCluster=%t", key, extractClusterSegmentFromKey) + return s.watcher.Watch(ctx, key, int64(rev), recursive, clusterName, opts.ProgressNotify, opts.Predicate) } From e835f376af5880aa43f3e3ac5e745f1ab459ef84 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Thu, 18 Nov 2021 10:17:14 -0800 Subject: [PATCH 43/87] HACK: fix etcd lib compilation Signed-off-by: Steve Kuznetsov --- staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go index 0ea27ee16abf1..a866e9cccc348 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -924,13 +924,11 @@ func (s *store) watch(ctx context.Context, key string, opts storage.ListOptions, if err != nil { return nil, storage.NewInternalError(fmt.Sprintf("Invalid cluster for key %s : %v", key, err)) } - extractClusterSegmentFromKey := false clusterName := cluster.Name if cluster.Wildcard { clusterName = "*" - extractClusterSegmentFromKey = true } - + return s.watcher.Watch(ctx, key, int64(rev), recursive, clusterName, opts.ProgressNotify, opts.Predicate) } From 662e3cd78ed998d71d71064d2f29711473e9124b Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 22 Nov 2021 11:27:44 -0800 Subject: [PATCH 44/87] HACK: negotiation: tell the user what they did wrong The error messages previously did not show the requested content type, which is not useful for the user. Signed-off-by: Steve Kuznetsov --- .../apiserver/pkg/endpoints/handlers/negotiation/errors.go | 7 ++++--- .../pkg/endpoints/handlers/negotiation/negotiate.go | 4 ++-- .../src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/errors.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/errors.go index 86faf525df1d3..2ec005f7d72ce 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/errors.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/errors.go @@ -77,16 +77,17 @@ func (e errNotAcceptableConversion) Status() metav1.Status { // errUnsupportedMediaType indicates Content-Type is not recognized type errUnsupportedMediaType struct { + requested string accepted []string } // NewUnsupportedMediaTypeError returns an error of UnsupportedMediaType which contains specified string -func NewUnsupportedMediaTypeError(accepted []string) error { - return errUnsupportedMediaType{accepted} +func NewUnsupportedMediaTypeError(requested string, accepted []string) error { + return errUnsupportedMediaType{requested: requested, accepted: accepted} } func (e errUnsupportedMediaType) Error() string { - return fmt.Sprintf("the body of the request was in an unknown format - accepted media types include: %v", strings.Join(e.accepted, ", ")) + return fmt.Sprintf("the body of the request was in an unknown format (%s) - accepted media types include: %v", e.requested, strings.Join(e.accepted, ", ")) } func (e errUnsupportedMediaType) Status() metav1.Status { diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go index 9dbad1ea65c29..a236ab6e9fae9 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go @@ -86,9 +86,9 @@ func NegotiateInputSerializerForMediaType(mediaType string, streaming bool, ns r supported, streamingSupported := MediaTypesForSerializer(ns) if streaming { - return runtime.SerializerInfo{}, NewUnsupportedMediaTypeError(streamingSupported) + return runtime.SerializerInfo{}, NewUnsupportedMediaTypeError(mediaType, streamingSupported) } - return runtime.SerializerInfo{}, NewUnsupportedMediaTypeError(supported) + return runtime.SerializerInfo{}, NewUnsupportedMediaTypeError(mediaType, supported) } // isPrettyPrint returns true if the "pretty" query parameter is true or if the User-Agent diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go index 07dbf573b4dc7..fb4f58338153c 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go @@ -83,7 +83,7 @@ func PatchResource(r rest.Patcher, scope *RequestScope, admit admission.Interfac // Ensure the patchType is one we support if !sets.NewString(patchTypes...).Has(contentType) { - scope.err(negotiation.NewUnsupportedMediaTypeError(patchTypes), w, req) + scope.err(negotiation.NewUnsupportedMediaTypeError(contentType, patchTypes), w, req) return } From ee4d0a0635300eab002b03203ee7819b47a1500d Mon Sep 17 00:00:00 2001 From: Joaquim Moreno Date: Fri, 19 Nov 2021 18:45:11 +0000 Subject: [PATCH 45/87] Additional checks to avoid panic due to a non-existant CRD. A wildcard cluster operation against a CRD that doesn't exist caused a panic. Signed-off-by: Joaquim Moreno --- .../pkg/apiserver/customresource_handler.go | 86 +++++++++++-------- 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index 04af5c29715da..1b7ccc5bb49a4 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -51,7 +51,6 @@ import ( "k8s.io/apimachinery/pkg/api/equality" apiequality "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -275,6 +274,18 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { var crdClusterName string var crd *apiextensionsv1.CustomResourceDefinition var err error + handleErrorFunc := func(err error) { + if apierrors.IsNotFound(err) { + r.delegate.ServeHTTP(w, req) + } + if err != nil { + utilruntime.HandleError(err) + responsewriters.ErrorNegotiated( + apierrors.NewInternalError(fmt.Errorf("error resolving resource: %v", err)), + Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req, + ) + } + } cluster, err := genericapirequest.ValidClusterFrom(ctx) if err != nil { @@ -293,45 +304,32 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { // with non-equal specs (especially non-equal schemas). var crds []*apiextensionsv1.CustomResourceDefinition crds, err = r.crdLister.List(labels.Everything()) - if err == nil { - if len(crds) == 0 { - err = errors.NewNotFound(schema.GroupResource{Group: apiextensionsv1.SchemeGroupVersion.Group, Resource: "customresourcedefinitions"}, "") - } else { - for _, aCRD := range crds { - if aCRD.Name != crdName { - continue - } - if crd == nil { - crd = aCRD - crdClusterName = aCRD.GetClusterName() - } else { - if !equality.Semantic.DeepEqual(crd.Spec, aCRD.Spec) { - responsewriters.ErrorNegotiated( - apierrors.NewInternalError(fmt.Errorf("error resolving resource: cannot watch across logical clusters for a resource type with several distinct schemas")), - Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req, - ) - return - } - } - } - } + if err != nil { + handleErrorFunc(err) + return + } + var equal bool // true if all the found CRDs have the same spec + crd, equal = findCRD(crdName, crds) + if !equal { + err = apierrors.NewInternalError(fmt.Errorf("error resolving resource: cannot watch across logical clusters for a resource type with several distinct schemas")) + responsewriters.ErrorNegotiated(err, Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req) + return } + + if crd == nil { + handleErrorFunc(apierrors.NewNotFound(schema.GroupResource{Group: apiextensionsv1.SchemeGroupVersion.Group, Resource: "customresourcedefinitions"}, "")) + return + } + crdClusterName = crd.GetClusterName() + } else { crdClusterName = cluster.Name crdKey := clusters.ToClusterAwareKey(crdClusterName, crdName) crd, err = r.crdLister.Get(crdKey) - } - if apierrors.IsNotFound(err) { - r.delegate.ServeHTTP(w, req) - return - } - if err != nil { - utilruntime.HandleError(err) - responsewriters.ErrorNegotiated( - apierrors.NewInternalError(fmt.Errorf("error resolving resource")), - Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req, - ) - return + if err != nil { + handleErrorFunc(err) + return + } } // if the scope in the CRD and the scope in request differ (with exception of the verbs in possiblyAcrossAllNamespacesVerbs @@ -1580,3 +1578,21 @@ func buildOpenAPIModelsForApply(staticOpenAPISpec *spec.Swagger, crd *apiextensi } return models, nil } +func findCRD(crdName string, crds []*apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, bool) { + var crd *apiextensionsv1.CustomResourceDefinition + + for _, aCRD := range crds { + if aCRD.Name != crdName { + continue + } + if crd == nil { + crd = aCRD + } else { + if !equality.Semantic.DeepEqual(crd.Spec, aCRD.Spec) { + return crd, false + } + } + } + + return crd, true +} From 246d2c46719ef92c2bd318814496c456f4eb0d37 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 22 Nov 2021 15:49:10 -0800 Subject: [PATCH 46/87] HACK: scope dynamic and discovery clients by cluster Signed-off-by: Steve Kuznetsov --- .../client-go/discovery/discovery_client.go | 16 ++++- .../src/k8s.io/client-go/dynamic/simple.go | 61 +++++++++++++++---- .../generators/generator_for_clientset.go | 2 +- 3 files changed, 65 insertions(+), 14 deletions(-) diff --git a/staging/src/k8s.io/client-go/discovery/discovery_client.go b/staging/src/k8s.io/client-go/discovery/discovery_client.go index 50e59c5d85cb6..804dae5e03b50 100644 --- a/staging/src/k8s.io/client-go/discovery/discovery_client.go +++ b/staging/src/k8s.io/client-go/discovery/discovery_client.go @@ -131,6 +131,18 @@ type OpenAPISchemaInterface interface { // DiscoveryClient implements the functions that discover server-supported API groups, // versions and resources. type DiscoveryClient struct { + *scopedClient + cluster string +} + +func (d *DiscoveryClient) WithCluster(cluster string) DiscoveryInterface { + return &DiscoveryClient{ + scopedClient: d.scopedClient, + cluster: cluster, + } +} + +type scopedClient struct { restClient restclient.Interface LegacyPrefix string @@ -506,7 +518,7 @@ func NewDiscoveryClientForConfigAndClient(c *restclient.Config, httpClient *http return nil, err } client, err := restclient.UnversionedRESTClientForConfigAndClient(&config, httpClient) - return &DiscoveryClient{restClient: client, LegacyPrefix: "/api"}, err + return &DiscoveryClient{scopedClient: &scopedClient{restClient: client, LegacyPrefix: "/api"}}, err } // NewDiscoveryClientForConfigOrDie creates a new DiscoveryClient for the given config. If @@ -522,7 +534,7 @@ func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient { // NewDiscoveryClient returns a new DiscoveryClient for the given RESTClient. func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient { - return &DiscoveryClient{restClient: c, LegacyPrefix: "/api"} + return &DiscoveryClient{scopedClient: &scopedClient{restClient: c, LegacyPrefix: "/api"}} } // RESTClient returns a RESTClient that is used to communicate diff --git a/staging/src/k8s.io/client-go/dynamic/simple.go b/staging/src/k8s.io/client-go/dynamic/simple.go index 87594bf2e160b..000dc858a9611 100644 --- a/staging/src/k8s.io/client-go/dynamic/simple.go +++ b/staging/src/k8s.io/client-go/dynamic/simple.go @@ -31,11 +31,43 @@ import ( "k8s.io/client-go/rest" ) -type dynamicClient struct { +// NewClusterForConfig creates a new Cluster for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewClusterForConfig will generate a rate-limiter in configShallowCopy. +func NewClusterForConfig(c *rest.Config) (*Cluster, error) { + cs, err := NewForConfig(c) + if err != nil { + return nil, err + } + return &Cluster{scopedClient: cs.scopedClient}, nil +} + +type ClusterInterface interface { + Cluster(name string) Interface +} + +type Cluster struct { + *scopedClient +} + +// Cluster sets the cluster for a Clientset. +func (c *Cluster) Cluster(name string) Interface { + return &DynamicClient{ + scopedClient: c.scopedClient, + cluster: name, + } +} + +type DynamicClient struct { + *scopedClient + cluster string +} + +type scopedClient struct { client *rest.RESTClient } -var _ Interface = &dynamicClient{} +var _ Interface = &DynamicClient{} // ConfigFor returns a copy of the provided config with the // appropriate dynamic client defaults set. @@ -52,7 +84,7 @@ func ConfigFor(inConfig *rest.Config) *rest.Config { // NewForConfigOrDie creates a new Interface for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) Interface { +func NewForConfigOrDie(c *rest.Config) *DynamicClient { ret, err := NewForConfig(c) if err != nil { panic(err) @@ -63,7 +95,7 @@ func NewForConfigOrDie(c *rest.Config) Interface { // NewForConfig creates a new dynamic client or returns an error. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(inConfig *rest.Config) (Interface, error) { +func NewForConfig(inConfig *rest.Config) (*DynamicClient, error) { config := ConfigFor(inConfig) httpClient, err := rest.HTTPClientFor(config) @@ -75,7 +107,7 @@ func NewForConfig(inConfig *rest.Config) (Interface, error) { // NewForConfigAndClient creates a new dynamic client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(inConfig *rest.Config, h *http.Client) (Interface, error) { +func NewForConfigAndClient(inConfig *rest.Config, h *http.Client) (*DynamicClient, error) { config := ConfigFor(inConfig) // for serializing the options config.GroupVersion = &schema.GroupVersion{} @@ -85,16 +117,17 @@ func NewForConfigAndClient(inConfig *rest.Config, h *http.Client) (Interface, er if err != nil { return nil, err } - return &dynamicClient{client: restClient}, nil + + return &DynamicClient{scopedClient: &scopedClient{client: restClient}}, nil } type dynamicResourceClient struct { - client *dynamicClient + client *DynamicClient namespace string resource schema.GroupVersionResource } -func (c *dynamicClient) Resource(resource schema.GroupVersionResource) NamespaceableResourceInterface { +func (c *DynamicClient) Resource(resource schema.GroupVersionResource) NamespaceableResourceInterface { return &dynamicResourceClient{client: c, resource: resource} } @@ -123,6 +156,7 @@ func (c *dynamicResourceClient) Create(ctx context.Context, obj *unstructured.Un result := c.client.client. Post(). + Cluster(c.client.cluster). AbsPath(append(c.makeURLSegments(name), subresources...)...). SetHeader("Content-Type", runtime.ContentTypeJSON). Body(outBytes). @@ -159,6 +193,7 @@ func (c *dynamicResourceClient) Update(ctx context.Context, obj *unstructured.Un result := c.client.client. Put(). + Cluster(c.client.cluster). AbsPath(append(c.makeURLSegments(name), subresources...)...). SetHeader("Content-Type", runtime.ContentTypeJSON). Body(outBytes). @@ -196,6 +231,7 @@ func (c *dynamicResourceClient) UpdateStatus(ctx context.Context, obj *unstructu result := c.client.client. Put(). + Cluster(c.client.cluster). AbsPath(append(c.makeURLSegments(name), "status")...). SetHeader("Content-Type", runtime.ContentTypeJSON). Body(outBytes). @@ -227,6 +263,7 @@ func (c *dynamicResourceClient) Delete(ctx context.Context, name string, opts me result := c.client.client. Delete(). + Cluster(c.client.cluster). AbsPath(append(c.makeURLSegments(name), subresources...)...). SetHeader("Content-Type", runtime.ContentTypeJSON). Body(deleteOptionsByte). @@ -242,6 +279,7 @@ func (c *dynamicResourceClient) DeleteCollection(ctx context.Context, opts metav result := c.client.client. Delete(). + Cluster(c.client.cluster). AbsPath(c.makeURLSegments("")...). SetHeader("Content-Type", runtime.ContentTypeJSON). Body(deleteOptionsByte). @@ -254,7 +292,7 @@ func (c *dynamicResourceClient) Get(ctx context.Context, name string, opts metav if len(name) == 0 { return nil, fmt.Errorf("name is required") } - result := c.client.client.Get().AbsPath(append(c.makeURLSegments(name), subresources...)...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(ctx) + result := c.client.client.Get().Cluster(c.client.cluster).AbsPath(append(c.makeURLSegments(name), subresources...)...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(ctx) if err := result.Error(); err != nil { return nil, err } @@ -270,7 +308,7 @@ func (c *dynamicResourceClient) Get(ctx context.Context, name string, opts metav } func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { - result := c.client.client.Get().AbsPath(c.makeURLSegments("")...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(ctx) + result := c.client.client.Get().Cluster(c.client.cluster).AbsPath(c.makeURLSegments("")...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(ctx) if err := result.Error(); err != nil { return nil, err } @@ -295,7 +333,7 @@ func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOption func (c *dynamicResourceClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true - return c.client.client.Get().AbsPath(c.makeURLSegments("")...). + return c.client.client.Get().Cluster(c.client.cluster).AbsPath(c.makeURLSegments("")...). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). Watch(ctx) } @@ -306,6 +344,7 @@ func (c *dynamicResourceClient) Patch(ctx context.Context, name string, pt types } result := c.client.client. Patch(pt). + Cluster(c.client.cluster). AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(data). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). diff --git a/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go b/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go index 2bd6f601b744e..1eacb9224288f 100644 --- a/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go +++ b/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go @@ -179,7 +179,7 @@ func (c *Clientset) Discovery() $.DiscoveryInterface|raw$ { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } ` From 80996352ba92f70deec73623945189b8f63275d5 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 22 Nov 2021 16:04:14 -0800 Subject: [PATCH 47/87] HACK: chore: re-generate clientsets with clustered discovery Signed-off-by: Steve Kuznetsov --- .../client-go/pkg/client/clientset/versioned/clientset.go | 2 +- .../pkg/client/clientset/clientset/clientset.go | 2 +- staging/src/k8s.io/client-go/kubernetes/clientset.go | 2 +- .../examples/HyphenGroup/clientset/versioned/clientset.go | 2 +- .../examples/MixedCase/clientset/versioned/clientset.go | 2 +- .../examples/apiserver/clientset/internalversion/clientset.go | 2 +- .../examples/apiserver/clientset/versioned/clientset.go | 2 +- .../examples/crd/clientset/versioned/clientset.go | 2 +- .../pkg/client/clientset_generated/clientset/clientset.go | 2 +- .../k8s.io/metrics/pkg/client/clientset/versioned/clientset.go | 2 +- .../pkg/generated/clientset/versioned/clientset.go | 2 +- .../pkg/generated/clientset/versioned/clientset.go | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go index 34479c19e94ac..9ff863f6a4f3c 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go @@ -84,7 +84,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go index 07320cdbfddc5..134206bf70c85 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go @@ -92,7 +92,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/client-go/kubernetes/clientset.go b/staging/src/k8s.io/client-go/kubernetes/clientset.go index a6efb88878e4c..0604bbfcaa61c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/clientset.go +++ b/staging/src/k8s.io/client-go/kubernetes/clientset.go @@ -436,7 +436,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/clientset.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/clientset.go index 1f729c63631eb..174124e51dd6b 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/clientset.go @@ -84,7 +84,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/clientset.go b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/clientset.go index b3c5482f43bb5..e6ccb7aa818d6 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/clientset.go @@ -84,7 +84,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/clientset.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/clientset.go index cd6e308d82ba6..778ecab33fa82 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/clientset.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/clientset.go @@ -100,7 +100,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/clientset.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/clientset.go index e7e74db1cb60b..b963f2c89ca75 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/clientset.go @@ -100,7 +100,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/clientset.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/clientset.go index d682b659e1b78..7375e2419a161 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/clientset.go @@ -92,7 +92,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go index d3be6dd5d617e..607e665668d9e 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go @@ -92,7 +92,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/clientset.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/clientset.go index deb66ae8d6a73..166a656c99fd9 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/clientset.go @@ -92,7 +92,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/clientset.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/clientset.go index 9093986de37c6..f9341d423b1bc 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/clientset.go @@ -92,7 +92,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. diff --git a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/clientset.go b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/clientset.go index ed836f9816c33..0b63478239e06 100644 --- a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/clientset.go +++ b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/clientset.go @@ -84,7 +84,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { return nil } - return c.DiscoveryClient + return c.DiscoveryClient.WithCluster(c.cluster) } // NewForConfig creates a new Clientset for the given config. From 70c29bdf019b6a1a4e0d9a72a1b0d728fec1390a Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Fri, 3 Dec 2021 07:30:12 -0800 Subject: [PATCH 48/87] HACK: hard-code the number of servers again We're not really sure why the previous hacks stopped passing this value in and instead hard-coded it to 3, but the result is that registering CRDs takes 5s at minimum. When our tests register dozens of CRDs and not always in parallel, this is annoying. Hard-code it to 1 for now and re-visit later. Signed-off-by: Steve Kuznetsov --- pkg/genericcontrolplane/apiextensions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/genericcontrolplane/apiextensions.go b/pkg/genericcontrolplane/apiextensions.go index a72e9b0ae4f48..5d69e0331beb8 100644 --- a/pkg/genericcontrolplane/apiextensions.go +++ b/pkg/genericcontrolplane/apiextensions.go @@ -87,7 +87,7 @@ func createAPIExtensionsConfig( }, ExtraConfig: apiextensionsapiserver.ExtraConfig{ CRDRESTOptionsGetter: apiextensionsoptions.NewCRDRESTOptionsGetter(etcdOptions), - MasterCount: 3, + MasterCount: 1, // TODO: pass this in correctly AuthResolverWrapper: authResolverWrapper, ServiceResolver: serviceResolver, }, From 06d5c7209d073acd06f418bc8906d492c5019467 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 8 Dec 2021 12:30:53 -0500 Subject: [PATCH 49/87] HACK: add Cluster() to generated client Watch() Signed-off-by: Andy Goldstein --- .../cmd/client-gen/generators/generator_for_type.go | 1 + 1 file changed, 1 insertion(+) diff --git a/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go b/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go index a9ae2bb7326ac..8bd3fcde7dba9 100644 --- a/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go +++ b/staging/src/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go @@ -662,6 +662,7 @@ func (c *$.type|privatePlural$) Watch(ctx context.Context, opts $.ListOptions|ra } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). $if .namespaced$Namespace(c.ns).$end$ Resource("$.type|resource$"). VersionedParams(&opts, $.schemeParameterCodec|raw$). From 78304e61c56a10dc22e81e07187b5dbcf86e2847 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 8 Dec 2021 12:31:39 -0500 Subject: [PATCH 50/87] Regenerate clients Signed-off-by: Andy Goldstein --- .../pkg/client/clientset/versioned/typed/cr/v1/example.go | 1 + .../clientset/typed/apiextensions/v1/customresourcedefinition.go | 1 + .../typed/apiextensions/v1beta1/customresourcedefinition.go | 1 + .../admissionregistration/v1/mutatingwebhookconfiguration.go | 1 + .../admissionregistration/v1/validatingwebhookconfiguration.go | 1 + .../v1beta1/mutatingwebhookconfiguration.go | 1 + .../v1beta1/validatingwebhookconfiguration.go | 1 + .../typed/apiserverinternal/v1alpha1/storageversion.go | 1 + .../client-go/kubernetes/typed/apps/v1/controllerrevision.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go | 1 + .../kubernetes/typed/apps/v1beta1/controllerrevision.go | 1 + .../k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go | 1 + .../client-go/kubernetes/typed/apps/v1beta1/statefulset.go | 1 + .../kubernetes/typed/apps/v1beta2/controllerrevision.go | 1 + .../k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go | 1 + .../k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go | 1 + .../k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go | 1 + .../client-go/kubernetes/typed/apps/v1beta2/statefulset.go | 1 + .../kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go | 1 + .../typed/autoscaling/v2beta1/horizontalpodautoscaler.go | 1 + .../typed/autoscaling/v2beta2/horizontalpodautoscaler.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go | 1 + staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go | 1 + .../k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go | 1 + .../typed/certificates/v1/certificatesigningrequest.go | 1 + .../typed/certificates/v1beta1/certificatesigningrequest.go | 1 + .../k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go | 1 + .../client-go/kubernetes/typed/coordination/v1beta1/lease.go | 1 + .../k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go | 1 + staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go | 1 + staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go | 1 + .../client-go/kubernetes/typed/core/v1/persistentvolume.go | 1 + .../client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go | 1 + staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go | 1 + .../client-go/kubernetes/typed/core/v1/replicationcontroller.go | 1 + .../k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go | 1 + staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go | 1 + staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go | 1 + .../k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go | 1 + .../client-go/kubernetes/typed/discovery/v1/endpointslice.go | 1 + .../kubernetes/typed/discovery/v1beta1/endpointslice.go | 1 + staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go | 1 + .../k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go | 1 + .../client-go/kubernetes/typed/extensions/v1beta1/daemonset.go | 1 + .../client-go/kubernetes/typed/extensions/v1beta1/deployment.go | 1 + .../client-go/kubernetes/typed/extensions/v1beta1/ingress.go | 1 + .../kubernetes/typed/extensions/v1beta1/networkpolicy.go | 1 + .../kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go | 1 + .../client-go/kubernetes/typed/extensions/v1beta1/replicaset.go | 1 + .../kubernetes/typed/flowcontrol/v1alpha1/flowschema.go | 1 + .../typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go | 1 + .../client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go | 1 + .../typed/flowcontrol/v1beta1/prioritylevelconfiguration.go | 1 + .../k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go | 1 + .../client-go/kubernetes/typed/networking/v1/ingressclass.go | 1 + .../client-go/kubernetes/typed/networking/v1/networkpolicy.go | 1 + .../client-go/kubernetes/typed/networking/v1beta1/ingress.go | 1 + .../kubernetes/typed/networking/v1beta1/ingressclass.go | 1 + .../k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go | 1 + .../client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go | 1 + .../client-go/kubernetes/typed/node/v1beta1/runtimeclass.go | 1 + .../client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go | 1 + .../kubernetes/typed/policy/v1beta1/poddisruptionbudget.go | 1 + .../kubernetes/typed/policy/v1beta1/podsecuritypolicy.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go | 1 + .../client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go | 1 + staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go | 1 + .../client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go | 1 + .../kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go | 1 + .../client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go | 1 + .../client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go | 1 + .../kubernetes/typed/rbac/v1beta1/clusterrolebinding.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go | 1 + .../client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go | 1 + .../client-go/kubernetes/typed/scheduling/v1/priorityclass.go | 1 + .../kubernetes/typed/scheduling/v1alpha1/priorityclass.go | 1 + .../kubernetes/typed/scheduling/v1beta1/priorityclass.go | 1 + .../k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go | 1 + .../src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go | 1 + .../k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go | 1 + .../client-go/kubernetes/typed/storage/v1/volumeattachment.go | 1 + .../kubernetes/typed/storage/v1alpha1/csistoragecapacity.go | 1 + .../kubernetes/typed/storage/v1alpha1/volumeattachment.go | 1 + .../client-go/kubernetes/typed/storage/v1beta1/csidriver.go | 1 + .../k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go | 1 + .../kubernetes/typed/storage/v1beta1/csistoragecapacity.go | 1 + .../client-go/kubernetes/typed/storage/v1beta1/storageclass.go | 1 + .../kubernetes/typed/storage/v1beta1/volumeattachment.go | 1 + .../clientset/versioned/typed/example/v1/clustertesttype.go | 1 + .../HyphenGroup/clientset/versioned/typed/example/v1/testtype.go | 1 + .../clientset/versioned/typed/example/v1/clustertesttype.go | 1 + .../MixedCase/clientset/versioned/typed/example/v1/testtype.go | 1 + .../internalversion/typed/example/internalversion/testtype.go | 1 + .../internalversion/typed/example2/internalversion/testtype.go | 1 + .../typed/example3.io/internalversion/testtype.go | 1 + .../apiserver/clientset/versioned/typed/example/v1/testtype.go | 1 + .../apiserver/clientset/versioned/typed/example2/v1/testtype.go | 1 + .../clientset/versioned/typed/example3.io/v1/testtype.go | 1 + .../crd/clientset/versioned/typed/example/v1/clustertesttype.go | 1 + .../crd/clientset/versioned/typed/example/v1/testtype.go | 1 + .../crd/clientset/versioned/typed/example2/v1/testtype.go | 1 + .../clientset/typed/apiregistration/v1/apiservice.go | 1 + .../clientset/typed/apiregistration/v1beta1/apiservice.go | 1 + .../clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go | 1 + .../clientset/versioned/typed/metrics/v1alpha1/podmetrics.go | 1 + .../clientset/versioned/typed/metrics/v1beta1/nodemetrics.go | 1 + .../clientset/versioned/typed/metrics/v1beta1/podmetrics.go | 1 + .../clientset/versioned/typed/wardle/v1alpha1/fischer.go | 1 + .../clientset/versioned/typed/wardle/v1alpha1/flunder.go | 1 + .../clientset/versioned/typed/wardle/v1beta1/flunder.go | 1 + .../clientset/versioned/typed/samplecontroller/v1alpha1/foo.go | 1 + 121 files changed, 121 insertions(+) diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go index c4c185aca1024..dca6b9cd8428b 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go @@ -105,6 +105,7 @@ func (c *examples) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("examples"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go index 5611060f89e06..d4ae9d80822e2 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go @@ -102,6 +102,7 @@ func (c *customResourceDefinitions) Watch(ctx context.Context, opts metav1.ListO } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("customresourcedefinitions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go index c9c963f1cda56..5088541f6a915 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go @@ -102,6 +102,7 @@ func (c *customResourceDefinitions) Watch(ctx context.Context, opts v1.ListOptio } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("customresourcedefinitions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go index 6b838cf0b7491..1718f2c127692 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -105,6 +105,7 @@ func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts metav1.L } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go index cde065f5fba39..5461098816d4c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go @@ -105,6 +105,7 @@ func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts metav1 } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index 294254dd0a857..faf7ad28158f7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -105,6 +105,7 @@ func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListO } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 8774ba172afb7..660e25b973386 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -105,6 +105,7 @@ func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts v1.Lis } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go b/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go index dcb2d877ef676..64a51f1b70a6b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go @@ -107,6 +107,7 @@ func (c *storageVersions) Watch(ctx context.Context, opts v1.ListOptions) (watch } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("storageversions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go index 35051de61e76a..c43877abb3788 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go @@ -109,6 +109,7 @@ func (c *controllerRevisions) Watch(ctx context.Context, opts metav1.ListOptions } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go index 79582ac174914..e0b5d60d39223 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go @@ -111,6 +111,7 @@ func (c *daemonSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch. } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go index aa6a9b92de39b..b746ac89261a7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go @@ -117,6 +117,7 @@ func (c *deployments) Watch(ctx context.Context, opts metav1.ListOptions) (watch } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go index 218230f7731e9..f64749dbbe208 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go @@ -117,6 +117,7 @@ func (c *replicaSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go index 8c703da0344bc..7198ff0af402b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go @@ -117,6 +117,7 @@ func (c *statefulSets) Watch(ctx context.Context, opts metav1.ListOptions) (watc } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go index 47afe6701cc1d..3da14ca7bbd91 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go @@ -109,6 +109,7 @@ func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (w } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go index 58ece3e64da32..09da282ef81e6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go @@ -111,6 +111,7 @@ func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go index ca99278cb7f54..2d24e51584688 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go @@ -111,6 +111,7 @@ func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go index 4cabd04715a48..bb92b4b73cde7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go @@ -109,6 +109,7 @@ func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (w } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go index 5c6b1d9ee96bb..af0fd0a9df4b3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go @@ -111,6 +111,7 @@ func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go index ee9c75084d290..2eb881511f40a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go @@ -111,6 +111,7 @@ func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go index 42cbb96024140..aaab311883b6b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go @@ -111,6 +111,7 @@ func (c *replicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go index 4db00b0c59c6d..7086ea9819f9d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go @@ -115,6 +115,7 @@ func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go index 240b1413c70c1..769685c6eea1c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -111,6 +111,7 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts metav1.ListOp } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go index eecb1eb1d54e9..2d0d57851bf61 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -111,6 +111,7 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOption } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go index f76715ae7a308..100c151444cb1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -111,6 +111,7 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOption } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go index eb24973f2fbab..67c47fce1485e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go @@ -111,6 +111,7 @@ func (c *cronJobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go index fb9e5679bf28c..66ccfc657323c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go @@ -111,6 +111,7 @@ func (c *jobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interf } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("jobs"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go index 4cc25e4de14de..4d5126bf7528b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go @@ -111,6 +111,7 @@ func (c *cronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go index b7d5ae2143dfd..662d797057f2f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go @@ -109,6 +109,7 @@ func (c *certificateSigningRequests) Watch(ctx context.Context, opts metav1.List } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("certificatesigningrequests"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go index d230d43d8bc69..6822b0292bcd4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go @@ -107,6 +107,7 @@ func (c *certificateSigningRequests) Watch(ctx context.Context, opts v1.ListOpti } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("certificatesigningrequests"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go index 15f8e3282597f..f4a515f52aceb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go @@ -109,6 +109,7 @@ func (c *leases) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inte } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go index 267ed39e1bd98..d0a5c9a5a0d34 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go @@ -109,6 +109,7 @@ func (c *leases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interfac } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go index 5dfce894d261a..936b952a8c45c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go @@ -105,6 +105,7 @@ func (c *componentStatuses) Watch(ctx context.Context, opts metav1.ListOptions) } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("componentstatuses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go index 5391e3eb710e5..0dfbd813aef5e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go @@ -109,6 +109,7 @@ func (c *configMaps) Watch(ctx context.Context, opts metav1.ListOptions) (watch. } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("configmaps"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go index 45ffae0dfb50a..65e6c9f8c2ee6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go @@ -109,6 +109,7 @@ func (c *endpoints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpoints"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go index fc3716a21dd73..08bae8963cb4b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go @@ -109,6 +109,7 @@ func (c *events) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inte } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go index 14dfc4977f0ae..27396c6084549 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go @@ -109,6 +109,7 @@ func (c *limitRanges) Watch(ctx context.Context, opts metav1.ListOptions) (watch } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("limitranges"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go index 0bc63fb0c1844..06e1cde3582e8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go @@ -106,6 +106,7 @@ func (c *namespaces) Watch(ctx context.Context, opts metav1.ListOptions) (watch. } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("namespaces"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go index cd6ac6a9def0e..1eb0a6ade8ad6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go @@ -107,6 +107,7 @@ func (c *nodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inter } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go index 1c5153983988e..fc0b2d1a3b6b5 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go @@ -107,6 +107,7 @@ func (c *persistentVolumes) Watch(ctx context.Context, opts metav1.ListOptions) } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("persistentvolumes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go index a2eeb795d2a2b..bd88dde1be237 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go @@ -111,6 +111,7 @@ func (c *persistentVolumeClaims) Watch(ctx context.Context, opts metav1.ListOpti } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("persistentvolumeclaims"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go index d3bfa895a4b2a..cde509c4c2dec 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go @@ -113,6 +113,7 @@ func (c *pods) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interf } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go index ae6b989a1d19f..0819b59e78e5b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go @@ -109,6 +109,7 @@ func (c *podTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watc } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("podtemplates"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go index 86c5d415135ff..05dedfc505fa2 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go @@ -115,6 +115,7 @@ func (c *replicationControllers) Watch(ctx context.Context, opts metav1.ListOpti } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicationcontrollers"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go index 7bf6b9b30b856..c1ed239925636 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go @@ -111,6 +111,7 @@ func (c *resourceQuotas) Watch(ctx context.Context, opts metav1.ListOptions) (wa } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("resourcequotas"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go index 00b83b4f3c87b..36e62d6091230 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go @@ -109,6 +109,7 @@ func (c *secrets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Int } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("secrets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go index bc4385e140bb9..fc165a3c62bf3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go @@ -110,6 +110,7 @@ func (c *services) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go index 0e537222c36cf..b01a374c56abe 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go @@ -112,6 +112,7 @@ func (c *serviceAccounts) Watch(ctx context.Context, opts metav1.ListOptions) (w } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("serviceaccounts"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go index 8a03531eff9f7..b4b1471eb1c49 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go @@ -109,6 +109,7 @@ func (c *endpointSlices) Watch(ctx context.Context, opts metav1.ListOptions) (wa } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go index 35650fafef06d..5259a83edc15a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go @@ -109,6 +109,7 @@ func (c *endpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch. } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go index 095fcd638cc23..28acf3206f5e3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go @@ -109,6 +109,7 @@ func (c *events) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inte } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go index e75ddac18e880..4d73d367ea10d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go @@ -109,6 +109,7 @@ func (c *events) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interfac } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go index 9c0349b2e01b1..14ec2874155d4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go @@ -111,6 +111,7 @@ func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go index 14e35134bad59..8130875d1ff24 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go @@ -115,6 +115,7 @@ func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go index b6eaa5030b512..9375a3a724ca2 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go @@ -111,6 +111,7 @@ func (c *ingresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go index 1ea6c4df2dbc6..41be9e2391562 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go @@ -109,6 +109,7 @@ func (c *networkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go index 6887024331991..1ba9f7a88cac9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go @@ -105,6 +105,7 @@ func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (w } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go index eb8b8ba22c7f3..6cadea19f9560 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go @@ -115,6 +115,7 @@ func (c *replicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go index ee7d6ade1d41f..cc623104000da 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go @@ -107,6 +107,7 @@ func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go index 7b9b91cba9534..8e9a11e03f018 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -107,6 +107,7 @@ func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOpt } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go index 3ba9f3a050115..2d0d50a17deb7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go @@ -107,6 +107,7 @@ func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go index 36f2fa37b4346..963f8420e935d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go @@ -107,6 +107,7 @@ func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOpt } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go index 6acba47207c91..bd6413ce9e782 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go @@ -111,6 +111,7 @@ func (c *ingresses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go index d99f83fe22d11..b49fc63b327e9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go @@ -105,6 +105,7 @@ func (c *ingressClasses) Watch(ctx context.Context, opts metav1.ListOptions) (wa } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("ingressclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go index 58f6ad58646c8..5452ac5120364 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go @@ -109,6 +109,7 @@ func (c *networkPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (w } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go index 09317be029de2..e2bb7a19fff96 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go @@ -111,6 +111,7 @@ func (c *ingresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go index dc62afc69f0f4..d129d40821daf 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go @@ -105,6 +105,7 @@ func (c *ingressClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("ingressclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go index 6172d1c4c1f51..17723ef0665a6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go @@ -105,6 +105,7 @@ func (c *runtimeClasses) Watch(ctx context.Context, opts metav1.ListOptions) (wa } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go index 3854f57452a94..2dee1419c330d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go @@ -105,6 +105,7 @@ func (c *runtimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go index 2091a82051845..a8ce652d82b18 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go @@ -105,6 +105,7 @@ func (c *runtimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go index f41c423c56f2d..67d553e79c977 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go @@ -111,6 +111,7 @@ func (c *podDisruptionBudgets) Watch(ctx context.Context, opts metav1.ListOption } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go index 0fea923f4a0d2..75083909e3325 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go @@ -111,6 +111,7 @@ func (c *podDisruptionBudgets) Watch(ctx context.Context, opts v1.ListOptions) ( } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("poddisruptionbudgets"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go index dfd4bd7f3f881..599d1af989c57 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go @@ -105,6 +105,7 @@ func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (w } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go index b3c5b5de76589..87426e0734429 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go @@ -105,6 +105,7 @@ func (c *clusterRoles) Watch(ctx context.Context, opts metav1.ListOptions) (watc } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go index f3427314e875d..08aa9152d816d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go @@ -105,6 +105,7 @@ func (c *clusterRoleBindings) Watch(ctx context.Context, opts metav1.ListOptions } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go index f0535e979e68c..b6d2a0993fe08 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go @@ -109,6 +109,7 @@ func (c *roles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inter } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go index f1468955f177d..961a8b1a0ad52 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go @@ -109,6 +109,7 @@ func (c *roleBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watc } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go index 6af02d7ca425f..214c6c788ba0b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go @@ -105,6 +105,7 @@ func (c *clusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go index cf3365b5c0e8c..aa66af149ac3b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go @@ -105,6 +105,7 @@ func (c *clusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (w } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go index f15537621d369..67272e4a1a4a2 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go @@ -109,6 +109,7 @@ func (c *roles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go index ec85f52f2a91d..f571cc2b24aad 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go @@ -109,6 +109,7 @@ func (c *roleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go index 230d7ca3740ac..e2d57347c9f5b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go @@ -105,6 +105,7 @@ func (c *clusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go index a7cd7280ca9f9..10bde414b19a4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go @@ -105,6 +105,7 @@ func (c *clusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (w } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go index 8a027775b6769..b6c0cb03aa2f8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go @@ -109,6 +109,7 @@ func (c *roles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go index d99c7a5804042..0e4ef2a600c10 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go @@ -109,6 +109,7 @@ func (c *roleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go index ed05337588fa2..5099499426363 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go @@ -105,6 +105,7 @@ func (c *priorityClasses) Watch(ctx context.Context, opts metav1.ListOptions) (w } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go index 5d72c0f03d0f4..b2e6879c1f3b5 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go @@ -105,6 +105,7 @@ func (c *priorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go index 451e7194306ca..8a23a4dc767ac 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go @@ -105,6 +105,7 @@ func (c *priorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go index 32cd8c7823b6d..c607d897796bb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go @@ -105,6 +105,7 @@ func (c *cSIDrivers) Watch(ctx context.Context, opts metav1.ListOptions) (watch. } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("csidrivers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go index 27cac2fa0625e..28ab4936f9ac7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go @@ -105,6 +105,7 @@ func (c *cSINodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go index 03ae6c4daebb7..d90d63f4ad443 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go @@ -105,6 +105,7 @@ func (c *storageClasses) Watch(ctx context.Context, opts metav1.ListOptions) (wa } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go index e2045d2b076da..06aed7b5e7d3b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go @@ -107,6 +107,7 @@ func (c *volumeAttachments) Watch(ctx context.Context, opts metav1.ListOptions) } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go index bd9fc1ffd6045..95f7b1aa1396d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go @@ -109,6 +109,7 @@ func (c *cSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) ( } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go index 24472655e0a29..9516392779385 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go @@ -107,6 +107,7 @@ func (c *volumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (wat } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go index c5a26cb30e32f..621275589ed97 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go @@ -105,6 +105,7 @@ func (c *cSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("csidrivers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go index 05457762027f7..1b46fa25b5324 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go @@ -105,6 +105,7 @@ func (c *cSINodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go index c007714b09943..431f5f4512661 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go @@ -109,6 +109,7 @@ func (c *cSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) ( } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("csistoragecapacities"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go index 6122ea513c740..e421d5f689713 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go @@ -105,6 +105,7 @@ func (c *storageClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go index 8fc3b41e8b7b7..fd42010286372 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go @@ -107,6 +107,7 @@ func (c *volumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (wat } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go index 3a59a5dbbfa93..593f2b200075e 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go @@ -106,6 +106,7 @@ func (c *clusterTestTypes) Watch(ctx context.Context, opts metav1.ListOptions) ( } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go index d86f428fa1e6a..8a492955efa0b 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go @@ -106,6 +106,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go index 8f4cefd576c8a..57340961f0c7b 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go @@ -107,6 +107,7 @@ func (c *clusterTestTypes) Watch(ctx context.Context, opts metav1.ListOptions) ( } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go index bc06776849b7b..87af8a48b39d8 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go @@ -106,6 +106,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go index 1d862384dfb6a..fb9ecbabff86f 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go @@ -106,6 +106,7 @@ func (c *testTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go index c935a99f2ce09..975873315f213 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go @@ -102,6 +102,7 @@ func (c *testTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go index 11008eeda9ede..af6b32a1dc6ab 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go @@ -106,6 +106,7 @@ func (c *testTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go index d2b8e530f293d..b54f5c66e8819 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go @@ -106,6 +106,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go index 6b65c1e3598da..2dd7d79629cb9 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go @@ -106,6 +106,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go index e91d3532e4562..1367e10a09104 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go @@ -106,6 +106,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go index 6fd6c4e29c961..88610b8bb191a 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go @@ -106,6 +106,7 @@ func (c *clusterTestTypes) Watch(ctx context.Context, opts metav1.ListOptions) ( } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("clustertesttypes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go index 6daa768839d32..7a18aad9ea970 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go @@ -106,6 +106,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go index 0e5064877b519..6ab9d3109d3d9 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go @@ -106,6 +106,7 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("testtypes"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go index d7effa62bbc0b..be2457bf58fde 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go @@ -102,6 +102,7 @@ func (c *aPIServices) Watch(ctx context.Context, opts metav1.ListOptions) (watch } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("apiservices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go index 9ec81977ac729..59bbed32b341d 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go @@ -102,6 +102,7 @@ func (c *aPIServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("apiservices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go index 72424d5c2d539..cc86eb6b0e862 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go @@ -95,6 +95,7 @@ func (c *nodeMetricses) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go index 981ea29cdfecf..fc5c9819d37e9 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go @@ -99,6 +99,7 @@ func (c *podMetricses) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go index 1d8df993e9ad7..3ccc708006e9b 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go @@ -95,6 +95,7 @@ func (c *nodeMetricses) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go index 6cbe8bb28edc8..251f48897cac7 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go @@ -99,6 +99,7 @@ func (c *podMetricses) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go index b900dd800f7b7..a47cd15e84ae1 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go @@ -101,6 +101,7 @@ func (c *fischers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("fischers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go index 03bb24f759329..7d3079881647e 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go @@ -106,6 +106,7 @@ func (c *flunders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go index 0bb6c0f03c626..ee8460c52b219 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go @@ -106,6 +106,7 @@ func (c *flunders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("flunders"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go index 4ce00687ac746..0849177800191 100644 --- a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go +++ b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go @@ -106,6 +106,7 @@ func (c *foos) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("foos"). VersionedParams(&opts, scheme.ParameterCodec). From 97eb27ec557923f7f15c6dda8b8d3f660716b9a1 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 8 Dec 2021 13:53:04 -0500 Subject: [PATCH 51/87] HACK: Make discovery client logical-cluster aware Signed-off-by: Andy Goldstein --- .../client-go/discovery/discovery_client.go | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/staging/src/k8s.io/client-go/discovery/discovery_client.go b/staging/src/k8s.io/client-go/discovery/discovery_client.go index 804dae5e03b50..f8e22de57ae8e 100644 --- a/staging/src/k8s.io/client-go/discovery/discovery_client.go +++ b/staging/src/k8s.io/client-go/discovery/discovery_client.go @@ -170,7 +170,7 @@ func apiVersionsToAPIGroup(apiVersions *metav1.APIVersions) (apiGroup metav1.API func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err error) { // Get the groupVersions exposed at /api v := &metav1.APIVersions{} - err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do(context.TODO()).Into(v) + err = d.restClient.Get().AbsPath(d.clusterAwarePath(d.LegacyPrefix)).Do(context.TODO()).Into(v) apiGroup := metav1.APIGroup{} if err == nil && len(v.Versions) != 0 { apiGroup = apiVersionsToAPIGroup(v) @@ -181,7 +181,7 @@ func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err // Get the groupVersions exposed at /apis apiGroupList = &metav1.APIGroupList{} - err = d.restClient.Get().AbsPath("/apis").Do(context.TODO()).Into(apiGroupList) + err = d.restClient.Get().AbsPath(d.clusterAwarePath("/apis")).Do(context.TODO()).Into(apiGroupList) if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) { return nil, err } @@ -211,7 +211,7 @@ func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (r resources = &metav1.APIResourceList{ GroupVersion: groupVersion, } - err = d.restClient.Get().AbsPath(url.String()).Do(context.TODO()).Into(resources) + err = d.restClient.Get().AbsPath(d.clusterAwarePath(url.String())).Do(context.TODO()).Into(resources) if err != nil { // ignore 403 or 404 error to be compatible with an v1.0 server. if groupVersion == "v1" && (errors.IsNotFound(err) || errors.IsForbidden(err)) { @@ -418,9 +418,16 @@ func ServerPreferredNamespacedResources(d DiscoveryInterface) ([]*metav1.APIReso }), all), err } +func (d *DiscoveryClient) clusterAwarePath(path string) string { + if d.cluster == "" { + return path + } + return "/clusters/" + d.cluster + path +} + // ServerVersion retrieves and parses the server's version (git version). func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { - body, err := d.restClient.Get().AbsPath("/version").Do(context.TODO()).Raw() + body, err := d.restClient.Get().AbsPath(d.clusterAwarePath("/version")).Do(context.TODO()).Raw() if err != nil { return nil, err } @@ -434,12 +441,12 @@ func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { // OpenAPISchema fetches the open api schema using a rest client and parses the proto. func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { - data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", mimePb).Do(context.TODO()).Raw() + data, err := d.restClient.Get().AbsPath(d.clusterAwarePath("/openapi/v2")).SetHeader("Accept", mimePb).Do(context.TODO()).Raw() if err != nil { if errors.IsForbidden(err) || errors.IsNotFound(err) || errors.IsNotAcceptable(err) { // single endpoint not found/registered in old server, try to fetch old endpoint // TODO: remove this when kubectl/client-go don't work with 1.9 server - data, err = d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do(context.TODO()).Raw() + data, err = d.restClient.Get().AbsPath(d.clusterAwarePath("/swagger-2.0.0.pb-v1")).Do(context.TODO()).Raw() if err != nil { return nil, err } From 6b8774d645fd8543fc5d36164e81ddd2b8da4e31 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Fri, 3 Dec 2021 14:33:54 -0500 Subject: [PATCH 52/87] Add context to generated lister funcs Signed-off-by: Andy Goldstein --- .../cmd/lister-gen/generators/lister.go | 67 +++++++++++++++---- 1 file changed, 55 insertions(+), 12 deletions(-) diff --git a/staging/src/k8s.io/code-generator/cmd/lister-gen/generators/lister.go b/staging/src/k8s.io/code-generator/cmd/lister-gen/generators/lister.go index 8ada494690312..69afc259bceff 100644 --- a/staging/src/k8s.io/code-generator/cmd/lister-gen/generators/lister.go +++ b/staging/src/k8s.io/code-generator/cmd/lister-gen/generators/lister.go @@ -214,6 +214,9 @@ func (g *listerGenerator) Imports(c *generator.Context) (imports []string) { imports = append(imports, "k8s.io/apimachinery/pkg/labels") // for Indexer imports = append(imports, "k8s.io/client-go/tools/cache") + + imports = append(imports, "context") + return } @@ -241,9 +244,11 @@ func (g *listerGenerator) GenerateType(c *generator.Context, t *types.Type, w io sw.Do(typeListerStruct, m) sw.Do(typeListerConstructor, m) sw.Do(typeLister_List, m) + sw.Do(typeLister_ListWithContext, m) if tags.NonNamespaced { sw.Do(typeLister_NonNamespacedGet, m) + sw.Do(typeLister_NonNamespacedGetWithContext, m) return sw.Error() } @@ -251,7 +256,9 @@ func (g *listerGenerator) GenerateType(c *generator.Context, t *types.Type, w io sw.Do(namespaceListerInterface, m) sw.Do(namespaceListerStruct, m) sw.Do(namespaceLister_List, m) + sw.Do(namespaceLister_ListWithContext, m) sw.Do(namespaceLister_Get, m) + sw.Do(namespaceLister_GetWithContext, m) return sw.Error() } @@ -263,6 +270,9 @@ type $.type|public$Lister interface { // List lists all $.type|publicPlural$ in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*$.type|raw$, err error) + // ListWithContext lists all $.type|publicPlural$ in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*$.type|raw$, err error) // $.type|publicPlural$ returns an object that can list and get $.type|publicPlural$. $.type|publicPlural$(namespace string) $.type|public$NamespaceLister $.type|public$ListerExpansion @@ -276,9 +286,15 @@ type $.type|public$Lister interface { // List lists all $.type|publicPlural$ in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*$.type|raw$, err error) + // ListWithContext lists all $.type|publicPlural$ in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*$.type|raw$, err error) // Get retrieves the $.type|public$ from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*$.type|raw$, error) + // GetWithContext retrieves the $.type|public$ from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*$.type|raw$, error) $.type|public$ListerExpansion } ` @@ -297,9 +313,9 @@ func New$.type|public$Lister(indexer cache.Indexer) $.type|public$Lister { } ` -var typeLister_List = ` -// List lists all $.type|publicPlural$ in the indexer. -func (s *$.type|private$Lister) List(selector labels.Selector) (ret []*$.type|raw$, err error) { +var typeLister_ListWithContext = ` +// ListWithContext lists all $.type|publicPlural$ in the indexer. +func (s *$.type|private$Lister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*$.type|raw$, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*$.type|raw$)) }) @@ -307,6 +323,13 @@ func (s *$.type|private$Lister) List(selector labels.Selector) (ret []*$.type|ra } ` +var typeLister_List = ` +// List lists all $.type|publicPlural$ in the indexer. +func (s *$.type|private$Lister) List(selector labels.Selector) (ret []*$.type|raw$, err error) { + return s.ListWithContext(context.Background(), selector) +} +` + var typeLister_NamespaceLister = ` // $.type|publicPlural$ returns an object that can list and get $.type|publicPlural$. func (s *$.type|private$Lister) $.type|publicPlural$(namespace string) $.type|public$NamespaceLister { @@ -314,9 +337,9 @@ func (s *$.type|private$Lister) $.type|publicPlural$(namespace string) $.type|pu } ` -var typeLister_NonNamespacedGet = ` -// Get retrieves the $.type|public$ from the index for a given name. -func (s *$.type|private$Lister) Get(name string) (*$.type|raw$, error) { +var typeLister_NonNamespacedGetWithContext = ` +// GetWithContext retrieves the $.type|public$ from the index for a given name. +func (s *$.type|private$Lister) GetWithContext(ctx context.Context, name string) (*$.type|raw$, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err @@ -328,6 +351,13 @@ func (s *$.type|private$Lister) Get(name string) (*$.type|raw$, error) { } ` +var typeLister_NonNamespacedGet = ` +// Get retrieves the $.type|public$ from the index for a given name. +func (s *$.type|private$Lister) Get(name string) (*$.type|raw$, error) { + return s.GetWithContext(context.Background(), name) +} +` + var namespaceListerInterface = ` // $.type|public$NamespaceLister helps list and get $.type|publicPlural$. // All objects returned here must be treated as read-only. @@ -351,9 +381,9 @@ type $.type|private$NamespaceLister struct { } ` -var namespaceLister_List = ` -// List lists all $.type|publicPlural$ in the indexer for a given namespace. -func (s $.type|private$NamespaceLister) List(selector labels.Selector) (ret []*$.type|raw$, err error) { +var namespaceLister_ListWithContext = ` +// ListWithContext lists all $.type|publicPlural$ in the indexer for a given namespace. +func (s $.type|private$NamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*$.type|raw$, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*$.type|raw$)) }) @@ -361,9 +391,16 @@ func (s $.type|private$NamespaceLister) List(selector labels.Selector) (ret []*$ } ` -var namespaceLister_Get = ` -// Get retrieves the $.type|public$ from the indexer for a given namespace and name. -func (s $.type|private$NamespaceLister) Get(name string) (*$.type|raw$, error) { +var namespaceLister_List = ` +// List lists all $.type|publicPlural$ in the indexer for a given namespace. +func (s $.type|private$NamespaceLister) List(selector labels.Selector) (ret []*$.type|raw$, err error) { + return s.ListWithContext(context.Background(), selector) +} +` + +var namespaceLister_GetWithContext = ` +// GetWithContext retrieves the $.type|public$ from the indexer for a given namespace and name. +func (s $.type|private$NamespaceLister) GetWithContext(ctx context.Context, name string) (*$.type|raw$, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err @@ -374,3 +411,9 @@ func (s $.type|private$NamespaceLister) Get(name string) (*$.type|raw$, error) { return obj.(*$.type|raw$), nil } ` +var namespaceLister_Get = ` +// Get retrieves the $.type|public$ from the indexer for a given namespace and name. +func (s $.type|private$NamespaceLister) Get(name string) (*$.type|raw$, error) { + return s.GetWithContext(context.Background(), name) +} +` From b66f23802a9ee8c964a77e999b4de10fcb3c582d Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Fri, 3 Dec 2021 14:35:53 -0500 Subject: [PATCH 53/87] Regenerate listers Signed-off-by: Andy Goldstein --- .../pkg/client/listers/cr/v1/example.go | 20 +++++++++++++++++++ .../v1/customresourcedefinition.go | 18 +++++++++++++++++ .../v1beta1/customresourcedefinition.go | 18 +++++++++++++++++ .../v1/mutatingwebhookconfiguration.go | 18 +++++++++++++++++ .../v1/validatingwebhookconfiguration.go | 18 +++++++++++++++++ .../v1beta1/mutatingwebhookconfiguration.go | 18 +++++++++++++++++ .../v1beta1/validatingwebhookconfiguration.go | 18 +++++++++++++++++ .../v1alpha1/storageversion.go | 18 +++++++++++++++++ .../listers/apps/v1/controllerrevision.go | 20 +++++++++++++++++++ .../client-go/listers/apps/v1/daemonset.go | 20 +++++++++++++++++++ .../client-go/listers/apps/v1/deployment.go | 20 +++++++++++++++++++ .../client-go/listers/apps/v1/replicaset.go | 20 +++++++++++++++++++ .../client-go/listers/apps/v1/statefulset.go | 20 +++++++++++++++++++ .../apps/v1beta1/controllerrevision.go | 20 +++++++++++++++++++ .../listers/apps/v1beta1/deployment.go | 20 +++++++++++++++++++ .../listers/apps/v1beta1/statefulset.go | 20 +++++++++++++++++++ .../apps/v1beta2/controllerrevision.go | 20 +++++++++++++++++++ .../listers/apps/v1beta2/daemonset.go | 20 +++++++++++++++++++ .../listers/apps/v1beta2/deployment.go | 20 +++++++++++++++++++ .../listers/apps/v1beta2/replicaset.go | 20 +++++++++++++++++++ .../listers/apps/v1beta2/statefulset.go | 20 +++++++++++++++++++ .../autoscaling/v1/horizontalpodautoscaler.go | 20 +++++++++++++++++++ .../v2beta1/horizontalpodautoscaler.go | 20 +++++++++++++++++++ .../v2beta2/horizontalpodautoscaler.go | 20 +++++++++++++++++++ .../client-go/listers/batch/v1/cronjob.go | 20 +++++++++++++++++++ .../k8s.io/client-go/listers/batch/v1/job.go | 20 +++++++++++++++++++ .../listers/batch/v1beta1/cronjob.go | 20 +++++++++++++++++++ .../v1/certificatesigningrequest.go | 18 +++++++++++++++++ .../v1beta1/certificatesigningrequest.go | 18 +++++++++++++++++ .../listers/coordination/v1/lease.go | 20 +++++++++++++++++++ .../listers/coordination/v1beta1/lease.go | 20 +++++++++++++++++++ .../listers/core/v1/componentstatus.go | 18 +++++++++++++++++ .../client-go/listers/core/v1/configmap.go | 20 +++++++++++++++++++ .../client-go/listers/core/v1/endpoints.go | 20 +++++++++++++++++++ .../k8s.io/client-go/listers/core/v1/event.go | 20 +++++++++++++++++++ .../client-go/listers/core/v1/limitrange.go | 20 +++++++++++++++++++ .../client-go/listers/core/v1/namespace.go | 18 +++++++++++++++++ .../k8s.io/client-go/listers/core/v1/node.go | 18 +++++++++++++++++ .../listers/core/v1/persistentvolume.go | 18 +++++++++++++++++ .../listers/core/v1/persistentvolumeclaim.go | 20 +++++++++++++++++++ .../k8s.io/client-go/listers/core/v1/pod.go | 20 +++++++++++++++++++ .../client-go/listers/core/v1/podtemplate.go | 20 +++++++++++++++++++ .../listers/core/v1/replicationcontroller.go | 20 +++++++++++++++++++ .../listers/core/v1/resourcequota.go | 20 +++++++++++++++++++ .../client-go/listers/core/v1/secret.go | 20 +++++++++++++++++++ .../client-go/listers/core/v1/service.go | 20 +++++++++++++++++++ .../listers/core/v1/serviceaccount.go | 20 +++++++++++++++++++ .../listers/discovery/v1/endpointslice.go | 20 +++++++++++++++++++ .../discovery/v1beta1/endpointslice.go | 20 +++++++++++++++++++ .../client-go/listers/events/v1/event.go | 20 +++++++++++++++++++ .../client-go/listers/events/v1beta1/event.go | 20 +++++++++++++++++++ .../listers/extensions/v1beta1/daemonset.go | 20 +++++++++++++++++++ .../listers/extensions/v1beta1/deployment.go | 20 +++++++++++++++++++ .../listers/extensions/v1beta1/ingress.go | 20 +++++++++++++++++++ .../extensions/v1beta1/networkpolicy.go | 20 +++++++++++++++++++ .../extensions/v1beta1/podsecuritypolicy.go | 18 +++++++++++++++++ .../listers/extensions/v1beta1/replicaset.go | 20 +++++++++++++++++++ .../flowcontrol/v1alpha1/flowschema.go | 18 +++++++++++++++++ .../v1alpha1/prioritylevelconfiguration.go | 18 +++++++++++++++++ .../listers/flowcontrol/v1beta1/flowschema.go | 18 +++++++++++++++++ .../v1beta1/prioritylevelconfiguration.go | 18 +++++++++++++++++ .../imagepolicy/v1alpha1/imagereview.go | 18 +++++++++++++++++ .../listers/networking/v1/ingress.go | 20 +++++++++++++++++++ .../listers/networking/v1/ingressclass.go | 18 +++++++++++++++++ .../listers/networking/v1/networkpolicy.go | 20 +++++++++++++++++++ .../listers/networking/v1beta1/ingress.go | 20 +++++++++++++++++++ .../networking/v1beta1/ingressclass.go | 18 +++++++++++++++++ .../client-go/listers/node/v1/runtimeclass.go | 18 +++++++++++++++++ .../listers/node/v1alpha1/runtimeclass.go | 18 +++++++++++++++++ .../listers/node/v1beta1/runtimeclass.go | 18 +++++++++++++++++ .../client-go/listers/policy/v1/eviction.go | 20 +++++++++++++++++++ .../listers/policy/v1/poddisruptionbudget.go | 20 +++++++++++++++++++ .../listers/policy/v1beta1/eviction.go | 20 +++++++++++++++++++ .../policy/v1beta1/poddisruptionbudget.go | 20 +++++++++++++++++++ .../policy/v1beta1/podsecuritypolicy.go | 18 +++++++++++++++++ .../client-go/listers/rbac/v1/clusterrole.go | 18 +++++++++++++++++ .../listers/rbac/v1/clusterrolebinding.go | 18 +++++++++++++++++ .../k8s.io/client-go/listers/rbac/v1/role.go | 20 +++++++++++++++++++ .../client-go/listers/rbac/v1/rolebinding.go | 20 +++++++++++++++++++ .../listers/rbac/v1alpha1/clusterrole.go | 18 +++++++++++++++++ .../rbac/v1alpha1/clusterrolebinding.go | 18 +++++++++++++++++ .../client-go/listers/rbac/v1alpha1/role.go | 20 +++++++++++++++++++ .../listers/rbac/v1alpha1/rolebinding.go | 20 +++++++++++++++++++ .../listers/rbac/v1beta1/clusterrole.go | 18 +++++++++++++++++ .../rbac/v1beta1/clusterrolebinding.go | 18 +++++++++++++++++ .../client-go/listers/rbac/v1beta1/role.go | 20 +++++++++++++++++++ .../listers/rbac/v1beta1/rolebinding.go | 20 +++++++++++++++++++ .../listers/scheduling/v1/priorityclass.go | 18 +++++++++++++++++ .../scheduling/v1alpha1/priorityclass.go | 18 +++++++++++++++++ .../scheduling/v1beta1/priorityclass.go | 18 +++++++++++++++++ .../client-go/listers/storage/v1/csidriver.go | 18 +++++++++++++++++ .../client-go/listers/storage/v1/csinode.go | 18 +++++++++++++++++ .../listers/storage/v1/storageclass.go | 18 +++++++++++++++++ .../listers/storage/v1/volumeattachment.go | 18 +++++++++++++++++ .../storage/v1alpha1/csistoragecapacity.go | 20 +++++++++++++++++++ .../storage/v1alpha1/volumeattachment.go | 18 +++++++++++++++++ .../listers/storage/v1beta1/csidriver.go | 18 +++++++++++++++++ .../listers/storage/v1beta1/csinode.go | 18 +++++++++++++++++ .../storage/v1beta1/csistoragecapacity.go | 20 +++++++++++++++++++ .../listers/storage/v1beta1/storageclass.go | 18 +++++++++++++++++ .../storage/v1beta1/volumeattachment.go | 18 +++++++++++++++++ .../listers/example/v1/clustertesttype.go | 18 +++++++++++++++++ .../listers/example/v1/testtype.go | 20 +++++++++++++++++++ .../listers/example/v1/clustertesttype.go | 18 +++++++++++++++++ .../MixedCase/listers/example/v1/testtype.go | 20 +++++++++++++++++++ .../example/internalversion/testtype.go | 20 +++++++++++++++++++ .../apiserver/listers/example/v1/testtype.go | 20 +++++++++++++++++++ .../example2/internalversion/testtype.go | 18 +++++++++++++++++ .../apiserver/listers/example2/v1/testtype.go | 20 +++++++++++++++++++ .../example3.io/internalversion/testtype.go | 20 +++++++++++++++++++ .../listers/example3.io/v1/testtype.go | 20 +++++++++++++++++++ .../crd/listers/example/v1/clustertesttype.go | 18 +++++++++++++++++ .../crd/listers/example/v1/testtype.go | 20 +++++++++++++++++++ .../crd/listers/example2/v1/testtype.go | 20 +++++++++++++++++++ .../listers/apiregistration/v1/apiservice.go | 18 +++++++++++++++++ .../apiregistration/v1beta1/apiservice.go | 18 +++++++++++++++++ .../listers/wardle/v1alpha1/fischer.go | 18 +++++++++++++++++ .../listers/wardle/v1alpha1/flunder.go | 20 +++++++++++++++++++ .../listers/wardle/v1beta1/flunder.go | 20 +++++++++++++++++++ .../listers/samplecontroller/v1alpha1/foo.go | 20 +++++++++++++++++++ 120 files changed, 2300 insertions(+) diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/example.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/example.go index 9b82534b158ee..c127d5e03ac9d 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/example.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/example.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ExampleLister interface { // List lists all Examples in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Example, err error) + // ListWithContext lists all Examples in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Example, err error) // Examples returns an object that can list and get Examples. Examples(namespace string) ExampleNamespaceLister ExampleListerExpansion @@ -48,6 +53,11 @@ func NewExampleLister(indexer cache.Indexer) ExampleLister { // List lists all Examples in the indexer. func (s *exampleLister) List(selector labels.Selector) (ret []*v1.Example, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Examples in the indexer. +func (s *exampleLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Example, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Example)) }) @@ -80,6 +90,11 @@ type exampleNamespaceLister struct { // List lists all Examples in the indexer for a given namespace. func (s exampleNamespaceLister) List(selector labels.Selector) (ret []*v1.Example, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Examples in the indexer for a given namespace. +func (s exampleNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Example, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Example)) }) @@ -88,6 +103,11 @@ func (s exampleNamespaceLister) List(selector labels.Selector) (ret []*v1.Exampl // Get retrieves the Example from the indexer for a given namespace and name. func (s exampleNamespaceLister) Get(name string) (*v1.Example, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Example from the indexer for a given namespace and name. +func (s exampleNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Example, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go index d83c58bc6298f..87b5dac9e6a79 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type CustomResourceDefinitionLister interface { // List lists all CustomResourceDefinitions in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.CustomResourceDefinition, err error) + // ListWithContext lists all CustomResourceDefinitions in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CustomResourceDefinition, err error) // Get retrieves the CustomResourceDefinition from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.CustomResourceDefinition, error) + // GetWithContext retrieves the CustomResourceDefinition from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.CustomResourceDefinition, error) CustomResourceDefinitionListerExpansion } @@ -49,6 +57,11 @@ func NewCustomResourceDefinitionLister(indexer cache.Indexer) CustomResourceDefi // List lists all CustomResourceDefinitions in the indexer. func (s *customResourceDefinitionLister) List(selector labels.Selector) (ret []*v1.CustomResourceDefinition, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CustomResourceDefinitions in the indexer. +func (s *customResourceDefinitionLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CustomResourceDefinition, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.CustomResourceDefinition)) }) @@ -57,6 +70,11 @@ func (s *customResourceDefinitionLister) List(selector labels.Selector) (ret []* // Get retrieves the CustomResourceDefinition from the index for a given name. func (s *customResourceDefinitionLister) Get(name string) (*v1.CustomResourceDefinition, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CustomResourceDefinition from the index for a given name. +func (s *customResourceDefinitionLister) GetWithContext(ctx context.Context, name string) (*v1.CustomResourceDefinition, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go index c57fd40d8fea5..24036ae0ae052 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type CustomResourceDefinitionLister interface { // List lists all CustomResourceDefinitions in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CustomResourceDefinition, err error) + // ListWithContext lists all CustomResourceDefinitions in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CustomResourceDefinition, err error) // Get retrieves the CustomResourceDefinition from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.CustomResourceDefinition, error) + // GetWithContext retrieves the CustomResourceDefinition from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.CustomResourceDefinition, error) CustomResourceDefinitionListerExpansion } @@ -49,6 +57,11 @@ func NewCustomResourceDefinitionLister(indexer cache.Indexer) CustomResourceDefi // List lists all CustomResourceDefinitions in the indexer. func (s *customResourceDefinitionLister) List(selector labels.Selector) (ret []*v1beta1.CustomResourceDefinition, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CustomResourceDefinitions in the indexer. +func (s *customResourceDefinitionLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CustomResourceDefinition, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CustomResourceDefinition)) }) @@ -57,6 +70,11 @@ func (s *customResourceDefinitionLister) List(selector labels.Selector) (ret []* // Get retrieves the CustomResourceDefinition from the index for a given name. func (s *customResourceDefinitionLister) Get(name string) (*v1beta1.CustomResourceDefinition, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CustomResourceDefinition from the index for a given name. +func (s *customResourceDefinitionLister) GetWithContext(ctx context.Context, name string) (*v1beta1.CustomResourceDefinition, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/listers/admissionregistration/v1/mutatingwebhookconfiguration.go index fe9e27985def8..dd33282b93b52 100644 --- a/staging/src/k8s.io/client-go/listers/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/listers/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/admissionregistration/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type MutatingWebhookConfigurationLister interface { // List lists all MutatingWebhookConfigurations in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.MutatingWebhookConfiguration, err error) + // ListWithContext lists all MutatingWebhookConfigurations in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.MutatingWebhookConfiguration, err error) // Get retrieves the MutatingWebhookConfiguration from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.MutatingWebhookConfiguration, error) + // GetWithContext retrieves the MutatingWebhookConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.MutatingWebhookConfiguration, error) MutatingWebhookConfigurationListerExpansion } @@ -49,6 +57,11 @@ func NewMutatingWebhookConfigurationLister(indexer cache.Indexer) MutatingWebhoo // List lists all MutatingWebhookConfigurations in the indexer. func (s *mutatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*v1.MutatingWebhookConfiguration, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all MutatingWebhookConfigurations in the indexer. +func (s *mutatingWebhookConfigurationLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.MutatingWebhookConfiguration, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.MutatingWebhookConfiguration)) }) @@ -57,6 +70,11 @@ func (s *mutatingWebhookConfigurationLister) List(selector labels.Selector) (ret // Get retrieves the MutatingWebhookConfiguration from the index for a given name. func (s *mutatingWebhookConfigurationLister) Get(name string) (*v1.MutatingWebhookConfiguration, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the MutatingWebhookConfiguration from the index for a given name. +func (s *mutatingWebhookConfigurationLister) GetWithContext(ctx context.Context, name string) (*v1.MutatingWebhookConfiguration, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/listers/admissionregistration/v1/validatingwebhookconfiguration.go index 1579a0ebb76b0..2da389c4a137c 100644 --- a/staging/src/k8s.io/client-go/listers/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/listers/admissionregistration/v1/validatingwebhookconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/admissionregistration/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type ValidatingWebhookConfigurationLister interface { // List lists all ValidatingWebhookConfigurations in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ValidatingWebhookConfiguration, err error) + // ListWithContext lists all ValidatingWebhookConfigurations in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ValidatingWebhookConfiguration, err error) // Get retrieves the ValidatingWebhookConfiguration from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.ValidatingWebhookConfiguration, error) + // GetWithContext retrieves the ValidatingWebhookConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.ValidatingWebhookConfiguration, error) ValidatingWebhookConfigurationListerExpansion } @@ -49,6 +57,11 @@ func NewValidatingWebhookConfigurationLister(indexer cache.Indexer) ValidatingWe // List lists all ValidatingWebhookConfigurations in the indexer. func (s *validatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*v1.ValidatingWebhookConfiguration, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ValidatingWebhookConfigurations in the indexer. +func (s *validatingWebhookConfigurationLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ValidatingWebhookConfiguration, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ValidatingWebhookConfiguration)) }) @@ -57,6 +70,11 @@ func (s *validatingWebhookConfigurationLister) List(selector labels.Selector) (r // Get retrieves the ValidatingWebhookConfiguration from the index for a given name. func (s *validatingWebhookConfigurationLister) Get(name string) (*v1.ValidatingWebhookConfiguration, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ValidatingWebhookConfiguration from the index for a given name. +func (s *validatingWebhookConfigurationLister) GetWithContext(ctx context.Context, name string) (*v1.ValidatingWebhookConfiguration, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index 93c6096ee9ec9..56829056d5016 100644 --- a/staging/src/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/admissionregistration/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type MutatingWebhookConfigurationLister interface { // List lists all MutatingWebhookConfigurations in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.MutatingWebhookConfiguration, err error) + // ListWithContext lists all MutatingWebhookConfigurations in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.MutatingWebhookConfiguration, err error) // Get retrieves the MutatingWebhookConfiguration from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.MutatingWebhookConfiguration, error) + // GetWithContext retrieves the MutatingWebhookConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.MutatingWebhookConfiguration, error) MutatingWebhookConfigurationListerExpansion } @@ -49,6 +57,11 @@ func NewMutatingWebhookConfigurationLister(indexer cache.Indexer) MutatingWebhoo // List lists all MutatingWebhookConfigurations in the indexer. func (s *mutatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*v1beta1.MutatingWebhookConfiguration, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all MutatingWebhookConfigurations in the indexer. +func (s *mutatingWebhookConfigurationLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.MutatingWebhookConfiguration, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.MutatingWebhookConfiguration)) }) @@ -57,6 +70,11 @@ func (s *mutatingWebhookConfigurationLister) List(selector labels.Selector) (ret // Get retrieves the MutatingWebhookConfiguration from the index for a given name. func (s *mutatingWebhookConfigurationLister) Get(name string) (*v1beta1.MutatingWebhookConfiguration, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the MutatingWebhookConfiguration from the index for a given name. +func (s *mutatingWebhookConfigurationLister) GetWithContext(ctx context.Context, name string) (*v1beta1.MutatingWebhookConfiguration, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 7c17fccb2e200..cc26def592a15 100644 --- a/staging/src/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/admissionregistration/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type ValidatingWebhookConfigurationLister interface { // List lists all ValidatingWebhookConfigurations in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ValidatingWebhookConfiguration, err error) + // ListWithContext lists all ValidatingWebhookConfigurations in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ValidatingWebhookConfiguration, err error) // Get retrieves the ValidatingWebhookConfiguration from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.ValidatingWebhookConfiguration, error) + // GetWithContext retrieves the ValidatingWebhookConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.ValidatingWebhookConfiguration, error) ValidatingWebhookConfigurationListerExpansion } @@ -49,6 +57,11 @@ func NewValidatingWebhookConfigurationLister(indexer cache.Indexer) ValidatingWe // List lists all ValidatingWebhookConfigurations in the indexer. func (s *validatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*v1beta1.ValidatingWebhookConfiguration, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ValidatingWebhookConfigurations in the indexer. +func (s *validatingWebhookConfigurationLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ValidatingWebhookConfiguration, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.ValidatingWebhookConfiguration)) }) @@ -57,6 +70,11 @@ func (s *validatingWebhookConfigurationLister) List(selector labels.Selector) (r // Get retrieves the ValidatingWebhookConfiguration from the index for a given name. func (s *validatingWebhookConfigurationLister) Get(name string) (*v1beta1.ValidatingWebhookConfiguration, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ValidatingWebhookConfiguration from the index for a given name. +func (s *validatingWebhookConfigurationLister) GetWithContext(ctx context.Context, name string) (*v1beta1.ValidatingWebhookConfiguration, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apiserverinternal/v1alpha1/storageversion.go b/staging/src/k8s.io/client-go/listers/apiserverinternal/v1alpha1/storageversion.go index 9a6d74b2bf51d..a863e1c3b4d95 100644 --- a/staging/src/k8s.io/client-go/listers/apiserverinternal/v1alpha1/storageversion.go +++ b/staging/src/k8s.io/client-go/listers/apiserverinternal/v1alpha1/storageversion.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/apiserverinternal/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type StorageVersionLister interface { // List lists all StorageVersions in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.StorageVersion, err error) + // ListWithContext lists all StorageVersions in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.StorageVersion, err error) // Get retrieves the StorageVersion from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.StorageVersion, error) + // GetWithContext retrieves the StorageVersion from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1alpha1.StorageVersion, error) StorageVersionListerExpansion } @@ -49,6 +57,11 @@ func NewStorageVersionLister(indexer cache.Indexer) StorageVersionLister { // List lists all StorageVersions in the indexer. func (s *storageVersionLister) List(selector labels.Selector) (ret []*v1alpha1.StorageVersion, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all StorageVersions in the indexer. +func (s *storageVersionLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.StorageVersion, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.StorageVersion)) }) @@ -57,6 +70,11 @@ func (s *storageVersionLister) List(selector labels.Selector) (ret []*v1alpha1.S // Get retrieves the StorageVersion from the index for a given name. func (s *storageVersionLister) Get(name string) (*v1alpha1.StorageVersion, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the StorageVersion from the index for a given name. +func (s *storageVersionLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.StorageVersion, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1/controllerrevision.go b/staging/src/k8s.io/client-go/listers/apps/v1/controllerrevision.go index 9e2f973746bbb..538b05de4f2bb 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1/controllerrevision.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ControllerRevisionLister interface { // List lists all ControllerRevisions in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ControllerRevision, err error) + // ListWithContext lists all ControllerRevisions in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ControllerRevision, err error) // ControllerRevisions returns an object that can list and get ControllerRevisions. ControllerRevisions(namespace string) ControllerRevisionNamespaceLister ControllerRevisionListerExpansion @@ -48,6 +53,11 @@ func NewControllerRevisionLister(indexer cache.Indexer) ControllerRevisionLister // List lists all ControllerRevisions in the indexer. func (s *controllerRevisionLister) List(selector labels.Selector) (ret []*v1.ControllerRevision, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ControllerRevisions in the indexer. +func (s *controllerRevisionLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ControllerRevision, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ControllerRevision)) }) @@ -80,6 +90,11 @@ type controllerRevisionNamespaceLister struct { // List lists all ControllerRevisions in the indexer for a given namespace. func (s controllerRevisionNamespaceLister) List(selector labels.Selector) (ret []*v1.ControllerRevision, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ControllerRevisions in the indexer for a given namespace. +func (s controllerRevisionNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ControllerRevision, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.ControllerRevision)) }) @@ -88,6 +103,11 @@ func (s controllerRevisionNamespaceLister) List(selector labels.Selector) (ret [ // Get retrieves the ControllerRevision from the indexer for a given namespace and name. func (s controllerRevisionNamespaceLister) Get(name string) (*v1.ControllerRevision, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ControllerRevision from the indexer for a given namespace and name. +func (s controllerRevisionNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.ControllerRevision, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1/daemonset.go b/staging/src/k8s.io/client-go/listers/apps/v1/daemonset.go index 061959e3daf68..a48d26339e177 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1/daemonset.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1/daemonset.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type DaemonSetLister interface { // List lists all DaemonSets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.DaemonSet, err error) + // ListWithContext lists all DaemonSets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.DaemonSet, err error) // DaemonSets returns an object that can list and get DaemonSets. DaemonSets(namespace string) DaemonSetNamespaceLister DaemonSetListerExpansion @@ -48,6 +53,11 @@ func NewDaemonSetLister(indexer cache.Indexer) DaemonSetLister { // List lists all DaemonSets in the indexer. func (s *daemonSetLister) List(selector labels.Selector) (ret []*v1.DaemonSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all DaemonSets in the indexer. +func (s *daemonSetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.DaemonSet, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.DaemonSet)) }) @@ -80,6 +90,11 @@ type daemonSetNamespaceLister struct { // List lists all DaemonSets in the indexer for a given namespace. func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1.DaemonSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all DaemonSets in the indexer for a given namespace. +func (s daemonSetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.DaemonSet, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.DaemonSet)) }) @@ -88,6 +103,11 @@ func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1.Daem // Get retrieves the DaemonSet from the indexer for a given namespace and name. func (s daemonSetNamespaceLister) Get(name string) (*v1.DaemonSet, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the DaemonSet from the indexer for a given namespace and name. +func (s daemonSetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.DaemonSet, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1/deployment.go b/staging/src/k8s.io/client-go/listers/apps/v1/deployment.go index 7704034172991..12d40118388b1 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1/deployment.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1/deployment.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type DeploymentLister interface { // List lists all Deployments in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Deployment, err error) + // ListWithContext lists all Deployments in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Deployment, err error) // Deployments returns an object that can list and get Deployments. Deployments(namespace string) DeploymentNamespaceLister DeploymentListerExpansion @@ -48,6 +53,11 @@ func NewDeploymentLister(indexer cache.Indexer) DeploymentLister { // List lists all Deployments in the indexer. func (s *deploymentLister) List(selector labels.Selector) (ret []*v1.Deployment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Deployments in the indexer. +func (s *deploymentLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Deployment, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Deployment)) }) @@ -80,6 +90,11 @@ type deploymentNamespaceLister struct { // List lists all Deployments in the indexer for a given namespace. func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1.Deployment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Deployments in the indexer for a given namespace. +func (s deploymentNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Deployment, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Deployment)) }) @@ -88,6 +103,11 @@ func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1.Dep // Get retrieves the Deployment from the indexer for a given namespace and name. func (s deploymentNamespaceLister) Get(name string) (*v1.Deployment, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Deployment from the indexer for a given namespace and name. +func (s deploymentNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Deployment, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1/replicaset.go b/staging/src/k8s.io/client-go/listers/apps/v1/replicaset.go index 3ca7757eb94bb..91f3cfb6ea2ba 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1/replicaset.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1/replicaset.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ReplicaSetLister interface { // List lists all ReplicaSets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ReplicaSet, err error) + // ListWithContext lists all ReplicaSets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ReplicaSet, err error) // ReplicaSets returns an object that can list and get ReplicaSets. ReplicaSets(namespace string) ReplicaSetNamespaceLister ReplicaSetListerExpansion @@ -48,6 +53,11 @@ func NewReplicaSetLister(indexer cache.Indexer) ReplicaSetLister { // List lists all ReplicaSets in the indexer. func (s *replicaSetLister) List(selector labels.Selector) (ret []*v1.ReplicaSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ReplicaSets in the indexer. +func (s *replicaSetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ReplicaSet, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ReplicaSet)) }) @@ -80,6 +90,11 @@ type replicaSetNamespaceLister struct { // List lists all ReplicaSets in the indexer for a given namespace. func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1.ReplicaSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ReplicaSets in the indexer for a given namespace. +func (s replicaSetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ReplicaSet, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.ReplicaSet)) }) @@ -88,6 +103,11 @@ func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1.Rep // Get retrieves the ReplicaSet from the indexer for a given namespace and name. func (s replicaSetNamespaceLister) Get(name string) (*v1.ReplicaSet, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ReplicaSet from the indexer for a given namespace and name. +func (s replicaSetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.ReplicaSet, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1/statefulset.go b/staging/src/k8s.io/client-go/listers/apps/v1/statefulset.go index f6899d5ff9bd8..5cfc11d6cb692 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1/statefulset.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1/statefulset.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type StatefulSetLister interface { // List lists all StatefulSets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.StatefulSet, err error) + // ListWithContext lists all StatefulSets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.StatefulSet, err error) // StatefulSets returns an object that can list and get StatefulSets. StatefulSets(namespace string) StatefulSetNamespaceLister StatefulSetListerExpansion @@ -48,6 +53,11 @@ func NewStatefulSetLister(indexer cache.Indexer) StatefulSetLister { // List lists all StatefulSets in the indexer. func (s *statefulSetLister) List(selector labels.Selector) (ret []*v1.StatefulSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all StatefulSets in the indexer. +func (s *statefulSetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.StatefulSet, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.StatefulSet)) }) @@ -80,6 +90,11 @@ type statefulSetNamespaceLister struct { // List lists all StatefulSets in the indexer for a given namespace. func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1.StatefulSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all StatefulSets in the indexer for a given namespace. +func (s statefulSetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.StatefulSet, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.StatefulSet)) }) @@ -88,6 +103,11 @@ func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1.St // Get retrieves the StatefulSet from the indexer for a given namespace and name. func (s statefulSetNamespaceLister) Get(name string) (*v1.StatefulSet, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the StatefulSet from the indexer for a given namespace and name. +func (s statefulSetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.StatefulSet, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go b/staging/src/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go index fc73de723fe5a..3c422089384de 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/apps/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ControllerRevisionLister interface { // List lists all ControllerRevisions in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error) + // ListWithContext lists all ControllerRevisions in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error) // ControllerRevisions returns an object that can list and get ControllerRevisions. ControllerRevisions(namespace string) ControllerRevisionNamespaceLister ControllerRevisionListerExpansion @@ -48,6 +53,11 @@ func NewControllerRevisionLister(indexer cache.Indexer) ControllerRevisionLister // List lists all ControllerRevisions in the indexer. func (s *controllerRevisionLister) List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ControllerRevisions in the indexer. +func (s *controllerRevisionLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.ControllerRevision)) }) @@ -80,6 +90,11 @@ type controllerRevisionNamespaceLister struct { // List lists all ControllerRevisions in the indexer for a given namespace. func (s controllerRevisionNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ControllerRevisions in the indexer for a given namespace. +func (s controllerRevisionNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.ControllerRevision)) }) @@ -88,6 +103,11 @@ func (s controllerRevisionNamespaceLister) List(selector labels.Selector) (ret [ // Get retrieves the ControllerRevision from the indexer for a given namespace and name. func (s controllerRevisionNamespaceLister) Get(name string) (*v1beta1.ControllerRevision, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ControllerRevision from the indexer for a given namespace and name. +func (s controllerRevisionNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.ControllerRevision, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta1/deployment.go b/staging/src/k8s.io/client-go/listers/apps/v1beta1/deployment.go index 3fb70794cad2a..b115ca9e48ca1 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta1/deployment.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/apps/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type DeploymentLister interface { // List lists all Deployments in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) + // ListWithContext lists all Deployments in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Deployment, err error) // Deployments returns an object that can list and get Deployments. Deployments(namespace string) DeploymentNamespaceLister DeploymentListerExpansion @@ -48,6 +53,11 @@ func NewDeploymentLister(indexer cache.Indexer) DeploymentLister { // List lists all Deployments in the indexer. func (s *deploymentLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Deployments in the indexer. +func (s *deploymentLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Deployment, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Deployment)) }) @@ -80,6 +90,11 @@ type deploymentNamespaceLister struct { // List lists all Deployments in the indexer for a given namespace. func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Deployments in the indexer for a given namespace. +func (s deploymentNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Deployment, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Deployment)) }) @@ -88,6 +103,11 @@ func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta // Get retrieves the Deployment from the indexer for a given namespace and name. func (s deploymentNamespaceLister) Get(name string) (*v1beta1.Deployment, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Deployment from the indexer for a given namespace and name. +func (s deploymentNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.Deployment, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta1/statefulset.go b/staging/src/k8s.io/client-go/listers/apps/v1beta1/statefulset.go index e3556bc398f0e..d3d2742d8b2db 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1beta1/statefulset.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta1/statefulset.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/apps/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type StatefulSetLister interface { // List lists all StatefulSets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) + // ListWithContext lists all StatefulSets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) // StatefulSets returns an object that can list and get StatefulSets. StatefulSets(namespace string) StatefulSetNamespaceLister StatefulSetListerExpansion @@ -48,6 +53,11 @@ func NewStatefulSetLister(indexer cache.Indexer) StatefulSetLister { // List lists all StatefulSets in the indexer. func (s *statefulSetLister) List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all StatefulSets in the indexer. +func (s *statefulSetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.StatefulSet)) }) @@ -80,6 +90,11 @@ type statefulSetNamespaceLister struct { // List lists all StatefulSets in the indexer for a given namespace. func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all StatefulSets in the indexer for a given namespace. +func (s statefulSetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.StatefulSet)) }) @@ -88,6 +103,11 @@ func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1bet // Get retrieves the StatefulSet from the indexer for a given namespace and name. func (s statefulSetNamespaceLister) Get(name string) (*v1beta1.StatefulSet, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the StatefulSet from the indexer for a given namespace and name. +func (s statefulSetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.StatefulSet, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go b/staging/src/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go index da2ce860054d7..e3c8ab70f2f27 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta2 import ( + "context" + v1beta2 "k8s.io/api/apps/v1beta2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ControllerRevisionLister interface { // List lists all ControllerRevisions in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) + // ListWithContext lists all ControllerRevisions in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) // ControllerRevisions returns an object that can list and get ControllerRevisions. ControllerRevisions(namespace string) ControllerRevisionNamespaceLister ControllerRevisionListerExpansion @@ -48,6 +53,11 @@ func NewControllerRevisionLister(indexer cache.Indexer) ControllerRevisionLister // List lists all ControllerRevisions in the indexer. func (s *controllerRevisionLister) List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ControllerRevisions in the indexer. +func (s *controllerRevisionLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.ControllerRevision)) }) @@ -80,6 +90,11 @@ type controllerRevisionNamespaceLister struct { // List lists all ControllerRevisions in the indexer for a given namespace. func (s controllerRevisionNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ControllerRevisions in the indexer for a given namespace. +func (s controllerRevisionNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.ControllerRevision)) }) @@ -88,6 +103,11 @@ func (s controllerRevisionNamespaceLister) List(selector labels.Selector) (ret [ // Get retrieves the ControllerRevision from the indexer for a given namespace and name. func (s controllerRevisionNamespaceLister) Get(name string) (*v1beta2.ControllerRevision, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ControllerRevision from the indexer for a given namespace and name. +func (s controllerRevisionNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta2.ControllerRevision, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta2/daemonset.go b/staging/src/k8s.io/client-go/listers/apps/v1beta2/daemonset.go index 4b7aedd7586ab..a8ec6c3c2f6fe 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1beta2/daemonset.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta2/daemonset.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta2 import ( + "context" + v1beta2 "k8s.io/api/apps/v1beta2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type DaemonSetLister interface { // List lists all DaemonSets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error) + // ListWithContext lists all DaemonSets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.DaemonSet, err error) // DaemonSets returns an object that can list and get DaemonSets. DaemonSets(namespace string) DaemonSetNamespaceLister DaemonSetListerExpansion @@ -48,6 +53,11 @@ func NewDaemonSetLister(indexer cache.Indexer) DaemonSetLister { // List lists all DaemonSets in the indexer. func (s *daemonSetLister) List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all DaemonSets in the indexer. +func (s *daemonSetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.DaemonSet, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.DaemonSet)) }) @@ -80,6 +90,11 @@ type daemonSetNamespaceLister struct { // List lists all DaemonSets in the indexer for a given namespace. func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all DaemonSets in the indexer for a given namespace. +func (s daemonSetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.DaemonSet, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.DaemonSet)) }) @@ -88,6 +103,11 @@ func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta2 // Get retrieves the DaemonSet from the indexer for a given namespace and name. func (s daemonSetNamespaceLister) Get(name string) (*v1beta2.DaemonSet, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the DaemonSet from the indexer for a given namespace and name. +func (s daemonSetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta2.DaemonSet, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta2/deployment.go b/staging/src/k8s.io/client-go/listers/apps/v1beta2/deployment.go index c2857bbc3666b..f3eea05b10cde 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1beta2/deployment.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta2/deployment.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta2 import ( + "context" + v1beta2 "k8s.io/api/apps/v1beta2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type DeploymentLister interface { // List lists all Deployments in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.Deployment, err error) + // ListWithContext lists all Deployments in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.Deployment, err error) // Deployments returns an object that can list and get Deployments. Deployments(namespace string) DeploymentNamespaceLister DeploymentListerExpansion @@ -48,6 +53,11 @@ func NewDeploymentLister(indexer cache.Indexer) DeploymentLister { // List lists all Deployments in the indexer. func (s *deploymentLister) List(selector labels.Selector) (ret []*v1beta2.Deployment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Deployments in the indexer. +func (s *deploymentLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.Deployment, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.Deployment)) }) @@ -80,6 +90,11 @@ type deploymentNamespaceLister struct { // List lists all Deployments in the indexer for a given namespace. func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.Deployment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Deployments in the indexer for a given namespace. +func (s deploymentNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.Deployment, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.Deployment)) }) @@ -88,6 +103,11 @@ func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta // Get retrieves the Deployment from the indexer for a given namespace and name. func (s deploymentNamespaceLister) Get(name string) (*v1beta2.Deployment, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Deployment from the indexer for a given namespace and name. +func (s deploymentNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta2.Deployment, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta2/replicaset.go b/staging/src/k8s.io/client-go/listers/apps/v1beta2/replicaset.go index 26b350ce8f82b..ded2d9a5113e1 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1beta2/replicaset.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta2/replicaset.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta2 import ( + "context" + v1beta2 "k8s.io/api/apps/v1beta2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ReplicaSetLister interface { // List lists all ReplicaSets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error) + // ListWithContext lists all ReplicaSets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error) // ReplicaSets returns an object that can list and get ReplicaSets. ReplicaSets(namespace string) ReplicaSetNamespaceLister ReplicaSetListerExpansion @@ -48,6 +53,11 @@ func NewReplicaSetLister(indexer cache.Indexer) ReplicaSetLister { // List lists all ReplicaSets in the indexer. func (s *replicaSetLister) List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ReplicaSets in the indexer. +func (s *replicaSetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.ReplicaSet)) }) @@ -80,6 +90,11 @@ type replicaSetNamespaceLister struct { // List lists all ReplicaSets in the indexer for a given namespace. func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ReplicaSets in the indexer for a given namespace. +func (s replicaSetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.ReplicaSet)) }) @@ -88,6 +103,11 @@ func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta // Get retrieves the ReplicaSet from the indexer for a given namespace and name. func (s replicaSetNamespaceLister) Get(name string) (*v1beta2.ReplicaSet, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ReplicaSet from the indexer for a given namespace and name. +func (s replicaSetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta2.ReplicaSet, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/apps/v1beta2/statefulset.go b/staging/src/k8s.io/client-go/listers/apps/v1beta2/statefulset.go index fbbaf0133f743..4a761f72a6dff 100644 --- a/staging/src/k8s.io/client-go/listers/apps/v1beta2/statefulset.go +++ b/staging/src/k8s.io/client-go/listers/apps/v1beta2/statefulset.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta2 import ( + "context" + v1beta2 "k8s.io/api/apps/v1beta2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type StatefulSetLister interface { // List lists all StatefulSets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error) + // ListWithContext lists all StatefulSets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.StatefulSet, err error) // StatefulSets returns an object that can list and get StatefulSets. StatefulSets(namespace string) StatefulSetNamespaceLister StatefulSetListerExpansion @@ -48,6 +53,11 @@ func NewStatefulSetLister(indexer cache.Indexer) StatefulSetLister { // List lists all StatefulSets in the indexer. func (s *statefulSetLister) List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all StatefulSets in the indexer. +func (s *statefulSetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.StatefulSet, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.StatefulSet)) }) @@ -80,6 +90,11 @@ type statefulSetNamespaceLister struct { // List lists all StatefulSets in the indexer for a given namespace. func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all StatefulSets in the indexer for a given namespace. +func (s statefulSetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.StatefulSet, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.StatefulSet)) }) @@ -88,6 +103,11 @@ func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1bet // Get retrieves the StatefulSet from the indexer for a given namespace and name. func (s statefulSetNamespaceLister) Get(name string) (*v1beta2.StatefulSet, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the StatefulSet from the indexer for a given namespace and name. +func (s statefulSetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta2.StatefulSet, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go index 8447f059d4553..fa542ad1679a1 100644 --- a/staging/src/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/autoscaling/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type HorizontalPodAutoscalerLister interface { // List lists all HorizontalPodAutoscalers in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) + // ListWithContext lists all HorizontalPodAutoscalers in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister HorizontalPodAutoscalerListerExpansion @@ -48,6 +53,11 @@ func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutosc // List lists all HorizontalPodAutoscalers in the indexer. func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all HorizontalPodAutoscalers in the indexer. +func (s *horizontalPodAutoscalerLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.HorizontalPodAutoscaler)) }) @@ -80,6 +90,11 @@ type horizontalPodAutoscalerNamespaceLister struct { // List lists all HorizontalPodAutoscalers in the indexer for a given namespace. func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all HorizontalPodAutoscalers in the indexer for a given namespace. +func (s horizontalPodAutoscalerNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.HorizontalPodAutoscaler)) }) @@ -88,6 +103,11 @@ func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) ( // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v1.HorizontalPodAutoscaler, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. +func (s horizontalPodAutoscalerNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.HorizontalPodAutoscaler, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go index f1804e995b6e9..084cb3564bec1 100644 --- a/staging/src/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -19,6 +19,8 @@ limitations under the License. package v2beta1 import ( + "context" + v2beta1 "k8s.io/api/autoscaling/v2beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type HorizontalPodAutoscalerLister interface { // List lists all HorizontalPodAutoscalers in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) + // ListWithContext lists all HorizontalPodAutoscalers in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister HorizontalPodAutoscalerListerExpansion @@ -48,6 +53,11 @@ func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutosc // List lists all HorizontalPodAutoscalers in the indexer. func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all HorizontalPodAutoscalers in the indexer. +func (s *horizontalPodAutoscalerLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v2beta1.HorizontalPodAutoscaler)) }) @@ -80,6 +90,11 @@ type horizontalPodAutoscalerNamespaceLister struct { // List lists all HorizontalPodAutoscalers in the indexer for a given namespace. func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all HorizontalPodAutoscalers in the indexer for a given namespace. +func (s horizontalPodAutoscalerNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v2beta1.HorizontalPodAutoscaler)) }) @@ -88,6 +103,11 @@ func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) ( // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2beta1.HorizontalPodAutoscaler, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. +func (s horizontalPodAutoscalerNamespaceLister) GetWithContext(ctx context.Context, name string) (*v2beta1.HorizontalPodAutoscaler, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go index b0dbaf9eb0a5f..51d33133a329d 100644 --- a/staging/src/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -19,6 +19,8 @@ limitations under the License. package v2beta2 import ( + "context" + v2beta2 "k8s.io/api/autoscaling/v2beta2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type HorizontalPodAutoscalerLister interface { // List lists all HorizontalPodAutoscalers in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) + // ListWithContext lists all HorizontalPodAutoscalers in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister HorizontalPodAutoscalerListerExpansion @@ -48,6 +53,11 @@ func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutosc // List lists all HorizontalPodAutoscalers in the indexer. func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all HorizontalPodAutoscalers in the indexer. +func (s *horizontalPodAutoscalerLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v2beta2.HorizontalPodAutoscaler)) }) @@ -80,6 +90,11 @@ type horizontalPodAutoscalerNamespaceLister struct { // List lists all HorizontalPodAutoscalers in the indexer for a given namespace. func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all HorizontalPodAutoscalers in the indexer for a given namespace. +func (s horizontalPodAutoscalerNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v2beta2.HorizontalPodAutoscaler)) }) @@ -88,6 +103,11 @@ func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) ( // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2beta2.HorizontalPodAutoscaler, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. +func (s horizontalPodAutoscalerNamespaceLister) GetWithContext(ctx context.Context, name string) (*v2beta2.HorizontalPodAutoscaler, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/batch/v1/cronjob.go b/staging/src/k8s.io/client-go/listers/batch/v1/cronjob.go index 8e49ed959fac6..3fda899ceabf6 100644 --- a/staging/src/k8s.io/client-go/listers/batch/v1/cronjob.go +++ b/staging/src/k8s.io/client-go/listers/batch/v1/cronjob.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/batch/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type CronJobLister interface { // List lists all CronJobs in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.CronJob, err error) + // ListWithContext lists all CronJobs in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CronJob, err error) // CronJobs returns an object that can list and get CronJobs. CronJobs(namespace string) CronJobNamespaceLister CronJobListerExpansion @@ -48,6 +53,11 @@ func NewCronJobLister(indexer cache.Indexer) CronJobLister { // List lists all CronJobs in the indexer. func (s *cronJobLister) List(selector labels.Selector) (ret []*v1.CronJob, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CronJobs in the indexer. +func (s *cronJobLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CronJob, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.CronJob)) }) @@ -80,6 +90,11 @@ type cronJobNamespaceLister struct { // List lists all CronJobs in the indexer for a given namespace. func (s cronJobNamespaceLister) List(selector labels.Selector) (ret []*v1.CronJob, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CronJobs in the indexer for a given namespace. +func (s cronJobNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CronJob, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.CronJob)) }) @@ -88,6 +103,11 @@ func (s cronJobNamespaceLister) List(selector labels.Selector) (ret []*v1.CronJo // Get retrieves the CronJob from the indexer for a given namespace and name. func (s cronJobNamespaceLister) Get(name string) (*v1.CronJob, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CronJob from the indexer for a given namespace and name. +func (s cronJobNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.CronJob, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/batch/v1/job.go b/staging/src/k8s.io/client-go/listers/batch/v1/job.go index 3aba6b95fa603..8c86087799853 100644 --- a/staging/src/k8s.io/client-go/listers/batch/v1/job.go +++ b/staging/src/k8s.io/client-go/listers/batch/v1/job.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/batch/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type JobLister interface { // List lists all Jobs in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Job, err error) + // ListWithContext lists all Jobs in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Job, err error) // Jobs returns an object that can list and get Jobs. Jobs(namespace string) JobNamespaceLister JobListerExpansion @@ -48,6 +53,11 @@ func NewJobLister(indexer cache.Indexer) JobLister { // List lists all Jobs in the indexer. func (s *jobLister) List(selector labels.Selector) (ret []*v1.Job, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Jobs in the indexer. +func (s *jobLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Job, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Job)) }) @@ -80,6 +90,11 @@ type jobNamespaceLister struct { // List lists all Jobs in the indexer for a given namespace. func (s jobNamespaceLister) List(selector labels.Selector) (ret []*v1.Job, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Jobs in the indexer for a given namespace. +func (s jobNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Job, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Job)) }) @@ -88,6 +103,11 @@ func (s jobNamespaceLister) List(selector labels.Selector) (ret []*v1.Job, err e // Get retrieves the Job from the indexer for a given namespace and name. func (s jobNamespaceLister) Get(name string) (*v1.Job, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Job from the indexer for a given namespace and name. +func (s jobNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Job, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/batch/v1beta1/cronjob.go b/staging/src/k8s.io/client-go/listers/batch/v1beta1/cronjob.go index 4842d5e5a15ca..0d354afcf6c5c 100644 --- a/staging/src/k8s.io/client-go/listers/batch/v1beta1/cronjob.go +++ b/staging/src/k8s.io/client-go/listers/batch/v1beta1/cronjob.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/batch/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type CronJobLister interface { // List lists all CronJobs in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CronJob, err error) + // ListWithContext lists all CronJobs in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CronJob, err error) // CronJobs returns an object that can list and get CronJobs. CronJobs(namespace string) CronJobNamespaceLister CronJobListerExpansion @@ -48,6 +53,11 @@ func NewCronJobLister(indexer cache.Indexer) CronJobLister { // List lists all CronJobs in the indexer. func (s *cronJobLister) List(selector labels.Selector) (ret []*v1beta1.CronJob, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CronJobs in the indexer. +func (s *cronJobLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CronJob, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CronJob)) }) @@ -80,6 +90,11 @@ type cronJobNamespaceLister struct { // List lists all CronJobs in the indexer for a given namespace. func (s cronJobNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.CronJob, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CronJobs in the indexer for a given namespace. +func (s cronJobNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CronJob, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CronJob)) }) @@ -88,6 +103,11 @@ func (s cronJobNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.C // Get retrieves the CronJob from the indexer for a given namespace and name. func (s cronJobNamespaceLister) Get(name string) (*v1beta1.CronJob, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CronJob from the indexer for a given namespace and name. +func (s cronJobNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.CronJob, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/certificates/v1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/listers/certificates/v1/certificatesigningrequest.go index 0d04e118dbcbf..23ef38a7086ec 100644 --- a/staging/src/k8s.io/client-go/listers/certificates/v1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/listers/certificates/v1/certificatesigningrequest.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/certificates/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type CertificateSigningRequestLister interface { // List lists all CertificateSigningRequests in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.CertificateSigningRequest, err error) + // ListWithContext lists all CertificateSigningRequests in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CertificateSigningRequest, err error) // Get retrieves the CertificateSigningRequest from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.CertificateSigningRequest, error) + // GetWithContext retrieves the CertificateSigningRequest from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.CertificateSigningRequest, error) CertificateSigningRequestListerExpansion } @@ -49,6 +57,11 @@ func NewCertificateSigningRequestLister(indexer cache.Indexer) CertificateSignin // List lists all CertificateSigningRequests in the indexer. func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret []*v1.CertificateSigningRequest, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CertificateSigningRequests in the indexer. +func (s *certificateSigningRequestLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CertificateSigningRequest, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.CertificateSigningRequest)) }) @@ -57,6 +70,11 @@ func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret [] // Get retrieves the CertificateSigningRequest from the index for a given name. func (s *certificateSigningRequestLister) Get(name string) (*v1.CertificateSigningRequest, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CertificateSigningRequest from the index for a given name. +func (s *certificateSigningRequestLister) GetWithContext(ctx context.Context, name string) (*v1.CertificateSigningRequest, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go index 471b5629b33a1..192d367f27668 100644 --- a/staging/src/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/certificates/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type CertificateSigningRequestLister interface { // List lists all CertificateSigningRequests in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) + // ListWithContext lists all CertificateSigningRequests in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) // Get retrieves the CertificateSigningRequest from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.CertificateSigningRequest, error) + // GetWithContext retrieves the CertificateSigningRequest from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.CertificateSigningRequest, error) CertificateSigningRequestListerExpansion } @@ -49,6 +57,11 @@ func NewCertificateSigningRequestLister(indexer cache.Indexer) CertificateSignin // List lists all CertificateSigningRequests in the indexer. func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CertificateSigningRequests in the indexer. +func (s *certificateSigningRequestLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CertificateSigningRequest)) }) @@ -57,6 +70,11 @@ func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret [] // Get retrieves the CertificateSigningRequest from the index for a given name. func (s *certificateSigningRequestLister) Get(name string) (*v1beta1.CertificateSigningRequest, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CertificateSigningRequest from the index for a given name. +func (s *certificateSigningRequestLister) GetWithContext(ctx context.Context, name string) (*v1beta1.CertificateSigningRequest, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/coordination/v1/lease.go b/staging/src/k8s.io/client-go/listers/coordination/v1/lease.go index de366d0e11a4b..4c6950e5f509e 100644 --- a/staging/src/k8s.io/client-go/listers/coordination/v1/lease.go +++ b/staging/src/k8s.io/client-go/listers/coordination/v1/lease.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/coordination/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type LeaseLister interface { // List lists all Leases in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Lease, err error) + // ListWithContext lists all Leases in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Lease, err error) // Leases returns an object that can list and get Leases. Leases(namespace string) LeaseNamespaceLister LeaseListerExpansion @@ -48,6 +53,11 @@ func NewLeaseLister(indexer cache.Indexer) LeaseLister { // List lists all Leases in the indexer. func (s *leaseLister) List(selector labels.Selector) (ret []*v1.Lease, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Leases in the indexer. +func (s *leaseLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Lease, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Lease)) }) @@ -80,6 +90,11 @@ type leaseNamespaceLister struct { // List lists all Leases in the indexer for a given namespace. func (s leaseNamespaceLister) List(selector labels.Selector) (ret []*v1.Lease, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Leases in the indexer for a given namespace. +func (s leaseNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Lease, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Lease)) }) @@ -88,6 +103,11 @@ func (s leaseNamespaceLister) List(selector labels.Selector) (ret []*v1.Lease, e // Get retrieves the Lease from the indexer for a given namespace and name. func (s leaseNamespaceLister) Get(name string) (*v1.Lease, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Lease from the indexer for a given namespace and name. +func (s leaseNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Lease, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/coordination/v1beta1/lease.go b/staging/src/k8s.io/client-go/listers/coordination/v1beta1/lease.go index 8dfdc1e9bc097..0e7eeb1134192 100644 --- a/staging/src/k8s.io/client-go/listers/coordination/v1beta1/lease.go +++ b/staging/src/k8s.io/client-go/listers/coordination/v1beta1/lease.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/coordination/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type LeaseLister interface { // List lists all Leases in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Lease, err error) + // ListWithContext lists all Leases in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Lease, err error) // Leases returns an object that can list and get Leases. Leases(namespace string) LeaseNamespaceLister LeaseListerExpansion @@ -48,6 +53,11 @@ func NewLeaseLister(indexer cache.Indexer) LeaseLister { // List lists all Leases in the indexer. func (s *leaseLister) List(selector labels.Selector) (ret []*v1beta1.Lease, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Leases in the indexer. +func (s *leaseLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Lease, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Lease)) }) @@ -80,6 +90,11 @@ type leaseNamespaceLister struct { // List lists all Leases in the indexer for a given namespace. func (s leaseNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Lease, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Leases in the indexer for a given namespace. +func (s leaseNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Lease, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Lease)) }) @@ -88,6 +103,11 @@ func (s leaseNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Lea // Get retrieves the Lease from the indexer for a given namespace and name. func (s leaseNamespaceLister) Get(name string) (*v1beta1.Lease, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Lease from the indexer for a given namespace and name. +func (s leaseNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.Lease, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/componentstatus.go b/staging/src/k8s.io/client-go/listers/core/v1/componentstatus.go index 5fcdac3c76435..bc9563755998e 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/componentstatus.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/componentstatus.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type ComponentStatusLister interface { // List lists all ComponentStatuses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ComponentStatus, err error) + // ListWithContext lists all ComponentStatuses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ComponentStatus, err error) // Get retrieves the ComponentStatus from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.ComponentStatus, error) + // GetWithContext retrieves the ComponentStatus from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.ComponentStatus, error) ComponentStatusListerExpansion } @@ -49,6 +57,11 @@ func NewComponentStatusLister(indexer cache.Indexer) ComponentStatusLister { // List lists all ComponentStatuses in the indexer. func (s *componentStatusLister) List(selector labels.Selector) (ret []*v1.ComponentStatus, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ComponentStatuses in the indexer. +func (s *componentStatusLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ComponentStatus, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ComponentStatus)) }) @@ -57,6 +70,11 @@ func (s *componentStatusLister) List(selector labels.Selector) (ret []*v1.Compon // Get retrieves the ComponentStatus from the index for a given name. func (s *componentStatusLister) Get(name string) (*v1.ComponentStatus, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ComponentStatus from the index for a given name. +func (s *componentStatusLister) GetWithContext(ctx context.Context, name string) (*v1.ComponentStatus, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/configmap.go b/staging/src/k8s.io/client-go/listers/core/v1/configmap.go index 6a410e47c4a4d..c49d7664118a3 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/configmap.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/configmap.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ConfigMapLister interface { // List lists all ConfigMaps in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ConfigMap, err error) + // ListWithContext lists all ConfigMaps in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ConfigMap, err error) // ConfigMaps returns an object that can list and get ConfigMaps. ConfigMaps(namespace string) ConfigMapNamespaceLister ConfigMapListerExpansion @@ -48,6 +53,11 @@ func NewConfigMapLister(indexer cache.Indexer) ConfigMapLister { // List lists all ConfigMaps in the indexer. func (s *configMapLister) List(selector labels.Selector) (ret []*v1.ConfigMap, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ConfigMaps in the indexer. +func (s *configMapLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ConfigMap, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ConfigMap)) }) @@ -80,6 +90,11 @@ type configMapNamespaceLister struct { // List lists all ConfigMaps in the indexer for a given namespace. func (s configMapNamespaceLister) List(selector labels.Selector) (ret []*v1.ConfigMap, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ConfigMaps in the indexer for a given namespace. +func (s configMapNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ConfigMap, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.ConfigMap)) }) @@ -88,6 +103,11 @@ func (s configMapNamespaceLister) List(selector labels.Selector) (ret []*v1.Conf // Get retrieves the ConfigMap from the indexer for a given namespace and name. func (s configMapNamespaceLister) Get(name string) (*v1.ConfigMap, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ConfigMap from the indexer for a given namespace and name. +func (s configMapNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.ConfigMap, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/endpoints.go b/staging/src/k8s.io/client-go/listers/core/v1/endpoints.go index 4759ce808febd..b068494e8a7ec 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/endpoints.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/endpoints.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type EndpointsLister interface { // List lists all Endpoints in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Endpoints, err error) + // ListWithContext lists all Endpoints in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Endpoints, err error) // Endpoints returns an object that can list and get Endpoints. Endpoints(namespace string) EndpointsNamespaceLister EndpointsListerExpansion @@ -48,6 +53,11 @@ func NewEndpointsLister(indexer cache.Indexer) EndpointsLister { // List lists all Endpoints in the indexer. func (s *endpointsLister) List(selector labels.Selector) (ret []*v1.Endpoints, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Endpoints in the indexer. +func (s *endpointsLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Endpoints, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Endpoints)) }) @@ -80,6 +90,11 @@ type endpointsNamespaceLister struct { // List lists all Endpoints in the indexer for a given namespace. func (s endpointsNamespaceLister) List(selector labels.Selector) (ret []*v1.Endpoints, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Endpoints in the indexer for a given namespace. +func (s endpointsNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Endpoints, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Endpoints)) }) @@ -88,6 +103,11 @@ func (s endpointsNamespaceLister) List(selector labels.Selector) (ret []*v1.Endp // Get retrieves the Endpoints from the indexer for a given namespace and name. func (s endpointsNamespaceLister) Get(name string) (*v1.Endpoints, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Endpoints from the indexer for a given namespace and name. +func (s endpointsNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Endpoints, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/event.go b/staging/src/k8s.io/client-go/listers/core/v1/event.go index 4416e20120b95..c159da4588b55 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/event.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/event.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type EventLister interface { // List lists all Events in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Event, err error) + // ListWithContext lists all Events in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Event, err error) // Events returns an object that can list and get Events. Events(namespace string) EventNamespaceLister EventListerExpansion @@ -48,6 +53,11 @@ func NewEventLister(indexer cache.Indexer) EventLister { // List lists all Events in the indexer. func (s *eventLister) List(selector labels.Selector) (ret []*v1.Event, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Events in the indexer. +func (s *eventLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Event, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Event)) }) @@ -80,6 +90,11 @@ type eventNamespaceLister struct { // List lists all Events in the indexer for a given namespace. func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1.Event, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Events in the indexer for a given namespace. +func (s eventNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Event, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Event)) }) @@ -88,6 +103,11 @@ func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1.Event, e // Get retrieves the Event from the indexer for a given namespace and name. func (s eventNamespaceLister) Get(name string) (*v1.Event, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Event from the indexer for a given namespace and name. +func (s eventNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Event, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/limitrange.go b/staging/src/k8s.io/client-go/listers/core/v1/limitrange.go index d8fa569cd384f..3e346ff895b43 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/limitrange.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/limitrange.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type LimitRangeLister interface { // List lists all LimitRanges in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.LimitRange, err error) + // ListWithContext lists all LimitRanges in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.LimitRange, err error) // LimitRanges returns an object that can list and get LimitRanges. LimitRanges(namespace string) LimitRangeNamespaceLister LimitRangeListerExpansion @@ -48,6 +53,11 @@ func NewLimitRangeLister(indexer cache.Indexer) LimitRangeLister { // List lists all LimitRanges in the indexer. func (s *limitRangeLister) List(selector labels.Selector) (ret []*v1.LimitRange, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all LimitRanges in the indexer. +func (s *limitRangeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.LimitRange, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.LimitRange)) }) @@ -80,6 +90,11 @@ type limitRangeNamespaceLister struct { // List lists all LimitRanges in the indexer for a given namespace. func (s limitRangeNamespaceLister) List(selector labels.Selector) (ret []*v1.LimitRange, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all LimitRanges in the indexer for a given namespace. +func (s limitRangeNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.LimitRange, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.LimitRange)) }) @@ -88,6 +103,11 @@ func (s limitRangeNamespaceLister) List(selector labels.Selector) (ret []*v1.Lim // Get retrieves the LimitRange from the indexer for a given namespace and name. func (s limitRangeNamespaceLister) Get(name string) (*v1.LimitRange, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the LimitRange from the indexer for a given namespace and name. +func (s limitRangeNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.LimitRange, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/namespace.go b/staging/src/k8s.io/client-go/listers/core/v1/namespace.go index 454aa1a0a231f..661ecfabadf80 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/namespace.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/namespace.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type NamespaceLister interface { // List lists all Namespaces in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Namespace, err error) + // ListWithContext lists all Namespaces in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Namespace, err error) // Get retrieves the Namespace from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.Namespace, error) + // GetWithContext retrieves the Namespace from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.Namespace, error) NamespaceListerExpansion } @@ -49,6 +57,11 @@ func NewNamespaceLister(indexer cache.Indexer) NamespaceLister { // List lists all Namespaces in the indexer. func (s *namespaceLister) List(selector labels.Selector) (ret []*v1.Namespace, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Namespaces in the indexer. +func (s *namespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Namespace, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Namespace)) }) @@ -57,6 +70,11 @@ func (s *namespaceLister) List(selector labels.Selector) (ret []*v1.Namespace, e // Get retrieves the Namespace from the index for a given name. func (s *namespaceLister) Get(name string) (*v1.Namespace, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Namespace from the index for a given name. +func (s *namespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Namespace, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/node.go b/staging/src/k8s.io/client-go/listers/core/v1/node.go index 596049857f192..bae810bf38af3 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/node.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/node.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type NodeLister interface { // List lists all Nodes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Node, err error) + // ListWithContext lists all Nodes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Node, err error) // Get retrieves the Node from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.Node, error) + // GetWithContext retrieves the Node from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.Node, error) NodeListerExpansion } @@ -49,6 +57,11 @@ func NewNodeLister(indexer cache.Indexer) NodeLister { // List lists all Nodes in the indexer. func (s *nodeLister) List(selector labels.Selector) (ret []*v1.Node, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Nodes in the indexer. +func (s *nodeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Node, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Node)) }) @@ -57,6 +70,11 @@ func (s *nodeLister) List(selector labels.Selector) (ret []*v1.Node, err error) // Get retrieves the Node from the index for a given name. func (s *nodeLister) Get(name string) (*v1.Node, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Node from the index for a given name. +func (s *nodeLister) GetWithContext(ctx context.Context, name string) (*v1.Node, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/persistentvolume.go b/staging/src/k8s.io/client-go/listers/core/v1/persistentvolume.go index e7dfd4ac9f624..4eaecb2a60cf2 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/persistentvolume.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/persistentvolume.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type PersistentVolumeLister interface { // List lists all PersistentVolumes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PersistentVolume, err error) + // ListWithContext lists all PersistentVolumes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PersistentVolume, err error) // Get retrieves the PersistentVolume from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.PersistentVolume, error) + // GetWithContext retrieves the PersistentVolume from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.PersistentVolume, error) PersistentVolumeListerExpansion } @@ -49,6 +57,11 @@ func NewPersistentVolumeLister(indexer cache.Indexer) PersistentVolumeLister { // List lists all PersistentVolumes in the indexer. func (s *persistentVolumeLister) List(selector labels.Selector) (ret []*v1.PersistentVolume, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PersistentVolumes in the indexer. +func (s *persistentVolumeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PersistentVolume, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.PersistentVolume)) }) @@ -57,6 +70,11 @@ func (s *persistentVolumeLister) List(selector labels.Selector) (ret []*v1.Persi // Get retrieves the PersistentVolume from the index for a given name. func (s *persistentVolumeLister) Get(name string) (*v1.PersistentVolume, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PersistentVolume from the index for a given name. +func (s *persistentVolumeLister) GetWithContext(ctx context.Context, name string) (*v1.PersistentVolume, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go b/staging/src/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go index fc71bb5a1fdf1..1d673a890cbc7 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type PersistentVolumeClaimLister interface { // List lists all PersistentVolumeClaims in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) + // ListWithContext lists all PersistentVolumeClaims in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) // PersistentVolumeClaims returns an object that can list and get PersistentVolumeClaims. PersistentVolumeClaims(namespace string) PersistentVolumeClaimNamespaceLister PersistentVolumeClaimListerExpansion @@ -48,6 +53,11 @@ func NewPersistentVolumeClaimLister(indexer cache.Indexer) PersistentVolumeClaim // List lists all PersistentVolumeClaims in the indexer. func (s *persistentVolumeClaimLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PersistentVolumeClaims in the indexer. +func (s *persistentVolumeClaimLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.PersistentVolumeClaim)) }) @@ -80,6 +90,11 @@ type persistentVolumeClaimNamespaceLister struct { // List lists all PersistentVolumeClaims in the indexer for a given namespace. func (s persistentVolumeClaimNamespaceLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PersistentVolumeClaims in the indexer for a given namespace. +func (s persistentVolumeClaimNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.PersistentVolumeClaim)) }) @@ -88,6 +103,11 @@ func (s persistentVolumeClaimNamespaceLister) List(selector labels.Selector) (re // Get retrieves the PersistentVolumeClaim from the indexer for a given namespace and name. func (s persistentVolumeClaimNamespaceLister) Get(name string) (*v1.PersistentVolumeClaim, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PersistentVolumeClaim from the indexer for a given namespace and name. +func (s persistentVolumeClaimNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.PersistentVolumeClaim, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/pod.go b/staging/src/k8s.io/client-go/listers/core/v1/pod.go index ab8f0946c3dca..298a6d96a5ff6 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/pod.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/pod.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type PodLister interface { // List lists all Pods in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Pod, err error) + // ListWithContext lists all Pods in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Pod, err error) // Pods returns an object that can list and get Pods. Pods(namespace string) PodNamespaceLister PodListerExpansion @@ -48,6 +53,11 @@ func NewPodLister(indexer cache.Indexer) PodLister { // List lists all Pods in the indexer. func (s *podLister) List(selector labels.Selector) (ret []*v1.Pod, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Pods in the indexer. +func (s *podLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Pod, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Pod)) }) @@ -80,6 +90,11 @@ type podNamespaceLister struct { // List lists all Pods in the indexer for a given namespace. func (s podNamespaceLister) List(selector labels.Selector) (ret []*v1.Pod, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Pods in the indexer for a given namespace. +func (s podNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Pod, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Pod)) }) @@ -88,6 +103,11 @@ func (s podNamespaceLister) List(selector labels.Selector) (ret []*v1.Pod, err e // Get retrieves the Pod from the indexer for a given namespace and name. func (s podNamespaceLister) Get(name string) (*v1.Pod, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Pod from the indexer for a given namespace and name. +func (s podNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Pod, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/podtemplate.go b/staging/src/k8s.io/client-go/listers/core/v1/podtemplate.go index 6c310045b71f1..a36876ea238f8 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/podtemplate.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/podtemplate.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type PodTemplateLister interface { // List lists all PodTemplates in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PodTemplate, err error) + // ListWithContext lists all PodTemplates in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PodTemplate, err error) // PodTemplates returns an object that can list and get PodTemplates. PodTemplates(namespace string) PodTemplateNamespaceLister PodTemplateListerExpansion @@ -48,6 +53,11 @@ func NewPodTemplateLister(indexer cache.Indexer) PodTemplateLister { // List lists all PodTemplates in the indexer. func (s *podTemplateLister) List(selector labels.Selector) (ret []*v1.PodTemplate, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PodTemplates in the indexer. +func (s *podTemplateLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PodTemplate, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.PodTemplate)) }) @@ -80,6 +90,11 @@ type podTemplateNamespaceLister struct { // List lists all PodTemplates in the indexer for a given namespace. func (s podTemplateNamespaceLister) List(selector labels.Selector) (ret []*v1.PodTemplate, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PodTemplates in the indexer for a given namespace. +func (s podTemplateNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PodTemplate, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.PodTemplate)) }) @@ -88,6 +103,11 @@ func (s podTemplateNamespaceLister) List(selector labels.Selector) (ret []*v1.Po // Get retrieves the PodTemplate from the indexer for a given namespace and name. func (s podTemplateNamespaceLister) Get(name string) (*v1.PodTemplate, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PodTemplate from the indexer for a given namespace and name. +func (s podTemplateNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.PodTemplate, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/replicationcontroller.go b/staging/src/k8s.io/client-go/listers/core/v1/replicationcontroller.go index e28e2ef768ea0..e3ee32aa8fcac 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/replicationcontroller.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/replicationcontroller.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ReplicationControllerLister interface { // List lists all ReplicationControllers in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ReplicationController, err error) + // ListWithContext lists all ReplicationControllers in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ReplicationController, err error) // ReplicationControllers returns an object that can list and get ReplicationControllers. ReplicationControllers(namespace string) ReplicationControllerNamespaceLister ReplicationControllerListerExpansion @@ -48,6 +53,11 @@ func NewReplicationControllerLister(indexer cache.Indexer) ReplicationController // List lists all ReplicationControllers in the indexer. func (s *replicationControllerLister) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ReplicationControllers in the indexer. +func (s *replicationControllerLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ReplicationController, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ReplicationController)) }) @@ -80,6 +90,11 @@ type replicationControllerNamespaceLister struct { // List lists all ReplicationControllers in the indexer for a given namespace. func (s replicationControllerNamespaceLister) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ReplicationControllers in the indexer for a given namespace. +func (s replicationControllerNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ReplicationController, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.ReplicationController)) }) @@ -88,6 +103,11 @@ func (s replicationControllerNamespaceLister) List(selector labels.Selector) (re // Get retrieves the ReplicationController from the indexer for a given namespace and name. func (s replicationControllerNamespaceLister) Get(name string) (*v1.ReplicationController, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ReplicationController from the indexer for a given namespace and name. +func (s replicationControllerNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.ReplicationController, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/resourcequota.go b/staging/src/k8s.io/client-go/listers/core/v1/resourcequota.go index 9c00b49d4f5ee..05122821c0ff8 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/resourcequota.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/resourcequota.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ResourceQuotaLister interface { // List lists all ResourceQuotas in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) + // ListWithContext lists all ResourceQuotas in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ResourceQuota, err error) // ResourceQuotas returns an object that can list and get ResourceQuotas. ResourceQuotas(namespace string) ResourceQuotaNamespaceLister ResourceQuotaListerExpansion @@ -48,6 +53,11 @@ func NewResourceQuotaLister(indexer cache.Indexer) ResourceQuotaLister { // List lists all ResourceQuotas in the indexer. func (s *resourceQuotaLister) List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ResourceQuotas in the indexer. +func (s *resourceQuotaLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ResourceQuota, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ResourceQuota)) }) @@ -80,6 +90,11 @@ type resourceQuotaNamespaceLister struct { // List lists all ResourceQuotas in the indexer for a given namespace. func (s resourceQuotaNamespaceLister) List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ResourceQuotas in the indexer for a given namespace. +func (s resourceQuotaNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ResourceQuota, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.ResourceQuota)) }) @@ -88,6 +103,11 @@ func (s resourceQuotaNamespaceLister) List(selector labels.Selector) (ret []*v1. // Get retrieves the ResourceQuota from the indexer for a given namespace and name. func (s resourceQuotaNamespaceLister) Get(name string) (*v1.ResourceQuota, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ResourceQuota from the indexer for a given namespace and name. +func (s resourceQuotaNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.ResourceQuota, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/secret.go b/staging/src/k8s.io/client-go/listers/core/v1/secret.go index d386d4d5cbd35..684e3e5605061 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/secret.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/secret.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type SecretLister interface { // List lists all Secrets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Secret, err error) + // ListWithContext lists all Secrets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Secret, err error) // Secrets returns an object that can list and get Secrets. Secrets(namespace string) SecretNamespaceLister SecretListerExpansion @@ -48,6 +53,11 @@ func NewSecretLister(indexer cache.Indexer) SecretLister { // List lists all Secrets in the indexer. func (s *secretLister) List(selector labels.Selector) (ret []*v1.Secret, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Secrets in the indexer. +func (s *secretLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Secret, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Secret)) }) @@ -80,6 +90,11 @@ type secretNamespaceLister struct { // List lists all Secrets in the indexer for a given namespace. func (s secretNamespaceLister) List(selector labels.Selector) (ret []*v1.Secret, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Secrets in the indexer for a given namespace. +func (s secretNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Secret, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Secret)) }) @@ -88,6 +103,11 @@ func (s secretNamespaceLister) List(selector labels.Selector) (ret []*v1.Secret, // Get retrieves the Secret from the indexer for a given namespace and name. func (s secretNamespaceLister) Get(name string) (*v1.Secret, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Secret from the indexer for a given namespace and name. +func (s secretNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Secret, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/service.go b/staging/src/k8s.io/client-go/listers/core/v1/service.go index 51026d7b4b604..d3e94435cf1fe 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/service.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/service.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ServiceLister interface { // List lists all Services in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Service, err error) + // ListWithContext lists all Services in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Service, err error) // Services returns an object that can list and get Services. Services(namespace string) ServiceNamespaceLister ServiceListerExpansion @@ -48,6 +53,11 @@ func NewServiceLister(indexer cache.Indexer) ServiceLister { // List lists all Services in the indexer. func (s *serviceLister) List(selector labels.Selector) (ret []*v1.Service, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Services in the indexer. +func (s *serviceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Service, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Service)) }) @@ -80,6 +90,11 @@ type serviceNamespaceLister struct { // List lists all Services in the indexer for a given namespace. func (s serviceNamespaceLister) List(selector labels.Selector) (ret []*v1.Service, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Services in the indexer for a given namespace. +func (s serviceNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Service, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Service)) }) @@ -88,6 +103,11 @@ func (s serviceNamespaceLister) List(selector labels.Selector) (ret []*v1.Servic // Get retrieves the Service from the indexer for a given namespace and name. func (s serviceNamespaceLister) Get(name string) (*v1.Service, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Service from the indexer for a given namespace and name. +func (s serviceNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Service, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/core/v1/serviceaccount.go b/staging/src/k8s.io/client-go/listers/core/v1/serviceaccount.go index aa9554d8bb576..f280b5687ba41 100644 --- a/staging/src/k8s.io/client-go/listers/core/v1/serviceaccount.go +++ b/staging/src/k8s.io/client-go/listers/core/v1/serviceaccount.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ServiceAccountLister interface { // List lists all ServiceAccounts in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) + // ListWithContext lists all ServiceAccounts in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ServiceAccount, err error) // ServiceAccounts returns an object that can list and get ServiceAccounts. ServiceAccounts(namespace string) ServiceAccountNamespaceLister ServiceAccountListerExpansion @@ -48,6 +53,11 @@ func NewServiceAccountLister(indexer cache.Indexer) ServiceAccountLister { // List lists all ServiceAccounts in the indexer. func (s *serviceAccountLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ServiceAccounts in the indexer. +func (s *serviceAccountLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ServiceAccount, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ServiceAccount)) }) @@ -80,6 +90,11 @@ type serviceAccountNamespaceLister struct { // List lists all ServiceAccounts in the indexer for a given namespace. func (s serviceAccountNamespaceLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ServiceAccounts in the indexer for a given namespace. +func (s serviceAccountNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ServiceAccount, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.ServiceAccount)) }) @@ -88,6 +103,11 @@ func (s serviceAccountNamespaceLister) List(selector labels.Selector) (ret []*v1 // Get retrieves the ServiceAccount from the indexer for a given namespace and name. func (s serviceAccountNamespaceLister) Get(name string) (*v1.ServiceAccount, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ServiceAccount from the indexer for a given namespace and name. +func (s serviceAccountNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.ServiceAccount, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/discovery/v1/endpointslice.go b/staging/src/k8s.io/client-go/listers/discovery/v1/endpointslice.go index 4dd46ff1bf949..67f7b487983bc 100644 --- a/staging/src/k8s.io/client-go/listers/discovery/v1/endpointslice.go +++ b/staging/src/k8s.io/client-go/listers/discovery/v1/endpointslice.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/discovery/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type EndpointSliceLister interface { // List lists all EndpointSlices in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) + // ListWithContext lists all EndpointSlices in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.EndpointSlice, err error) // EndpointSlices returns an object that can list and get EndpointSlices. EndpointSlices(namespace string) EndpointSliceNamespaceLister EndpointSliceListerExpansion @@ -48,6 +53,11 @@ func NewEndpointSliceLister(indexer cache.Indexer) EndpointSliceLister { // List lists all EndpointSlices in the indexer. func (s *endpointSliceLister) List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all EndpointSlices in the indexer. +func (s *endpointSliceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.EndpointSlice, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.EndpointSlice)) }) @@ -80,6 +90,11 @@ type endpointSliceNamespaceLister struct { // List lists all EndpointSlices in the indexer for a given namespace. func (s endpointSliceNamespaceLister) List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all EndpointSlices in the indexer for a given namespace. +func (s endpointSliceNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.EndpointSlice, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.EndpointSlice)) }) @@ -88,6 +103,11 @@ func (s endpointSliceNamespaceLister) List(selector labels.Selector) (ret []*v1. // Get retrieves the EndpointSlice from the indexer for a given namespace and name. func (s endpointSliceNamespaceLister) Get(name string) (*v1.EndpointSlice, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the EndpointSlice from the indexer for a given namespace and name. +func (s endpointSliceNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.EndpointSlice, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go b/staging/src/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go index e92872d5f4573..2cb1c1c0a7c2f 100644 --- a/staging/src/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go +++ b/staging/src/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/discovery/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type EndpointSliceLister interface { // List lists all EndpointSlices in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) + // ListWithContext lists all EndpointSlices in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) // EndpointSlices returns an object that can list and get EndpointSlices. EndpointSlices(namespace string) EndpointSliceNamespaceLister EndpointSliceListerExpansion @@ -48,6 +53,11 @@ func NewEndpointSliceLister(indexer cache.Indexer) EndpointSliceLister { // List lists all EndpointSlices in the indexer. func (s *endpointSliceLister) List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all EndpointSlices in the indexer. +func (s *endpointSliceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.EndpointSlice)) }) @@ -80,6 +90,11 @@ type endpointSliceNamespaceLister struct { // List lists all EndpointSlices in the indexer for a given namespace. func (s endpointSliceNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all EndpointSlices in the indexer for a given namespace. +func (s endpointSliceNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.EndpointSlice)) }) @@ -88,6 +103,11 @@ func (s endpointSliceNamespaceLister) List(selector labels.Selector) (ret []*v1b // Get retrieves the EndpointSlice from the indexer for a given namespace and name. func (s endpointSliceNamespaceLister) Get(name string) (*v1beta1.EndpointSlice, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the EndpointSlice from the indexer for a given namespace and name. +func (s endpointSliceNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.EndpointSlice, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/events/v1/event.go b/staging/src/k8s.io/client-go/listers/events/v1/event.go index 4abe841e26536..f9ad44a34d0d5 100644 --- a/staging/src/k8s.io/client-go/listers/events/v1/event.go +++ b/staging/src/k8s.io/client-go/listers/events/v1/event.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/events/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type EventLister interface { // List lists all Events in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Event, err error) + // ListWithContext lists all Events in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Event, err error) // Events returns an object that can list and get Events. Events(namespace string) EventNamespaceLister EventListerExpansion @@ -48,6 +53,11 @@ func NewEventLister(indexer cache.Indexer) EventLister { // List lists all Events in the indexer. func (s *eventLister) List(selector labels.Selector) (ret []*v1.Event, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Events in the indexer. +func (s *eventLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Event, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Event)) }) @@ -80,6 +90,11 @@ type eventNamespaceLister struct { // List lists all Events in the indexer for a given namespace. func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1.Event, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Events in the indexer for a given namespace. +func (s eventNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Event, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Event)) }) @@ -88,6 +103,11 @@ func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1.Event, e // Get retrieves the Event from the indexer for a given namespace and name. func (s eventNamespaceLister) Get(name string) (*v1.Event, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Event from the indexer for a given namespace and name. +func (s eventNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Event, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/events/v1beta1/event.go b/staging/src/k8s.io/client-go/listers/events/v1beta1/event.go index 41a521be6f4f1..7ea51e46200cb 100644 --- a/staging/src/k8s.io/client-go/listers/events/v1beta1/event.go +++ b/staging/src/k8s.io/client-go/listers/events/v1beta1/event.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/events/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type EventLister interface { // List lists all Events in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Event, err error) + // ListWithContext lists all Events in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Event, err error) // Events returns an object that can list and get Events. Events(namespace string) EventNamespaceLister EventListerExpansion @@ -48,6 +53,11 @@ func NewEventLister(indexer cache.Indexer) EventLister { // List lists all Events in the indexer. func (s *eventLister) List(selector labels.Selector) (ret []*v1beta1.Event, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Events in the indexer. +func (s *eventLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Event, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Event)) }) @@ -80,6 +90,11 @@ type eventNamespaceLister struct { // List lists all Events in the indexer for a given namespace. func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Event, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Events in the indexer for a given namespace. +func (s eventNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Event, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Event)) }) @@ -88,6 +103,11 @@ func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Eve // Get retrieves the Event from the indexer for a given namespace and name. func (s eventNamespaceLister) Get(name string) (*v1beta1.Event, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Event from the indexer for a given namespace and name. +func (s eventNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.Event, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go index 900475410b507..057305bf2661f 100644 --- a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type DaemonSetLister interface { // List lists all DaemonSets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) + // ListWithContext lists all DaemonSets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) // DaemonSets returns an object that can list and get DaemonSets. DaemonSets(namespace string) DaemonSetNamespaceLister DaemonSetListerExpansion @@ -48,6 +53,11 @@ func NewDaemonSetLister(indexer cache.Indexer) DaemonSetLister { // List lists all DaemonSets in the indexer. func (s *daemonSetLister) List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all DaemonSets in the indexer. +func (s *daemonSetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.DaemonSet)) }) @@ -80,6 +90,11 @@ type daemonSetNamespaceLister struct { // List lists all DaemonSets in the indexer for a given namespace. func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all DaemonSets in the indexer for a given namespace. +func (s daemonSetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.DaemonSet)) }) @@ -88,6 +103,11 @@ func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1 // Get retrieves the DaemonSet from the indexer for a given namespace and name. func (s daemonSetNamespaceLister) Get(name string) (*v1beta1.DaemonSet, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the DaemonSet from the indexer for a given namespace and name. +func (s daemonSetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.DaemonSet, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/deployment.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/deployment.go index 42b5a07231bc0..f2620c67aea51 100644 --- a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/deployment.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type DeploymentLister interface { // List lists all Deployments in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) + // ListWithContext lists all Deployments in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Deployment, err error) // Deployments returns an object that can list and get Deployments. Deployments(namespace string) DeploymentNamespaceLister DeploymentListerExpansion @@ -48,6 +53,11 @@ func NewDeploymentLister(indexer cache.Indexer) DeploymentLister { // List lists all Deployments in the indexer. func (s *deploymentLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Deployments in the indexer. +func (s *deploymentLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Deployment, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Deployment)) }) @@ -80,6 +90,11 @@ type deploymentNamespaceLister struct { // List lists all Deployments in the indexer for a given namespace. func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Deployments in the indexer for a given namespace. +func (s deploymentNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Deployment, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Deployment)) }) @@ -88,6 +103,11 @@ func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta // Get retrieves the Deployment from the indexer for a given namespace and name. func (s deploymentNamespaceLister) Get(name string) (*v1beta1.Deployment, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Deployment from the indexer for a given namespace and name. +func (s deploymentNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.Deployment, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/ingress.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/ingress.go index 1cb7677bd80c5..687ab22c23b88 100644 --- a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/ingress.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type IngressLister interface { // List lists all Ingresses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) + // ListWithContext lists all Ingresses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Ingress, err error) // Ingresses returns an object that can list and get Ingresses. Ingresses(namespace string) IngressNamespaceLister IngressListerExpansion @@ -48,6 +53,11 @@ func NewIngressLister(indexer cache.Indexer) IngressLister { // List lists all Ingresses in the indexer. func (s *ingressLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Ingresses in the indexer. +func (s *ingressLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Ingress, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Ingress)) }) @@ -80,6 +90,11 @@ type ingressNamespaceLister struct { // List lists all Ingresses in the indexer for a given namespace. func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Ingresses in the indexer for a given namespace. +func (s ingressNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Ingress, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Ingress)) }) @@ -88,6 +103,11 @@ func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.I // Get retrieves the Ingress from the indexer for a given namespace and name. func (s ingressNamespaceLister) Get(name string) (*v1beta1.Ingress, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Ingress from the indexer for a given namespace and name. +func (s ingressNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.Ingress, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/networkpolicy.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/networkpolicy.go index 84419a8e96640..48a8343e4de3b 100644 --- a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/networkpolicy.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type NetworkPolicyLister interface { // List lists all NetworkPolicies in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error) + // ListWithContext lists all NetworkPolicies in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error) // NetworkPolicies returns an object that can list and get NetworkPolicies. NetworkPolicies(namespace string) NetworkPolicyNamespaceLister NetworkPolicyListerExpansion @@ -48,6 +53,11 @@ func NewNetworkPolicyLister(indexer cache.Indexer) NetworkPolicyLister { // List lists all NetworkPolicies in the indexer. func (s *networkPolicyLister) List(selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all NetworkPolicies in the indexer. +func (s *networkPolicyLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.NetworkPolicy)) }) @@ -80,6 +90,11 @@ type networkPolicyNamespaceLister struct { // List lists all NetworkPolicies in the indexer for a given namespace. func (s networkPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all NetworkPolicies in the indexer for a given namespace. +func (s networkPolicyNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.NetworkPolicy)) }) @@ -88,6 +103,11 @@ func (s networkPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1b // Get retrieves the NetworkPolicy from the indexer for a given namespace and name. func (s networkPolicyNamespaceLister) Get(name string) (*v1beta1.NetworkPolicy, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the NetworkPolicy from the indexer for a given namespace and name. +func (s networkPolicyNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.NetworkPolicy, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go index 5f6a8c0360140..2a963711045fd 100644 --- a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type PodSecurityPolicyLister interface { // List lists all PodSecurityPolicies in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) + // ListWithContext lists all PodSecurityPolicies in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) // Get retrieves the PodSecurityPolicy from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.PodSecurityPolicy, error) + // GetWithContext retrieves the PodSecurityPolicy from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.PodSecurityPolicy, error) PodSecurityPolicyListerExpansion } @@ -49,6 +57,11 @@ func NewPodSecurityPolicyLister(indexer cache.Indexer) PodSecurityPolicyLister { // List lists all PodSecurityPolicies in the indexer. func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PodSecurityPolicies in the indexer. +func (s *podSecurityPolicyLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.PodSecurityPolicy)) }) @@ -57,6 +70,11 @@ func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*v1beta1 // Get retrieves the PodSecurityPolicy from the index for a given name. func (s *podSecurityPolicyLister) Get(name string) (*v1beta1.PodSecurityPolicy, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PodSecurityPolicy from the index for a given name. +func (s *podSecurityPolicyLister) GetWithContext(ctx context.Context, name string) (*v1beta1.PodSecurityPolicy, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go index a5ec3229bc34c..db35a3ad28ad1 100644 --- a/staging/src/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go +++ b/staging/src/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/extensions/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type ReplicaSetLister interface { // List lists all ReplicaSets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) + // ListWithContext lists all ReplicaSets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) // ReplicaSets returns an object that can list and get ReplicaSets. ReplicaSets(namespace string) ReplicaSetNamespaceLister ReplicaSetListerExpansion @@ -48,6 +53,11 @@ func NewReplicaSetLister(indexer cache.Indexer) ReplicaSetLister { // List lists all ReplicaSets in the indexer. func (s *replicaSetLister) List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ReplicaSets in the indexer. +func (s *replicaSetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.ReplicaSet)) }) @@ -80,6 +90,11 @@ type replicaSetNamespaceLister struct { // List lists all ReplicaSets in the indexer for a given namespace. func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ReplicaSets in the indexer for a given namespace. +func (s replicaSetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.ReplicaSet)) }) @@ -88,6 +103,11 @@ func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta // Get retrieves the ReplicaSet from the indexer for a given namespace and name. func (s replicaSetNamespaceLister) Get(name string) (*v1beta1.ReplicaSet, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ReplicaSet from the indexer for a given namespace and name. +func (s replicaSetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.ReplicaSet, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/flowcontrol/v1alpha1/flowschema.go b/staging/src/k8s.io/client-go/listers/flowcontrol/v1alpha1/flowschema.go index c8a595cd29c86..97165ff517647 100644 --- a/staging/src/k8s.io/client-go/listers/flowcontrol/v1alpha1/flowschema.go +++ b/staging/src/k8s.io/client-go/listers/flowcontrol/v1alpha1/flowschema.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type FlowSchemaLister interface { // List lists all FlowSchemas in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.FlowSchema, err error) + // ListWithContext lists all FlowSchemas in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.FlowSchema, err error) // Get retrieves the FlowSchema from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.FlowSchema, error) + // GetWithContext retrieves the FlowSchema from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1alpha1.FlowSchema, error) FlowSchemaListerExpansion } @@ -49,6 +57,11 @@ func NewFlowSchemaLister(indexer cache.Indexer) FlowSchemaLister { // List lists all FlowSchemas in the indexer. func (s *flowSchemaLister) List(selector labels.Selector) (ret []*v1alpha1.FlowSchema, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all FlowSchemas in the indexer. +func (s *flowSchemaLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.FlowSchema, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.FlowSchema)) }) @@ -57,6 +70,11 @@ func (s *flowSchemaLister) List(selector labels.Selector) (ret []*v1alpha1.FlowS // Get retrieves the FlowSchema from the index for a given name. func (s *flowSchemaLister) Get(name string) (*v1alpha1.FlowSchema, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the FlowSchema from the index for a given name. +func (s *flowSchemaLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.FlowSchema, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go index daa4ff31d93ef..5c5e1ab9278e8 100644 --- a/staging/src/k8s.io/client-go/listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type PriorityLevelConfigurationLister interface { // List lists all PriorityLevelConfigurations in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.PriorityLevelConfiguration, err error) + // ListWithContext lists all PriorityLevelConfigurations in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.PriorityLevelConfiguration, err error) // Get retrieves the PriorityLevelConfiguration from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.PriorityLevelConfiguration, error) + // GetWithContext retrieves the PriorityLevelConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1alpha1.PriorityLevelConfiguration, error) PriorityLevelConfigurationListerExpansion } @@ -49,6 +57,11 @@ func NewPriorityLevelConfigurationLister(indexer cache.Indexer) PriorityLevelCon // List lists all PriorityLevelConfigurations in the indexer. func (s *priorityLevelConfigurationLister) List(selector labels.Selector) (ret []*v1alpha1.PriorityLevelConfiguration, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PriorityLevelConfigurations in the indexer. +func (s *priorityLevelConfigurationLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.PriorityLevelConfiguration, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.PriorityLevelConfiguration)) }) @@ -57,6 +70,11 @@ func (s *priorityLevelConfigurationLister) List(selector labels.Selector) (ret [ // Get retrieves the PriorityLevelConfiguration from the index for a given name. func (s *priorityLevelConfigurationLister) Get(name string) (*v1alpha1.PriorityLevelConfiguration, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PriorityLevelConfiguration from the index for a given name. +func (s *priorityLevelConfigurationLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.PriorityLevelConfiguration, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta1/flowschema.go b/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta1/flowschema.go index 7927a8411eed1..f81a9915e279b 100644 --- a/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta1/flowschema.go +++ b/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta1/flowschema.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/flowcontrol/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type FlowSchemaLister interface { // List lists all FlowSchemas in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FlowSchema, err error) + // ListWithContext lists all FlowSchemas in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.FlowSchema, err error) // Get retrieves the FlowSchema from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FlowSchema, error) + // GetWithContext retrieves the FlowSchema from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.FlowSchema, error) FlowSchemaListerExpansion } @@ -49,6 +57,11 @@ func NewFlowSchemaLister(indexer cache.Indexer) FlowSchemaLister { // List lists all FlowSchemas in the indexer. func (s *flowSchemaLister) List(selector labels.Selector) (ret []*v1beta1.FlowSchema, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all FlowSchemas in the indexer. +func (s *flowSchemaLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.FlowSchema, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.FlowSchema)) }) @@ -57,6 +70,11 @@ func (s *flowSchemaLister) List(selector labels.Selector) (ret []*v1beta1.FlowSc // Get retrieves the FlowSchema from the index for a given name. func (s *flowSchemaLister) Get(name string) (*v1beta1.FlowSchema, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the FlowSchema from the index for a given name. +func (s *flowSchemaLister) GetWithContext(ctx context.Context, name string) (*v1beta1.FlowSchema, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta1/prioritylevelconfiguration.go index c94aaa4c1d11e..cbeb738399b3a 100644 --- a/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta1/prioritylevelconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/flowcontrol/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type PriorityLevelConfigurationLister interface { // List lists all PriorityLevelConfigurations in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.PriorityLevelConfiguration, err error) + // ListWithContext lists all PriorityLevelConfigurations in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PriorityLevelConfiguration, err error) // Get retrieves the PriorityLevelConfiguration from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.PriorityLevelConfiguration, error) + // GetWithContext retrieves the PriorityLevelConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.PriorityLevelConfiguration, error) PriorityLevelConfigurationListerExpansion } @@ -49,6 +57,11 @@ func NewPriorityLevelConfigurationLister(indexer cache.Indexer) PriorityLevelCon // List lists all PriorityLevelConfigurations in the indexer. func (s *priorityLevelConfigurationLister) List(selector labels.Selector) (ret []*v1beta1.PriorityLevelConfiguration, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PriorityLevelConfigurations in the indexer. +func (s *priorityLevelConfigurationLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PriorityLevelConfiguration, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.PriorityLevelConfiguration)) }) @@ -57,6 +70,11 @@ func (s *priorityLevelConfigurationLister) List(selector labels.Selector) (ret [ // Get retrieves the PriorityLevelConfiguration from the index for a given name. func (s *priorityLevelConfigurationLister) Get(name string) (*v1beta1.PriorityLevelConfiguration, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PriorityLevelConfiguration from the index for a given name. +func (s *priorityLevelConfigurationLister) GetWithContext(ctx context.Context, name string) (*v1beta1.PriorityLevelConfiguration, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/imagepolicy/v1alpha1/imagereview.go b/staging/src/k8s.io/client-go/listers/imagepolicy/v1alpha1/imagereview.go index cb0f7b7a13378..c211e34905fcf 100644 --- a/staging/src/k8s.io/client-go/listers/imagepolicy/v1alpha1/imagereview.go +++ b/staging/src/k8s.io/client-go/listers/imagepolicy/v1alpha1/imagereview.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/imagepolicy/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type ImageReviewLister interface { // List lists all ImageReviews in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.ImageReview, err error) + // ListWithContext lists all ImageReviews in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.ImageReview, err error) // Get retrieves the ImageReview from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.ImageReview, error) + // GetWithContext retrieves the ImageReview from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1alpha1.ImageReview, error) ImageReviewListerExpansion } @@ -49,6 +57,11 @@ func NewImageReviewLister(indexer cache.Indexer) ImageReviewLister { // List lists all ImageReviews in the indexer. func (s *imageReviewLister) List(selector labels.Selector) (ret []*v1alpha1.ImageReview, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ImageReviews in the indexer. +func (s *imageReviewLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.ImageReview, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.ImageReview)) }) @@ -57,6 +70,11 @@ func (s *imageReviewLister) List(selector labels.Selector) (ret []*v1alpha1.Imag // Get retrieves the ImageReview from the index for a given name. func (s *imageReviewLister) Get(name string) (*v1alpha1.ImageReview, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ImageReview from the index for a given name. +func (s *imageReviewLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.ImageReview, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/networking/v1/ingress.go b/staging/src/k8s.io/client-go/listers/networking/v1/ingress.go index 0f49d4f572c21..38470704bfe87 100644 --- a/staging/src/k8s.io/client-go/listers/networking/v1/ingress.go +++ b/staging/src/k8s.io/client-go/listers/networking/v1/ingress.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/networking/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type IngressLister interface { // List lists all Ingresses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Ingress, err error) + // ListWithContext lists all Ingresses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Ingress, err error) // Ingresses returns an object that can list and get Ingresses. Ingresses(namespace string) IngressNamespaceLister IngressListerExpansion @@ -48,6 +53,11 @@ func NewIngressLister(indexer cache.Indexer) IngressLister { // List lists all Ingresses in the indexer. func (s *ingressLister) List(selector labels.Selector) (ret []*v1.Ingress, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Ingresses in the indexer. +func (s *ingressLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Ingress, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Ingress)) }) @@ -80,6 +90,11 @@ type ingressNamespaceLister struct { // List lists all Ingresses in the indexer for a given namespace. func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1.Ingress, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Ingresses in the indexer for a given namespace. +func (s ingressNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Ingress, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Ingress)) }) @@ -88,6 +103,11 @@ func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1.Ingres // Get retrieves the Ingress from the indexer for a given namespace and name. func (s ingressNamespaceLister) Get(name string) (*v1.Ingress, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Ingress from the indexer for a given namespace and name. +func (s ingressNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Ingress, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/networking/v1/ingressclass.go b/staging/src/k8s.io/client-go/listers/networking/v1/ingressclass.go index 1480cb13fdfb3..d8ee3c0e60cee 100644 --- a/staging/src/k8s.io/client-go/listers/networking/v1/ingressclass.go +++ b/staging/src/k8s.io/client-go/listers/networking/v1/ingressclass.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/networking/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type IngressClassLister interface { // List lists all IngressClasses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.IngressClass, err error) + // ListWithContext lists all IngressClasses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.IngressClass, err error) // Get retrieves the IngressClass from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.IngressClass, error) + // GetWithContext retrieves the IngressClass from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.IngressClass, error) IngressClassListerExpansion } @@ -49,6 +57,11 @@ func NewIngressClassLister(indexer cache.Indexer) IngressClassLister { // List lists all IngressClasses in the indexer. func (s *ingressClassLister) List(selector labels.Selector) (ret []*v1.IngressClass, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all IngressClasses in the indexer. +func (s *ingressClassLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.IngressClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.IngressClass)) }) @@ -57,6 +70,11 @@ func (s *ingressClassLister) List(selector labels.Selector) (ret []*v1.IngressCl // Get retrieves the IngressClass from the index for a given name. func (s *ingressClassLister) Get(name string) (*v1.IngressClass, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the IngressClass from the index for a given name. +func (s *ingressClassLister) GetWithContext(ctx context.Context, name string) (*v1.IngressClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/networking/v1/networkpolicy.go b/staging/src/k8s.io/client-go/listers/networking/v1/networkpolicy.go index 34cabf0577a1e..77aa5fb147d9e 100644 --- a/staging/src/k8s.io/client-go/listers/networking/v1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/listers/networking/v1/networkpolicy.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/networking/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type NetworkPolicyLister interface { // List lists all NetworkPolicies in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) + // ListWithContext lists all NetworkPolicies in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.NetworkPolicy, err error) // NetworkPolicies returns an object that can list and get NetworkPolicies. NetworkPolicies(namespace string) NetworkPolicyNamespaceLister NetworkPolicyListerExpansion @@ -48,6 +53,11 @@ func NewNetworkPolicyLister(indexer cache.Indexer) NetworkPolicyLister { // List lists all NetworkPolicies in the indexer. func (s *networkPolicyLister) List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all NetworkPolicies in the indexer. +func (s *networkPolicyLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.NetworkPolicy, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.NetworkPolicy)) }) @@ -80,6 +90,11 @@ type networkPolicyNamespaceLister struct { // List lists all NetworkPolicies in the indexer for a given namespace. func (s networkPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all NetworkPolicies in the indexer for a given namespace. +func (s networkPolicyNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.NetworkPolicy, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.NetworkPolicy)) }) @@ -88,6 +103,11 @@ func (s networkPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1. // Get retrieves the NetworkPolicy from the indexer for a given namespace and name. func (s networkPolicyNamespaceLister) Get(name string) (*v1.NetworkPolicy, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the NetworkPolicy from the indexer for a given namespace and name. +func (s networkPolicyNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.NetworkPolicy, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/networking/v1beta1/ingress.go b/staging/src/k8s.io/client-go/listers/networking/v1beta1/ingress.go index b8f4d355802f6..a09242c0b6512 100644 --- a/staging/src/k8s.io/client-go/listers/networking/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/listers/networking/v1beta1/ingress.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/networking/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type IngressLister interface { // List lists all Ingresses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) + // ListWithContext lists all Ingresses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Ingress, err error) // Ingresses returns an object that can list and get Ingresses. Ingresses(namespace string) IngressNamespaceLister IngressListerExpansion @@ -48,6 +53,11 @@ func NewIngressLister(indexer cache.Indexer) IngressLister { // List lists all Ingresses in the indexer. func (s *ingressLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Ingresses in the indexer. +func (s *ingressLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Ingress, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Ingress)) }) @@ -80,6 +90,11 @@ type ingressNamespaceLister struct { // List lists all Ingresses in the indexer for a given namespace. func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Ingresses in the indexer for a given namespace. +func (s ingressNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Ingress, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Ingress)) }) @@ -88,6 +103,11 @@ func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.I // Get retrieves the Ingress from the indexer for a given namespace and name. func (s ingressNamespaceLister) Get(name string) (*v1beta1.Ingress, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Ingress from the indexer for a given namespace and name. +func (s ingressNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.Ingress, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go b/staging/src/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go index ebcd6ba85b1a0..2980cf9400db9 100644 --- a/staging/src/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go +++ b/staging/src/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/networking/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type IngressClassLister interface { // List lists all IngressClasses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.IngressClass, err error) + // ListWithContext lists all IngressClasses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.IngressClass, err error) // Get retrieves the IngressClass from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.IngressClass, error) + // GetWithContext retrieves the IngressClass from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.IngressClass, error) IngressClassListerExpansion } @@ -49,6 +57,11 @@ func NewIngressClassLister(indexer cache.Indexer) IngressClassLister { // List lists all IngressClasses in the indexer. func (s *ingressClassLister) List(selector labels.Selector) (ret []*v1beta1.IngressClass, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all IngressClasses in the indexer. +func (s *ingressClassLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.IngressClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.IngressClass)) }) @@ -57,6 +70,11 @@ func (s *ingressClassLister) List(selector labels.Selector) (ret []*v1beta1.Ingr // Get retrieves the IngressClass from the index for a given name. func (s *ingressClassLister) Get(name string) (*v1beta1.IngressClass, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the IngressClass from the index for a given name. +func (s *ingressClassLister) GetWithContext(ctx context.Context, name string) (*v1beta1.IngressClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/node/v1/runtimeclass.go b/staging/src/k8s.io/client-go/listers/node/v1/runtimeclass.go index 6e00cf1a59236..e6520aad5d2e4 100644 --- a/staging/src/k8s.io/client-go/listers/node/v1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/listers/node/v1/runtimeclass.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/node/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type RuntimeClassLister interface { // List lists all RuntimeClasses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.RuntimeClass, err error) + // ListWithContext lists all RuntimeClasses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.RuntimeClass, err error) // Get retrieves the RuntimeClass from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.RuntimeClass, error) + // GetWithContext retrieves the RuntimeClass from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.RuntimeClass, error) RuntimeClassListerExpansion } @@ -49,6 +57,11 @@ func NewRuntimeClassLister(indexer cache.Indexer) RuntimeClassLister { // List lists all RuntimeClasses in the indexer. func (s *runtimeClassLister) List(selector labels.Selector) (ret []*v1.RuntimeClass, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all RuntimeClasses in the indexer. +func (s *runtimeClassLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.RuntimeClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.RuntimeClass)) }) @@ -57,6 +70,11 @@ func (s *runtimeClassLister) List(selector labels.Selector) (ret []*v1.RuntimeCl // Get retrieves the RuntimeClass from the index for a given name. func (s *runtimeClassLister) Get(name string) (*v1.RuntimeClass, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the RuntimeClass from the index for a given name. +func (s *runtimeClassLister) GetWithContext(ctx context.Context, name string) (*v1.RuntimeClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/node/v1alpha1/runtimeclass.go b/staging/src/k8s.io/client-go/listers/node/v1alpha1/runtimeclass.go index 31f3357990bd6..08f3270355a47 100644 --- a/staging/src/k8s.io/client-go/listers/node/v1alpha1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/listers/node/v1alpha1/runtimeclass.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/node/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type RuntimeClassLister interface { // List lists all RuntimeClasses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.RuntimeClass, err error) + // ListWithContext lists all RuntimeClasses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.RuntimeClass, err error) // Get retrieves the RuntimeClass from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.RuntimeClass, error) + // GetWithContext retrieves the RuntimeClass from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1alpha1.RuntimeClass, error) RuntimeClassListerExpansion } @@ -49,6 +57,11 @@ func NewRuntimeClassLister(indexer cache.Indexer) RuntimeClassLister { // List lists all RuntimeClasses in the indexer. func (s *runtimeClassLister) List(selector labels.Selector) (ret []*v1alpha1.RuntimeClass, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all RuntimeClasses in the indexer. +func (s *runtimeClassLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.RuntimeClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.RuntimeClass)) }) @@ -57,6 +70,11 @@ func (s *runtimeClassLister) List(selector labels.Selector) (ret []*v1alpha1.Run // Get retrieves the RuntimeClass from the index for a given name. func (s *runtimeClassLister) Get(name string) (*v1alpha1.RuntimeClass, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the RuntimeClass from the index for a given name. +func (s *runtimeClassLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.RuntimeClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/node/v1beta1/runtimeclass.go b/staging/src/k8s.io/client-go/listers/node/v1beta1/runtimeclass.go index 7dbd6ab268bb1..13de36a6ea646 100644 --- a/staging/src/k8s.io/client-go/listers/node/v1beta1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/listers/node/v1beta1/runtimeclass.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/node/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type RuntimeClassLister interface { // List lists all RuntimeClasses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.RuntimeClass, err error) + // ListWithContext lists all RuntimeClasses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.RuntimeClass, err error) // Get retrieves the RuntimeClass from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.RuntimeClass, error) + // GetWithContext retrieves the RuntimeClass from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.RuntimeClass, error) RuntimeClassListerExpansion } @@ -49,6 +57,11 @@ func NewRuntimeClassLister(indexer cache.Indexer) RuntimeClassLister { // List lists all RuntimeClasses in the indexer. func (s *runtimeClassLister) List(selector labels.Selector) (ret []*v1beta1.RuntimeClass, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all RuntimeClasses in the indexer. +func (s *runtimeClassLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.RuntimeClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.RuntimeClass)) }) @@ -57,6 +70,11 @@ func (s *runtimeClassLister) List(selector labels.Selector) (ret []*v1beta1.Runt // Get retrieves the RuntimeClass from the index for a given name. func (s *runtimeClassLister) Get(name string) (*v1beta1.RuntimeClass, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the RuntimeClass from the index for a given name. +func (s *runtimeClassLister) GetWithContext(ctx context.Context, name string) (*v1beta1.RuntimeClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/policy/v1/eviction.go b/staging/src/k8s.io/client-go/listers/policy/v1/eviction.go index dc5ffa0740f37..2d46d3a503e5a 100644 --- a/staging/src/k8s.io/client-go/listers/policy/v1/eviction.go +++ b/staging/src/k8s.io/client-go/listers/policy/v1/eviction.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/policy/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type EvictionLister interface { // List lists all Evictions in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Eviction, err error) + // ListWithContext lists all Evictions in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Eviction, err error) // Evictions returns an object that can list and get Evictions. Evictions(namespace string) EvictionNamespaceLister EvictionListerExpansion @@ -48,6 +53,11 @@ func NewEvictionLister(indexer cache.Indexer) EvictionLister { // List lists all Evictions in the indexer. func (s *evictionLister) List(selector labels.Selector) (ret []*v1.Eviction, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Evictions in the indexer. +func (s *evictionLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Eviction, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Eviction)) }) @@ -80,6 +90,11 @@ type evictionNamespaceLister struct { // List lists all Evictions in the indexer for a given namespace. func (s evictionNamespaceLister) List(selector labels.Selector) (ret []*v1.Eviction, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Evictions in the indexer for a given namespace. +func (s evictionNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Eviction, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Eviction)) }) @@ -88,6 +103,11 @@ func (s evictionNamespaceLister) List(selector labels.Selector) (ret []*v1.Evict // Get retrieves the Eviction from the indexer for a given namespace and name. func (s evictionNamespaceLister) Get(name string) (*v1.Eviction, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Eviction from the indexer for a given namespace and name. +func (s evictionNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Eviction, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go index 8470d38bb2998..647df11c69bea 100644 --- a/staging/src/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/policy/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type PodDisruptionBudgetLister interface { // List lists all PodDisruptionBudgets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PodDisruptionBudget, err error) + // ListWithContext lists all PodDisruptionBudgets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PodDisruptionBudget, err error) // PodDisruptionBudgets returns an object that can list and get PodDisruptionBudgets. PodDisruptionBudgets(namespace string) PodDisruptionBudgetNamespaceLister PodDisruptionBudgetListerExpansion @@ -48,6 +53,11 @@ func NewPodDisruptionBudgetLister(indexer cache.Indexer) PodDisruptionBudgetList // List lists all PodDisruptionBudgets in the indexer. func (s *podDisruptionBudgetLister) List(selector labels.Selector) (ret []*v1.PodDisruptionBudget, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PodDisruptionBudgets in the indexer. +func (s *podDisruptionBudgetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PodDisruptionBudget, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.PodDisruptionBudget)) }) @@ -80,6 +90,11 @@ type podDisruptionBudgetNamespaceLister struct { // List lists all PodDisruptionBudgets in the indexer for a given namespace. func (s podDisruptionBudgetNamespaceLister) List(selector labels.Selector) (ret []*v1.PodDisruptionBudget, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PodDisruptionBudgets in the indexer for a given namespace. +func (s podDisruptionBudgetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PodDisruptionBudget, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.PodDisruptionBudget)) }) @@ -88,6 +103,11 @@ func (s podDisruptionBudgetNamespaceLister) List(selector labels.Selector) (ret // Get retrieves the PodDisruptionBudget from the indexer for a given namespace and name. func (s podDisruptionBudgetNamespaceLister) Get(name string) (*v1.PodDisruptionBudget, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PodDisruptionBudget from the indexer for a given namespace and name. +func (s podDisruptionBudgetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.PodDisruptionBudget, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/policy/v1beta1/eviction.go b/staging/src/k8s.io/client-go/listers/policy/v1beta1/eviction.go index e1d40d0b32f0b..ef6e47c15213d 100644 --- a/staging/src/k8s.io/client-go/listers/policy/v1beta1/eviction.go +++ b/staging/src/k8s.io/client-go/listers/policy/v1beta1/eviction.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/policy/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type EvictionLister interface { // List lists all Evictions in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) + // ListWithContext lists all Evictions in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Eviction, err error) // Evictions returns an object that can list and get Evictions. Evictions(namespace string) EvictionNamespaceLister EvictionListerExpansion @@ -48,6 +53,11 @@ func NewEvictionLister(indexer cache.Indexer) EvictionLister { // List lists all Evictions in the indexer. func (s *evictionLister) List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Evictions in the indexer. +func (s *evictionLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Eviction, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Eviction)) }) @@ -80,6 +90,11 @@ type evictionNamespaceLister struct { // List lists all Evictions in the indexer for a given namespace. func (s evictionNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Evictions in the indexer for a given namespace. +func (s evictionNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Eviction, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Eviction)) }) @@ -88,6 +103,11 @@ func (s evictionNamespaceLister) List(selector labels.Selector) (ret []*v1beta1. // Get retrieves the Eviction from the indexer for a given namespace and name. func (s evictionNamespaceLister) Get(name string) (*v1beta1.Eviction, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Eviction from the indexer for a given namespace and name. +func (s evictionNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.Eviction, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go index aa08f813eef0d..f9218c857f801 100644 --- a/staging/src/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/policy/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type PodDisruptionBudgetLister interface { // List lists all PodDisruptionBudgets in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) + // ListWithContext lists all PodDisruptionBudgets in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) // PodDisruptionBudgets returns an object that can list and get PodDisruptionBudgets. PodDisruptionBudgets(namespace string) PodDisruptionBudgetNamespaceLister PodDisruptionBudgetListerExpansion @@ -48,6 +53,11 @@ func NewPodDisruptionBudgetLister(indexer cache.Indexer) PodDisruptionBudgetList // List lists all PodDisruptionBudgets in the indexer. func (s *podDisruptionBudgetLister) List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PodDisruptionBudgets in the indexer. +func (s *podDisruptionBudgetLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.PodDisruptionBudget)) }) @@ -80,6 +90,11 @@ type podDisruptionBudgetNamespaceLister struct { // List lists all PodDisruptionBudgets in the indexer for a given namespace. func (s podDisruptionBudgetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PodDisruptionBudgets in the indexer for a given namespace. +func (s podDisruptionBudgetNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.PodDisruptionBudget)) }) @@ -88,6 +103,11 @@ func (s podDisruptionBudgetNamespaceLister) List(selector labels.Selector) (ret // Get retrieves the PodDisruptionBudget from the indexer for a given namespace and name. func (s podDisruptionBudgetNamespaceLister) Get(name string) (*v1beta1.PodDisruptionBudget, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PodDisruptionBudget from the indexer for a given namespace and name. +func (s podDisruptionBudgetNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.PodDisruptionBudget, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go index 7e73161b25ab9..7199e1bcd615f 100644 --- a/staging/src/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/policy/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type PodSecurityPolicyLister interface { // List lists all PodSecurityPolicies in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) + // ListWithContext lists all PodSecurityPolicies in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) // Get retrieves the PodSecurityPolicy from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.PodSecurityPolicy, error) + // GetWithContext retrieves the PodSecurityPolicy from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.PodSecurityPolicy, error) PodSecurityPolicyListerExpansion } @@ -49,6 +57,11 @@ func NewPodSecurityPolicyLister(indexer cache.Indexer) PodSecurityPolicyLister { // List lists all PodSecurityPolicies in the indexer. func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PodSecurityPolicies in the indexer. +func (s *podSecurityPolicyLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.PodSecurityPolicy)) }) @@ -57,6 +70,11 @@ func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*v1beta1 // Get retrieves the PodSecurityPolicy from the index for a given name. func (s *podSecurityPolicyLister) Get(name string) (*v1beta1.PodSecurityPolicy, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PodSecurityPolicy from the index for a given name. +func (s *podSecurityPolicyLister) GetWithContext(ctx context.Context, name string) (*v1beta1.PodSecurityPolicy, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1/clusterrole.go b/staging/src/k8s.io/client-go/listers/rbac/v1/clusterrole.go index 84dc003ca2e23..a029e9c61e69b 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1/clusterrole.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1/clusterrole.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type ClusterRoleLister interface { // List lists all ClusterRoles in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ClusterRole, err error) + // ListWithContext lists all ClusterRoles in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ClusterRole, err error) // Get retrieves the ClusterRole from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.ClusterRole, error) + // GetWithContext retrieves the ClusterRole from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.ClusterRole, error) ClusterRoleListerExpansion } @@ -49,6 +57,11 @@ func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister { // List lists all ClusterRoles in the indexer. func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1.ClusterRole, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ClusterRoles in the indexer. +func (s *clusterRoleLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ClusterRole, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ClusterRole)) }) @@ -57,6 +70,11 @@ func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1.ClusterRol // Get retrieves the ClusterRole from the index for a given name. func (s *clusterRoleLister) Get(name string) (*v1.ClusterRole, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ClusterRole from the index for a given name. +func (s *clusterRoleLister) GetWithContext(ctx context.Context, name string) (*v1.ClusterRole, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go b/staging/src/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go index ff061d4b2b8d4..17e802792fb86 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type ClusterRoleBindingLister interface { // List lists all ClusterRoleBindings in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ClusterRoleBinding, err error) + // ListWithContext lists all ClusterRoleBindings in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ClusterRoleBinding, err error) // Get retrieves the ClusterRoleBinding from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.ClusterRoleBinding, error) + // GetWithContext retrieves the ClusterRoleBinding from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.ClusterRoleBinding, error) ClusterRoleBindingListerExpansion } @@ -49,6 +57,11 @@ func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister // List lists all ClusterRoleBindings in the indexer. func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1.ClusterRoleBinding, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ClusterRoleBindings in the indexer. +func (s *clusterRoleBindingLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ClusterRoleBinding, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ClusterRoleBinding)) }) @@ -57,6 +70,11 @@ func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1.Clu // Get retrieves the ClusterRoleBinding from the index for a given name. func (s *clusterRoleBindingLister) Get(name string) (*v1.ClusterRoleBinding, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ClusterRoleBinding from the index for a given name. +func (s *clusterRoleBindingLister) GetWithContext(ctx context.Context, name string) (*v1.ClusterRoleBinding, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1/role.go b/staging/src/k8s.io/client-go/listers/rbac/v1/role.go index 503f013b5206b..e833ad7840cdb 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1/role.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1/role.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type RoleLister interface { // List lists all Roles in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Role, err error) + // ListWithContext lists all Roles in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Role, err error) // Roles returns an object that can list and get Roles. Roles(namespace string) RoleNamespaceLister RoleListerExpansion @@ -48,6 +53,11 @@ func NewRoleLister(indexer cache.Indexer) RoleLister { // List lists all Roles in the indexer. func (s *roleLister) List(selector labels.Selector) (ret []*v1.Role, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Roles in the indexer. +func (s *roleLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Role, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Role)) }) @@ -80,6 +90,11 @@ type roleNamespaceLister struct { // List lists all Roles in the indexer for a given namespace. func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1.Role, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Roles in the indexer for a given namespace. +func (s roleNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.Role, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Role)) }) @@ -88,6 +103,11 @@ func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1.Role, err // Get retrieves the Role from the indexer for a given namespace and name. func (s roleNamespaceLister) Get(name string) (*v1.Role, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Role from the indexer for a given namespace and name. +func (s roleNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.Role, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1/rolebinding.go b/staging/src/k8s.io/client-go/listers/rbac/v1/rolebinding.go index ea50c641360f9..152478e36af54 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1/rolebinding.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1/rolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type RoleBindingLister interface { // List lists all RoleBindings in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.RoleBinding, err error) + // ListWithContext lists all RoleBindings in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.RoleBinding, err error) // RoleBindings returns an object that can list and get RoleBindings. RoleBindings(namespace string) RoleBindingNamespaceLister RoleBindingListerExpansion @@ -48,6 +53,11 @@ func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister { // List lists all RoleBindings in the indexer. func (s *roleBindingLister) List(selector labels.Selector) (ret []*v1.RoleBinding, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all RoleBindings in the indexer. +func (s *roleBindingLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.RoleBinding, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.RoleBinding)) }) @@ -80,6 +90,11 @@ type roleBindingNamespaceLister struct { // List lists all RoleBindings in the indexer for a given namespace. func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1.RoleBinding, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all RoleBindings in the indexer for a given namespace. +func (s roleBindingNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.RoleBinding, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.RoleBinding)) }) @@ -88,6 +103,11 @@ func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1.Ro // Get retrieves the RoleBinding from the indexer for a given namespace and name. func (s roleBindingNamespaceLister) Get(name string) (*v1.RoleBinding, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the RoleBinding from the indexer for a given namespace and name. +func (s roleBindingNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.RoleBinding, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go index 181ea95a7d487..70b60e5462255 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/rbac/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type ClusterRoleLister interface { // List lists all ClusterRoles in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.ClusterRole, err error) + // ListWithContext lists all ClusterRoles in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.ClusterRole, err error) // Get retrieves the ClusterRole from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.ClusterRole, error) + // GetWithContext retrieves the ClusterRole from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1alpha1.ClusterRole, error) ClusterRoleListerExpansion } @@ -49,6 +57,11 @@ func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister { // List lists all ClusterRoles in the indexer. func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1alpha1.ClusterRole, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ClusterRoles in the indexer. +func (s *clusterRoleLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.ClusterRole, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.ClusterRole)) }) @@ -57,6 +70,11 @@ func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1alpha1.Clus // Get retrieves the ClusterRole from the index for a given name. func (s *clusterRoleLister) Get(name string) (*v1alpha1.ClusterRole, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ClusterRole from the index for a given name. +func (s *clusterRoleLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.ClusterRole, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go index 29d283b6cf288..05369c51eb61b 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/rbac/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type ClusterRoleBindingLister interface { // List lists all ClusterRoleBindings in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.ClusterRoleBinding, err error) + // ListWithContext lists all ClusterRoleBindings in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.ClusterRoleBinding, err error) // Get retrieves the ClusterRoleBinding from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.ClusterRoleBinding, error) + // GetWithContext retrieves the ClusterRoleBinding from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1alpha1.ClusterRoleBinding, error) ClusterRoleBindingListerExpansion } @@ -49,6 +57,11 @@ func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister // List lists all ClusterRoleBindings in the indexer. func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1alpha1.ClusterRoleBinding, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ClusterRoleBindings in the indexer. +func (s *clusterRoleBindingLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.ClusterRoleBinding, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.ClusterRoleBinding)) }) @@ -57,6 +70,11 @@ func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1alph // Get retrieves the ClusterRoleBinding from the index for a given name. func (s *clusterRoleBindingLister) Get(name string) (*v1alpha1.ClusterRoleBinding, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ClusterRoleBinding from the index for a given name. +func (s *clusterRoleBindingLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.ClusterRoleBinding, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/role.go b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/role.go index 13a64137aed35..93f914650e0a9 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/role.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/role.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/rbac/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type RoleLister interface { // List lists all Roles in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.Role, err error) + // ListWithContext lists all Roles in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Role, err error) // Roles returns an object that can list and get Roles. Roles(namespace string) RoleNamespaceLister RoleListerExpansion @@ -48,6 +53,11 @@ func NewRoleLister(indexer cache.Indexer) RoleLister { // List lists all Roles in the indexer. func (s *roleLister) List(selector labels.Selector) (ret []*v1alpha1.Role, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Roles in the indexer. +func (s *roleLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Role, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.Role)) }) @@ -80,6 +90,11 @@ type roleNamespaceLister struct { // List lists all Roles in the indexer for a given namespace. func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Role, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Roles in the indexer for a given namespace. +func (s roleNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Role, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.Role)) }) @@ -88,6 +103,11 @@ func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Rol // Get retrieves the Role from the indexer for a given namespace and name. func (s roleNamespaceLister) Get(name string) (*v1alpha1.Role, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Role from the indexer for a given namespace and name. +func (s roleNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.Role, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go index 0ad3d0eba061c..23d96c585b7c9 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/rbac/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type RoleBindingLister interface { // List lists all RoleBindings in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) + // ListWithContext lists all RoleBindings in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) // RoleBindings returns an object that can list and get RoleBindings. RoleBindings(namespace string) RoleBindingNamespaceLister RoleBindingListerExpansion @@ -48,6 +53,11 @@ func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister { // List lists all RoleBindings in the indexer. func (s *roleBindingLister) List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all RoleBindings in the indexer. +func (s *roleBindingLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.RoleBinding)) }) @@ -80,6 +90,11 @@ type roleBindingNamespaceLister struct { // List lists all RoleBindings in the indexer for a given namespace. func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all RoleBindings in the indexer for a given namespace. +func (s roleBindingNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.RoleBinding)) }) @@ -88,6 +103,11 @@ func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1alp // Get retrieves the RoleBinding from the indexer for a given namespace and name. func (s roleBindingNamespaceLister) Get(name string) (*v1alpha1.RoleBinding, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the RoleBinding from the indexer for a given namespace and name. +func (s roleBindingNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.RoleBinding, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go index bf6cd99cb14d2..0bcd83861774b 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/rbac/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type ClusterRoleLister interface { // List lists all ClusterRoles in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ClusterRole, err error) + // ListWithContext lists all ClusterRoles in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ClusterRole, err error) // Get retrieves the ClusterRole from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.ClusterRole, error) + // GetWithContext retrieves the ClusterRole from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.ClusterRole, error) ClusterRoleListerExpansion } @@ -49,6 +57,11 @@ func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister { // List lists all ClusterRoles in the indexer. func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1beta1.ClusterRole, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ClusterRoles in the indexer. +func (s *clusterRoleLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ClusterRole, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.ClusterRole)) }) @@ -57,6 +70,11 @@ func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1beta1.Clust // Get retrieves the ClusterRole from the index for a given name. func (s *clusterRoleLister) Get(name string) (*v1beta1.ClusterRole, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ClusterRole from the index for a given name. +func (s *clusterRoleLister) GetWithContext(ctx context.Context, name string) (*v1beta1.ClusterRole, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go index 00bab2330bd43..6603c99c03fcb 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/rbac/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type ClusterRoleBindingLister interface { // List lists all ClusterRoleBindings in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error) + // ListWithContext lists all ClusterRoleBindings in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error) // Get retrieves the ClusterRoleBinding from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.ClusterRoleBinding, error) + // GetWithContext retrieves the ClusterRoleBinding from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.ClusterRoleBinding, error) ClusterRoleBindingListerExpansion } @@ -49,6 +57,11 @@ func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister // List lists all ClusterRoleBindings in the indexer. func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ClusterRoleBindings in the indexer. +func (s *clusterRoleBindingLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.ClusterRoleBinding)) }) @@ -57,6 +70,11 @@ func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1beta // Get retrieves the ClusterRoleBinding from the index for a given name. func (s *clusterRoleBindingLister) Get(name string) (*v1beta1.ClusterRoleBinding, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ClusterRoleBinding from the index for a given name. +func (s *clusterRoleBindingLister) GetWithContext(ctx context.Context, name string) (*v1beta1.ClusterRoleBinding, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/role.go b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/role.go index 9cd9b9042df10..407fa7cc7a695 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/role.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/role.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/rbac/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type RoleLister interface { // List lists all Roles in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Role, err error) + // ListWithContext lists all Roles in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Role, err error) // Roles returns an object that can list and get Roles. Roles(namespace string) RoleNamespaceLister RoleListerExpansion @@ -48,6 +53,11 @@ func NewRoleLister(indexer cache.Indexer) RoleLister { // List lists all Roles in the indexer. func (s *roleLister) List(selector labels.Selector) (ret []*v1beta1.Role, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Roles in the indexer. +func (s *roleLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Role, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Role)) }) @@ -80,6 +90,11 @@ type roleNamespaceLister struct { // List lists all Roles in the indexer for a given namespace. func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Role, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Roles in the indexer for a given namespace. +func (s roleNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Role, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Role)) }) @@ -88,6 +103,11 @@ func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Role // Get retrieves the Role from the indexer for a given namespace and name. func (s roleNamespaceLister) Get(name string) (*v1beta1.Role, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Role from the indexer for a given namespace and name. +func (s roleNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.Role, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go index 7c7c91bf3f73e..c7ee299bc416f 100644 --- a/staging/src/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go +++ b/staging/src/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/rbac/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type RoleBindingLister interface { // List lists all RoleBindings in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) + // ListWithContext lists all RoleBindings in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) // RoleBindings returns an object that can list and get RoleBindings. RoleBindings(namespace string) RoleBindingNamespaceLister RoleBindingListerExpansion @@ -48,6 +53,11 @@ func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister { // List lists all RoleBindings in the indexer. func (s *roleBindingLister) List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all RoleBindings in the indexer. +func (s *roleBindingLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.RoleBinding)) }) @@ -80,6 +90,11 @@ type roleBindingNamespaceLister struct { // List lists all RoleBindings in the indexer for a given namespace. func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all RoleBindings in the indexer for a given namespace. +func (s roleBindingNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.RoleBinding)) }) @@ -88,6 +103,11 @@ func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1bet // Get retrieves the RoleBinding from the indexer for a given namespace and name. func (s roleBindingNamespaceLister) Get(name string) (*v1beta1.RoleBinding, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the RoleBinding from the indexer for a given namespace and name. +func (s roleBindingNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.RoleBinding, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/scheduling/v1/priorityclass.go b/staging/src/k8s.io/client-go/listers/scheduling/v1/priorityclass.go index 4da84ccf8a3a1..e8230b47bb86d 100644 --- a/staging/src/k8s.io/client-go/listers/scheduling/v1/priorityclass.go +++ b/staging/src/k8s.io/client-go/listers/scheduling/v1/priorityclass.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/scheduling/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type PriorityClassLister interface { // List lists all PriorityClasses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PriorityClass, err error) + // ListWithContext lists all PriorityClasses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PriorityClass, err error) // Get retrieves the PriorityClass from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.PriorityClass, error) + // GetWithContext retrieves the PriorityClass from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.PriorityClass, error) PriorityClassListerExpansion } @@ -49,6 +57,11 @@ func NewPriorityClassLister(indexer cache.Indexer) PriorityClassLister { // List lists all PriorityClasses in the indexer. func (s *priorityClassLister) List(selector labels.Selector) (ret []*v1.PriorityClass, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PriorityClasses in the indexer. +func (s *priorityClassLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.PriorityClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.PriorityClass)) }) @@ -57,6 +70,11 @@ func (s *priorityClassLister) List(selector labels.Selector) (ret []*v1.Priority // Get retrieves the PriorityClass from the index for a given name. func (s *priorityClassLister) Get(name string) (*v1.PriorityClass, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PriorityClass from the index for a given name. +func (s *priorityClassLister) GetWithContext(ctx context.Context, name string) (*v1.PriorityClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go b/staging/src/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go index 3d25dc80af32a..16316ff51e5f2 100644 --- a/staging/src/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go +++ b/staging/src/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/scheduling/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type PriorityClassLister interface { // List lists all PriorityClasses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.PriorityClass, err error) + // ListWithContext lists all PriorityClasses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.PriorityClass, err error) // Get retrieves the PriorityClass from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.PriorityClass, error) + // GetWithContext retrieves the PriorityClass from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1alpha1.PriorityClass, error) PriorityClassListerExpansion } @@ -49,6 +57,11 @@ func NewPriorityClassLister(indexer cache.Indexer) PriorityClassLister { // List lists all PriorityClasses in the indexer. func (s *priorityClassLister) List(selector labels.Selector) (ret []*v1alpha1.PriorityClass, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PriorityClasses in the indexer. +func (s *priorityClassLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.PriorityClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.PriorityClass)) }) @@ -57,6 +70,11 @@ func (s *priorityClassLister) List(selector labels.Selector) (ret []*v1alpha1.Pr // Get retrieves the PriorityClass from the index for a given name. func (s *priorityClassLister) Get(name string) (*v1alpha1.PriorityClass, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PriorityClass from the index for a given name. +func (s *priorityClassLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.PriorityClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go b/staging/src/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go index c848d035afc0d..6a71abe2754c6 100644 --- a/staging/src/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go +++ b/staging/src/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/scheduling/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type PriorityClassLister interface { // List lists all PriorityClasses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.PriorityClass, err error) + // ListWithContext lists all PriorityClasses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PriorityClass, err error) // Get retrieves the PriorityClass from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.PriorityClass, error) + // GetWithContext retrieves the PriorityClass from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.PriorityClass, error) PriorityClassListerExpansion } @@ -49,6 +57,11 @@ func NewPriorityClassLister(indexer cache.Indexer) PriorityClassLister { // List lists all PriorityClasses in the indexer. func (s *priorityClassLister) List(selector labels.Selector) (ret []*v1beta1.PriorityClass, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PriorityClasses in the indexer. +func (s *priorityClassLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.PriorityClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.PriorityClass)) }) @@ -57,6 +70,11 @@ func (s *priorityClassLister) List(selector labels.Selector) (ret []*v1beta1.Pri // Get retrieves the PriorityClass from the index for a given name. func (s *priorityClassLister) Get(name string) (*v1beta1.PriorityClass, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PriorityClass from the index for a given name. +func (s *priorityClassLister) GetWithContext(ctx context.Context, name string) (*v1beta1.PriorityClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1/csidriver.go b/staging/src/k8s.io/client-go/listers/storage/v1/csidriver.go index 4e8ab909007b6..17808934cdb6a 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1/csidriver.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1/csidriver.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type CSIDriverLister interface { // List lists all CSIDrivers in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.CSIDriver, err error) + // ListWithContext lists all CSIDrivers in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CSIDriver, err error) // Get retrieves the CSIDriver from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.CSIDriver, error) + // GetWithContext retrieves the CSIDriver from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.CSIDriver, error) CSIDriverListerExpansion } @@ -49,6 +57,11 @@ func NewCSIDriverLister(indexer cache.Indexer) CSIDriverLister { // List lists all CSIDrivers in the indexer. func (s *cSIDriverLister) List(selector labels.Selector) (ret []*v1.CSIDriver, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CSIDrivers in the indexer. +func (s *cSIDriverLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CSIDriver, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.CSIDriver)) }) @@ -57,6 +70,11 @@ func (s *cSIDriverLister) List(selector labels.Selector) (ret []*v1.CSIDriver, e // Get retrieves the CSIDriver from the index for a given name. func (s *cSIDriverLister) Get(name string) (*v1.CSIDriver, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CSIDriver from the index for a given name. +func (s *cSIDriverLister) GetWithContext(ctx context.Context, name string) (*v1.CSIDriver, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1/csinode.go b/staging/src/k8s.io/client-go/listers/storage/v1/csinode.go index 93f869572caee..54e32656054b3 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1/csinode.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1/csinode.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type CSINodeLister interface { // List lists all CSINodes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.CSINode, err error) + // ListWithContext lists all CSINodes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CSINode, err error) // Get retrieves the CSINode from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.CSINode, error) + // GetWithContext retrieves the CSINode from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.CSINode, error) CSINodeListerExpansion } @@ -49,6 +57,11 @@ func NewCSINodeLister(indexer cache.Indexer) CSINodeLister { // List lists all CSINodes in the indexer. func (s *cSINodeLister) List(selector labels.Selector) (ret []*v1.CSINode, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CSINodes in the indexer. +func (s *cSINodeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.CSINode, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.CSINode)) }) @@ -57,6 +70,11 @@ func (s *cSINodeLister) List(selector labels.Selector) (ret []*v1.CSINode, err e // Get retrieves the CSINode from the index for a given name. func (s *cSINodeLister) Get(name string) (*v1.CSINode, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CSINode from the index for a given name. +func (s *cSINodeLister) GetWithContext(ctx context.Context, name string) (*v1.CSINode, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1/storageclass.go b/staging/src/k8s.io/client-go/listers/storage/v1/storageclass.go index ffa3d19f50b61..506e8d135bbdd 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1/storageclass.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1/storageclass.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type StorageClassLister interface { // List lists all StorageClasses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.StorageClass, err error) + // ListWithContext lists all StorageClasses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.StorageClass, err error) // Get retrieves the StorageClass from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.StorageClass, error) + // GetWithContext retrieves the StorageClass from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.StorageClass, error) StorageClassListerExpansion } @@ -49,6 +57,11 @@ func NewStorageClassLister(indexer cache.Indexer) StorageClassLister { // List lists all StorageClasses in the indexer. func (s *storageClassLister) List(selector labels.Selector) (ret []*v1.StorageClass, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all StorageClasses in the indexer. +func (s *storageClassLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.StorageClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.StorageClass)) }) @@ -57,6 +70,11 @@ func (s *storageClassLister) List(selector labels.Selector) (ret []*v1.StorageCl // Get retrieves the StorageClass from the index for a given name. func (s *storageClassLister) Get(name string) (*v1.StorageClass, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the StorageClass from the index for a given name. +func (s *storageClassLister) GetWithContext(ctx context.Context, name string) (*v1.StorageClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1/volumeattachment.go b/staging/src/k8s.io/client-go/listers/storage/v1/volumeattachment.go index fbc735c93943b..6dfcdb6ef9434 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1/volumeattachment.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + v1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type VolumeAttachmentLister interface { // List lists all VolumeAttachments in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.VolumeAttachment, err error) + // ListWithContext lists all VolumeAttachments in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.VolumeAttachment, err error) // Get retrieves the VolumeAttachment from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.VolumeAttachment, error) + // GetWithContext retrieves the VolumeAttachment from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.VolumeAttachment, error) VolumeAttachmentListerExpansion } @@ -49,6 +57,11 @@ func NewVolumeAttachmentLister(indexer cache.Indexer) VolumeAttachmentLister { // List lists all VolumeAttachments in the indexer. func (s *volumeAttachmentLister) List(selector labels.Selector) (ret []*v1.VolumeAttachment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all VolumeAttachments in the indexer. +func (s *volumeAttachmentLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.VolumeAttachment, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.VolumeAttachment)) }) @@ -57,6 +70,11 @@ func (s *volumeAttachmentLister) List(selector labels.Selector) (ret []*v1.Volum // Get retrieves the VolumeAttachment from the index for a given name. func (s *volumeAttachmentLister) Get(name string) (*v1.VolumeAttachment, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the VolumeAttachment from the index for a given name. +func (s *volumeAttachmentLister) GetWithContext(ctx context.Context, name string) (*v1.VolumeAttachment, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1alpha1/csistoragecapacity.go b/staging/src/k8s.io/client-go/listers/storage/v1alpha1/csistoragecapacity.go index 0c1b5f264740a..a939c58735eb9 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1alpha1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1alpha1/csistoragecapacity.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/storage/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type CSIStorageCapacityLister interface { // List lists all CSIStorageCapacities in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.CSIStorageCapacity, err error) + // ListWithContext lists all CSIStorageCapacities in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.CSIStorageCapacity, err error) // CSIStorageCapacities returns an object that can list and get CSIStorageCapacities. CSIStorageCapacities(namespace string) CSIStorageCapacityNamespaceLister CSIStorageCapacityListerExpansion @@ -48,6 +53,11 @@ func NewCSIStorageCapacityLister(indexer cache.Indexer) CSIStorageCapacityLister // List lists all CSIStorageCapacities in the indexer. func (s *cSIStorageCapacityLister) List(selector labels.Selector) (ret []*v1alpha1.CSIStorageCapacity, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CSIStorageCapacities in the indexer. +func (s *cSIStorageCapacityLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.CSIStorageCapacity, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.CSIStorageCapacity)) }) @@ -80,6 +90,11 @@ type cSIStorageCapacityNamespaceLister struct { // List lists all CSIStorageCapacities in the indexer for a given namespace. func (s cSIStorageCapacityNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.CSIStorageCapacity, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CSIStorageCapacities in the indexer for a given namespace. +func (s cSIStorageCapacityNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.CSIStorageCapacity, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.CSIStorageCapacity)) }) @@ -88,6 +103,11 @@ func (s cSIStorageCapacityNamespaceLister) List(selector labels.Selector) (ret [ // Get retrieves the CSIStorageCapacity from the indexer for a given namespace and name. func (s cSIStorageCapacityNamespaceLister) Get(name string) (*v1alpha1.CSIStorageCapacity, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CSIStorageCapacity from the indexer for a given namespace and name. +func (s cSIStorageCapacityNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.CSIStorageCapacity, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go b/staging/src/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go index 3d5e2b7b712ff..b9414ec78548c 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + v1alpha1 "k8s.io/api/storage/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type VolumeAttachmentLister interface { // List lists all VolumeAttachments in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.VolumeAttachment, err error) + // ListWithContext lists all VolumeAttachments in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.VolumeAttachment, err error) // Get retrieves the VolumeAttachment from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.VolumeAttachment, error) + // GetWithContext retrieves the VolumeAttachment from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1alpha1.VolumeAttachment, error) VolumeAttachmentListerExpansion } @@ -49,6 +57,11 @@ func NewVolumeAttachmentLister(indexer cache.Indexer) VolumeAttachmentLister { // List lists all VolumeAttachments in the indexer. func (s *volumeAttachmentLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeAttachment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all VolumeAttachments in the indexer. +func (s *volumeAttachmentLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.VolumeAttachment, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.VolumeAttachment)) }) @@ -57,6 +70,11 @@ func (s *volumeAttachmentLister) List(selector labels.Selector) (ret []*v1alpha1 // Get retrieves the VolumeAttachment from the index for a given name. func (s *volumeAttachmentLister) Get(name string) (*v1alpha1.VolumeAttachment, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the VolumeAttachment from the index for a given name. +func (s *volumeAttachmentLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.VolumeAttachment, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1beta1/csidriver.go b/staging/src/k8s.io/client-go/listers/storage/v1beta1/csidriver.go index c6787aa01ba24..ffc808d4f8c47 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1beta1/csidriver.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1beta1/csidriver.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/storage/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type CSIDriverLister interface { // List lists all CSIDrivers in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CSIDriver, err error) + // ListWithContext lists all CSIDrivers in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CSIDriver, err error) // Get retrieves the CSIDriver from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.CSIDriver, error) + // GetWithContext retrieves the CSIDriver from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.CSIDriver, error) CSIDriverListerExpansion } @@ -49,6 +57,11 @@ func NewCSIDriverLister(indexer cache.Indexer) CSIDriverLister { // List lists all CSIDrivers in the indexer. func (s *cSIDriverLister) List(selector labels.Selector) (ret []*v1beta1.CSIDriver, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CSIDrivers in the indexer. +func (s *cSIDriverLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CSIDriver, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CSIDriver)) }) @@ -57,6 +70,11 @@ func (s *cSIDriverLister) List(selector labels.Selector) (ret []*v1beta1.CSIDriv // Get retrieves the CSIDriver from the index for a given name. func (s *cSIDriverLister) Get(name string) (*v1beta1.CSIDriver, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CSIDriver from the index for a given name. +func (s *cSIDriverLister) GetWithContext(ctx context.Context, name string) (*v1beta1.CSIDriver, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1beta1/csinode.go b/staging/src/k8s.io/client-go/listers/storage/v1beta1/csinode.go index 809efaa36965d..fdb87f994e2ef 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1beta1/csinode.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1beta1/csinode.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/storage/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type CSINodeLister interface { // List lists all CSINodes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CSINode, err error) + // ListWithContext lists all CSINodes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CSINode, err error) // Get retrieves the CSINode from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.CSINode, error) + // GetWithContext retrieves the CSINode from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.CSINode, error) CSINodeListerExpansion } @@ -49,6 +57,11 @@ func NewCSINodeLister(indexer cache.Indexer) CSINodeLister { // List lists all CSINodes in the indexer. func (s *cSINodeLister) List(selector labels.Selector) (ret []*v1beta1.CSINode, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CSINodes in the indexer. +func (s *cSINodeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CSINode, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CSINode)) }) @@ -57,6 +70,11 @@ func (s *cSINodeLister) List(selector labels.Selector) (ret []*v1beta1.CSINode, // Get retrieves the CSINode from the index for a given name. func (s *cSINodeLister) Get(name string) (*v1beta1.CSINode, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CSINode from the index for a given name. +func (s *cSINodeLister) GetWithContext(ctx context.Context, name string) (*v1beta1.CSINode, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go b/staging/src/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go index 4680ffb7c82c4..1ea92349659a8 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/storage/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type CSIStorageCapacityLister interface { // List lists all CSIStorageCapacities in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CSIStorageCapacity, err error) + // ListWithContext lists all CSIStorageCapacities in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CSIStorageCapacity, err error) // CSIStorageCapacities returns an object that can list and get CSIStorageCapacities. CSIStorageCapacities(namespace string) CSIStorageCapacityNamespaceLister CSIStorageCapacityListerExpansion @@ -48,6 +53,11 @@ func NewCSIStorageCapacityLister(indexer cache.Indexer) CSIStorageCapacityLister // List lists all CSIStorageCapacities in the indexer. func (s *cSIStorageCapacityLister) List(selector labels.Selector) (ret []*v1beta1.CSIStorageCapacity, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CSIStorageCapacities in the indexer. +func (s *cSIStorageCapacityLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CSIStorageCapacity, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CSIStorageCapacity)) }) @@ -80,6 +90,11 @@ type cSIStorageCapacityNamespaceLister struct { // List lists all CSIStorageCapacities in the indexer for a given namespace. func (s cSIStorageCapacityNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.CSIStorageCapacity, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all CSIStorageCapacities in the indexer for a given namespace. +func (s cSIStorageCapacityNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.CSIStorageCapacity, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CSIStorageCapacity)) }) @@ -88,6 +103,11 @@ func (s cSIStorageCapacityNamespaceLister) List(selector labels.Selector) (ret [ // Get retrieves the CSIStorageCapacity from the indexer for a given namespace and name. func (s cSIStorageCapacityNamespaceLister) Get(name string) (*v1beta1.CSIStorageCapacity, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the CSIStorageCapacity from the indexer for a given namespace and name. +func (s cSIStorageCapacityNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.CSIStorageCapacity, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1beta1/storageclass.go b/staging/src/k8s.io/client-go/listers/storage/v1beta1/storageclass.go index eb7b8315c6997..216ad26ff1404 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1beta1/storageclass.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1beta1/storageclass.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/storage/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type StorageClassLister interface { // List lists all StorageClasses in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.StorageClass, err error) + // ListWithContext lists all StorageClasses in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.StorageClass, err error) // Get retrieves the StorageClass from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.StorageClass, error) + // GetWithContext retrieves the StorageClass from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.StorageClass, error) StorageClassListerExpansion } @@ -49,6 +57,11 @@ func NewStorageClassLister(indexer cache.Indexer) StorageClassLister { // List lists all StorageClasses in the indexer. func (s *storageClassLister) List(selector labels.Selector) (ret []*v1beta1.StorageClass, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all StorageClasses in the indexer. +func (s *storageClassLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.StorageClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.StorageClass)) }) @@ -57,6 +70,11 @@ func (s *storageClassLister) List(selector labels.Selector) (ret []*v1beta1.Stor // Get retrieves the StorageClass from the index for a given name. func (s *storageClassLister) Get(name string) (*v1beta1.StorageClass, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the StorageClass from the index for a given name. +func (s *storageClassLister) GetWithContext(ctx context.Context, name string) (*v1beta1.StorageClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go b/staging/src/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go index bab2d317c7942..a1f622428a331 100644 --- a/staging/src/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + v1beta1 "k8s.io/api/storage/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type VolumeAttachmentLister interface { // List lists all VolumeAttachments in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.VolumeAttachment, err error) + // ListWithContext lists all VolumeAttachments in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.VolumeAttachment, err error) // Get retrieves the VolumeAttachment from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.VolumeAttachment, error) + // GetWithContext retrieves the VolumeAttachment from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.VolumeAttachment, error) VolumeAttachmentListerExpansion } @@ -49,6 +57,11 @@ func NewVolumeAttachmentLister(indexer cache.Indexer) VolumeAttachmentLister { // List lists all VolumeAttachments in the indexer. func (s *volumeAttachmentLister) List(selector labels.Selector) (ret []*v1beta1.VolumeAttachment, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all VolumeAttachments in the indexer. +func (s *volumeAttachmentLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.VolumeAttachment, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.VolumeAttachment)) }) @@ -57,6 +70,11 @@ func (s *volumeAttachmentLister) List(selector labels.Selector) (ret []*v1beta1. // Get retrieves the VolumeAttachment from the index for a given name. func (s *volumeAttachmentLister) Get(name string) (*v1beta1.VolumeAttachment, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the VolumeAttachment from the index for a given name. +func (s *volumeAttachmentLister) GetWithContext(ctx context.Context, name string) (*v1beta1.VolumeAttachment, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/listers/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/listers/example/v1/clustertesttype.go index fc9022b6106a3..691ea4d0c7698 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/listers/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/listers/example/v1/clustertesttype.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,9 +33,15 @@ type ClusterTestTypeLister interface { // List lists all ClusterTestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ClusterTestType, err error) + // ListWithContext lists all ClusterTestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ClusterTestType, err error) // Get retrieves the ClusterTestType from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.ClusterTestType, error) + // GetWithContext retrieves the ClusterTestType from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.ClusterTestType, error) ClusterTestTypeListerExpansion } @@ -49,6 +57,11 @@ func NewClusterTestTypeLister(indexer cache.Indexer) ClusterTestTypeLister { // List lists all ClusterTestTypes in the indexer. func (s *clusterTestTypeLister) List(selector labels.Selector) (ret []*v1.ClusterTestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ClusterTestTypes in the indexer. +func (s *clusterTestTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ClusterTestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ClusterTestType)) }) @@ -57,6 +70,11 @@ func (s *clusterTestTypeLister) List(selector labels.Selector) (ret []*v1.Cluste // Get retrieves the ClusterTestType from the index for a given name. func (s *clusterTestTypeLister) Get(name string) (*v1.ClusterTestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ClusterTestType from the index for a given name. +func (s *clusterTestTypeLister) GetWithContext(ctx context.Context, name string) (*v1.ClusterTestType, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/listers/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/listers/example/v1/testtype.go index 3165bc8a39fab..b3e8728acd49c 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/listers/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/listers/example/v1/testtype.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type TestTypeLister interface { // List lists all TestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.TestType, err error) + // ListWithContext lists all TestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) // TestTypes returns an object that can list and get TestTypes. TestTypes(namespace string) TestTypeNamespaceLister TestTypeListerExpansion @@ -48,6 +53,11 @@ func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { // List lists all TestTypes in the indexer. func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer. +func (s *testTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -80,6 +90,11 @@ type testTypeNamespaceLister struct { // List lists all TestTypes in the indexer for a given namespace. func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -88,6 +103,11 @@ func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestT // Get retrieves the TestType from the indexer for a given namespace and name. func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.TestType, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/listers/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/MixedCase/listers/example/v1/clustertesttype.go index 0f1591007ca2a..f42337e180b99 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/listers/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/listers/example/v1/clustertesttype.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,9 +33,15 @@ type ClusterTestTypeLister interface { // List lists all ClusterTestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ClusterTestType, err error) + // ListWithContext lists all ClusterTestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ClusterTestType, err error) // Get retrieves the ClusterTestType from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.ClusterTestType, error) + // GetWithContext retrieves the ClusterTestType from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.ClusterTestType, error) ClusterTestTypeListerExpansion } @@ -49,6 +57,11 @@ func NewClusterTestTypeLister(indexer cache.Indexer) ClusterTestTypeLister { // List lists all ClusterTestTypes in the indexer. func (s *clusterTestTypeLister) List(selector labels.Selector) (ret []*v1.ClusterTestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ClusterTestTypes in the indexer. +func (s *clusterTestTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ClusterTestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ClusterTestType)) }) @@ -57,6 +70,11 @@ func (s *clusterTestTypeLister) List(selector labels.Selector) (ret []*v1.Cluste // Get retrieves the ClusterTestType from the index for a given name. func (s *clusterTestTypeLister) Get(name string) (*v1.ClusterTestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ClusterTestType from the index for a given name. +func (s *clusterTestTypeLister) GetWithContext(ctx context.Context, name string) (*v1.ClusterTestType, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/listers/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/MixedCase/listers/example/v1/testtype.go index 44402fdfb08fd..bf40c4ad9fb63 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/listers/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/listers/example/v1/testtype.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type TestTypeLister interface { // List lists all TestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.TestType, err error) + // ListWithContext lists all TestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) // TestTypes returns an object that can list and get TestTypes. TestTypes(namespace string) TestTypeNamespaceLister TestTypeListerExpansion @@ -48,6 +53,11 @@ func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { // List lists all TestTypes in the indexer. func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer. +func (s *testTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -80,6 +90,11 @@ type testTypeNamespaceLister struct { // List lists all TestTypes in the indexer for a given namespace. func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -88,6 +103,11 @@ func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestT // Get retrieves the TestType from the indexer for a given namespace and name. func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.TestType, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example/internalversion/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example/internalversion/testtype.go index e47d215d5a906..2d01573709be0 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example/internalversion/testtype.go @@ -19,6 +19,8 @@ limitations under the License. package internalversion import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type TestTypeLister interface { // List lists all TestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*example.TestType, err error) + // ListWithContext lists all TestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*example.TestType, err error) // TestTypes returns an object that can list and get TestTypes. TestTypes(namespace string) TestTypeNamespaceLister TestTypeListerExpansion @@ -48,6 +53,11 @@ func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { // List lists all TestTypes in the indexer. func (s *testTypeLister) List(selector labels.Selector) (ret []*example.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer. +func (s *testTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*example.TestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*example.TestType)) }) @@ -80,6 +90,11 @@ type testTypeNamespaceLister struct { // List lists all TestTypes in the indexer for a given namespace. func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*example.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*example.TestType, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*example.TestType)) }) @@ -88,6 +103,11 @@ func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*example. // Get retrieves the TestType from the indexer for a given namespace and name. func (s testTypeNamespaceLister) Get(name string) (*example.TestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) GetWithContext(ctx context.Context, name string) (*example.TestType, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example/v1/testtype.go index 2c2239d4c27fa..0390ffac47deb 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example/v1/testtype.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type TestTypeLister interface { // List lists all TestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.TestType, err error) + // ListWithContext lists all TestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) // TestTypes returns an object that can list and get TestTypes. TestTypes(namespace string) TestTypeNamespaceLister TestTypeListerExpansion @@ -48,6 +53,11 @@ func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { // List lists all TestTypes in the indexer. func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer. +func (s *testTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -80,6 +90,11 @@ type testTypeNamespaceLister struct { // List lists all TestTypes in the indexer for a given namespace. func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -88,6 +103,11 @@ func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestT // Get retrieves the TestType from the indexer for a given namespace and name. func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.TestType, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example2/internalversion/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example2/internalversion/testtype.go index fe5c2d885fd21..73dd31477af4a 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example2/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example2/internalversion/testtype.go @@ -19,6 +19,8 @@ limitations under the License. package internalversion import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,9 +33,15 @@ type TestTypeLister interface { // List lists all TestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*example2.TestType, err error) + // ListWithContext lists all TestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*example2.TestType, err error) // Get retrieves the TestType from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*example2.TestType, error) + // GetWithContext retrieves the TestType from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*example2.TestType, error) TestTypeListerExpansion } @@ -49,6 +57,11 @@ func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { // List lists all TestTypes in the indexer. func (s *testTypeLister) List(selector labels.Selector) (ret []*example2.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer. +func (s *testTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*example2.TestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*example2.TestType)) }) @@ -57,6 +70,11 @@ func (s *testTypeLister) List(selector labels.Selector) (ret []*example2.TestTyp // Get retrieves the TestType from the index for a given name. func (s *testTypeLister) Get(name string) (*example2.TestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the TestType from the index for a given name. +func (s *testTypeLister) GetWithContext(ctx context.Context, name string) (*example2.TestType, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example2/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example2/v1/testtype.go index 7b2e54ee55f72..f123cb84368cf 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example2/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example2/v1/testtype.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type TestTypeLister interface { // List lists all TestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.TestType, err error) + // ListWithContext lists all TestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) // TestTypes returns an object that can list and get TestTypes. TestTypes(namespace string) TestTypeNamespaceLister TestTypeListerExpansion @@ -48,6 +53,11 @@ func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { // List lists all TestTypes in the indexer. func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer. +func (s *testTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -80,6 +90,11 @@ type testTypeNamespaceLister struct { // List lists all TestTypes in the indexer for a given namespace. func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -88,6 +103,11 @@ func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestT // Get retrieves the TestType from the indexer for a given namespace and name. func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.TestType, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example3.io/internalversion/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example3.io/internalversion/testtype.go index ca7045689ecc6..d65d3c667dd63 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example3.io/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example3.io/internalversion/testtype.go @@ -19,6 +19,8 @@ limitations under the License. package internalversion import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type TestTypeLister interface { // List lists all TestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*example3io.TestType, err error) + // ListWithContext lists all TestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*example3io.TestType, err error) // TestTypes returns an object that can list and get TestTypes. TestTypes(namespace string) TestTypeNamespaceLister TestTypeListerExpansion @@ -48,6 +53,11 @@ func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { // List lists all TestTypes in the indexer. func (s *testTypeLister) List(selector labels.Selector) (ret []*example3io.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer. +func (s *testTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*example3io.TestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*example3io.TestType)) }) @@ -80,6 +90,11 @@ type testTypeNamespaceLister struct { // List lists all TestTypes in the indexer for a given namespace. func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*example3io.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*example3io.TestType, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*example3io.TestType)) }) @@ -88,6 +103,11 @@ func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*example3 // Get retrieves the TestType from the indexer for a given namespace and name. func (s testTypeNamespaceLister) Get(name string) (*example3io.TestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) GetWithContext(ctx context.Context, name string) (*example3io.TestType, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example3.io/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example3.io/v1/testtype.go index 559089119b55c..ca14c989d0c3e 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/listers/example3.io/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/listers/example3.io/v1/testtype.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type TestTypeLister interface { // List lists all TestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.TestType, err error) + // ListWithContext lists all TestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) // TestTypes returns an object that can list and get TestTypes. TestTypes(namespace string) TestTypeNamespaceLister TestTypeListerExpansion @@ -48,6 +53,11 @@ func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { // List lists all TestTypes in the indexer. func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer. +func (s *testTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -80,6 +90,11 @@ type testTypeNamespaceLister struct { // List lists all TestTypes in the indexer for a given namespace. func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -88,6 +103,11 @@ func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestT // Get retrieves the TestType from the indexer for a given namespace and name. func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.TestType, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/crd/listers/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/crd/listers/example/v1/clustertesttype.go index d637166cf7d9e..e8359ef7bd486 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/listers/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/listers/example/v1/clustertesttype.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,9 +33,15 @@ type ClusterTestTypeLister interface { // List lists all ClusterTestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ClusterTestType, err error) + // ListWithContext lists all ClusterTestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ClusterTestType, err error) // Get retrieves the ClusterTestType from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.ClusterTestType, error) + // GetWithContext retrieves the ClusterTestType from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.ClusterTestType, error) ClusterTestTypeListerExpansion } @@ -49,6 +57,11 @@ func NewClusterTestTypeLister(indexer cache.Indexer) ClusterTestTypeLister { // List lists all ClusterTestTypes in the indexer. func (s *clusterTestTypeLister) List(selector labels.Selector) (ret []*v1.ClusterTestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all ClusterTestTypes in the indexer. +func (s *clusterTestTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.ClusterTestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ClusterTestType)) }) @@ -57,6 +70,11 @@ func (s *clusterTestTypeLister) List(selector labels.Selector) (ret []*v1.Cluste // Get retrieves the ClusterTestType from the index for a given name. func (s *clusterTestTypeLister) Get(name string) (*v1.ClusterTestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the ClusterTestType from the index for a given name. +func (s *clusterTestTypeLister) GetWithContext(ctx context.Context, name string) (*v1.ClusterTestType, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/crd/listers/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/crd/listers/example/v1/testtype.go index 597a920c448ac..01fbd02d3ea91 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/listers/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/listers/example/v1/testtype.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type TestTypeLister interface { // List lists all TestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.TestType, err error) + // ListWithContext lists all TestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) // TestTypes returns an object that can list and get TestTypes. TestTypes(namespace string) TestTypeNamespaceLister TestTypeListerExpansion @@ -48,6 +53,11 @@ func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { // List lists all TestTypes in the indexer. func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer. +func (s *testTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -80,6 +90,11 @@ type testTypeNamespaceLister struct { // List lists all TestTypes in the indexer for a given namespace. func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -88,6 +103,11 @@ func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestT // Get retrieves the TestType from the indexer for a given namespace and name. func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.TestType, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/code-generator/examples/crd/listers/example2/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/crd/listers/example2/v1/testtype.go index 0337b3c4fa13e..639d376bc5aa4 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/listers/example2/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/listers/example2/v1/testtype.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type TestTypeLister interface { // List lists all TestTypes in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.TestType, err error) + // ListWithContext lists all TestTypes in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) // TestTypes returns an object that can list and get TestTypes. TestTypes(namespace string) TestTypeNamespaceLister TestTypeListerExpansion @@ -48,6 +53,11 @@ func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { // List lists all TestTypes in the indexer. func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer. +func (s *testTypeLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -80,6 +90,11 @@ type testTypeNamespaceLister struct { // List lists all TestTypes in the indexer for a given namespace. func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.TestType, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.TestType)) }) @@ -88,6 +103,11 @@ func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestT // Get retrieves the TestType from the indexer for a given namespace and name. func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1.TestType, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1/apiservice.go index 5af77c7f76047..518b467b2e518 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1/apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1/apiservice.go @@ -19,6 +19,8 @@ limitations under the License. package v1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,9 +33,15 @@ type APIServiceLister interface { // List lists all APIServices in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.APIService, err error) + // ListWithContext lists all APIServices in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.APIService, err error) // Get retrieves the APIService from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1.APIService, error) + // GetWithContext retrieves the APIService from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1.APIService, error) APIServiceListerExpansion } @@ -49,6 +57,11 @@ func NewAPIServiceLister(indexer cache.Indexer) APIServiceLister { // List lists all APIServices in the indexer. func (s *aPIServiceLister) List(selector labels.Selector) (ret []*v1.APIService, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all APIServices in the indexer. +func (s *aPIServiceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1.APIService, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.APIService)) }) @@ -57,6 +70,11 @@ func (s *aPIServiceLister) List(selector labels.Selector) (ret []*v1.APIService, // Get retrieves the APIService from the index for a given name. func (s *aPIServiceLister) Get(name string) (*v1.APIService, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the APIService from the index for a given name. +func (s *aPIServiceLister) GetWithContext(ctx context.Context, name string) (*v1.APIService, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1beta1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1beta1/apiservice.go index 8628b80d03ecb..59d71df2ce5b6 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1beta1/apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1beta1/apiservice.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,9 +33,15 @@ type APIServiceLister interface { // List lists all APIServices in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.APIService, err error) + // ListWithContext lists all APIServices in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.APIService, err error) // Get retrieves the APIService from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.APIService, error) + // GetWithContext retrieves the APIService from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta1.APIService, error) APIServiceListerExpansion } @@ -49,6 +57,11 @@ func NewAPIServiceLister(indexer cache.Indexer) APIServiceLister { // List lists all APIServices in the indexer. func (s *aPIServiceLister) List(selector labels.Selector) (ret []*v1beta1.APIService, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all APIServices in the indexer. +func (s *aPIServiceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.APIService, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.APIService)) }) @@ -57,6 +70,11 @@ func (s *aPIServiceLister) List(selector labels.Selector) (ret []*v1beta1.APISer // Get retrieves the APIService from the index for a given name. func (s *aPIServiceLister) Get(name string) (*v1beta1.APIService, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the APIService from the index for a given name. +func (s *aPIServiceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.APIService, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1alpha1/fischer.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1alpha1/fischer.go index 1b02a6a26f25e..88eb919be8b7c 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1alpha1/fischer.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1alpha1/fischer.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,9 +33,15 @@ type FischerLister interface { // List lists all Fischers in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.Fischer, err error) + // ListWithContext lists all Fischers in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Fischer, err error) // Get retrieves the Fischer from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.Fischer, error) + // GetWithContext retrieves the Fischer from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1alpha1.Fischer, error) FischerListerExpansion } @@ -49,6 +57,11 @@ func NewFischerLister(indexer cache.Indexer) FischerLister { // List lists all Fischers in the indexer. func (s *fischerLister) List(selector labels.Selector) (ret []*v1alpha1.Fischer, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Fischers in the indexer. +func (s *fischerLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Fischer, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.Fischer)) }) @@ -57,6 +70,11 @@ func (s *fischerLister) List(selector labels.Selector) (ret []*v1alpha1.Fischer, // Get retrieves the Fischer from the index for a given name. func (s *fischerLister) Get(name string) (*v1alpha1.Fischer, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Fischer from the index for a given name. +func (s *fischerLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.Fischer, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1alpha1/flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1alpha1/flunder.go index 9d09445fa5273..e5e5ea5783573 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1alpha1/flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1alpha1/flunder.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type FlunderLister interface { // List lists all Flunders in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.Flunder, err error) + // ListWithContext lists all Flunders in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Flunder, err error) // Flunders returns an object that can list and get Flunders. Flunders(namespace string) FlunderNamespaceLister FlunderListerExpansion @@ -48,6 +53,11 @@ func NewFlunderLister(indexer cache.Indexer) FlunderLister { // List lists all Flunders in the indexer. func (s *flunderLister) List(selector labels.Selector) (ret []*v1alpha1.Flunder, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Flunders in the indexer. +func (s *flunderLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Flunder, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.Flunder)) }) @@ -80,6 +90,11 @@ type flunderNamespaceLister struct { // List lists all Flunders in the indexer for a given namespace. func (s flunderNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Flunder, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Flunders in the indexer for a given namespace. +func (s flunderNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Flunder, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.Flunder)) }) @@ -88,6 +103,11 @@ func (s flunderNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1. // Get retrieves the Flunder from the indexer for a given namespace and name. func (s flunderNamespaceLister) Get(name string) (*v1alpha1.Flunder, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Flunder from the indexer for a given namespace and name. +func (s flunderNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.Flunder, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1beta1/flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1beta1/flunder.go index f4bc4e2a40948..89bd31e8a9e4a 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1beta1/flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/listers/wardle/v1beta1/flunder.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type FlunderLister interface { // List lists all Flunders in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Flunder, err error) + // ListWithContext lists all Flunders in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Flunder, err error) // Flunders returns an object that can list and get Flunders. Flunders(namespace string) FlunderNamespaceLister FlunderListerExpansion @@ -48,6 +53,11 @@ func NewFlunderLister(indexer cache.Indexer) FlunderLister { // List lists all Flunders in the indexer. func (s *flunderLister) List(selector labels.Selector) (ret []*v1beta1.Flunder, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Flunders in the indexer. +func (s *flunderLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Flunder, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Flunder)) }) @@ -80,6 +90,11 @@ type flunderNamespaceLister struct { // List lists all Flunders in the indexer for a given namespace. func (s flunderNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Flunder, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Flunders in the indexer for a given namespace. +func (s flunderNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta1.Flunder, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Flunder)) }) @@ -88,6 +103,11 @@ func (s flunderNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.F // Get retrieves the Flunder from the indexer for a given namespace and name. func (s flunderNamespaceLister) Get(name string) (*v1beta1.Flunder, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Flunder from the indexer for a given namespace and name. +func (s flunderNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1beta1.Flunder, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/sample-controller/pkg/generated/listers/samplecontroller/v1alpha1/foo.go b/staging/src/k8s.io/sample-controller/pkg/generated/listers/samplecontroller/v1alpha1/foo.go index 0c53ed6db250d..396ed70c3f888 100644 --- a/staging/src/k8s.io/sample-controller/pkg/generated/listers/samplecontroller/v1alpha1/foo.go +++ b/staging/src/k8s.io/sample-controller/pkg/generated/listers/samplecontroller/v1alpha1/foo.go @@ -19,6 +19,8 @@ limitations under the License. package v1alpha1 import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -31,6 +33,9 @@ type FooLister interface { // List lists all Foos in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.Foo, err error) + // ListWithContext lists all Foos in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Foo, err error) // Foos returns an object that can list and get Foos. Foos(namespace string) FooNamespaceLister FooListerExpansion @@ -48,6 +53,11 @@ func NewFooLister(indexer cache.Indexer) FooLister { // List lists all Foos in the indexer. func (s *fooLister) List(selector labels.Selector) (ret []*v1alpha1.Foo, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Foos in the indexer. +func (s *fooLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Foo, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.Foo)) }) @@ -80,6 +90,11 @@ type fooNamespaceLister struct { // List lists all Foos in the indexer for a given namespace. func (s fooNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Foo, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all Foos in the indexer for a given namespace. +func (s fooNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1alpha1.Foo, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.Foo)) }) @@ -88,6 +103,11 @@ func (s fooNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Foo, // Get retrieves the Foo from the indexer for a given namespace and name. func (s fooNamespaceLister) Get(name string) (*v1alpha1.Foo, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the Foo from the indexer for a given namespace and name. +func (s fooNamespaceLister) GetWithContext(ctx context.Context, name string) (*v1alpha1.Foo, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err From d7cbe0af75a49f138b0dffe1eac3bdb8f6524ca7 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Fri, 3 Dec 2021 14:42:27 -0500 Subject: [PATCH 54/87] Print old & new stacks for same path registrations --- staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go b/staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go index 3bd0dd5f0c626..b4bc70c3f6d37 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go +++ b/staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go @@ -103,10 +103,11 @@ func (m *PathRecorderMux) ListedPaths(clusterName string) []string { } func (m *PathRecorderMux) trackCallers(path string) { + stack := string(debug.Stack()) if existingStack, ok := m.pathStacks[path]; ok { - utilruntime.HandleError(fmt.Errorf("registered %q from %v", path, existingStack)) + utilruntime.HandleError(fmt.Errorf("duplicate path registration of %q: original registration from %v\n\nnew registration from %v", path, existingStack, stack)) } - m.pathStacks[path] = string(debug.Stack()) + m.pathStacks[path] = stack } // refreshMuxLocked creates a new mux and must be called while locked. Otherwise the view of handlers may From 2876606b09dd1a83fca54f0022b2b6db689015ed Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Fri, 3 Dec 2021 14:43:27 -0500 Subject: [PATCH 55/87] Add cluster name support to meta accessor --- .../apimachinery/pkg/api/meta/interfaces.go | 3 +++ .../k8s.io/apimachinery/pkg/api/meta/meta.go | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go b/staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go index a35ce3bd0aad1..a4937c9046d24 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go @@ -72,6 +72,9 @@ type MetadataAccessor interface { Continue(obj runtime.Object) (string, error) SetContinue(obj runtime.Object, c string) error + ClusterName(obj runtime.Object) (string, error) + SetClusterName(obj runtime.Object, clusterName string) error + runtime.ResourceVersioner } diff --git a/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go b/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go index 6a4116a040b44..903826401ecf0 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -375,6 +375,23 @@ func (resourceAccessor) SetContinue(obj runtime.Object, version string) error { return nil } +func (resourceAccessor) ClusterName(obj runtime.Object) (string, error) { + accessor, err := Accessor(obj) + if err != nil { + return "", err + } + return accessor.GetClusterName(), nil +} + +func (resourceAccessor) SetClusterName(obj runtime.Object, clusterName string) error { + accessor, err := Accessor(obj) + if err != nil { + return err + } + accessor.SetClusterName(clusterName) + return nil +} + // extractFromOwnerReference extracts v to o. v is the OwnerReferences field of an object. func extractFromOwnerReference(v reflect.Value, o *metav1.OwnerReference) error { if err := runtime.Field(v, "APIVersion", &o.APIVersion); err != nil { From d45763cba9d035e9b3c95cdc7a4535914e9d1fc8 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 6 Dec 2021 15:55:54 -0500 Subject: [PATCH 56/87] HACK: let user set cert, key, token for loopback --- .../server/options/serving_with_loopback.go | 100 ++++++++++++++++-- 1 file changed, 93 insertions(+), 7 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go b/staging/src/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go index 2317be82d26f5..ce11473c773a3 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go @@ -17,7 +17,10 @@ limitations under the License. package options import ( + "errors" "fmt" + "net" + "strconv" "github.com/google/uuid" @@ -29,10 +32,30 @@ import ( type SecureServingOptionsWithLoopback struct { *SecureServingOptions + + // LoopbackOptions contains authentication and authorization options for the loopback client + // configuration. + LoopbackOptions *LoopbackOptions +} + +// LoopbackOptions contains authentication and authorization options for the loopback client +// configuration. +type LoopbackOptions struct { + // Cert is the self-signed certificate. If unset, will be generated when ApplyTo is + // called. + Cert []byte + // Key is the private key for the self-signed certificate. If unset, will be + // generated when ApplyTo is called. + Key []byte + // Token is the bearer token the loopback client uses to communicate with the server. if + // unset, will be generated when ApplyTo is called. + Token string } func (o *SecureServingOptions) WithLoopback() *SecureServingOptionsWithLoopback { - return &SecureServingOptionsWithLoopback{o} + return &SecureServingOptionsWithLoopback{ + SecureServingOptions: o, + } } // ApplyTo fills up serving information in the server configuration. @@ -49,12 +72,37 @@ func (s *SecureServingOptionsWithLoopback) ApplyTo(secureServingInfo **server.Se return nil } - // create self-signed cert+key with the fake server.LoopbackClientServerNameOverride and - // let the server return it when the loopback client connects. - certPem, keyPem, err := certutil.GenerateSelfSignedCertKey(server.LoopbackClientServerNameOverride, nil, nil) - if err != nil { - return fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) + var ( + certPem, keyPem []byte + loopbackToken string + err error + ) + + if s.LoopbackOptions != nil { + if len(s.LoopbackOptions.Cert) == 0 { + return errors.New("when specifying SecureServingOptionsWithLoopback.LoopbackOptions, Cert is required") + } + if len(s.LoopbackOptions.Key) == 0 { + return errors.New("when specifying SecureServingOptionsWithLoopback.LoopbackOptions, Key is required") + } + if s.LoopbackOptions.Token == "" { + return errors.New("when specifying SecureServingOptionsWithLoopback.LoopbackOptions, Token is required") + } + + certPem = s.LoopbackOptions.Cert + keyPem = s.LoopbackOptions.Key + loopbackToken = s.LoopbackOptions.Token + } else { + // create self-signed cert+key with the fake server.LoopbackClientServerNameOverride and + // let the server return it when the loopback client connects. + certPem, keyPem, err = s.NewLoopbackClientCert() + if err != nil { + return fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) + } + + loopbackToken = uuid.New().String() } + certProvider, err := dynamiccertificates.NewStaticSNICertKeyContent("self-signed loopback", certPem, keyPem, server.LoopbackClientServerNameOverride) if err != nil { return fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) @@ -63,7 +111,7 @@ func (s *SecureServingOptionsWithLoopback) ApplyTo(secureServingInfo **server.Se // Write to the front of SNICerts so that this overrides any other certs with the same name (*secureServingInfo).SNICerts = append([]dynamiccertificates.SNICertKeyContentProvider{certProvider}, (*secureServingInfo).SNICerts...) - secureLoopbackClientConfig, err := (*secureServingInfo).NewLoopbackClientConfig(uuid.New().String(), certPem) + secureLoopbackClientConfig, err := (*secureServingInfo).NewLoopbackClientConfig(loopbackToken, certPem) switch { // if we failed and there's no fallback loopback client config, we need to fail case err != nil && *loopbackClientConfig == nil: @@ -79,3 +127,41 @@ func (s *SecureServingOptionsWithLoopback) ApplyTo(secureServingInfo **server.Se return nil } + +// NewLoopbackClientCert creates a self-signed certificate and key for the loopback client. +func (s *SecureServingOptionsWithLoopback) NewLoopbackClientCert() ([]byte, []byte, error) { + certPem, keyPem, err := certutil.GenerateSelfSignedCertKey(server.LoopbackClientServerNameOverride, nil, nil) + if err != nil { + return nil, nil, fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) + } + return certPem, keyPem, nil +} + +// NewLoopbackClientConfig creates a loopback client *rest.Config for the given token and +// certificate. API server composers can use this to create a loopback client configuration before +// the server has started. It is slightly different from SecureServingInfo.NewLoopbackClientConfig +// in that this method does not support a BindPort of 0, and it returns an error in that case. +func (s *SecureServingOptionsWithLoopback) NewLoopbackClientConfig(token string, cert []byte) (*rest.Config, error) { + if s.BindPort == 0 { + return nil, errors.New("BindPort must be > 0") + } + + hostAndPort := s.BindAddress.String() + ":" + strconv.Itoa(s.BindPort) + host, port, err := server.LoopbackHostPort(hostAndPort) + if err != nil { + return nil, err + } + + c := &rest.Config{ + // Do not limit loopback client QPS. + QPS: -1, + Host: "https://" + net.JoinHostPort(host, port), + TLSClientConfig: rest.TLSClientConfig{ + CAData: cert, + ServerName: server.LoopbackClientServerNameOverride, + }, + BearerToken: token, + } + + return c, nil +} From 452178b2617073ce5f879025632dfe953148697e Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 6 Dec 2021 15:58:05 -0500 Subject: [PATCH 57/87] HACK: fix crd openapi bug Fix a bug in updateSpecLocked() where it was only updating the first logical cluster's specs and then accidentally returning early. --- .../pkg/controller/openapi/controller.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go index db3e08a9d46fe..fef857885abde 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go @@ -24,6 +24,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" + utilerrors "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/server/routes" @@ -272,8 +273,9 @@ func buildVersionSpecs(crd *apiextensionsv1.CustomResourceDefinition, oldSpecs m // updateSpecLocked aggregates all OpenAPI specs and updates openAPIService. // It is not thread-safe. The caller is responsible to hold proper lock (Controller.lock). func (c *Controller) updateSpecLocked() error { - crdSpecs := []*spec.Swagger{} + var errs []error for clusterName, clusterCrdSpecs := range c.crdSpecs { + crdSpecs := []*spec.Swagger{} for _, versionSpecs := range clusterCrdSpecs { for _, s := range versionSpecs { crdSpecs = append(crdSpecs, s) @@ -283,9 +285,12 @@ func (c *Controller) updateSpecLocked() error { if err != nil { return fmt.Errorf("failed to merge specs: %v", err) } - return c.openAPIServiceProvider.ForCluster(clusterName).UpdateSpec(mergedSpec) + if err := c.openAPIServiceProvider.ForCluster(clusterName).UpdateSpec(mergedSpec); err != nil { + errs = append(errs, err) + } } - return nil + + return utilerrors.NewAggregate(errs) } func (c *Controller) addCustomResourceDefinition(obj interface{}) { From 11bb23e8632a72b0aea0b84ce16728b8b2f3d40a Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 6 Dec 2021 16:00:27 -0500 Subject: [PATCH 58/87] HACK: discovery.GroupManager: expose Groups() Add a GroupLister interface/Groups() method to the GroupManager interface, allowing the mini aggregation server to aggregate API discovery for multiple generic API servers. --- .../apiserver/pkg/endpoints/discovery/root.go | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/root.go b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/root.go index beba9c8a41dde..729be36c0a167 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/root.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/root.go @@ -17,6 +17,7 @@ limitations under the License. package discovery import ( + "context" "net/http" "sync" @@ -33,12 +34,21 @@ import ( // GroupManager is an interface that allows dynamic mutation of the existing webservice to handle // API groups being added or removed. type GroupManager interface { + GroupLister + AddGroup(apiGroup metav1.APIGroup) RemoveGroup(groupName string) WebService() *restful.WebService } +// GroupLister knows how to list APIGroups for discovery. +type GroupLister interface { + // Groups returns APIGroups for discovery, filling in ServerAddressByClientCIDRs + // based on data in req. + Groups(ctx context.Context, req *http.Request) ([]metav1.APIGroup, error) +} + // rootAPIsHandler creates a webservice serving api group discovery. // The list of APIGroups may change while the server is running because additional resources // are registered or removed. It is not safe to cache the values. @@ -94,24 +104,36 @@ func (s *rootAPIsHandler) RemoveGroup(groupName string) { } } -func (s *rootAPIsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { +func (s *rootAPIsHandler) Groups(ctx context.Context, req *http.Request) ([]metav1.APIGroup, error) { s.lock.RLock() defer s.lock.RUnlock() - orderedGroups := []metav1.APIGroup{} - for _, groupName := range s.apiGroupNames { - orderedGroups = append(orderedGroups, s.apiGroups[groupName]) - } + return s.groupsLocked(ctx, req), nil +} +// groupsLocked returns the APIGroupList discovery information for this handler. +// The caller must hold the lock before invoking this method to avoid data races. +func (s *rootAPIsHandler) groupsLocked(ctx context.Context, req *http.Request) []metav1.APIGroup { clientIP := utilnet.GetClientIP(req) serverCIDR := s.addresses.ServerAddressByClientCIDRs(clientIP) - groups := make([]metav1.APIGroup, len(orderedGroups)) - for i := range orderedGroups { - groups[i] = orderedGroups[i] - groups[i].ServerAddressByClientCIDRs = serverCIDR + + groups := make([]metav1.APIGroup, len(s.apiGroupNames)) + for i, groupName := range s.apiGroupNames { + group := s.apiGroups[groupName] + group.ServerAddressByClientCIDRs = serverCIDR + groups[i] = group } - responsewriters.WriteObjectNegotiated(s.serializer, negotiation.DefaultEndpointRestrictions, schema.GroupVersion{}, resp, req, http.StatusOK, &metav1.APIGroupList{Groups: groups}) + return groups +} + +func (s *rootAPIsHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { + s.lock.RLock() + defer s.lock.RUnlock() + + groupList := metav1.APIGroupList{Groups: s.groupsLocked(req.Context(), req)} + + responsewriters.WriteObjectNegotiated(s.serializer, negotiation.DefaultEndpointRestrictions, schema.GroupVersion{}, w, req, http.StatusOK, &groupList) } func (s *rootAPIsHandler) restfulHandle(req *restful.Request, resp *restful.Response) { From 51ee5203ba8c868e2de7bbe051940ae83b1afbfc Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 13 Dec 2021 09:27:48 -0500 Subject: [PATCH 59/87] Overridable client/informers for CRD apiserver Add NewClientFunc and NewInformerFactoryFunc for the apiextensions-apiserver to allow composers to customize how the client and shared informer factories are created. Signed-off-by: Andy Goldstein --- pkg/genericcontrolplane/apiextensions.go | 10 ++++++---- pkg/genericcontrolplane/options/options.go | 11 ++++++++-- .../pkg/apiserver/apiserver.go | 20 +++++++++++++++++-- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/pkg/genericcontrolplane/apiextensions.go b/pkg/genericcontrolplane/apiextensions.go index 5d69e0331beb8..f043b949106bb 100644 --- a/pkg/genericcontrolplane/apiextensions.go +++ b/pkg/genericcontrolplane/apiextensions.go @@ -86,10 +86,12 @@ func createAPIExtensionsConfig( SharedInformerFactory: externalInformers, }, ExtraConfig: apiextensionsapiserver.ExtraConfig{ - CRDRESTOptionsGetter: apiextensionsoptions.NewCRDRESTOptionsGetter(etcdOptions), - MasterCount: 1, // TODO: pass this in correctly - AuthResolverWrapper: authResolverWrapper, - ServiceResolver: serviceResolver, + CRDRESTOptionsGetter: apiextensionsoptions.NewCRDRESTOptionsGetter(etcdOptions), + MasterCount: 1, // TODO: pass this in correctly + AuthResolverWrapper: authResolverWrapper, + ServiceResolver: serviceResolver, + NewClientFunc: commandOptions.APIExtensionsNewClientFunc, + NewInformerFactoryFunc: commandOptions.APIExtensionsNewSharedInformerFactoryFunc, }, } diff --git a/pkg/genericcontrolplane/options/options.go b/pkg/genericcontrolplane/options/options.go index db1db12c1e057..99f3fe04f49f4 100644 --- a/pkg/genericcontrolplane/options/options.go +++ b/pkg/genericcontrolplane/options/options.go @@ -20,11 +20,14 @@ import ( "net/http" "time" + apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + apiextensionsinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions" "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating" "k8s.io/apiserver/pkg/admission/plugin/webhook/validating" genericapiserver "k8s.io/apiserver/pkg/server" genericoptions "k8s.io/apiserver/pkg/server/options" "k8s.io/apiserver/pkg/storage/storagebackend" + "k8s.io/client-go/rest" "k8s.io/component-base/logs" "k8s.io/component-base/metrics" @@ -71,6 +74,10 @@ type ServerRunOptions struct { // BuildHandlerChainFunc allows you to build custom handler chains by decorating the apiHandler. BuildHandlerChainFunc func(apiHandler http.Handler, c *genericapiserver.Config) (secure http.Handler) + + // TODO consider either moving into an apiextensions-specific struct, or maybe reuse apiextensions-apiserver/pkg/cmd/options? + APIExtensionsNewClientFunc func(config *rest.Config) (apiextensionsclient.Interface, error) + APIExtensionsNewSharedInformerFactoryFunc func(client apiextensionsclient.Interface, resyncPeriod time.Duration) apiextensionsinformers.SharedInformerFactory } // NewServerRunOptions creates a new ServerRunOptions object with default parameters @@ -89,8 +96,8 @@ func NewServerRunOptions() *ServerRunOptions { Logs: logs.NewOptions(), Traces: genericoptions.NewTracingOptions(), - EnableLogsHandler: true, - EventTTL: 1 * time.Hour, + EnableLogsHandler: true, + EventTTL: 1 * time.Hour, IdentityLeaseDurationSeconds: 3600, IdentityLeaseRenewIntervalSeconds: 10, diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go index decb28b3e7eb1..e864ed43e3cbb 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go @@ -49,6 +49,7 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/util/webhook" + restclient "k8s.io/client-go/rest" ) var ( @@ -87,6 +88,9 @@ type ExtraConfig struct { ServiceResolver webhook.ServiceResolver // AuthResolverWrapper is used in CR webhook converters AuthResolverWrapper webhook.AuthenticationInfoResolverWrapper + + NewClientFunc func(config *restclient.Config) (clientset.Interface, error) + NewInformerFactoryFunc func(client clientset.Interface, resyncPeriod time.Duration) externalinformers.SharedInformerFactory } type Config struct { @@ -126,6 +130,18 @@ func (cfg *Config) Complete() CompletedConfig { } } + if c.ExtraConfig.NewClientFunc == nil { + c.ExtraConfig.NewClientFunc = func(config *restclient.Config) (clientset.Interface, error) { + return clientset.NewForConfig(config) + } + } + + if c.ExtraConfig.NewInformerFactoryFunc == nil { + c.ExtraConfig.NewInformerFactoryFunc = func(client clientset.Interface, resyncPeriod time.Duration) externalinformers.SharedInformerFactory { + return externalinformers.NewSharedInformerFactory(client, resyncPeriod) + } + } + return CompletedConfig{&c} } @@ -166,13 +182,13 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) return nil, err } - crdClient, err := clientset.NewForConfig(s.GenericAPIServer.LoopbackClientConfig) + crdClient, err := c.ExtraConfig.NewClientFunc(s.GenericAPIServer.LoopbackClientConfig) if err != nil { // it's really bad that this is leaking here, but until we can fix the test (which I'm pretty sure isn't even testing what it wants to test), // we need to be able to move forward return nil, fmt.Errorf("failed to create clientset: %v", err) } - s.Informers = externalinformers.NewSharedInformerFactory(crdClient, 5*time.Minute) + s.Informers = c.ExtraConfig.NewInformerFactoryFunc(crdClient, 5*time.Minute) delegateHandler := delegationTarget.UnprotectedHandler() if delegateHandler == nil { From 70d52d3fad472eda1fef17113e134e2f7a0cfce6 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 13 Dec 2021 09:30:06 -0500 Subject: [PATCH 60/87] HACK: make CRDs more extensible Switch from controller-based discovery to controller-free discovery for CRDs. Remove logical cluster code from the crdHandler as it can be composed from above (in kcp). Signed-off-by: Andy Goldstein --- .../pkg/apiserver/apiserver.go | 38 +- .../pkg/apiserver/customresource_discovery.go | 326 +++++++++++++---- .../customresource_discovery_controller.go | 345 ------------------ .../pkg/apiserver/customresource_handler.go | 103 +----- 4 files changed, 287 insertions(+), 525 deletions(-) delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go index e864ed43e3cbb..573fd961899ff 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go @@ -113,6 +113,13 @@ type CustomResourceDefinitions struct { // provided for easier embedding Informers externalinformers.SharedInformerFactory + + DiscoveryGroupLister discovery.GroupLister + + crdHandler *crdHandler + versionDiscoveryHandler *versionDiscoveryHandler + groupDiscoveryHandler *groupDiscoveryHandler + rootDiscoveryHandler *rootDiscoveryHandler } // Complete fills in any fields not set that are required to have valid data. It's mutating the receiver. @@ -195,18 +202,27 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) delegateHandler = http.NotFoundHandler() } - versionDiscoveryHandler := &versionDiscoveryHandler{ - discovery: map[string]map[schema.GroupVersion]*discovery.APIVersionHandler{}, + s.versionDiscoveryHandler = &versionDiscoveryHandler{ + crdLister: s.Informers.Apiextensions().V1().CustomResourceDefinitions().Lister(), + delegate: delegateHandler, + } + + s.groupDiscoveryHandler = &groupDiscoveryHandler{ + crdLister: s.Informers.Apiextensions().V1().CustomResourceDefinitions().Lister(), delegate: delegateHandler, } - groupDiscoveryHandler := &groupDiscoveryHandler{ - discovery: map[string]map[string]*discovery.APIGroupHandler{}, + + s.rootDiscoveryHandler = &rootDiscoveryHandler{ + crdLister: s.Informers.Apiextensions().V1().CustomResourceDefinitions().Lister(), delegate: delegateHandler, } + s.DiscoveryGroupLister = s.rootDiscoveryHandler + establishingController := establish.NewEstablishingController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), crdClient.ApiextensionsV1()) + crdHandler, err := NewCustomResourceDefinitionHandler( - versionDiscoveryHandler, - groupDiscoveryHandler, + s.versionDiscoveryHandler, + s.groupDiscoveryHandler, s.Informers.Apiextensions().V1().CustomResourceDefinitions(), delegateHandler, c.ExtraConfig.CRDRESTOptionsGetter, @@ -224,12 +240,13 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) if err != nil { return nil, err } + s.crdHandler = crdHandler + s.GenericAPIServer.Handler.NonGoRestfulMux.Handle("/apis", crdHandler) s.GenericAPIServer.Handler.NonGoRestfulMux.HandlePrefix("/apis/", crdHandler) // HACK: Added to allow serving core resources registered through CRDs (for the KCP scenario) s.GenericAPIServer.Handler.NonGoRestfulMux.UnlistedHandlePrefix("/api/v1/", crdHandler) - discoveryController := NewDiscoveryController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), versionDiscoveryHandler, groupDiscoveryHandler) namingController := status.NewNamingConditionController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), crdClient.ApiextensionsV1()) nonStructuralSchemaController := nonstructuralschema.NewConditionController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), crdClient.ApiextensionsV1()) apiApprovalController := apiapproval.NewKubernetesAPIApprovalPolicyConformantConditionController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), crdClient.ApiextensionsV1()) @@ -266,13 +283,6 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) go apiApprovalController.Run(5, context.StopCh) go finalizingController.Run(5, context.StopCh) - discoverySyncedCh := make(chan struct{}) - go discoveryController.Run(context.StopCh, discoverySyncedCh) - select { - case <-context.StopCh: - case <-discoverySyncedCh: - } - return nil }) // we don't want to report healthy until we can handle all CRDs that have already been registered. Waiting for the informer diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go index 4d13bed97891d..ddb75d5af439a 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go @@ -17,21 +17,25 @@ limitations under the License. package apiserver import ( + "context" "net/http" + "sort" "strings" - "sync" + autoscaling "k8s.io/api/autoscaling/v1" + apiextensionshelpers "k8s.io/apiextensions-apiserver/pkg/apihelpers" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + listers "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" "k8s.io/apiserver/pkg/endpoints/discovery" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) type versionDiscoveryHandler struct { - // TODO, writing is infrequent, optimize this - discoveryLock sync.RWMutex - discovery map[string]map[schema.GroupVersion]*discovery.APIVersionHandler - - delegate http.Handler + crdLister listers.CustomResourceDefinitionLister + delegate http.Handler } func (r *versionDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { @@ -42,63 +46,130 @@ func (r *versionDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Req return } - clusterName, err := genericapirequest.ClusterNameFrom(req.Context()) + apiResourcesForDiscovery := []metav1.APIResource{} + + ctx := req.Context() + + requestedGroup := pathParts[1] + requestedVersion := pathParts[2] + + crds, err := r.crdLister.ListWithContext(ctx, labels.Everything()) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } - - discovery, ok := r.getDiscovery(clusterName, schema.GroupVersion{Group: pathParts[1], Version: pathParts[2]}) - if !ok { - r.delegate.ServeHTTP(w, req) - return - } - - discovery.ServeHTTP(w, req) -} - -func (r *versionDiscoveryHandler) getDiscovery(clusterName string, gv schema.GroupVersion) (*discovery.APIVersionHandler, bool) { - r.discoveryLock.RLock() - defer r.discoveryLock.RUnlock() - - clusterDiscovery, clusterExists := r.discovery[clusterName] - if !clusterExists { - return nil, false + foundVersion := false + foundGroup := false + for _, crd := range crds { + if requestedGroup != crd.Spec.Group { + continue + } + + if !apiextensionshelpers.IsCRDConditionTrue(crd, apiextensionsv1.Established) { + continue + } + + foundRequestedVersion := false + var storageVersionHash string + for _, v := range crd.Spec.Versions { + if !v.Served { + continue + } + // If there is any Served version, that means the group should show up in discovery + foundGroup = true + + // HACK: support the case when we add core resources through CRDs (KCP scenario) + groupVersion := crd.Spec.Group + "/" + v.Name + if crd.Spec.Group == "" { + groupVersion = v.Name + } + + gv := metav1.GroupVersion{Group: groupVersion, Version: v.Name} + + if v.Name == requestedVersion { + foundRequestedVersion = true + } + if v.Storage { + storageVersionHash = discovery.StorageVersionHash(crd.ClusterName, gv.Group, gv.Version, crd.Spec.Names.Kind) + } + } + + if !foundRequestedVersion { + // This CRD doesn't have the requested version + continue + } + foundVersion = true + + verbs := metav1.Verbs([]string{"delete", "deletecollection", "get", "list", "patch", "create", "update", "watch"}) + // if we're terminating we don't allow some verbs + if apiextensionshelpers.IsCRDConditionTrue(crd, apiextensionsv1.Terminating) { + verbs = metav1.Verbs([]string{"delete", "deletecollection", "get", "list", "watch"}) + } + + apiResourcesForDiscovery = append(apiResourcesForDiscovery, metav1.APIResource{ + Name: crd.Status.AcceptedNames.Plural, + SingularName: crd.Status.AcceptedNames.Singular, + Namespaced: crd.Spec.Scope == apiextensionsv1.NamespaceScoped, + Kind: crd.Status.AcceptedNames.Kind, + Verbs: verbs, + ShortNames: crd.Status.AcceptedNames.ShortNames, + Categories: crd.Status.AcceptedNames.Categories, + StorageVersionHash: storageVersionHash, + }) + + subresources, err := apiextensionshelpers.GetSubresourcesForVersion(crd, requestedVersion) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + if subresources != nil && subresources.Status != nil { + apiResourcesForDiscovery = append(apiResourcesForDiscovery, metav1.APIResource{ + Name: crd.Status.AcceptedNames.Plural + "/status", + Namespaced: crd.Spec.Scope == apiextensionsv1.NamespaceScoped, + Kind: crd.Status.AcceptedNames.Kind, + Verbs: metav1.Verbs([]string{"get", "patch", "update"}), + }) + } + + if subresources != nil && subresources.Scale != nil { + apiResourcesForDiscovery = append(apiResourcesForDiscovery, metav1.APIResource{ + Group: autoscaling.GroupName, + Version: "v1", + Kind: "Scale", + Name: crd.Status.AcceptedNames.Plural + "/scale", + Namespaced: crd.Spec.Scope == apiextensionsv1.NamespaceScoped, + Verbs: metav1.Verbs([]string{"get", "patch", "update"}), + }) + } } - ret, ok := clusterDiscovery[gv] - return ret, ok -} -func (r *versionDiscoveryHandler) setDiscovery(clusterName string, gv schema.GroupVersion, discoveryHandler *discovery.APIVersionHandler) { - r.discoveryLock.Lock() - defer r.discoveryLock.Unlock() + resourceListerFunc := discovery.APIResourceListerFunc(func() []metav1.APIResource { + return apiResourcesForDiscovery + }) - if _, clusterExists := r.discovery[clusterName]; !clusterExists { - r.discovery[clusterName] = map[schema.GroupVersion]*discovery.APIVersionHandler{} - } - r.discovery[clusterName][gv] = discoveryHandler -} + // HACK: if we are adding resources in legacy scheme group through CRDs (KCP scenario) + // then do not expose the CRD `APIResource`s in their own CRD-related group`, + // But instead add them in the existing legacy schema group + // if genericcontrolplanescheme.Scheme.IsGroupRegistered(clusterGroupVersion.Group) { + // if !foundGroup || !foundVersion { + // delete(discovery.ContributedResources, clusterGroupVersion) + // } -func (r *versionDiscoveryHandler) unsetDiscovery(clusterName string, gv schema.GroupVersion) { - r.discoveryLock.Lock() - defer r.discoveryLock.Unlock() + // discovery.ContributedResources[clusterGroupVersion] = resourceListerFunc + // return nil + // } - if _, clusterExists := r.discovery[clusterName]; !clusterExists { + if !foundGroup || !foundVersion { + r.delegate.ServeHTTP(w, req) return } - delete(r.discovery[clusterName], gv) - if len(r.discovery[clusterName]) == 0 { - delete(r.discovery, clusterName) - } + discovery.NewAPIVersionHandler(Codecs, schema.GroupVersion{Group: requestedGroup, Version: requestedVersion}, resourceListerFunc).ServeHTTP(w, req) } type groupDiscoveryHandler struct { - // TODO, writing is infrequent, optimize this - discoveryLock sync.RWMutex - discovery map[string]map[string]*discovery.APIGroupHandler - - delegate http.Handler + crdLister listers.CustomResourceDefinitionLister + delegate http.Handler } func (r *groupDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { @@ -109,55 +180,148 @@ func (r *groupDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Reque return } - clusterName, err := genericapirequest.ClusterNameFrom(req.Context()) + apiVersionsForDiscovery := []metav1.GroupVersionForDiscovery{} + versionsForDiscoveryMap := map[metav1.GroupVersion]bool{} + + ctx := req.Context() + + requestedGroup := pathParts[1] + + crds, err := r.crdLister.ListWithContext(ctx, labels.Everything()) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } + foundGroup := false + for _, crd := range crds { + if requestedGroup != crd.Spec.Group { + continue + } + + if !apiextensionshelpers.IsCRDConditionTrue(crd, apiextensionsv1.Established) { + continue + } + + for _, v := range crd.Spec.Versions { + if !v.Served { + continue + } + // If there is any Served version, that means the group should show up in discovery + foundGroup = true + + // HACK: support the case when we add core resources through CRDs (KCP scenario) + groupVersion := crd.Spec.Group + "/" + v.Name + if crd.Spec.Group == "" { + groupVersion = v.Name + } + + gv := metav1.GroupVersion{Group: crd.Spec.Group, Version: v.Name} + + if !versionsForDiscoveryMap[gv] { + versionsForDiscoveryMap[gv] = true + apiVersionsForDiscovery = append(apiVersionsForDiscovery, metav1.GroupVersionForDiscovery{ + GroupVersion: groupVersion, + Version: v.Name, + }) + } + } + } + + sortGroupDiscoveryByKubeAwareVersion(apiVersionsForDiscovery) - discovery, ok := r.getDiscovery(clusterName, pathParts[1]) - if !ok { + // HACK: if we are adding resources in legacy scheme group through CRDs (KCP scenario) + // then do not expose the CRD `APIResource`s in their own CRD-related group`, + // But instead add them in the existing legacy schema group + // if genericcontrolplanescheme.Scheme.IsGroupRegistered(clusterGroupVersion.Group) { + // if !foundGroup || !foundVersion { + // delete(discovery.ContributedResources, clusterGroupVersion) + // } + + // discovery.ContributedResources[clusterGroupVersion] = resourceListerFunc + // return nil + // } + + if !foundGroup { r.delegate.ServeHTTP(w, req) return } - discovery.ServeHTTP(w, req) -} + apiGroup := metav1.APIGroup{ + Name: requestedGroup, + Versions: apiVersionsForDiscovery, + // the preferred versions for a group is the first item in + // apiVersionsForDiscovery after it put in the right ordered + PreferredVersion: apiVersionsForDiscovery[0], + } -func (r *groupDiscoveryHandler) getDiscovery(clusterName, group string) (*discovery.APIGroupHandler, bool) { - r.discoveryLock.RLock() - defer r.discoveryLock.RUnlock() + discovery.NewAPIGroupHandler(Codecs, apiGroup).ServeHTTP(w, req) +} - clusterDiscovery, clusterExists := r.discovery[clusterName] - if !clusterExists { - return nil, false - } - ret, ok := clusterDiscovery[group] - return ret, ok +type rootDiscoveryHandler struct { + crdLister listers.CustomResourceDefinitionLister + delegate http.Handler } -func (r *groupDiscoveryHandler) setDiscovery(clusterName, group string, discoveryHandler *discovery.APIGroupHandler) { - r.discoveryLock.Lock() - defer r.discoveryLock.Unlock() +func (r *rootDiscoveryHandler) Groups(ctx context.Context, req *http.Request) ([]metav1.APIGroup, error) { + apiVersionsForDiscovery := map[string][]metav1.GroupVersionForDiscovery{} + versionsForDiscoveryMap := map[string]map[metav1.GroupVersion]bool{} - if _, clusterExists := r.discovery[clusterName]; !clusterExists { - r.discovery[clusterName] = map[string]*discovery.APIGroupHandler{} + crds, err := r.crdLister.ListWithContext(ctx, labels.Everything()) + if err != nil { + return []metav1.APIGroup{}, err + } + for _, crd := range crds { + if !apiextensionshelpers.IsCRDConditionTrue(crd, apiextensionsv1.Established) { + continue + } + + for _, v := range crd.Spec.Versions { + if !v.Served { + continue + } + + // HACK: support the case when we add core resources through CRDs (KCP scenario) + groupVersion := crd.Spec.Group + "/" + v.Name + if crd.Spec.Group == "" { + groupVersion = v.Name + } + + gv := metav1.GroupVersion{Group: crd.Spec.Group, Version: v.Name} + + m, ok := versionsForDiscoveryMap[crd.Spec.Group] + if !ok { + m = make(map[metav1.GroupVersion]bool) + } + + if !m[gv] { + m[gv] = true + groupVersions := apiVersionsForDiscovery[crd.Spec.Group] + groupVersions = append(groupVersions, metav1.GroupVersionForDiscovery{ + GroupVersion: groupVersion, + Version: v.Name, + }) + apiVersionsForDiscovery[crd.Spec.Group] = groupVersions + } + + versionsForDiscoveryMap[crd.Spec.Group] = m + } } - r.discovery[clusterName][group] = discoveryHandler -} -func (r *groupDiscoveryHandler) unsetDiscovery(clusterName, group string) { - r.discoveryLock.Lock() - defer r.discoveryLock.Unlock() + for _, versions := range apiVersionsForDiscovery { + sortGroupDiscoveryByKubeAwareVersion(versions) - if _, clusterExists := r.discovery[clusterName]; !clusterExists { - return } - delete(r.discovery[clusterName], group) - if len(r.discovery[clusterName]) == 0 { - delete(r.discovery, clusterName) + groupList := make([]metav1.APIGroup, 0, len(apiVersionsForDiscovery)) + for group, versions := range apiVersionsForDiscovery { + g := metav1.APIGroup{ + Name: group, + Versions: versions, + PreferredVersion: versions[0], + } + groupList = append(groupList, g) } + return groupList, nil } // splitPath returns the segments for a URL path. @@ -168,3 +332,9 @@ func splitPath(path string) []string { } return strings.Split(path, "/") } + +func sortGroupDiscoveryByKubeAwareVersion(gd []metav1.GroupVersionForDiscovery) { + sort.Slice(gd, func(i, j int) bool { + return version.CompareKubeAwareVersionStrings(gd[i].Version, gd[j].Version) > 0 + }) +} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go deleted file mode 100644 index 38aee2eb7ef6f..0000000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go +++ /dev/null @@ -1,345 +0,0 @@ -/* -Copyright 2017 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 apiserver - -import ( - "fmt" - "sort" - "time" - - "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" - - autoscaling "k8s.io/api/autoscaling/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/version" - "k8s.io/apiserver/pkg/endpoints/discovery" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - - apiextensionshelpers "k8s.io/apiextensions-apiserver/pkg/apihelpers" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - informers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1" - listers "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" -) - -type DiscoveryController struct { - versionHandler *versionDiscoveryHandler - groupHandler *groupDiscoveryHandler - - crdLister listers.CustomResourceDefinitionLister - crdsSynced cache.InformerSynced - - // To allow injection for testing. - syncFn func(clusterGroupVersion discovery.ClusterGroupVersion) error - - queue workqueue.RateLimitingInterface -} - -func NewDiscoveryController(crdInformer informers.CustomResourceDefinitionInformer, versionHandler *versionDiscoveryHandler, groupHandler *groupDiscoveryHandler) *DiscoveryController { - c := &DiscoveryController{ - versionHandler: versionHandler, - groupHandler: groupHandler, - crdLister: crdInformer.Lister(), - crdsSynced: crdInformer.Informer().HasSynced, - - queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "DiscoveryController"), - } - - crdInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: c.addCustomResourceDefinition, - UpdateFunc: c.updateCustomResourceDefinition, - DeleteFunc: c.deleteCustomResourceDefinition, - }) - - c.syncFn = c.sync - - return c -} - -func (c *DiscoveryController) sync(clusterGroupVersion discovery.ClusterGroupVersion) error { - - apiVersionsForDiscovery := []metav1.GroupVersionForDiscovery{} - apiResourcesForDiscovery := []metav1.APIResource{} - versionsForDiscoveryMap := map[metav1.GroupVersion]bool{} - - crds, err := c.crdLister.List(labels.Everything()) - if err != nil { - return err - } - foundVersion := false - foundGroup := false - for _, crd := range crds { - if !apiextensionshelpers.IsCRDConditionTrue(crd, apiextensionsv1.Established) { - continue - } - - if crd.Spec.Group != clusterGroupVersion.Group { - continue - } - - if crd.GetClusterName() != clusterGroupVersion.ClusterName { - continue - } - - foundThisVersion := false - var storageVersionHash string - for _, v := range crd.Spec.Versions { - if !v.Served { - continue - } - // If there is any Served version, that means the group should show up in discovery - foundGroup = true - - // HACK: support the case when we add core resources through CRDs (KCP scenario) - groupVersion := crd.Spec.Group + "/" + v.Name - if crd.Spec.Group == "" { - groupVersion = v.Name - } - - gv := metav1.GroupVersion{Group: crd.Spec.Group, Version: v.Name} - - if !versionsForDiscoveryMap[gv] { - versionsForDiscoveryMap[gv] = true - apiVersionsForDiscovery = append(apiVersionsForDiscovery, metav1.GroupVersionForDiscovery{ - GroupVersion: groupVersion, - Version: v.Name, - }) - } - if v.Name == clusterGroupVersion.Version { - foundThisVersion = true - } - if v.Storage { - storageVersionHash = discovery.StorageVersionHash(clusterGroupVersion.ClusterName, gv.Group, gv.Version, crd.Spec.Names.Kind) - } - } - - if !foundThisVersion { - continue - } - foundVersion = true - - verbs := metav1.Verbs([]string{"delete", "deletecollection", "get", "list", "patch", "create", "update", "watch"}) - // if we're terminating we don't allow some verbs - if apiextensionshelpers.IsCRDConditionTrue(crd, apiextensionsv1.Terminating) { - verbs = metav1.Verbs([]string{"delete", "deletecollection", "get", "list", "watch"}) - } - - apiResourcesForDiscovery = append(apiResourcesForDiscovery, metav1.APIResource{ - Name: crd.Status.AcceptedNames.Plural, - SingularName: crd.Status.AcceptedNames.Singular, - Namespaced: crd.Spec.Scope == apiextensionsv1.NamespaceScoped, - Kind: crd.Status.AcceptedNames.Kind, - Verbs: verbs, - ShortNames: crd.Status.AcceptedNames.ShortNames, - Categories: crd.Status.AcceptedNames.Categories, - StorageVersionHash: storageVersionHash, - }) - - subresources, err := apiextensionshelpers.GetSubresourcesForVersion(crd, clusterGroupVersion.Version) - if err != nil { - return err - } - if subresources != nil && subresources.Status != nil { - apiResourcesForDiscovery = append(apiResourcesForDiscovery, metav1.APIResource{ - Name: crd.Status.AcceptedNames.Plural + "/status", - Namespaced: crd.Spec.Scope == apiextensionsv1.NamespaceScoped, - Kind: crd.Status.AcceptedNames.Kind, - Verbs: metav1.Verbs([]string{"get", "patch", "update"}), - }) - } - - if subresources != nil && subresources.Scale != nil { - apiResourcesForDiscovery = append(apiResourcesForDiscovery, metav1.APIResource{ - Group: autoscaling.GroupName, - Version: "v1", - Kind: "Scale", - Name: crd.Status.AcceptedNames.Plural + "/scale", - Namespaced: crd.Spec.Scope == apiextensionsv1.NamespaceScoped, - Verbs: metav1.Verbs([]string{"get", "patch", "update"}), - }) - } - } - - sortGroupDiscoveryByKubeAwareVersion(apiVersionsForDiscovery) - - resourceListerFunc := discovery.APIResourceListerFunc(func() []metav1.APIResource { - return apiResourcesForDiscovery - }) - - // HACK: if we are adding resources in legacy scheme group through CRDs (KCP scenario) - // then do not expose the CRD `APIResource`s in their own CRD-related group`, - // But instead add them in the existing legacy schema group - if genericcontrolplanescheme.Scheme.IsGroupRegistered(clusterGroupVersion.Group) { - if !foundGroup || !foundVersion { - delete(discovery.ContributedResources, clusterGroupVersion) - } - - discovery.ContributedResources[clusterGroupVersion] = resourceListerFunc - return nil - } - - if !foundGroup { - c.groupHandler.unsetDiscovery(clusterGroupVersion.ClusterName, clusterGroupVersion.Group) - c.versionHandler.unsetDiscovery(clusterGroupVersion.ClusterName, clusterGroupVersion.GroupVersion()) - return nil - } - - if clusterGroupVersion.Group != "" { - // If we don't add resources in the core API group - apiGroup := metav1.APIGroup{ - Name: clusterGroupVersion.Group, - Versions: apiVersionsForDiscovery, - // the preferred versions for a group is the first item in - // apiVersionsForDiscovery after it put in the right ordered - PreferredVersion: apiVersionsForDiscovery[0], - } - c.groupHandler.setDiscovery(clusterGroupVersion.ClusterName, clusterGroupVersion.Group, discovery.NewAPIGroupHandler(Codecs, apiGroup)) - - if !foundVersion { - c.versionHandler.unsetDiscovery(clusterGroupVersion.ClusterName, clusterGroupVersion.GroupVersion()) - return nil - } - c.versionHandler.setDiscovery(clusterGroupVersion.ClusterName, clusterGroupVersion.GroupVersion(), discovery.NewAPIVersionHandler(Codecs, clusterGroupVersion.GroupVersion(), resourceListerFunc)) - } - - return nil -} - -func sortGroupDiscoveryByKubeAwareVersion(gd []metav1.GroupVersionForDiscovery) { - sort.Slice(gd, func(i, j int) bool { - return version.CompareKubeAwareVersionStrings(gd[i].Version, gd[j].Version) > 0 - }) -} - -func (c *DiscoveryController) Run(stopCh <-chan struct{}, synchedCh chan<- struct{}) { - defer utilruntime.HandleCrash() - defer c.queue.ShutDown() - defer klog.Info("Shutting down DiscoveryController") - - klog.Info("Starting DiscoveryController") - - if !cache.WaitForCacheSync(stopCh, c.crdsSynced) { - utilruntime.HandleError(fmt.Errorf("timed out waiting for caches to sync")) - return - } - - // initially sync all group versions to make sure we serve complete discovery - if err := wait.PollImmediateUntil(time.Second, func() (bool, error) { - crds, err := c.crdLister.List(labels.Everything()) - if err != nil { - utilruntime.HandleError(fmt.Errorf("failed to initially list CRDs: %v", err)) - return false, nil - } - for _, crd := range crds { - for _, v := range crd.Spec.Versions { - gv := discovery.ClusterGroupVersion{ - Group: crd.Spec.Group, - Version: v.Name, - ClusterName: crd.GetClusterName(), - } - if err := c.sync(gv); err != nil { - utilruntime.HandleError(fmt.Errorf("failed to initially sync CRD version %v: %v", gv, err)) - return false, nil - } - } - } - return true, nil - }, stopCh); err == wait.ErrWaitTimeout { - utilruntime.HandleError(fmt.Errorf("timed out waiting for discovery endpoint to initialize")) - return - } else if err != nil { - panic(fmt.Errorf("unexpected error: %v", err)) - } - close(synchedCh) - - // only start one worker thread since its a slow moving API - go wait.Until(c.runWorker, time.Second, stopCh) - - <-stopCh -} - -func (c *DiscoveryController) runWorker() { - for c.processNextWorkItem() { - } -} - -// processNextWorkItem deals with one key off the queue. It returns false when it's time to quit. -func (c *DiscoveryController) processNextWorkItem() bool { - key, quit := c.queue.Get() - if quit { - return false - } - defer c.queue.Done(key) - - err := c.syncFn(key.(discovery.ClusterGroupVersion)) - if err == nil { - c.queue.Forget(key) - return true - } - - utilruntime.HandleError(fmt.Errorf("%v failed with: %v", key, err)) - c.queue.AddRateLimited(key) - - return true -} - -func (c *DiscoveryController) enqueue(obj *apiextensionsv1.CustomResourceDefinition) { - for _, v := range obj.Spec.Versions { - c.queue.Add(discovery.ClusterGroupVersion{ - ClusterName: obj.GetClusterName(), - Group: obj.Spec.Group, - Version: v.Name}) - } -} - -func (c *DiscoveryController) addCustomResourceDefinition(obj interface{}) { - castObj := obj.(*apiextensionsv1.CustomResourceDefinition) - klog.V(4).Infof("Adding customresourcedefinition %s", castObj.Name) - c.enqueue(castObj) -} - -func (c *DiscoveryController) updateCustomResourceDefinition(oldObj, newObj interface{}) { - castNewObj := newObj.(*apiextensionsv1.CustomResourceDefinition) - castOldObj := oldObj.(*apiextensionsv1.CustomResourceDefinition) - klog.V(4).Infof("Updating customresourcedefinition %s", castOldObj.Name) - // Enqueue both old and new object to make sure we remove and add appropriate Versions. - // The working queue will resolve any duplicates and only changes will stay in the queue. - c.enqueue(castNewObj) - c.enqueue(castOldObj) -} - -func (c *DiscoveryController) deleteCustomResourceDefinition(obj interface{}) { - castObj, ok := obj.(*apiextensionsv1.CustomResourceDefinition) - if !ok { - tombstone, ok := obj.(cache.DeletedFinalStateUnknown) - if !ok { - klog.Errorf("Couldn't get object from tombstone %#v", obj) - return - } - castObj, ok = tombstone.Obj.(*apiextensionsv1.CustomResourceDefinition) - if !ok { - klog.Errorf("Tombstone contained object that is not expected %#v", obj) - return - } - } - klog.V(4).Infof("Deleting customresourcedefinition %q", castObj.Name) - c.enqueue(castObj) -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index 1b7ccc5bb49a4..3f8dca57488fd 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -49,7 +49,6 @@ import ( "k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor" "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/apimachinery/pkg/api/equality" apiequality "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" @@ -75,7 +74,6 @@ import ( "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apiserver/pkg/endpoints/openapi" apirequest "k8s.io/apiserver/pkg/endpoints/request" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" @@ -90,7 +88,6 @@ import ( "k8s.io/client-go/scale" "k8s.io/client-go/scale/scheme/autoscalingv1" "k8s.io/client-go/tools/cache" - "k8s.io/client-go/tools/clusters" "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/util/proto" "k8s.io/kube-openapi/pkg/validation/spec" @@ -266,29 +263,13 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { } crdName := requestInfo.Resource + "." + requestInfo.APIGroup - // HACK: support the case when we add core resources through CRDs (KCP scenario) - if requestInfo.APIGroup == "" { - crdName = crdName + "core" - } - - var crdClusterName string - var crd *apiextensionsv1.CustomResourceDefinition - var err error - handleErrorFunc := func(err error) { - if apierrors.IsNotFound(err) { - r.delegate.ServeHTTP(w, req) - } - if err != nil { - utilruntime.HandleError(err) - responsewriters.ErrorNegotiated( - apierrors.NewInternalError(fmt.Errorf("error resolving resource: %v", err)), - Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req, - ) - } + crd, err := r.crdLister.GetWithContext(ctx, crdName) + if apierrors.IsNotFound(err) { + r.delegate.ServeHTTP(w, req) + return } - - cluster, err := genericapirequest.ValidClusterFrom(ctx) if err != nil { + utilruntime.HandleError(err) responsewriters.ErrorNegotiated( apierrors.NewInternalError(fmt.Errorf("error resolving resource: %v", err)), Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req, @@ -296,42 +277,6 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { return } - if cluster.Wildcard { - // HACK: Search for the right logical cluster hosting the given CRD when watching or listing with wildcards. - // This is a temporary fix for issue https://github.com/kcp-dev/kcp/issues/183: One cannot watch with wildcards - // (across logical clusters) if the CRD of the related API Resource hasn't been added in the admin logical cluster first. - // The fix in this HACK is limited since the request will fail if 2 logical clusters contain CRDs for the same GVK - // with non-equal specs (especially non-equal schemas). - var crds []*apiextensionsv1.CustomResourceDefinition - crds, err = r.crdLister.List(labels.Everything()) - if err != nil { - handleErrorFunc(err) - return - } - var equal bool // true if all the found CRDs have the same spec - crd, equal = findCRD(crdName, crds) - if !equal { - err = apierrors.NewInternalError(fmt.Errorf("error resolving resource: cannot watch across logical clusters for a resource type with several distinct schemas")) - responsewriters.ErrorNegotiated(err, Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req) - return - } - - if crd == nil { - handleErrorFunc(apierrors.NewNotFound(schema.GroupResource{Group: apiextensionsv1.SchemeGroupVersion.Group, Resource: "customresourcedefinitions"}, "")) - return - } - crdClusterName = crd.GetClusterName() - - } else { - crdClusterName = cluster.Name - crdKey := clusters.ToClusterAwareKey(crdClusterName, crdName) - crd, err = r.crdLister.Get(crdKey) - if err != nil { - handleErrorFunc(err) - return - } - } - // if the scope in the CRD and the scope in request differ (with exception of the verbs in possiblyAcrossAllNamespacesVerbs // for namespaced resources), pass request to the delegate, which is supposed to lead to a 404. namespacedCRD, namespacedReq := crd.Spec.Scope == apiextensionsv1.NamespaceScoped, len(requestInfo.Namespace) > 0 @@ -361,7 +306,7 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { terminating := apiextensionshelpers.IsCRDConditionTrue(crd, apiextensionsv1.Terminating) - crdInfo, err := r.getOrCreateServingInfoFor(crd.UID, crd.Name, crdClusterName) + crdInfo, err := r.getOrCreateServingInfoFor(crd) if apierrors.IsNotFound(err) { r.delegate.ServeHTTP(w, req) return @@ -715,18 +660,18 @@ func (r *crdHandler) tearDown(oldInfo *crdInfo) { // GetCustomResourceListerCollectionDeleter returns the ListerCollectionDeleter of // the given crd. func (r *crdHandler) GetCustomResourceListerCollectionDeleter(crd *apiextensionsv1.CustomResourceDefinition) (finalizer.ListerCollectionDeleter, error) { - info, err := r.getOrCreateServingInfoFor(crd.UID, crd.Name, crd.GetClusterName()) + info, err := r.getOrCreateServingInfoFor(crd) if err != nil { return nil, err } return info.storages[info.storageVersion].CustomResource, nil } -// getOrCreateServingInfoFor gets the CRD serving info for the given CRD UID if the key exists in the storage map. -// Otherwise the function fetches the up-to-date CRD using the given CRD name and creates CRD serving info. -func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name, clusterName string) (*crdInfo, error) { +// getOrCreateServingInfoFor gets the CRD serving info for the given CRD (by its UID) if the key exists in the storage map. +// Otherwise the function creates CRD serving info. +func (r *crdHandler) getOrCreateServingInfoFor(crd *apiextensionsv1.CustomResourceDefinition) (*crdInfo, error) { storageMap := r.customStorage.Load().(crdStorageMap) - if ret, ok := storageMap[uid]; ok { + if ret, ok := storageMap[crd.UID]; ok { return ret, nil } @@ -737,11 +682,11 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name, clusterName // If updateCustomResourceDefinition sees an update and happens later, the storage will be deleted and // we will re-create the updated storage on demand. If updateCustomResourceDefinition happens before, // we make sure that we observe the same up-to-date CRD. - crdKey := name - if clusterName != "" { - crdKey = clusters.ToClusterAwareKey(clusterName, crdKey) + key, err := cache.MetaNamespaceKeyFunc(crd) + if err != nil { + return nil, err } - crd, err := r.crdLister.Get(crdKey) + crd, err = r.crdLister.Get(key) if err != nil { return nil, err } @@ -1578,21 +1523,3 @@ func buildOpenAPIModelsForApply(staticOpenAPISpec *spec.Swagger, crd *apiextensi } return models, nil } -func findCRD(crdName string, crds []*apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, bool) { - var crd *apiextensionsv1.CustomResourceDefinition - - for _, aCRD := range crds { - if aCRD.Name != crdName { - continue - } - if crd == nil { - crd = aCRD - } else { - if !equality.Semantic.DeepEqual(crd.Spec, aCRD.Spec) { - return crd, false - } - } - } - - return crd, true -} From ef48aff30a25d7b77554b20454bca9a3d29549e1 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 6 Dec 2021 16:13:08 -0500 Subject: [PATCH 61/87] HACK: mini aggregator Replace full kube-aggregator with a new mini-aggregator that only includes the generic control plane apiserver and the apiextensions apiserver. Aggregate discovery from generic control plane, apiextensions, and custom resource definitions. Aggregate OpenAPI as best as possible (it's per logical cluster, but doesn't yet support API inheritance). --- pkg/genericcontrolplane/aggregator.go | 300 ------------------ .../aggregator/aggregator.go | 241 ++++++++++++++ pkg/genericcontrolplane/server.go | 125 +++----- 3 files changed, 286 insertions(+), 380 deletions(-) delete mode 100644 pkg/genericcontrolplane/aggregator.go create mode 100644 pkg/genericcontrolplane/aggregator/aggregator.go diff --git a/pkg/genericcontrolplane/aggregator.go b/pkg/genericcontrolplane/aggregator.go deleted file mode 100644 index 6c70408817d33..0000000000000 --- a/pkg/genericcontrolplane/aggregator.go +++ /dev/null @@ -1,300 +0,0 @@ -/* -Copyright 2017 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 app does all of the work necessary to create a Kubernetes -// APIServer by binding together the API, master and APIServer infrastructure. -// It can be configured and called directly or via the hyperkube framework. -package genericcontrolplane - -import ( - "fmt" - "net/http" - "strings" - "sync" - - "k8s.io/klog/v2" - - apiextensionsinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apiserver/pkg/admission" - genericfeatures "k8s.io/apiserver/pkg/features" - genericapiserver "k8s.io/apiserver/pkg/server" - "k8s.io/apiserver/pkg/server/healthz" - genericoptions "k8s.io/apiserver/pkg/server/options" - utilfeature "k8s.io/apiserver/pkg/util/feature" - kubeexternalinformers "k8s.io/client-go/informers" - "k8s.io/client-go/tools/cache" - v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" - v1helper "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/helper" - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" - aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" - aggregatorscheme "k8s.io/kube-aggregator/pkg/apiserver/scheme" - apiregistrationclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1" - informers "k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1" - "k8s.io/kube-aggregator/pkg/controllers/autoregister" - "k8s.io/kubernetes/pkg/controlplane/controller/crdregistration" - "k8s.io/kubernetes/pkg/genericcontrolplane/options" -) - -func createAggregatorConfig( - kubeAPIServerConfig genericapiserver.Config, - commandOptions *options.ServerRunOptions, - externalInformers kubeexternalinformers.SharedInformerFactory, - serviceResolver aggregatorapiserver.ServiceResolver, - proxyTransport *http.Transport, - pluginInitializers []admission.PluginInitializer, -) (*aggregatorapiserver.Config, error) { - // make a shallow copy to let us twiddle a few things - // most of the config actually remains the same. We only need to mess with a couple items related to the particulars of the aggregator - genericConfig := kubeAPIServerConfig - genericConfig.PostStartHooks = map[string]genericapiserver.PostStartHookConfigEntry{} - genericConfig.RESTOptionsGetter = nil - // prevent generic API server from installing the OpenAPI handler. Aggregator server - // has its own customized OpenAPI handler. - genericConfig.SkipOpenAPIInstallation = true - - if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.StorageVersionAPI) && - utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIServerIdentity) { - // Add StorageVersionPrecondition handler to aggregator-apiserver. - // The handler will block write requests to built-in resources until the - // target resources' storage versions are up-to-date. - genericConfig.BuildHandlerChainFunc = genericapiserver.BuildHandlerChainWithStorageVersionPrecondition - } - - // override genericConfig.AdmissionControl with kube-aggregator's scheme, - // because aggregator apiserver should use its own scheme to convert its own resources. - err := commandOptions.Admission.ApplyTo( - &genericConfig, - externalInformers, - genericConfig.LoopbackClientConfig, - utilfeature.DefaultFeatureGate, - pluginInitializers...) - if err != nil { - return nil, err - } - - // copy the etcd options so we don't mutate originals. - etcdOptions := *commandOptions.Etcd - etcdOptions.StorageConfig.Paging = utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIListChunking) - etcdOptions.StorageConfig.Codec = aggregatorscheme.Codecs.LegacyCodec(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion) - etcdOptions.StorageConfig.EncodeVersioner = runtime.NewMultiGroupVersioner(v1.SchemeGroupVersion, schema.GroupKind{Group: v1beta1.GroupName}) - genericConfig.RESTOptionsGetter = &genericoptions.SimpleRestOptionsFactory{Options: etcdOptions} - - // override MergedResourceConfig with aggregator defaults and registry - if err := commandOptions.APIEnablement.ApplyTo( - &genericConfig, - aggregatorapiserver.DefaultAPIResourceConfigSource(), - aggregatorscheme.Scheme); err != nil { - return nil, err - } - - aggregatorConfig := &aggregatorapiserver.Config{ - GenericConfig: &genericapiserver.RecommendedConfig{ - Config: genericConfig, - SharedInformerFactory: externalInformers, - }, - ExtraConfig: aggregatorapiserver.ExtraConfig{ - ProxyClientCertFile: commandOptions.ProxyClientCertFile, - ProxyClientKeyFile: commandOptions.ProxyClientKeyFile, - ServiceResolver: serviceResolver, - ProxyTransport: proxyTransport, - }, - } - - // we need to clear the poststarthooks so we don't add them multiple times to all the servers (that fails) - aggregatorConfig.GenericConfig.PostStartHooks = map[string]genericapiserver.PostStartHookConfigEntry{} - - return aggregatorConfig, nil -} - -func createAggregatorServer(aggregatorConfig *aggregatorapiserver.Config, delegateAPIServer genericapiserver.DelegationTarget, apiExtensionInformers apiextensionsinformers.SharedInformerFactory, id string) (*aggregatorapiserver.APIAggregator, error) { - aggregatorServer, err := aggregatorConfig.Complete().NewWithDelegate(delegateAPIServer) - if err != nil { - return nil, err - } - - // create controllers for auto-registration - apiRegistrationClient, err := apiregistrationclient.NewForConfig(aggregatorConfig.GenericConfig.LoopbackClientConfig) - if err != nil { - return nil, err - } - autoRegistrationController := autoregister.NewAutoRegisterController(aggregatorServer.APIRegistrationInformers.Apiregistration().V1().APIServices(), apiRegistrationClient) - apiServices := apiServicesToRegister(delegateAPIServer, autoRegistrationController, id) - crdRegistrationController := crdregistration.NewCRDRegistrationController( - apiExtensionInformers.Apiextensions().V1().CustomResourceDefinitions(), - autoRegistrationController) - - err = aggregatorServer.GenericAPIServer.AddPostStartHook("kube-apiserver-autoregistration", func(context genericapiserver.PostStartHookContext) error { - go crdRegistrationController.Run(5, context.StopCh) - go func() { - // let the CRD controller process the initial set of CRDs before starting the autoregistration controller. - // this prevents the autoregistration controller's initial sync from deleting APIServices for CRDs that still exist. - // we only need to do this if CRDs are enabled on this server. We can't use discovery because we are the source for discovery. - if aggregatorConfig.GenericConfig.MergedResourceConfig.AnyVersionForGroupEnabled("apiextensions.k8s.io") { - crdRegistrationController.WaitForInitialSync() - } - autoRegistrationController.Run(5, context.StopCh) - }() - return nil - }) - if err != nil { - return nil, err - } - - err = aggregatorServer.GenericAPIServer.AddBootSequenceHealthChecks( - makeAPIServiceAvailableHealthCheck( - "autoregister-completion", - apiServices, - aggregatorServer.APIRegistrationInformers.Apiregistration().V1().APIServices(), - ), - ) - if err != nil { - return nil, err - } - - return aggregatorServer, nil -} - -func makeAPIService(gv schema.GroupVersion, id string) *v1.APIService { - apiServicePriority, ok := apiVersionPriorities[gv] - if !ok { - // if we aren't found, then we shouldn't register ourselves because it could result in a CRD group version - // being permanently stuck in the APIServices list. - klog.Infof("Skipping APIService creation for %v", gv) - return nil - } - cluster := SanitizedClusterName(id, RootClusterName) - return &v1.APIService{ - ObjectMeta: metav1.ObjectMeta{ - Name: gv.Version + "." + gv.Group, - ClusterName: cluster, - }, - Spec: v1.APIServiceSpec{ - Group: gv.Group, - Version: gv.Version, - GroupPriorityMinimum: apiServicePriority.group, - VersionPriority: apiServicePriority.version, - }, - } -} - -// makeAPIServiceAvailableHealthCheck returns a healthz check that returns healthy -// once all of the specified services have been observed to be available at least once. -func makeAPIServiceAvailableHealthCheck(name string, apiServices []*v1.APIService, apiServiceInformer informers.APIServiceInformer) healthz.HealthChecker { - // Track the auto-registered API services that have not been observed to be available yet - pendingServiceNamesLock := &sync.RWMutex{} - pendingServiceNames := sets.NewString() - for _, service := range apiServices { - pendingServiceNames.Insert(service.Name) - } - - // When an APIService in the list is seen as available, remove it from the pending list - handleAPIServiceChange := func(service *v1.APIService) { - pendingServiceNamesLock.Lock() - defer pendingServiceNamesLock.Unlock() - if !pendingServiceNames.Has(service.Name) { - return - } - if v1helper.IsAPIServiceConditionTrue(service, v1.Available) { - pendingServiceNames.Delete(service.Name) - } - } - - // Watch add/update events for APIServices - apiServiceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { handleAPIServiceChange(obj.(*v1.APIService)) }, - UpdateFunc: func(old, new interface{}) { handleAPIServiceChange(new.(*v1.APIService)) }, - }) - - // Don't return healthy until the pending list is empty - return healthz.NamedCheck(name, func(r *http.Request) error { - pendingServiceNamesLock.RLock() - defer pendingServiceNamesLock.RUnlock() - if pendingServiceNames.Len() > 0 { - return fmt.Errorf("missing APIService: %v", pendingServiceNames.List()) - } - return nil - }) -} - -// priority defines group priority that is used in discovery. This controls -// group position in the kubectl output. -type priority struct { - // group indicates the order of the group relative to other groups. - group int32 - // version indicates the relative order of the version inside of its group. - version int32 -} - -// The proper way to resolve this letting the aggregator know the desired group and version-within-group order of the underlying servers -// is to refactor the genericapiserver.DelegationTarget to include a list of priorities based on which APIs were installed. -// This requires the APIGroupInfo struct to evolve and include the concept of priorities and to avoid mistakes, the core storage map there needs to be updated. -// That ripples out every bit as far as you'd expect, so for 1.7 we'll include the list here instead of being built up during storage. -var apiVersionPriorities = map[schema.GroupVersion]priority{ - {Group: "", Version: "v1"}: {group: 18000, version: 1}, - // to my knowledge, nothing below here collides - {Group: "events.k8s.io", Version: "v1"}: {group: 17750, version: 15}, - {Group: "events.k8s.io", Version: "v1beta1"}: {group: 17750, version: 5}, - {Group: "authentication.k8s.io", Version: "v1"}: {group: 17700, version: 15}, - {Group: "authentication.k8s.io", Version: "v1beta1"}: {group: 17700, version: 9}, - {Group: "authorization.k8s.io", Version: "v1"}: {group: 17600, version: 15}, - {Group: "authorization.k8s.io", Version: "v1beta1"}: {group: 17600, version: 9}, - {Group: "certificates.k8s.io", Version: "v1"}: {group: 17300, version: 15}, - {Group: "certificates.k8s.io", Version: "v1beta1"}: {group: 17300, version: 9}, - {Group: "extensions", Version: "v1beta1"}: {group: 17150, version: 1}, // prioritize below networking.k8s.io, which contains the GA version of Ingress, the only resource remaining in extensions/v1beta1 - {Group: "rbac.authorization.k8s.io", Version: "v1"}: {group: 17000, version: 15}, - {Group: "rbac.authorization.k8s.io", Version: "v1beta1"}: {group: 17000, version: 12}, - {Group: "rbac.authorization.k8s.io", Version: "v1alpha1"}: {group: 17000, version: 9}, - {Group: "apiextensions.k8s.io", Version: "v1"}: {group: 16700, version: 15}, - {Group: "coordination.k8s.io", Version: "v1"}: {group: 16500, version: 15}, - {Group: "coordination.k8s.io", Version: "v1beta1"}: {group: 16500, version: 9}, - {Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"}: {group: 16100, version: 12}, - {Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16100, version: 9}, -} - -func apiServicesToRegister(delegateAPIServer genericapiserver.DelegationTarget, registration autoregister.AutoAPIServiceRegistration, id string) []*v1.APIService { - apiServices := []*v1.APIService{} - - for _, curr := range delegateAPIServer.ListedPaths("") { - if curr == "/api/v1" { - apiService := makeAPIService(schema.GroupVersion{Group: "", Version: "v1"}, id) - registration.AddAPIServiceToSyncOnStart(apiService) - apiServices = append(apiServices, apiService) - continue - } - - if !strings.HasPrefix(curr, "/apis/") { - continue - } - // this comes back in a list that looks like /apis/rbac.authorization.k8s.io/v1alpha1 - tokens := strings.Split(curr, "/") - if len(tokens) != 4 { - continue - } - - apiService := makeAPIService(schema.GroupVersion{Group: tokens[2], Version: tokens[3]}, id) - if apiService == nil { - continue - } - registration.AddAPIServiceToSyncOnStart(apiService) - apiServices = append(apiServices, apiService) - } - - return apiServices -} diff --git a/pkg/genericcontrolplane/aggregator/aggregator.go b/pkg/genericcontrolplane/aggregator/aggregator.go new file mode 100644 index 0000000000000..d999d2782f4c6 --- /dev/null +++ b/pkg/genericcontrolplane/aggregator/aggregator.go @@ -0,0 +1,241 @@ +/* +Copyright 2017 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 aggregator contains a server that aggregates content from a generic control +// plane server, apiextensions server, and CustomResourceDefinitions. +package aggregator + +import ( + "fmt" + "net/http" + + "github.com/emicklei/go-restful" + apiextensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" + "k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" + "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + genericapiserver "k8s.io/apiserver/pkg/server" + clientgoinformers "k8s.io/client-go/informers" + "k8s.io/klog/v2" + "k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator" + "k8s.io/kube-openapi/pkg/handler" + "k8s.io/kubernetes/pkg/genericcontrolplane/apis" +) + +var ( + // DiscoveryScheme defines methods for serializing and deserializing API objects. + DiscoveryScheme = runtime.NewScheme() + + // DiscoveryCodecs provides methods for retrieving codecs and serializers for specific + // versions and content types. + DiscoveryCodecs = serializer.NewCodecFactory(DiscoveryScheme) +) + +func init() { + // we need to add the options to empty v1 + // TODO fix the server code to avoid this + metav1.AddToGroupVersion(DiscoveryScheme, schema.GroupVersion{Version: "v1"}) + + // TODO: keep the generic API server from wanting this + unversioned := schema.GroupVersion{Group: "", Version: "v1"} + DiscoveryScheme.AddUnversionedTypes(unversioned, + &metav1.Status{}, + &metav1.APIVersions{}, + &metav1.APIGroupList{}, + &metav1.APIGroup{}, + &metav1.APIResourceList{}, + ) +} + +// MiniAggregatorConfig contains configuration settings for the mini aggregator. +type MiniAggregatorConfig struct { + GenericConfig *genericapiserver.Config +} + +// completedMiniAggregatorConfig contains completed configuration settings for +// the mini aggregator. Any fields not filled in by the user that are required +// to have valid data are defaulted. This struct is private and ultimately +// embedded in CompletedMiniAggregatorConfig to require the user to invoke +// Complete() prior to being able to instantiate a MiniAggregatorServer. +type completedMiniAggregatorConfig struct { + GenericConfig genericapiserver.CompletedConfig +} + +// CompletedMiniAggregatorConfig contains completed configuration settings for +// the mini aggregator. Any fields not filled in by the user that are required +// to have valid data are defaulted. +type CompletedMiniAggregatorConfig struct { + *completedMiniAggregatorConfig +} + +// MiniAggregatorServer sits in front of the GenericControlPlane and +// CustomResourceDefinitions servers and aggregates them. +type MiniAggregatorServer struct { + // GenericAPIServer is the aggregator's server. + GenericAPIServer *genericapiserver.GenericAPIServer + // GenericControlPlane is the server for the minimal control plane. It serves + // APIs such as core v1, certificates.k8s.io, RBAC, etc. + GenericControlPlane *apis.GenericControlPlane + // CustomResourceDefinitions is the server for API extensions. + CustomResourceDefinitions *apiextensionsapiserver.CustomResourceDefinitions +} + +// Complete fills in any fields not set that are required to have valid data. +// It's mutating the receiver. +func (cfg *MiniAggregatorConfig) Complete(kubeInformers clientgoinformers.SharedInformerFactory) CompletedMiniAggregatorConfig { + // make a shallow copy to let us twiddle a few things + // most of the config actually remains the same. + cfgCopy := cfg + + // CRITICAL: to be able to provide our own /openapi/v2 implementation that aggregates + // content from multiple servers, we *must* skip OpenAPI installation. Otherwise, + // when PrepareRun() is invoked, it will register a handler for /openapi/v2, + // replacing the aggregator's handler. + cfgCopy.GenericConfig.SkipOpenAPIInstallation = true + + c := completedMiniAggregatorConfig{ + GenericConfig: cfgCopy.GenericConfig.Complete(kubeInformers), + } + + return CompletedMiniAggregatorConfig{ + completedMiniAggregatorConfig: &c, + } +} + +// New creates a new MiniAggregatorServer. +func (c completedMiniAggregatorConfig) New( + delegationTarget genericapiserver.DelegationTarget, + genericControlPlane *apis.GenericControlPlane, + crds *apiextensionsapiserver.CustomResourceDefinitions, +) (*MiniAggregatorServer, error) { + genericServer, err := c.GenericConfig.New("mini-aggregator", delegationTarget) + if err != nil { + return nil, err + } + + s := &MiniAggregatorServer{ + GenericAPIServer: genericServer, + GenericControlPlane: genericControlPlane, + CustomResourceDefinitions: crds, + } + + // Have to do this as a filter because of how the APIServerHandler.Director serves requests. + s.GenericAPIServer.Handler.GoRestfulContainer.Filter(s.filterAPIsRequest) + + s.GenericAPIServer.Handler.NonGoRestfulMux.HandleFunc("/openapi/v2", s.serveOpenAPI) + + return s, nil +} + +// filterAPIsRequest checks if the request is for /apis, and if so, it aggregates group discovery +// for the generic control plane server, apiextensions server (which provides the apiextensions.k8s.io group), +// and the CRDs themselves. +func (s *MiniAggregatorServer) filterAPIsRequest(req *restful.Request, resp *restful.Response, chain *restful.FilterChain) { + if req.Request.URL.Path != "/apis" && req.Request.URL.Path != "/apis/" { + chain.ProcessFilter(req, resp) + return + } + + // Discovery for things like core, authentication, authorization, certificates, ... + gcpGroups, err := s.GenericControlPlane.GenericAPIServer.DiscoveryGroupManager.Groups(req.Request.Context(), req.Request) + if err != nil { + http.Error(resp.ResponseWriter, fmt.Sprintf("error retrieving generic control plane discovery groups: %v", err), http.StatusInternalServerError) + } + + // Discovery for the apiextensions group itself + apiextensionsGroups, err := s.CustomResourceDefinitions.GenericAPIServer.DiscoveryGroupManager.Groups(req.Request.Context(), req.Request) + if err != nil { + http.Error(resp.ResponseWriter, fmt.Sprintf("error retrieving apiextensions discovery groups: %v", err), http.StatusInternalServerError) + } + + // Discovery for all the groups contributed by CRDs + crdGroups, err := s.CustomResourceDefinitions.DiscoveryGroupLister.Groups(req.Request.Context(), req.Request) + if err != nil { + http.Error(resp.ResponseWriter, fmt.Sprintf("error retrieving custom resource discovery groups: %v", err), http.StatusInternalServerError) + } + + // Combine the slices using copy - more efficient than append + combined := make([]metav1.APIGroup, len(gcpGroups)+len(apiextensionsGroups)+len(crdGroups)) + var i int + i += copy(combined[i:], gcpGroups) + i += copy(combined[i:], apiextensionsGroups) + i += copy(combined[i:], crdGroups) + + responsewriters.WriteObjectNegotiated(DiscoveryCodecs, negotiation.DefaultEndpointRestrictions, schema.GroupVersion{}, resp.ResponseWriter, req.Request, http.StatusOK, &metav1.APIGroupList{Groups: combined}) +} + +// serveOpenAPI aggregates OpenAPI specs from the generic control plane and apiextensions servers. +func (s *MiniAggregatorServer) serveOpenAPI(w http.ResponseWriter, req *http.Request) { + downloader := aggregator.NewDownloader() + + cluster := genericapirequest.ClusterFrom(req.Context()) + + withCluster := func(handler http.Handler) http.HandlerFunc { + return func(res http.ResponseWriter, req *http.Request) { + if cluster != nil { + req = req.Clone(genericapirequest.WithCluster(req.Context(), *cluster)) + } + handler.ServeHTTP(res, req) + } + } + + // Can't use withCluster here because the GenericControlPlane doesn't have APIs coming from multiple logical clusters at this time. + controlPlaneSpec, _, _, err := downloader.Download(s.GenericControlPlane.GenericAPIServer.Handler.Director, "") + + // Use withCluster here because each logical cluster can have a distinct set of APIs coming from its CRDs. + crdSpecs, _, _, err := downloader.Download(withCluster(s.CustomResourceDefinitions.GenericAPIServer.Handler.Director), "") + + // TODO(ncdc): merging on the fly is expensive. We may need to optimize this (e.g. caching). + mergedSpecs, err := builder.MergeSpecs(controlPlaneSpec, crdSpecs) + + openAPIVersionedService, err := handler.NewOpenAPIService(mergedSpecs) + if err != nil { + klog.Errorf("Error while building OpenAPI schema: %v", err) + } + + handler := &singlePathHandler{} + + // In order to reuse the kube-openapi API as much as possible, we + // register the OpenAPI service in the singlePathHandler + err = openAPIVersionedService.RegisterOpenAPIVersionedService("/openapi/v2", handler) + if err != nil { + klog.Errorf("Error while building OpenAPI schema: %v", err) + } + + handler.ServeHTTP(w, req) +} + +// singlePathHandler is a dummy PathHandler that mainly allows grabbing a http.Handler +// from a PathHandler consumer and then being able to use the http.Handler +// to serve a request. +type singlePathHandler struct { + handler [1]http.Handler +} + +func (sph *singlePathHandler) Handle(path string, handler http.Handler) { + sph.handler[0] = handler +} +func (sph *singlePathHandler) ServeHTTP(res http.ResponseWriter, req *http.Request) { + if sph.handler[0] == nil { + res.WriteHeader(404) + } + sph.handler[0].ServeHTTP(res, req) +} diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 3795633320753..79fdcecb069ce 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -21,26 +21,25 @@ package genericcontrolplane import ( "fmt" - "net/http" "os" "regexp" "strings" "time" "github.com/emicklei/go-restful" + apiextensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" - "k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/authorization/union" "k8s.io/apiserver/pkg/endpoints/discovery" openapinamer "k8s.io/apiserver/pkg/endpoints/openapi" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" genericfeatures "k8s.io/apiserver/pkg/features" genericapiserver "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/filters" serverstorage "k8s.io/apiserver/pkg/server/storage" + "k8s.io/apiserver/pkg/util/feature" utilfeature "k8s.io/apiserver/pkg/util/feature" utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" "k8s.io/apiserver/pkg/util/webhook" @@ -50,10 +49,9 @@ import ( "k8s.io/component-base/version" "k8s.io/klog/v2" aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" - "k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator" - "k8s.io/kube-openapi/pkg/handler" "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" + "k8s.io/kubernetes/pkg/genericcontrolplane/aggregator" "k8s.io/kubernetes/pkg/genericcontrolplane/apis" "k8s.io/kubernetes/pkg/genericcontrolplane/clientutils" "k8s.io/kubernetes/pkg/genericcontrolplane/options" @@ -97,25 +95,43 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro // To help debugging, immediately log version klog.Infof("Version: %+v", version.Get()) - server, err := CreateServerChain(completeOptions, stopCh) + serverChain, err := CreateServerChain(completeOptions, stopCh) if err != nil { return err } + server := serverChain.MiniAggregator.GenericAPIServer prepared := server.PrepareRun() return prepared.Run(stopCh) } +type ServerChain struct { + CustomResourceDefinitions *apiextensionsapiserver.CustomResourceDefinitions + GenericControlPlane *apis.GenericControlPlane + MiniAggregator *aggregator.MiniAggregatorServer +} + // CreateServerChain creates the apiservers connected via delegation. -func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan struct{}) (*genericapiserver.GenericAPIServer, error) { +func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan struct{}) (*ServerChain, error) { kubeAPIServerConfig, serviceResolver, pluginInitializer, err := CreateKubeAPIServerConfig(completedOptions) if err != nil { return nil, err } // If additional API servers are added, they should be gated. - apiExtensionsConfig, err := createAPIExtensionsConfig(*kubeAPIServerConfig.GenericConfig, kubeAPIServerConfig.ExtraConfig.VersionedInformers, pluginInitializer, completedOptions.ServerRunOptions, - serviceResolver, webhook.NewDefaultAuthenticationInfoResolverWrapper(nil, kubeAPIServerConfig.GenericConfig.EgressSelector, kubeAPIServerConfig.GenericConfig.LoopbackClientConfig, kubeAPIServerConfig.GenericConfig.TracerProvider)) + apiExtensionsConfig, err := createAPIExtensionsConfig( + *kubeAPIServerConfig.GenericConfig, + kubeAPIServerConfig.ExtraConfig.VersionedInformers, + pluginInitializer, + completedOptions.ServerRunOptions, + serviceResolver, + webhook.NewDefaultAuthenticationInfoResolverWrapper( + nil, + kubeAPIServerConfig.GenericConfig.EgressSelector, + kubeAPIServerConfig.GenericConfig.LoopbackClientConfig, + kubeAPIServerConfig.GenericConfig.TracerProvider, + ), + ) if err != nil { return nil, fmt.Errorf("configure api extensions: %v", err) } @@ -129,17 +145,6 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan return nil, err } - // aggregator comes last in the chain - aggregatorConfig, err := createAggregatorConfig(*kubeAPIServerConfig.GenericConfig, completedOptions.ServerRunOptions, kubeAPIServerConfig.ExtraConfig.VersionedInformers, serviceResolver, nil, pluginInitializer) - if err != nil { - return nil, err - } - aggregatorServer, err := createAggregatorServer(aggregatorConfig, kubeAPIServer.GenericAPIServer, apiExtensionsServer.Informers, kubeAPIServer.GenericAPIServer.ExternalAddress) - if err != nil { - // we don't need special handling for innerStopCh because the aggregator server doesn't create any go routines - return nil, err - } - // HACK: support the case when we can add core or other legacy scheme resources through CRDs (KCP scenario) // In such a case, the request should be processed by the CRD handler // (registered in the apiExtensionsServer NonGoRestfulMux handler) @@ -152,69 +157,29 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan } }) - // HACK: we don't use the OpenAPI Aggregator of the aggretorServer anymore (only the agregator generic server is prepared) - // because the openAPI Agregator isn't compatible with CRD tenancy. - // So instead, at the same path, we register our own handler that mainly returns the right merged openAPI schema - // based on the logical cluster based on the incoming request. - downloader := aggregator.NewDownloader() - aggregatorServer.GenericAPIServer.Handler.NonGoRestfulMux.HandleFunc("/openapi/v2", func(res http.ResponseWriter, req *http.Request) { - req = req.Clone(req.Context()) - req.URL.Path = "/openapi/v2" - req.URL.RawPath = req.URL.Path - - cluster := genericapirequest.ClusterFrom(req.Context()) - - withCluster := func(handler http.Handler) http.HandlerFunc { - return func(res http.ResponseWriter, req *http.Request) { - if cluster != nil { - req = req.Clone(genericapirequest.WithCluster(req.Context(), *cluster)) - } - handler.ServeHTTP(res, req) - } - } - - // DAVID TODO: try to understand why adding the cluster returns nil here. The default openAPIService should work - controlPlaneSpec, _, _, err := downloader.Download(kubeAPIServer.GenericAPIServer.Handler.Director, "") - - crdSpecs, _, _, err := downloader.Download(withCluster(apiExtensionsServer.GenericAPIServer.Handler.Director), "") - - mergedSpecs, err := builder.MergeSpecs(controlPlaneSpec, crdSpecs) - - openAPIVersionedService, err := handler.NewOpenAPIService(mergedSpecs) - if err != nil { - klog.Errorf("Error while building OpenAPI schema: %v", err) - } - - handler := &singlePathHandler{} - - // In order to reuse the kube-openapi API as much as possible, we - // register the OpenAPI service in the singlePathHandler - err = openAPIVersionedService.RegisterOpenAPIVersionedService("/openapi/v2", handler) - if err != nil { - klog.Errorf("Error while building OpenAPI schema: %v", err) - } - - handler.ServeHTTP(res, req) - }) - - return aggregatorServer.GenericAPIServer, nil -} + miniAggregatorConfig := &aggregator.MiniAggregatorConfig{ + GenericConfig: kubeAPIServerConfig.GenericConfig, + } -// singlePathHandler is a dummy PathHandler that mainly allows grabbing a http.Handler -// from a PathHandler consumer and then being able to use the http.Handler -// to serve a request. -type singlePathHandler struct { - handler [1]http.Handler -} + if err := completedOptions.ServerRunOptions.Admission.ApplyTo( + kubeAPIServerConfig.GenericConfig, + kubeAPIServerConfig.ExtraConfig.VersionedInformers, + kubeAPIServerConfig.GenericConfig.LoopbackClientConfig, + feature.DefaultFeatureGate, + pluginInitializer...); err != nil { + return nil, err + } -func (sph *singlePathHandler) Handle(path string, handler http.Handler) { - sph.handler[0] = handler -} -func (sph *singlePathHandler) ServeHTTP(res http.ResponseWriter, req *http.Request) { - if sph.handler[0] == nil { - res.WriteHeader(404) + miniAggregatorServer, err := miniAggregatorConfig.Complete(kubeAPIServerConfig.ExtraConfig.VersionedInformers).New(kubeAPIServer.GenericAPIServer, kubeAPIServer, apiExtensionsServer) + if err != nil { + return nil, err } - sph.handler[0].ServeHTTP(res, req) + + return &ServerChain{ + CustomResourceDefinitions: apiExtensionsServer, + GenericControlPlane: kubeAPIServer, + MiniAggregator: miniAggregatorServer, + }, nil } // CreateKubeAPIServer creates and wires a workable kube-apiserver From 850db6ff8edefe8e0d4550c7f46ed451ee1bf07d Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Tue, 7 Dec 2021 15:15:26 -0500 Subject: [PATCH 62/87] UNDO: contributed resources version hack This is now handled in kcp --- pkg/genericcontrolplane/server.go | 14 -- .../pkg/endpoints/discovery/version.go | 11 +- .../pkg/endpoints/discovery/version_hack.go | 123 ------------------ 3 files changed, 5 insertions(+), 143 deletions(-) delete mode 100644 staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 79fdcecb069ce..354875c82d0ac 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -26,14 +26,12 @@ import ( "strings" "time" - "github.com/emicklei/go-restful" apiextensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/authorization/union" - "k8s.io/apiserver/pkg/endpoints/discovery" openapinamer "k8s.io/apiserver/pkg/endpoints/openapi" genericfeatures "k8s.io/apiserver/pkg/features" genericapiserver "k8s.io/apiserver/pkg/server" @@ -145,18 +143,6 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan return nil, err } - // HACK: support the case when we can add core or other legacy scheme resources through CRDs (KCP scenario) - // In such a case, the request should be processed by the CRD handler - // (registered in the apiExtensionsServer NonGoRestfulMux handler) - // and not by the main KubeAPIServer. - kubeAPIServer.GenericAPIServer.Handler.GoRestfulContainer.Filter(func(req *restful.Request, res *restful.Response, chain *restful.FilterChain) { - if discovery.IsAPIContributed(req.Request.URL.Path) { - apiExtensionsServer.GenericAPIServer.Handler.NonGoRestfulMux.ServeHTTP(res.ResponseWriter, req.Request) - } else { - chain.ProcessFilter(req, res) - } - }) - miniAggregatorConfig := &aggregator.MiniAggregatorConfig{ GenericConfig: kubeAPIServerConfig.GenericConfig, } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go index e18f0a259192d..0976041bff0e0 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version.go @@ -44,7 +44,7 @@ type APIVersionHandler struct { serializer runtime.NegotiatedSerializer groupVersion schema.GroupVersion - apiResourceLister func(*http.Request) APIResourceLister + apiResourceLister APIResourceLister } func NewAPIVersionHandler(serializer runtime.NegotiatedSerializer, groupVersion schema.GroupVersion, apiResourceLister APIResourceLister) *APIVersionHandler { @@ -56,10 +56,9 @@ func NewAPIVersionHandler(serializer runtime.NegotiatedSerializer, groupVersion } return &APIVersionHandler{ - serializer: serializer, - groupVersion: groupVersion, - // HACK: support the case when we can add core or other legacy scheme resources through CRDs (KCP scenario) - apiResourceLister: withContributedResources(groupVersion, apiResourceLister), + serializer: serializer, + groupVersion: groupVersion, + apiResourceLister: apiResourceLister, } } @@ -80,5 +79,5 @@ func (s *APIVersionHandler) handle(req *restful.Request, resp *restful.Response) func (s *APIVersionHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { responsewriters.WriteObjectNegotiated(s.serializer, negotiation.DefaultEndpointRestrictions, schema.GroupVersion{}, w, req, http.StatusOK, - &metav1.APIResourceList{GroupVersion: s.groupVersion.String(), APIResources: s.apiResourceLister(req).ListAPIResources()}) + &metav1.APIResourceList{GroupVersion: s.groupVersion.String(), APIResources: s.apiResourceLister.ListAPIResources()}) } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go b/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go deleted file mode 100644 index f702b6c8f45be..0000000000000 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/version_hack.go +++ /dev/null @@ -1,123 +0,0 @@ -/* -Copyright 2017 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 discovery - -import ( - "net/http" - "regexp" - "sort" - "strings" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" -) - -// HACK: support the case when we can add core or other legacy scheme resources through CRDs (KCP scenario) -// Possibly we wouldn't need a global variable for ContributedResources that is cluster scoped, -// In the long run we could see the context carrying an injected interface that would let us perform -// some of these cluster scoped behaviors (where we would call methods on it instead of having lots of little caches everywhere). -// Finally with more refactoring we might also just want to skip having the cache and do it dynamically. -var ContributedResources map[ClusterGroupVersion]APIResourceLister = map[ClusterGroupVersion]APIResourceLister{} - -type ClusterGroupVersion struct { - ClusterName string - Group string - Version string -} - -// Empty returns true if group and version are empty -func (cgv ClusterGroupVersion) Empty() bool { - return len(cgv.Group) == 0 && len(cgv.Version) == 0 -} - -// String puts "group" and "version" into a single "group/version" string. For the legacy v1 -// it returns "v1". -func (cgv ClusterGroupVersion) String() string { - // special case the internal apiVersion for the legacy kube types - if cgv.Empty() { - return "" - } - - gv := cgv.Group + "/" + cgv.Version - // special case of "v1" for backward compatibility - if len(cgv.Group) == 0 && cgv.Version == "v1" { - gv = cgv.Version - } - result := gv - if cgv.ClusterName != "" { - result = cgv.ClusterName + "/" + gv - } - return result -} - -func (cgv ClusterGroupVersion) GroupVersion() schema.GroupVersion { - return schema.GroupVersion{ - Group: cgv.Group, - Version: cgv.Version, - } -} - -func withContributedResources(groupVersion schema.GroupVersion, apiResourceLister APIResourceLister) func(*http.Request) APIResourceLister { - return func(req *http.Request) APIResourceLister { - cluster := genericapirequest.ClusterFrom(req.Context()) - return APIResourceListerFunc(func() []metav1.APIResource { - result := []metav1.APIResource{} - result = append(result, apiResourceLister.ListAPIResources()...) - if cluster != nil { - if additionalResources := ContributedResources[ClusterGroupVersion{ - ClusterName: cluster.Name, - Group: groupVersion.Group, - Version: groupVersion.Version}]; additionalResources != nil { - result = append(result, additionalResources.ListAPIResources()...) - } - sort.Slice(result, func(i, j int) bool { - return result[i].Name < result[j].Name - }) - } - return result - }) - } -} - -// IsAPIContributed returns `true` is the path corresponds to a resource that -// has been contribued to a legacy scheme group from a CRD. -func IsAPIContributed(path string) bool { - for gv, resourceLister := range ContributedResources { - prefix := gv.Group - if prefix != "" { - prefix = "/apis/" + prefix + "/" + gv.Version + "/" - } else { - prefix = "/api/" + gv.Version + "/" - } - if !strings.HasPrefix(path, prefix) { - continue - } - - for _, resource := range resourceLister.ListAPIResources() { - if strings.HasPrefix(path, prefix+resource.Name) { - return true - } - if resource.Namespaced { - if matched, _ := regexp.MatchString(prefix+"namespaces/[^/][^/]*/"+resource.Name+"(/[^/].*)?", path); matched { - return true - } - } - } - } - return false -} From e3751b9ac839aeaa4491dee7c597885e539b89ab Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Tue, 7 Dec 2021 15:18:08 -0500 Subject: [PATCH 63/87] HACK: CRD discovery fixes Tease APIResourcesForGroupVersion function out of versionDiscoveryHandler.ServeHTTP so it can be used by kcp when aggregating built in /api/v1 discovery data with CRDs in /api/v1. Fix issue where the core API group was being included in CRD group discovery - this led to a bug where kubectl tried to download /api/v1 discovery twice, and that broke the client-side RESTMapper (because it saw each resource twice). --- .../pkg/apiserver/customresource_discovery.go | 80 +++++++------------ 1 file changed, 27 insertions(+), 53 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go index ddb75d5af439a..d795c237388ce 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery.go @@ -46,8 +46,6 @@ func (r *versionDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Req return } - apiResourcesForDiscovery := []metav1.APIResource{} - ctx := req.Context() requestedGroup := pathParts[1] @@ -58,8 +56,19 @@ func (r *versionDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Req http.Error(w, err.Error(), http.StatusInternalServerError) return } - foundVersion := false - foundGroup := false + + apiResources := APIResourcesForGroupVersion(requestedGroup, requestedVersion, crds) + + resourceListerFunc := discovery.APIResourceListerFunc(func() []metav1.APIResource { + return apiResources + }) + + discovery.NewAPIVersionHandler(Codecs, schema.GroupVersion{Group: requestedGroup, Version: requestedVersion}, resourceListerFunc).ServeHTTP(w, req) +} + +func APIResourcesForGroupVersion(requestedGroup, requestedVersion string, crds []*apiextensionsv1.CustomResourceDefinition) []metav1.APIResource { + apiResourcesForDiscovery := []metav1.APIResource{} + for _, crd := range crds { if requestedGroup != crd.Spec.Group { continue @@ -69,14 +78,16 @@ func (r *versionDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Req continue } - foundRequestedVersion := false - var storageVersionHash string + var ( + storageVersionHash string + subresources *apiextensionsv1.CustomResourceSubresources + foundVersion = false + ) + for _, v := range crd.Spec.Versions { if !v.Served { continue } - // If there is any Served version, that means the group should show up in discovery - foundGroup = true // HACK: support the case when we add core resources through CRDs (KCP scenario) groupVersion := crd.Spec.Group + "/" + v.Name @@ -87,18 +98,18 @@ func (r *versionDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Req gv := metav1.GroupVersion{Group: groupVersion, Version: v.Name} if v.Name == requestedVersion { - foundRequestedVersion = true + foundVersion = true + subresources = v.Subresources } if v.Storage { storageVersionHash = discovery.StorageVersionHash(crd.ClusterName, gv.Group, gv.Version, crd.Spec.Names.Kind) } } - if !foundRequestedVersion { + if !foundVersion { // This CRD doesn't have the requested version continue } - foundVersion = true verbs := metav1.Verbs([]string{"delete", "deletecollection", "get", "list", "patch", "create", "update", "watch"}) // if we're terminating we don't allow some verbs @@ -117,11 +128,6 @@ func (r *versionDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Req StorageVersionHash: storageVersionHash, }) - subresources, err := apiextensionshelpers.GetSubresourcesForVersion(crd, requestedVersion) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } if subresources != nil && subresources.Status != nil { apiResourcesForDiscovery = append(apiResourcesForDiscovery, metav1.APIResource{ Name: crd.Status.AcceptedNames.Plural + "/status", @@ -143,28 +149,7 @@ func (r *versionDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Req } } - resourceListerFunc := discovery.APIResourceListerFunc(func() []metav1.APIResource { - return apiResourcesForDiscovery - }) - - // HACK: if we are adding resources in legacy scheme group through CRDs (KCP scenario) - // then do not expose the CRD `APIResource`s in their own CRD-related group`, - // But instead add them in the existing legacy schema group - // if genericcontrolplanescheme.Scheme.IsGroupRegistered(clusterGroupVersion.Group) { - // if !foundGroup || !foundVersion { - // delete(discovery.ContributedResources, clusterGroupVersion) - // } - - // discovery.ContributedResources[clusterGroupVersion] = resourceListerFunc - // return nil - // } - - if !foundGroup || !foundVersion { - r.delegate.ServeHTTP(w, req) - return - } - - discovery.NewAPIVersionHandler(Codecs, schema.GroupVersion{Group: requestedGroup, Version: requestedVersion}, resourceListerFunc).ServeHTTP(w, req) + return apiResourcesForDiscovery } type groupDiscoveryHandler struct { @@ -229,18 +214,6 @@ func (r *groupDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Reque sortGroupDiscoveryByKubeAwareVersion(apiVersionsForDiscovery) - // HACK: if we are adding resources in legacy scheme group through CRDs (KCP scenario) - // then do not expose the CRD `APIResource`s in their own CRD-related group`, - // But instead add them in the existing legacy schema group - // if genericcontrolplanescheme.Scheme.IsGroupRegistered(clusterGroupVersion.Group) { - // if !foundGroup || !foundVersion { - // delete(discovery.ContributedResources, clusterGroupVersion) - // } - - // discovery.ContributedResources[clusterGroupVersion] = resourceListerFunc - // return nil - // } - if !foundGroup { r.delegate.ServeHTTP(w, req) return @@ -280,11 +253,12 @@ func (r *rootDiscoveryHandler) Groups(ctx context.Context, req *http.Request) ([ continue } - // HACK: support the case when we add core resources through CRDs (KCP scenario) - groupVersion := crd.Spec.Group + "/" + v.Name if crd.Spec.Group == "" { - groupVersion = v.Name + // Don't include CRDs in the core ("") group in /apis discovery. They + // instead are in /api/v1 handled elsewhere. + continue } + groupVersion := crd.Spec.Group + "/" + v.Name gv := metav1.GroupVersion{Group: crd.Spec.Group, Version: v.Name} From 0f1328a715e2f25f59a4f80f669f39faea86e877 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 13 Dec 2021 14:41:27 -0500 Subject: [PATCH 64/87] HACK: fix conversionLister As part of the updated Lister interface methods, fix the hand-written conversionLister to conform to the updated interface. Signed-off-by: Andy Goldstein --- pkg/controller/replication/conversion.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/controller/replication/conversion.go b/pkg/controller/replication/conversion.go index 57eb2555468e9..6a298ebfe900d 100644 --- a/pkg/controller/replication/conversion.go +++ b/pkg/controller/replication/conversion.go @@ -82,6 +82,10 @@ type conversionLister struct { } func (l conversionLister) List(selector labels.Selector) ([]*apps.ReplicaSet, error) { + return l.ListWithContext(context.Background(), selector) +} + +func (l conversionLister) ListWithContext(ctx context.Context, selector labels.Selector) ([]*apps.ReplicaSet, error) { rcList, err := l.rcLister.List(selector) if err != nil { return nil, err From fc12ad6d16f801f7dfdb03e2daa708cf10aa4c9e Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 13 Dec 2021 14:50:03 -0500 Subject: [PATCH 65/87] UNDO: lcluster support for crdRegistrationController Signed-off-by: Andy Goldstein --- .../crdregistration_controller.go | 41 ++++++++----------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/pkg/controlplane/controller/crdregistration/crdregistration_controller.go b/pkg/controlplane/controller/crdregistration/crdregistration_controller.go index b9663f28eb9c1..0636a0ca2d794 100644 --- a/pkg/controlplane/controller/crdregistration/crdregistration_controller.go +++ b/pkg/controlplane/controller/crdregistration/crdregistration_controller.go @@ -20,7 +20,6 @@ import ( "fmt" "time" - "k8s.io/apiserver/pkg/endpoints/discovery" "k8s.io/klog/v2" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -28,10 +27,10 @@ import ( crdlisters "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/cache" - "k8s.io/client-go/tools/clusters" "k8s.io/client-go/util/workqueue" v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" ) @@ -51,7 +50,7 @@ type crdRegistrationController struct { apiServiceRegistration AutoAPIServiceRegistration - syncHandler func(clusterGroupVersion discovery.ClusterGroupVersion) error + syncHandler func(groupVersion schema.GroupVersion) error syncedInitialSet chan struct{} @@ -123,10 +122,9 @@ func (c *crdRegistrationController) Run(workers int, stopCh <-chan struct{}) { } else { for _, crd := range crds { for _, version := range crd.Spec.Versions { - if err := c.syncHandler(discovery.ClusterGroupVersion{ - ClusterName: crd.GetClusterName(), - Group: crd.Spec.Group, - Version: version.Name, + if err := c.syncHandler(schema.GroupVersion{ + Group: crd.Spec.Group, + Version: version.Name, }); err != nil { utilruntime.HandleError(err) } @@ -169,7 +167,7 @@ func (c *crdRegistrationController) processNextWorkItem() bool { defer c.queue.Done(key) // do your work on the key. This method will contains your "do stuff" logic - err := c.syncHandler(key.(discovery.ClusterGroupVersion)) + err := c.syncHandler(key.(schema.GroupVersion)) if err == nil { // if you had no error, tell the queue to stop tracking history for your key. This will // reset things like failure counts for per-item rate limiting @@ -191,16 +189,15 @@ func (c *crdRegistrationController) processNextWorkItem() bool { func (c *crdRegistrationController) enqueueCRD(crd *apiextensionsv1.CustomResourceDefinition) { for _, version := range crd.Spec.Versions { - c.queue.Add(discovery.ClusterGroupVersion{ - ClusterName: crd.GetClusterName(), - Group: crd.Spec.Group, - Version: version.Name, + c.queue.Add(schema.GroupVersion{ + Group: crd.Spec.Group, + Version: version.Name, }) } } -func (c *crdRegistrationController) handleVersionUpdate(clusterGroupVersion discovery.ClusterGroupVersion) error { - apiServiceName := clusterGroupVersion.Version + "." + clusterGroupVersion.Group +func (c *crdRegistrationController) handleVersionUpdate(groupVersion schema.GroupVersion) error { + apiServiceName := groupVersion.Version + "." + groupVersion.Group // check all CRDs. There shouldn't that many, but if we have problems later we can index them crds, err := c.crdLister.List(labels.Everything()) @@ -208,25 +205,21 @@ func (c *crdRegistrationController) handleVersionUpdate(clusterGroupVersion disc return err } for _, crd := range crds { - if crd.GetClusterName() != clusterGroupVersion.ClusterName { - continue - } - if crd.Spec.Group != clusterGroupVersion.Group { + if crd.Spec.Group != groupVersion.Group { continue } for _, version := range crd.Spec.Versions { - if version.Name != clusterGroupVersion.Version || !version.Served { + if version.Name != groupVersion.Version || !version.Served { continue } c.apiServiceRegistration.AddAPIServiceToSync(&v1.APIService{ ObjectMeta: metav1.ObjectMeta{ - Name: apiServiceName, - ClusterName: clusterGroupVersion.ClusterName, + Name: apiServiceName, }, Spec: v1.APIServiceSpec{ - Group: clusterGroupVersion.Group, - Version: clusterGroupVersion.Version, + Group: groupVersion.Group, + Version: groupVersion.Version, GroupPriorityMinimum: 1000, // CRDs should have relatively low priority VersionPriority: 100, // CRDs will be sorted by kube-like versions like any other APIService with the same VersionPriority }, @@ -235,6 +228,6 @@ func (c *crdRegistrationController) handleVersionUpdate(clusterGroupVersion disc } } - c.apiServiceRegistration.RemoveAPIServiceToSync(clusters.ToClusterAwareKey(clusterGroupVersion.ClusterName, apiServiceName)) + c.apiServiceRegistration.RemoveAPIServiceToSync(apiServiceName) return nil } From c7acddc918744e39ae25d6408cd96353f97880cb Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 15 Dec 2021 15:34:33 -0500 Subject: [PATCH 66/87] REACT(1.23): correct import for clock Signed-off-by: Andy Goldstein --- pkg/genericcontrolplane/apis/apis.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/genericcontrolplane/apis/apis.go b/pkg/genericcontrolplane/apis/apis.go index 105cec0acdf6c..b2b92a70051fa 100644 --- a/pkg/genericcontrolplane/apis/apis.go +++ b/pkg/genericcontrolplane/apis/apis.go @@ -27,13 +27,12 @@ import ( authorizationapiv1 "k8s.io/api/authorization/v1" certificatesapiv1 "k8s.io/api/certificates/v1" coordinationapiv1 "k8s.io/api/coordination/v1" - eventsv1 "k8s.io/api/events/v1" corev1 "k8s.io/api/core/v1" + eventsv1 "k8s.io/api/events/v1" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/endpoints/discovery" @@ -54,6 +53,7 @@ import ( "k8s.io/kubernetes/pkg/routes" "k8s.io/kubernetes/pkg/serviceaccount" nodeutil "k8s.io/kubernetes/pkg/util/node" + "k8s.io/utils/clock" // RESTStorage installers apiserverinternalrest "k8s.io/kubernetes/pkg/registry/apiserverinternal/rest" From b599efe80d69a532f9ac0eed3586d40afdbf7b0f Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 15 Dec 2021 15:35:26 -0500 Subject: [PATCH 67/87] REACT(1.23): update apiextensions-apiserver delegate Signed-off-by: Andy Goldstein --- pkg/genericcontrolplane/server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 354875c82d0ac..55b332eae78fc 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -32,6 +32,7 @@ import ( "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/authorization/union" + genericapifilters "k8s.io/apiserver/pkg/endpoints/filters" openapinamer "k8s.io/apiserver/pkg/endpoints/openapi" genericfeatures "k8s.io/apiserver/pkg/features" genericapiserver "k8s.io/apiserver/pkg/server" @@ -40,6 +41,7 @@ import ( "k8s.io/apiserver/pkg/util/feature" utilfeature "k8s.io/apiserver/pkg/util/feature" utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" + "k8s.io/apiserver/pkg/util/notfoundhandler" "k8s.io/apiserver/pkg/util/webhook" clientgoinformers "k8s.io/client-go/informers" clientgoclientset "k8s.io/client-go/kubernetes" @@ -133,7 +135,8 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan if err != nil { return nil, fmt.Errorf("configure api extensions: %v", err) } - apiExtensionsServer, err := createAPIExtensionsServer(apiExtensionsConfig, genericapiserver.NewEmptyDelegate()) + notFoundHandler := notfoundhandler.New(kubeAPIServerConfig.GenericConfig.Serializer, genericapifilters.NoMuxAndDiscoveryIncompleteKey) + apiExtensionsServer, err := createAPIExtensionsServer(apiExtensionsConfig, genericapiserver.NewEmptyDelegateWithCustomHandler(notFoundHandler)) if err != nil { return nil, fmt.Errorf("create api extensions: %v", err) } From 6563dc2e5524fc10056839d94a60ab2a89fcbe11 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 15 Dec 2021 15:36:00 -0500 Subject: [PATCH 68/87] REACT(1.23): update flow control API version Signed-off-by: Andy Goldstein --- pkg/genericcontrolplane/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 55b332eae78fc..eb8687428680f 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -388,7 +388,7 @@ func BuildPriorityAndFairness(s *options.ServerRunOptions, extclient clientgocli } return utilflowcontrol.New( versionedInformer, - extclient.FlowcontrolV1beta1(), + extclient.FlowcontrolV1beta2(), s.GenericServerRunOptions.MaxRequestsInFlight+s.GenericServerRunOptions.MaxMutatingRequestsInFlight, s.GenericServerRunOptions.RequestTimeout/4, ), nil From f39d53d83ba4fc2a031083e4c44556dc43e3bee0 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 15 Dec 2021 15:42:48 -0500 Subject: [PATCH 69/87] REACT(1.23): s.Logs.Apply update s.Logs.Apply no longer exists; it is now ValidateAndApply. Upstream calls this as early as possible in the Cobra RunE method, so this is a deviation (it's a minimal change to keep compiling). Signed-off-by: Andy Goldstein --- pkg/genericcontrolplane/server.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index eb8687428680f..81f1a7dcf0414 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -203,7 +203,11 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( } versionedInformers := clientgoinformers.NewSharedInformerFactory(clientgoExternalClient, 10*time.Minute) - s.Logs.Apply() + // TODO(ncdc,1.23) upstream has this in the Cobra RunE method and it's called as early as + // possible. Do we want to consider doing something similar? + if err := s.Logs.ValidateAndApply(); err != nil { + return nil, nil, nil, err + } config := &apis.Config{ GenericConfig: genericConfig, From 10e5e9ff4b7215e145debc0a6d8baba0c96a735d Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 15 Dec 2021 16:08:52 -0500 Subject: [PATCH 70/87] REACT(1.23): revert any disabled OpenAPI features Signed-off-by: Andy Goldstein --- pkg/genericcontrolplane/server.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 81f1a7dcf0414..2d4bdd3b64523 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -42,6 +42,7 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" "k8s.io/apiserver/pkg/util/notfoundhandler" + "k8s.io/apiserver/pkg/util/openapi" "k8s.io/apiserver/pkg/util/webhook" clientgoinformers "k8s.io/client-go/informers" clientgoclientset "k8s.io/client-go/kubernetes" @@ -50,6 +51,7 @@ import ( "k8s.io/klog/v2" aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" + "k8s.io/kubernetes/pkg/api/legacyscheme" generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" "k8s.io/kubernetes/pkg/genericcontrolplane/aggregator" "k8s.io/kubernetes/pkg/genericcontrolplane/apis" @@ -301,7 +303,9 @@ func BuildGenericConfig( } } - genericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(generatedopenapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(genericcontrolplanescheme.Scheme, extensionsapiserver.Scheme)) + // wrap the definitions to revert any changes from disabled features + getOpenAPIDefinitions := openapi.GetOpenAPIDefinitionsWithoutDisabledFeatures(generatedopenapi.GetOpenAPIDefinitions) + genericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(getOpenAPIDefinitions, openapinamer.NewDefinitionNamer(legacyscheme.Scheme, extensionsapiserver.Scheme, extensionsapiserver.Scheme)) genericConfig.OpenAPIConfig.Info.Title = "Kubernetes" genericConfig.LongRunningFunc = filters.BasicLongRunningRequestCheck( sets.NewString("watch", "proxy"), From 146306f7ab1a185402383426b244ca5e5a82abdd Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 15 Dec 2021 16:58:15 -0500 Subject: [PATCH 71/87] FIXUP: regen clients to add missing cluster method to watch calls Signed-off-by: Andy Goldstein --- .../kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go | 1 + .../client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go | 1 + .../typed/flowcontrol/v1beta2/prioritylevelconfiguration.go | 1 + 3 files changed, 3 insertions(+) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go index 7630e1a55051a..7d6aaddc72405 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go @@ -111,6 +111,7 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOption } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Namespace(c.ns). Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go index 8d91dadc282f0..b76103c23ce24 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go @@ -107,6 +107,7 @@ func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go index 4906675b2898c..991220e3a882c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go @@ -107,6 +107,7 @@ func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOpt } opts.Watch = true return c.client.Get(). + Cluster(c.cluster). Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). From b86d32714cf17912a6f3ee71147cd192e6222183 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 15 Dec 2021 16:58:44 -0500 Subject: [PATCH 72/87] FIXUP: regen listers to add missing WithContext methods Signed-off-by: Andy Goldstein --- .../autoscaling/v2/horizontalpodautoscaler.go | 20 +++++++++++++++++++ .../listers/flowcontrol/v1beta2/flowschema.go | 18 +++++++++++++++++ .../v1beta2/prioritylevelconfiguration.go | 18 +++++++++++++++++ 3 files changed, 56 insertions(+) diff --git a/staging/src/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go index a5cef27725771..905cc0d6c1eda 100644 --- a/staging/src/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go @@ -19,6 +19,8 @@ limitations under the License. package v2 import ( + "context" + v2 "k8s.io/api/autoscaling/v2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,6 +33,9 @@ type HorizontalPodAutoscalerLister interface { // List lists all HorizontalPodAutoscalers in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) + // ListWithContext lists all HorizontalPodAutoscalers in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister HorizontalPodAutoscalerListerExpansion @@ -48,6 +53,11 @@ func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutosc // List lists all HorizontalPodAutoscalers in the indexer. func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all HorizontalPodAutoscalers in the indexer. +func (s *horizontalPodAutoscalerLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v2.HorizontalPodAutoscaler)) }) @@ -80,6 +90,11 @@ type horizontalPodAutoscalerNamespaceLister struct { // List lists all HorizontalPodAutoscalers in the indexer for a given namespace. func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all HorizontalPodAutoscalers in the indexer for a given namespace. +func (s horizontalPodAutoscalerNamespaceLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v2.HorizontalPodAutoscaler)) }) @@ -88,6 +103,11 @@ func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) ( // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2.HorizontalPodAutoscaler, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. +func (s horizontalPodAutoscalerNamespaceLister) GetWithContext(ctx context.Context, name string) (*v2.HorizontalPodAutoscaler, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta2/flowschema.go b/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta2/flowschema.go index 2710f26306025..ed78936893cd8 100644 --- a/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta2/flowschema.go +++ b/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta2/flowschema.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta2 import ( + "context" + v1beta2 "k8s.io/api/flowcontrol/v1beta2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type FlowSchemaLister interface { // List lists all FlowSchemas in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.FlowSchema, err error) + // ListWithContext lists all FlowSchemas in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.FlowSchema, err error) // Get retrieves the FlowSchema from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta2.FlowSchema, error) + // GetWithContext retrieves the FlowSchema from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta2.FlowSchema, error) FlowSchemaListerExpansion } @@ -49,6 +57,11 @@ func NewFlowSchemaLister(indexer cache.Indexer) FlowSchemaLister { // List lists all FlowSchemas in the indexer. func (s *flowSchemaLister) List(selector labels.Selector) (ret []*v1beta2.FlowSchema, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all FlowSchemas in the indexer. +func (s *flowSchemaLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.FlowSchema, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.FlowSchema)) }) @@ -57,6 +70,11 @@ func (s *flowSchemaLister) List(selector labels.Selector) (ret []*v1beta2.FlowSc // Get retrieves the FlowSchema from the index for a given name. func (s *flowSchemaLister) Get(name string) (*v1beta2.FlowSchema, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the FlowSchema from the index for a given name. +func (s *flowSchemaLister) GetWithContext(ctx context.Context, name string) (*v1beta2.FlowSchema, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err diff --git a/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta2/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta2/prioritylevelconfiguration.go index 00ede00709a87..93f6356bee457 100644 --- a/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta2/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/listers/flowcontrol/v1beta2/prioritylevelconfiguration.go @@ -19,6 +19,8 @@ limitations under the License. package v1beta2 import ( + "context" + v1beta2 "k8s.io/api/flowcontrol/v1beta2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" @@ -31,9 +33,15 @@ type PriorityLevelConfigurationLister interface { // List lists all PriorityLevelConfigurations in the indexer. // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.PriorityLevelConfiguration, err error) + // ListWithContext lists all PriorityLevelConfigurations in the indexer. + // Objects returned here must be treated as read-only. + ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.PriorityLevelConfiguration, err error) // Get retrieves the PriorityLevelConfiguration from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*v1beta2.PriorityLevelConfiguration, error) + // GetWithContext retrieves the PriorityLevelConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. + GetWithContext(ctx context.Context, name string) (*v1beta2.PriorityLevelConfiguration, error) PriorityLevelConfigurationListerExpansion } @@ -49,6 +57,11 @@ func NewPriorityLevelConfigurationLister(indexer cache.Indexer) PriorityLevelCon // List lists all PriorityLevelConfigurations in the indexer. func (s *priorityLevelConfigurationLister) List(selector labels.Selector) (ret []*v1beta2.PriorityLevelConfiguration, err error) { + return s.ListWithContext(context.Background(), selector) +} + +// ListWithContext lists all PriorityLevelConfigurations in the indexer. +func (s *priorityLevelConfigurationLister) ListWithContext(ctx context.Context, selector labels.Selector) (ret []*v1beta2.PriorityLevelConfiguration, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta2.PriorityLevelConfiguration)) }) @@ -57,6 +70,11 @@ func (s *priorityLevelConfigurationLister) List(selector labels.Selector) (ret [ // Get retrieves the PriorityLevelConfiguration from the index for a given name. func (s *priorityLevelConfigurationLister) Get(name string) (*v1beta2.PriorityLevelConfiguration, error) { + return s.GetWithContext(context.Background(), name) +} + +// GetWithContext retrieves the PriorityLevelConfiguration from the index for a given name. +func (s *priorityLevelConfigurationLister) GetWithContext(ctx context.Context, name string) (*v1beta2.PriorityLevelConfiguration, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err From a9ba39b271b6031f1199534f8490e1c0191405af Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 15 Dec 2021 17:07:20 -0500 Subject: [PATCH 73/87] Regenerate openapi Signed-off-by: Andy Goldstein --- pkg/generated/openapi/zz_generated.openapi.go | 25327 +++++++++------- 1 file changed, 13543 insertions(+), 11784 deletions(-) diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 6818f865fcaa5..e3ed0023aba66 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -86,6 +86,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/apps/v1.StatefulSet": schema_k8sio_api_apps_v1_StatefulSet(ref), "k8s.io/api/apps/v1.StatefulSetCondition": schema_k8sio_api_apps_v1_StatefulSetCondition(ref), "k8s.io/api/apps/v1.StatefulSetList": schema_k8sio_api_apps_v1_StatefulSetList(ref), + "k8s.io/api/apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy": schema_k8sio_api_apps_v1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), "k8s.io/api/apps/v1.StatefulSetSpec": schema_k8sio_api_apps_v1_StatefulSetSpec(ref), "k8s.io/api/apps/v1.StatefulSetStatus": schema_k8sio_api_apps_v1_StatefulSetStatus(ref), "k8s.io/api/apps/v1.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref), @@ -107,6 +108,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/apps/v1beta1.StatefulSet": schema_k8sio_api_apps_v1beta1_StatefulSet(ref), "k8s.io/api/apps/v1beta1.StatefulSetCondition": schema_k8sio_api_apps_v1beta1_StatefulSetCondition(ref), "k8s.io/api/apps/v1beta1.StatefulSetList": schema_k8sio_api_apps_v1beta1_StatefulSetList(ref), + "k8s.io/api/apps/v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy": schema_k8sio_api_apps_v1beta1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), "k8s.io/api/apps/v1beta1.StatefulSetSpec": schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref), "k8s.io/api/apps/v1beta1.StatefulSetStatus": schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref), "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1beta1_StatefulSetUpdateStrategy(ref), @@ -138,6 +140,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/apps/v1beta2.StatefulSet": schema_k8sio_api_apps_v1beta2_StatefulSet(ref), "k8s.io/api/apps/v1beta2.StatefulSetCondition": schema_k8sio_api_apps_v1beta2_StatefulSetCondition(ref), "k8s.io/api/apps/v1beta2.StatefulSetList": schema_k8sio_api_apps_v1beta2_StatefulSetList(ref), + "k8s.io/api/apps/v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy": schema_k8sio_api_apps_v1beta2_StatefulSetPersistentVolumeClaimRetentionPolicy(ref), "k8s.io/api/apps/v1beta2.StatefulSetSpec": schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref), "k8s.io/api/apps/v1beta2.StatefulSetStatus": schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref), "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy": schema_k8sio_api_apps_v1beta2_StatefulSetUpdateStrategy(ref), @@ -200,6 +203,30 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/autoscaling/v1.Scale": schema_k8sio_api_autoscaling_v1_Scale(ref), "k8s.io/api/autoscaling/v1.ScaleSpec": schema_k8sio_api_autoscaling_v1_ScaleSpec(ref), "k8s.io/api/autoscaling/v1.ScaleStatus": schema_k8sio_api_autoscaling_v1_ScaleStatus(ref), + "k8s.io/api/autoscaling/v2.ContainerResourceMetricSource": schema_k8sio_api_autoscaling_v2_ContainerResourceMetricSource(ref), + "k8s.io/api/autoscaling/v2.ContainerResourceMetricStatus": schema_k8sio_api_autoscaling_v2_ContainerResourceMetricStatus(ref), + "k8s.io/api/autoscaling/v2.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2_CrossVersionObjectReference(ref), + "k8s.io/api/autoscaling/v2.ExternalMetricSource": schema_k8sio_api_autoscaling_v2_ExternalMetricSource(ref), + "k8s.io/api/autoscaling/v2.ExternalMetricStatus": schema_k8sio_api_autoscaling_v2_ExternalMetricStatus(ref), + "k8s.io/api/autoscaling/v2.HPAScalingPolicy": schema_k8sio_api_autoscaling_v2_HPAScalingPolicy(ref), + "k8s.io/api/autoscaling/v2.HPAScalingRules": schema_k8sio_api_autoscaling_v2_HPAScalingRules(ref), + "k8s.io/api/autoscaling/v2.HorizontalPodAutoscaler": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscaler(ref), + "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerBehavior": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerBehavior(ref), + "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerCondition": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerCondition(ref), + "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerList": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerList(ref), + "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerSpec": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerSpec(ref), + "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerStatus": schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerStatus(ref), + "k8s.io/api/autoscaling/v2.MetricIdentifier": schema_k8sio_api_autoscaling_v2_MetricIdentifier(ref), + "k8s.io/api/autoscaling/v2.MetricSpec": schema_k8sio_api_autoscaling_v2_MetricSpec(ref), + "k8s.io/api/autoscaling/v2.MetricStatus": schema_k8sio_api_autoscaling_v2_MetricStatus(ref), + "k8s.io/api/autoscaling/v2.MetricTarget": schema_k8sio_api_autoscaling_v2_MetricTarget(ref), + "k8s.io/api/autoscaling/v2.MetricValueStatus": schema_k8sio_api_autoscaling_v2_MetricValueStatus(ref), + "k8s.io/api/autoscaling/v2.ObjectMetricSource": schema_k8sio_api_autoscaling_v2_ObjectMetricSource(ref), + "k8s.io/api/autoscaling/v2.ObjectMetricStatus": schema_k8sio_api_autoscaling_v2_ObjectMetricStatus(ref), + "k8s.io/api/autoscaling/v2.PodsMetricSource": schema_k8sio_api_autoscaling_v2_PodsMetricSource(ref), + "k8s.io/api/autoscaling/v2.PodsMetricStatus": schema_k8sio_api_autoscaling_v2_PodsMetricStatus(ref), + "k8s.io/api/autoscaling/v2.ResourceMetricSource": schema_k8sio_api_autoscaling_v2_ResourceMetricSource(ref), + "k8s.io/api/autoscaling/v2.ResourceMetricStatus": schema_k8sio_api_autoscaling_v2_ResourceMetricStatus(ref), "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource": schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref), "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus": schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref), "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference": schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref), @@ -335,18 +362,19 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), + "k8s.io/api/core/v1.GRPCAction": schema_k8sio_api_core_v1_GRPCAction(ref), "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), - "k8s.io/api/core/v1.Handler": schema_k8sio_api_core_v1_Handler(ref), "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), + "k8s.io/api/core/v1.LifecycleHandler": schema_k8sio_api_core_v1_LifecycleHandler(ref), "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), @@ -405,6 +433,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), + "k8s.io/api/core/v1.PodOS": schema_k8sio_api_core_v1_PodOS(ref), "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), @@ -421,6 +450,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), + "k8s.io/api/core/v1.ProbeHandler": schema_k8sio_api_core_v1_ProbeHandler(ref), "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), @@ -601,6 +631,28 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject": schema_k8sio_api_flowcontrol_v1beta1_ServiceAccountSubject(ref), "k8s.io/api/flowcontrol/v1beta1.Subject": schema_k8sio_api_flowcontrol_v1beta1_Subject(ref), "k8s.io/api/flowcontrol/v1beta1.UserSubject": schema_k8sio_api_flowcontrol_v1beta1_UserSubject(ref), + "k8s.io/api/flowcontrol/v1beta2.FlowDistinguisherMethod": schema_k8sio_api_flowcontrol_v1beta2_FlowDistinguisherMethod(ref), + "k8s.io/api/flowcontrol/v1beta2.FlowSchema": schema_k8sio_api_flowcontrol_v1beta2_FlowSchema(ref), + "k8s.io/api/flowcontrol/v1beta2.FlowSchemaCondition": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaCondition(ref), + "k8s.io/api/flowcontrol/v1beta2.FlowSchemaList": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaList(ref), + "k8s.io/api/flowcontrol/v1beta2.FlowSchemaSpec": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaSpec(ref), + "k8s.io/api/flowcontrol/v1beta2.FlowSchemaStatus": schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaStatus(ref), + "k8s.io/api/flowcontrol/v1beta2.GroupSubject": schema_k8sio_api_flowcontrol_v1beta2_GroupSubject(ref), + "k8s.io/api/flowcontrol/v1beta2.LimitResponse": schema_k8sio_api_flowcontrol_v1beta2_LimitResponse(ref), + "k8s.io/api/flowcontrol/v1beta2.LimitedPriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta2_LimitedPriorityLevelConfiguration(ref), + "k8s.io/api/flowcontrol/v1beta2.NonResourcePolicyRule": schema_k8sio_api_flowcontrol_v1beta2_NonResourcePolicyRule(ref), + "k8s.io/api/flowcontrol/v1beta2.PolicyRulesWithSubjects": schema_k8sio_api_flowcontrol_v1beta2_PolicyRulesWithSubjects(ref), + "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfiguration": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfiguration(ref), + "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationCondition": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationCondition(ref), + "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationList": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationList(ref), + "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationReference": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationReference(ref), + "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationSpec": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationSpec(ref), + "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationStatus": schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationStatus(ref), + "k8s.io/api/flowcontrol/v1beta2.QueuingConfiguration": schema_k8sio_api_flowcontrol_v1beta2_QueuingConfiguration(ref), + "k8s.io/api/flowcontrol/v1beta2.ResourcePolicyRule": schema_k8sio_api_flowcontrol_v1beta2_ResourcePolicyRule(ref), + "k8s.io/api/flowcontrol/v1beta2.ServiceAccountSubject": schema_k8sio_api_flowcontrol_v1beta2_ServiceAccountSubject(ref), + "k8s.io/api/flowcontrol/v1beta2.Subject": schema_k8sio_api_flowcontrol_v1beta2_Subject(ref), + "k8s.io/api/flowcontrol/v1beta2.UserSubject": schema_k8sio_api_flowcontrol_v1beta2_UserSubject(ref), "k8s.io/api/imagepolicy/v1alpha1.ImageReview": schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref), "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref), "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec": schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref), @@ -789,6 +841,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref), "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref), "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference": schema_pkg_apis_apiextensions_v1_ServiceReference(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule": schema_pkg_apis_apiextensions_v1_ValidationRule(ref), "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref), "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion": schema_pkg_apis_apiextensions_v1_WebhookConversion(ref), "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest": schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref), @@ -814,6 +867,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref), "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray": schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref), "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference": schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref), + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule": schema_pkg_apis_apiextensions_v1beta1_ValidationRule(ref), "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig": schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref), "k8s.io/apimachinery/pkg/api/resource.Quantity": schema_apimachinery_pkg_api_resource_Quantity(ref), "k8s.io/apimachinery/pkg/api/resource.int64Amount": schema_apimachinery_pkg_api_resource_int64Amount(ref), @@ -934,6 +988,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref), "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref), "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroringControllerConfiguration(ref), + "k8s.io/kube-controller-manager/config/v1alpha1.EphemeralVolumeControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_EphemeralVolumeControllerConfiguration(ref), "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref), "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource": schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref), "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration": schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref), @@ -957,46 +1012,10 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref), "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref), "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration": schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref), - "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource": schema_k8sio_kube_scheduler_config_v1_ExtenderManagedResource(ref), - "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig": schema_k8sio_kube_scheduler_config_v1_ExtenderTLSConfig(ref), - "k8s.io/kube-scheduler/config/v1.LabelPreference": schema_k8sio_kube_scheduler_config_v1_LabelPreference(ref), - "k8s.io/kube-scheduler/config/v1.LabelsPresence": schema_k8sio_kube_scheduler_config_v1_LabelsPresence(ref), - "k8s.io/kube-scheduler/config/v1.LegacyExtender": schema_k8sio_kube_scheduler_config_v1_LegacyExtender(ref), - "k8s.io/kube-scheduler/config/v1.Policy": schema_k8sio_kube_scheduler_config_v1_Policy(ref), - "k8s.io/kube-scheduler/config/v1.PredicateArgument": schema_k8sio_kube_scheduler_config_v1_PredicateArgument(ref), - "k8s.io/kube-scheduler/config/v1.PredicatePolicy": schema_k8sio_kube_scheduler_config_v1_PredicatePolicy(ref), - "k8s.io/kube-scheduler/config/v1.PriorityArgument": schema_k8sio_kube_scheduler_config_v1_PriorityArgument(ref), - "k8s.io/kube-scheduler/config/v1.PriorityPolicy": schema_k8sio_kube_scheduler_config_v1_PriorityPolicy(ref), - "k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments": schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioArguments(ref), - "k8s.io/kube-scheduler/config/v1.ResourceSpec": schema_k8sio_kube_scheduler_config_v1_ResourceSpec(ref), - "k8s.io/kube-scheduler/config/v1.ServiceAffinity": schema_k8sio_kube_scheduler_config_v1_ServiceAffinity(ref), - "k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity": schema_k8sio_kube_scheduler_config_v1_ServiceAntiAffinity(ref), - "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint": schema_k8sio_kube_scheduler_config_v1_UtilizationShapePoint(ref), - "k8s.io/kube-scheduler/config/v1beta1.DefaultPreemptionArgs": schema_k8sio_kube_scheduler_config_v1beta1_DefaultPreemptionArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.Extender": schema_k8sio_kube_scheduler_config_v1beta1_Extender(ref), - "k8s.io/kube-scheduler/config/v1beta1.InterPodAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta1_InterPodAffinityArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.KubeSchedulerConfiguration": schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerConfiguration(ref), - "k8s.io/kube-scheduler/config/v1beta1.KubeSchedulerProfile": schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerProfile(ref), - "k8s.io/kube-scheduler/config/v1beta1.NodeAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeAffinityArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.NodeLabelArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeLabelArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.NodeResourcesBalancedAllocationArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesBalancedAllocationArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.NodeResourcesFitArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesFitArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.NodeResourcesLeastAllocatedArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesLeastAllocatedArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.NodeResourcesMostAllocatedArgs": schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesMostAllocatedArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.Plugin": schema_k8sio_kube_scheduler_config_v1beta1_Plugin(ref), - "k8s.io/kube-scheduler/config/v1beta1.PluginConfig": schema_k8sio_kube_scheduler_config_v1beta1_PluginConfig(ref), - "k8s.io/kube-scheduler/config/v1beta1.PluginSet": schema_k8sio_kube_scheduler_config_v1beta1_PluginSet(ref), - "k8s.io/kube-scheduler/config/v1beta1.Plugins": schema_k8sio_kube_scheduler_config_v1beta1_Plugins(ref), - "k8s.io/kube-scheduler/config/v1beta1.PodTopologySpreadArgs": schema_k8sio_kube_scheduler_config_v1beta1_PodTopologySpreadArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.RequestedToCapacityRatioArgs": schema_k8sio_kube_scheduler_config_v1beta1_RequestedToCapacityRatioArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.RequestedToCapacityRatioParam": schema_k8sio_kube_scheduler_config_v1beta1_RequestedToCapacityRatioParam(ref), - "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec": schema_k8sio_kube_scheduler_config_v1beta1_ResourceSpec(ref), - "k8s.io/kube-scheduler/config/v1beta1.ScoringStrategy": schema_k8sio_kube_scheduler_config_v1beta1_ScoringStrategy(ref), - "k8s.io/kube-scheduler/config/v1beta1.ServiceAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta1_ServiceAffinityArgs(ref), - "k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint": schema_k8sio_kube_scheduler_config_v1beta1_UtilizationShapePoint(ref), - "k8s.io/kube-scheduler/config/v1beta1.VolumeBindingArgs": schema_k8sio_kube_scheduler_config_v1beta1_VolumeBindingArgs(ref), "k8s.io/kube-scheduler/config/v1beta2.DefaultPreemptionArgs": schema_k8sio_kube_scheduler_config_v1beta2_DefaultPreemptionArgs(ref), "k8s.io/kube-scheduler/config/v1beta2.Extender": schema_k8sio_kube_scheduler_config_v1beta2_Extender(ref), + "k8s.io/kube-scheduler/config/v1beta2.ExtenderManagedResource": schema_k8sio_kube_scheduler_config_v1beta2_ExtenderManagedResource(ref), + "k8s.io/kube-scheduler/config/v1beta2.ExtenderTLSConfig": schema_k8sio_kube_scheduler_config_v1beta2_ExtenderTLSConfig(ref), "k8s.io/kube-scheduler/config/v1beta2.InterPodAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta2_InterPodAffinityArgs(ref), "k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerConfiguration": schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref), "k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile": schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerProfile(ref), @@ -1013,6 +1032,26 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy": schema_k8sio_kube_scheduler_config_v1beta2_ScoringStrategy(ref), "k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint": schema_k8sio_kube_scheduler_config_v1beta2_UtilizationShapePoint(ref), "k8s.io/kube-scheduler/config/v1beta2.VolumeBindingArgs": schema_k8sio_kube_scheduler_config_v1beta2_VolumeBindingArgs(ref), + "k8s.io/kube-scheduler/config/v1beta3.DefaultPreemptionArgs": schema_k8sio_kube_scheduler_config_v1beta3_DefaultPreemptionArgs(ref), + "k8s.io/kube-scheduler/config/v1beta3.Extender": schema_k8sio_kube_scheduler_config_v1beta3_Extender(ref), + "k8s.io/kube-scheduler/config/v1beta3.ExtenderManagedResource": schema_k8sio_kube_scheduler_config_v1beta3_ExtenderManagedResource(ref), + "k8s.io/kube-scheduler/config/v1beta3.ExtenderTLSConfig": schema_k8sio_kube_scheduler_config_v1beta3_ExtenderTLSConfig(ref), + "k8s.io/kube-scheduler/config/v1beta3.InterPodAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta3_InterPodAffinityArgs(ref), + "k8s.io/kube-scheduler/config/v1beta3.KubeSchedulerConfiguration": schema_k8sio_kube_scheduler_config_v1beta3_KubeSchedulerConfiguration(ref), + "k8s.io/kube-scheduler/config/v1beta3.KubeSchedulerProfile": schema_k8sio_kube_scheduler_config_v1beta3_KubeSchedulerProfile(ref), + "k8s.io/kube-scheduler/config/v1beta3.NodeAffinityArgs": schema_k8sio_kube_scheduler_config_v1beta3_NodeAffinityArgs(ref), + "k8s.io/kube-scheduler/config/v1beta3.NodeResourcesBalancedAllocationArgs": schema_k8sio_kube_scheduler_config_v1beta3_NodeResourcesBalancedAllocationArgs(ref), + "k8s.io/kube-scheduler/config/v1beta3.NodeResourcesFitArgs": schema_k8sio_kube_scheduler_config_v1beta3_NodeResourcesFitArgs(ref), + "k8s.io/kube-scheduler/config/v1beta3.Plugin": schema_k8sio_kube_scheduler_config_v1beta3_Plugin(ref), + "k8s.io/kube-scheduler/config/v1beta3.PluginConfig": schema_k8sio_kube_scheduler_config_v1beta3_PluginConfig(ref), + "k8s.io/kube-scheduler/config/v1beta3.PluginSet": schema_k8sio_kube_scheduler_config_v1beta3_PluginSet(ref), + "k8s.io/kube-scheduler/config/v1beta3.Plugins": schema_k8sio_kube_scheduler_config_v1beta3_Plugins(ref), + "k8s.io/kube-scheduler/config/v1beta3.PodTopologySpreadArgs": schema_k8sio_kube_scheduler_config_v1beta3_PodTopologySpreadArgs(ref), + "k8s.io/kube-scheduler/config/v1beta3.RequestedToCapacityRatioParam": schema_k8sio_kube_scheduler_config_v1beta3_RequestedToCapacityRatioParam(ref), + "k8s.io/kube-scheduler/config/v1beta3.ResourceSpec": schema_k8sio_kube_scheduler_config_v1beta3_ResourceSpec(ref), + "k8s.io/kube-scheduler/config/v1beta3.ScoringStrategy": schema_k8sio_kube_scheduler_config_v1beta3_ScoringStrategy(ref), + "k8s.io/kube-scheduler/config/v1beta3.UtilizationShapePoint": schema_k8sio_kube_scheduler_config_v1beta3_UtilizationShapePoint(ref), + "k8s.io/kube-scheduler/config/v1beta3.VolumeBindingArgs": schema_k8sio_kube_scheduler_config_v1beta3_VolumeBindingArgs(ref), "k8s.io/kubelet/config/v1alpha1.CredentialProvider": schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref), "k8s.io/kubelet/config/v1alpha1.CredentialProviderConfig": schema_k8sio_kubelet_config_v1alpha1_CredentialProviderConfig(ref), "k8s.io/kubelet/config/v1alpha1.ExecEnvVar": schema_k8sio_kubelet_config_v1alpha1_ExecEnvVar(ref), @@ -1026,6 +1065,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/kubelet/config/v1beta1.MemoryReservation": schema_k8sio_kubelet_config_v1beta1_MemoryReservation(ref), "k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration": schema_k8sio_kubelet_config_v1beta1_MemorySwapConfiguration(ref), "k8s.io/kubelet/config/v1beta1.SerializedNodeConfigSource": schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref), + "k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority": schema_k8sio_kubelet_config_v1beta1_ShutdownGracePeriodByPodPriority(ref), "k8s.io/kubernetes/pkg/apis/abac/v1beta1.Policy": schema_pkg_apis_abac_v1beta1_Policy(ref), "k8s.io/kubernetes/pkg/apis/abac/v1beta1.PolicySpec": schema_pkg_apis_abac_v1beta1_PolicySpec(ref), "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1.MetricListOptions": schema_pkg_apis_custom_metrics_v1beta1_MetricListOptions(ref), @@ -2967,7 +3007,7 @@ func schema_k8sio_api_apps_v1_DaemonSetStatus(ref common.ReferenceCallback) comm }, "numberReady": { SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + Description: "numberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running with a Ready Condition.", Default: 0, Type: []string{"integer"}, Format: "int32", @@ -3046,10 +3086,10 @@ func schema_k8sio_api_apps_v1_DaemonSetUpdateStrategy(ref common.ReferenceCallba Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.", + Description: "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.\n\nPossible enum values:\n - `\"OnDelete\"` Replace the old daemons only when it's killed\n - `\"RollingUpdate\"` Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"OnDelete", "RollingUpdate"}}, }, "rollingUpdate": { SchemaProps: spec.SchemaProps{ @@ -3332,7 +3372,7 @@ func schema_k8sio_api_apps_v1_DeploymentStatus(ref common.ReferenceCallback) com }, "readyReplicas": { SchemaProps: spec.SchemaProps{ - Description: "Total number of ready pods targeted by this deployment.", + Description: "readyReplicas is the number of pods targeted by this Deployment with a Ready Condition.", Type: []string{"integer"}, Format: "int32", }, @@ -3395,10 +3435,10 @@ func schema_k8sio_api_apps_v1_DeploymentStrategy(ref common.ReferenceCallback) c Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + Description: "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.\n\nPossible enum values:\n - `\"Recreate\"` Kill all existing pods before creating new ones.\n - `\"RollingUpdate\"` Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Recreate", "RollingUpdate"}}, }, "rollingUpdate": { SchemaProps: spec.SchemaProps{ @@ -3635,7 +3675,7 @@ func schema_k8sio_api_apps_v1_ReplicaSetStatus(ref common.ReferenceCallback) com }, "readyReplicas": { SchemaProps: spec.SchemaProps{ - Description: "The number of ready replicas for this replica set.", + Description: "readyReplicas is the number of pods targeted by this ReplicaSet with a Ready Condition.", Type: []string{"integer"}, Format: "int32", }, @@ -3911,6 +3951,33 @@ func schema_k8sio_api_apps_v1_StatefulSetList(ref common.ReferenceCallback) comm } } +func schema_k8sio_api_apps_v1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "whenDeleted": { + SchemaProps: spec.SchemaProps{ + Description: "WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.", + Type: []string{"string"}, + Format: "", + }, + }, + "whenScaled": { + SchemaProps: spec.SchemaProps{ + Description: "WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -3962,10 +4029,10 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm }, "podManagementPolicy": { SchemaProps: spec.SchemaProps{ - Description: "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", + Description: "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.\n\nPossible enum values:\n - `\"OrderedReady\"` will create pods in strictly increasing order on scale up and strictly decreasing order on scale down, progressing only when the previous pod is ready or terminated. At most one pod will be changed at any time.\n - `\"Parallel\"` will create and delete pods as soon as the stateful set replica count is changed, and will not wait for pods to be ready or complete termination.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"OrderedReady", "Parallel"}}, }, "updateStrategy": { SchemaProps: spec.SchemaProps{ @@ -3988,12 +4055,18 @@ func schema_k8sio_api_apps_v1_StatefulSetSpec(ref common.ReferenceCallback) comm Format: "int32", }, }, + "persistentVolumeClaimRetentionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha. +optional", + Ref: ref("k8s.io/api/apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy"), + }, + }, }, Required: []string{"selector", "template", "serviceName"}, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy", "k8s.io/api/apps/v1.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } @@ -4021,7 +4094,7 @@ func schema_k8sio_api_apps_v1_StatefulSetStatus(ref common.ReferenceCallback) co }, "readyReplicas": { SchemaProps: spec.SchemaProps{ - Description: "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", + Description: "readyReplicas is the number of pods created for this StatefulSet with a Ready Condition.", Type: []string{"integer"}, Format: "int32", }, @@ -4083,13 +4156,14 @@ func schema_k8sio_api_apps_v1_StatefulSetStatus(ref common.ReferenceCallback) co }, "availableReplicas": { SchemaProps: spec.SchemaProps{ - Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. Remove omitempty when graduating to beta", + Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"replicas"}, + Required: []string{"replicas", "availableReplicas"}, }, }, Dependencies: []string{ @@ -4106,10 +4180,10 @@ func schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref common.ReferenceCall Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.", + Description: "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.\n\nPossible enum values:\n - `\"OnDelete\"` triggers the legacy behavior. Version tracking and ordered rolling restarts are disabled. Pods are recreated from the StatefulSetSpec when they are manually deleted. When a scale operation is performed with this strategy,specification version indicated by the StatefulSet's currentRevision.\n - `\"RollingUpdate\"` indicates that update will be applied to all Pods in the StatefulSet with respect to the StatefulSet ordering constraints. When a scale operation is performed with this strategy, new Pods will be created from the specification version indicated by the StatefulSet's updateRevision.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"OnDelete", "RollingUpdate"}}, }, "rollingUpdate": { SchemaProps: spec.SchemaProps{ @@ -4562,7 +4636,7 @@ func schema_k8sio_api_apps_v1beta1_DeploymentStatus(ref common.ReferenceCallback }, "readyReplicas": { SchemaProps: spec.SchemaProps{ - Description: "Total number of ready pods targeted by this deployment.", + Description: "readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition.", Type: []string{"integer"}, Format: "int32", }, @@ -4977,6 +5051,33 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetList(ref common.ReferenceCallback) } } +func schema_k8sio_api_apps_v1beta1_StatefulSetPersistentVolumeClaimRetentionPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "whenDeleted": { + SchemaProps: spec.SchemaProps{ + Description: "WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.", + Type: []string{"string"}, + Format: "", + }, + }, + "whenScaled": { + SchemaProps: spec.SchemaProps{ + Description: "WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -5054,12 +5155,18 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetSpec(ref common.ReferenceCallback) Format: "int32", }, }, + "persistentVolumeClaimRetentionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha.", + Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy"), + }, + }, }, Required: []string{"template", "serviceName"}, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/apps/v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy", "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } @@ -5087,7 +5194,7 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref common.ReferenceCallbac }, "readyReplicas": { SchemaProps: spec.SchemaProps{ - Description: "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", + Description: "readyReplicas is the number of pods created by this StatefulSet controller with a Ready Condition.", Type: []string{"integer"}, Format: "int32", }, @@ -5149,13 +5256,14 @@ func schema_k8sio_api_apps_v1beta1_StatefulSetStatus(ref common.ReferenceCallbac }, "availableReplicas": { SchemaProps: spec.SchemaProps{ - Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. Remove omitempty when graduating to beta", + Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"replicas"}, + Required: []string{"replicas", "availableReplicas"}, }, }, Dependencies: []string{ @@ -5531,7 +5639,7 @@ func schema_k8sio_api_apps_v1beta2_DaemonSetStatus(ref common.ReferenceCallback) }, "numberReady": { SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + Description: "Total number of nodes that should be running the daemon pod and have one or more of the daemon pod running with a Ready Condition by passing the readinessProbe.", Default: 0, Type: []string{"integer"}, Format: "int32", @@ -5896,7 +6004,7 @@ func schema_k8sio_api_apps_v1beta2_DeploymentStatus(ref common.ReferenceCallback }, "readyReplicas": { SchemaProps: spec.SchemaProps{ - Description: "Total number of ready pods targeted by this deployment.", + Description: "readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition.", Type: []string{"integer"}, Format: "int32", }, @@ -6199,7 +6307,7 @@ func schema_k8sio_api_apps_v1beta2_ReplicaSetStatus(ref common.ReferenceCallback }, "readyReplicas": { SchemaProps: spec.SchemaProps{ - Description: "The number of ready replicas for this replica set.", + Description: "readyReplicas is the number of pods targeted by this ReplicaSet controller with a Ready Condition.", Type: []string{"integer"}, Format: "int32", }, @@ -6592,6 +6700,33 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetList(ref common.ReferenceCallback) } } +func schema_k8sio_api_apps_v1beta2_StatefulSetPersistentVolumeClaimRetentionPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "whenDeleted": { + SchemaProps: spec.SchemaProps{ + Description: "WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.", + Type: []string{"string"}, + Format: "", + }, + }, + "whenScaled": { + SchemaProps: spec.SchemaProps{ + Description: "WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -6669,12 +6804,18 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetSpec(ref common.ReferenceCallback) Format: "int32", }, }, + "persistentVolumeClaimRetentionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha.", + Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy"), + }, + }, }, Required: []string{"selector", "template", "serviceName"}, }, }, Dependencies: []string{ - "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/apps/v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy", "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } @@ -6702,7 +6843,7 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref common.ReferenceCallbac }, "readyReplicas": { SchemaProps: spec.SchemaProps{ - Description: "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", + Description: "readyReplicas is the number of pods created by this StatefulSet controller with a Ready Condition.", Type: []string{"integer"}, Format: "int32", }, @@ -6764,13 +6905,14 @@ func schema_k8sio_api_apps_v1beta2_StatefulSetStatus(ref common.ReferenceCallbac }, "availableReplicas": { SchemaProps: spec.SchemaProps{ - Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. Remove omitempty when graduating to beta", + Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"replicas"}, + Required: []string{"replicas", "availableReplicas"}, }, }, Dependencies: []string{ @@ -9133,11 +9275,11 @@ func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) co Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + Description: "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled\n\nPossible enum values:\n - `\"ContainerResource\"` is a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics (the \"pods\" source).\n - `\"External\"` is a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\n - `\"Object\"` is a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n - `\"Pods\"` is a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\n - `\"Resource\"` is a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics (the \"pods\" source).", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"ContainerResource", "External", "Object", "Pods", "Resource"}}, }, "object": { SchemaProps: spec.SchemaProps{ @@ -9187,11 +9329,11 @@ func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + Description: "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled\n\nPossible enum values:\n - `\"ContainerResource\"` is a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics (the \"pods\" source).\n - `\"External\"` is a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\n - `\"Object\"` is a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n - `\"Pods\"` is a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\n - `\"Resource\"` is a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics (the \"pods\" source).", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"ContainerResource", "External", "Object", "Pods", "Resource"}}, }, "object": { SchemaProps: spec.SchemaProps{ @@ -9580,7 +9722,7 @@ func schema_k8sio_api_autoscaling_v1_ScaleStatus(ref common.ReferenceCallback) c } } -func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -9595,17 +9737,11 @@ func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref comm Format: "", }, }, - "targetAverageUtilization": { - SchemaProps: spec.SchemaProps{ - Description: "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "targetAverageValue": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricTarget"), }, }, "container": { @@ -9617,15 +9753,15 @@ func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref comm }, }, }, - Required: []string{"name", "container"}, + Required: []string{"name", "target", "container"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "k8s.io/api/autoscaling/v2.MetricTarget"}, } } -func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -9634,44 +9770,37 @@ func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref comm Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "name is the name of the resource in question.", + Description: "Name is the name of the resource in question.", Default: "", Type: []string{"string"}, Format: "", }, }, - "currentAverageUtilization": { - SchemaProps: spec.SchemaProps{ - Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentAverageValue": { + "current": { SchemaProps: spec.SchemaProps{ - Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref("k8s.io/api/autoscaling/v2.MetricValueStatus"), }, }, "container": { SchemaProps: spec.SchemaProps{ - Description: "container is the name of the container in the pods of the scaling target", + Description: "Container is the name of the container in the pods of the scaling target", Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"name", "currentAverageValue", "container"}, + Required: []string{"name", "current", "container"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "k8s.io/api/autoscaling/v2.MetricValueStatus"}, } } -func schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -9708,92 +9837,153 @@ func schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref common } } -func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set.", + Description: "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metricName": { + "metric": { SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), }, }, - "metricSelector": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "metricSelector is used to identify a specific time series within a given metric.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricTarget"), }, }, - "targetValue": { + }, + Required: []string{"metric", "target"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricTarget"}, + } +} + +func schema_k8sio_api_autoscaling_v2_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metric": { SchemaProps: spec.SchemaProps{ - Description: "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), }, }, - "targetAverageValue": { + "current": { SchemaProps: spec.SchemaProps{ - Description: "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "current contains the current value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricValueStatus"), }, }, }, - Required: []string{"metricName"}, + Required: []string{"metric", "current"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricValueStatus"}, } } -func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_HPAScalingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", + Description: "HPAScalingPolicy is a single policy which must hold true for a specified past interval.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metricName": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of a metric used for autoscaling in metric system.", + Description: "Type is used to specify the scaling policy.", Default: "", Type: []string{"string"}, Format: "", }, }, - "metricSelector": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "metricSelector is used to identify a specific time series within a given metric.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "Value contains the amount of change which is permitted by the policy. It must be greater than zero", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "currentValue": { + "periodSeconds": { SchemaProps: spec.SchemaProps{ - Description: "currentValue is the current value of the metric (as a quantity)", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "currentAverageValue": { + }, + Required: []string{"type", "value", "periodSeconds"}, + }, + }, + } +} + +func schema_k8sio_api_autoscaling_v2_HPAScalingRules(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "stabilizationWindowSeconds": { SchemaProps: spec.SchemaProps{ - Description: "currentAverageValue is the current value of metric averaged over autoscaled pods.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selectPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "policies": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.HPAScalingPolicy"), + }, + }, + }, }, }, }, - Required: []string{"metricName", "currentValue"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/autoscaling/v2.HPAScalingPolicy"}, } } -func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -9825,25 +10015,52 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec"), + Ref: ref("k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current information about the autoscaler.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus"), + Ref: ref("k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerBehavior(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "scaleUp": { + SchemaProps: spec.SchemaProps{ + Description: "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used.", + Ref: ref("k8s.io/api/autoscaling/v2.HPAScalingRules"), + }, + }, + "scaleDown": { + SchemaProps: spec.SchemaProps{ + Description: "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).", + Ref: ref("k8s.io/api/autoscaling/v2.HPAScalingRules"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2.HPAScalingRules"}, + } +} + +func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -9896,11 +10113,11 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref c } } -func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.", + Description: "HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -9932,7 +10149,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler"), + Ref: ref("k8s.io/api/autoscaling/v2.HorizontalPodAutoscaler"), }, }, }, @@ -9943,11 +10160,11 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/autoscaling/v2.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -9958,7 +10175,7 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common SchemaProps: spec.SchemaProps{ Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), + Ref: ref("k8s.io/api/autoscaling/v2.CrossVersionObjectReference"), }, }, "minReplicas": { @@ -9977,29 +10194,40 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common }, }, "metrics": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.", + Description: "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricSpec"), + Ref: ref("k8s.io/api/autoscaling/v2.MetricSpec"), }, }, }, }, }, + "behavior": { + SchemaProps: spec.SchemaProps{ + Description: "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.", + Ref: ref("k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerBehavior"), + }, + }, }, Required: []string{"scaleTargetRef", "maxReplicas"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta1.MetricSpec"}, + "k8s.io/api/autoscaling/v2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerBehavior", "k8s.io/api/autoscaling/v2.MetricSpec"}, } } -func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10022,7 +10250,6 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm "currentReplicas": { SchemaProps: spec.SchemaProps{ Description: "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", - Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -10036,6 +10263,11 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm }, }, "currentMetrics": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "currentMetrics is the last read state of the metrics used by this autoscaler.", Type: []string{"array"}, @@ -10043,13 +10275,23 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2.MetricStatus"), }, }, }, }, }, "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, SchemaProps: spec.SchemaProps{ Description: "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", Type: []string{"array"}, @@ -10057,22 +10299,52 @@ func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition"), + Ref: ref("k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerCondition"), }, }, }, }, }, }, - Required: []string{"currentReplicas", "desiredReplicas", "conditions"}, + Required: []string{"desiredReplicas"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2beta1.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/autoscaling/v2.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_MetricIdentifier(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MetricIdentifier defines the name and optionally selector for a metric", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the given metric", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_autoscaling_v2_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10090,31 +10362,31 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallbac "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ObjectMetricSource"), + Ref: ref("k8s.io/api/autoscaling/v2.ObjectMetricSource"), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.PodsMetricSource"), + Ref: ref("k8s.io/api/autoscaling/v2.PodsMetricSource"), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"), + Ref: ref("k8s.io/api/autoscaling/v2.ResourceMetricSource"), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ - Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource"), + Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + Ref: ref("k8s.io/api/autoscaling/v2.ContainerResourceMetricSource"), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ExternalMetricSource"), + Ref: ref("k8s.io/api/autoscaling/v2.ExternalMetricSource"), }, }, }, @@ -10122,11 +10394,11 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v2beta1.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta1.PodsMetricSource", "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"}, + "k8s.io/api/autoscaling/v2.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v2.ExternalMetricSource", "k8s.io/api/autoscaling/v2.ObjectMetricSource", "k8s.io/api/autoscaling/v2.PodsMetricSource", "k8s.io/api/autoscaling/v2.ResourceMetricSource"}, } } -func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10144,31 +10416,31 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallb "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2.ObjectMetricStatus"), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.PodsMetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2.PodsMetricStatus"), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2.ResourceMetricStatus"), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2.ContainerResourceMetricStatus"), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2.ExternalMetricStatus"), }, }, }, @@ -10176,185 +10448,222 @@ func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"}, + "k8s.io/api/autoscaling/v2.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v2.ExternalMetricStatus", "k8s.io/api/autoscaling/v2.ObjectMetricStatus", "k8s.io/api/autoscaling/v2.PodsMetricStatus", "k8s.io/api/autoscaling/v2.ResourceMetricStatus"}, } } -func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_MetricTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Description: "MetricTarget defines the target value, average value, or average utilization of a specific metric", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "target": { - SchemaProps: spec.SchemaProps{ - Description: "target is the described Kubernetes object.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), - }, - }, - "metricName": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question.", + Description: "type represents whether the metric type is Utilization, Value, or AverageValue", Default: "", Type: []string{"string"}, Format: "", }, }, - "targetValue": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "targetValue is the target value of the metric (as a quantity).", - Default: map[string]interface{}{}, + Description: "value is the target value of the metric (as a quantity).", Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, "averageValue": { SchemaProps: spec.SchemaProps{ Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, + "averageUtilization": { + SchemaProps: spec.SchemaProps{ + Description: "averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, - Required: []string{"target", "metricName", "targetValue"}, + Required: []string{"type"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_MetricValueStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Description: "MetricValueStatus holds the current value for a metric", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "target": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "target is the described Kubernetes object.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), + Description: "value is the current value of the metric (as a quantity).", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "metricName": { + "averageValue": { SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "currentValue": { + "averageUtilization": { SchemaProps: spec.SchemaProps{ - Description: "currentValue is the current value of the metric (as a quantity).", + Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_autoscaling_v2_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "describedObject": { + SchemaProps: spec.SchemaProps{ + Description: "describedObject specifies the descriptions of a object,such as kind,name apiVersion", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref("k8s.io/api/autoscaling/v2.CrossVersionObjectReference"), }, }, - "selector": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricTarget"), }, }, - "averageValue": { + "metric": { SchemaProps: spec.SchemaProps{ - Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), }, }, }, - Required: []string{"target", "metricName", "currentValue"}, + Required: []string{"describedObject", "target", "metric"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/autoscaling/v2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricTarget"}, } } -func schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Description: "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metricName": { + "metric": { SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), }, }, - "targetAverageValue": { + "current": { SchemaProps: spec.SchemaProps{ - Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref("k8s.io/api/autoscaling/v2.MetricValueStatus"), }, }, - "selector": { + "describedObject": { SchemaProps: spec.SchemaProps{ - Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "DescribedObject specifies the descriptions of a object,such as kind,name apiVersion", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.CrossVersionObjectReference"), }, }, }, - Required: []string{"metricName", "targetAverageValue"}, + Required: []string{"metric", "current", "describedObject"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/autoscaling/v2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricValueStatus"}, } } -func schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + Description: "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metricName": { + "metric": { SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), }, }, - "currentAverageValue": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref("k8s.io/api/autoscaling/v2.MetricTarget"), }, }, - "selector": { + }, + Required: []string{"metric", "target"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricTarget"}, + } +} + +func schema_k8sio_api_autoscaling_v2_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metric": { SchemaProps: spec.SchemaProps{ - Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricIdentifier"), + }, + }, + "current": { + SchemaProps: spec.SchemaProps{ + Description: "current contains the current value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricValueStatus"), }, }, }, - Required: []string{"metricName", "currentAverageValue"}, + Required: []string{"metric", "current"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/autoscaling/v2.MetricIdentifier", "k8s.io/api/autoscaling/v2.MetricValueStatus"}, } } -func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10369,29 +10678,23 @@ func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref common.Refere Format: "", }, }, - "targetAverageUtilization": { - SchemaProps: spec.SchemaProps{ - Description: "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "targetAverageValue": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2.MetricTarget"), }, }, }, - Required: []string{"name"}, + Required: []string{"name", "target"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "k8s.io/api/autoscaling/v2.MetricTarget"}, } } -func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10400,36 +10703,29 @@ func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref common.Refere Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "name is the name of the resource in question.", + Description: "Name is the name of the resource in question.", Default: "", Type: []string{"string"}, Format: "", }, }, - "currentAverageUtilization": { - SchemaProps: spec.SchemaProps{ - Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentAverageValue": { + "current": { SchemaProps: spec.SchemaProps{ - Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref("k8s.io/api/autoscaling/v2.MetricValueStatus"), }, }, }, - Required: []string{"name", "currentAverageValue"}, + Required: []string{"name", "current"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "k8s.io/api/autoscaling/v2.MetricValueStatus"}, } } -func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10444,11 +10740,17 @@ func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref comm Format: "", }, }, - "target": { + "targetAverageUtilization": { SchemaProps: spec.SchemaProps{ - Description: "target specifies the target value for the given metric", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + Description: "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "targetAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, "container": { @@ -10460,15 +10762,15 @@ func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref comm }, }, }, - Required: []string{"name", "target", "container"}, + Required: []string{"name", "container"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10477,37 +10779,44 @@ func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref comm Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the resource in question.", + Description: "name is the name of the resource in question.", Default: "", Type: []string{"string"}, Format: "", }, }, - "current": { + "currentAverageUtilization": { SchemaProps: spec.SchemaProps{ - Description: "current contains the current value for the given metric", + Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, "container": { SchemaProps: spec.SchemaProps{ - Description: "Container is the name of the container in the pods of the scaling target", + Description: "container is the name of the container in the pods of the scaling target", Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"name", "current", "container"}, + Required: []string{"name", "currentAverageValue", "container"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10544,148 +10853,92 @@ func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common } } -func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Description: "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metric": { + "metricName": { SchemaProps: spec.SchemaProps{ - Description: "metric identifies the target metric by name and selector", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Description: "metricName is the name of the metric in question.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "target": { + "metricSelector": { SchemaProps: spec.SchemaProps{ - Description: "target specifies the target value for the given metric", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + Description: "metricSelector is used to identify a specific time series within a given metric.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - }, - Required: []string{"metric", "target"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, - } -} - -func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "metric": { + "targetValue": { SchemaProps: spec.SchemaProps{ - Description: "metric identifies the target metric by name and selector", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Description: "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "current": { + "targetAverageValue": { SchemaProps: spec.SchemaProps{ - Description: "current contains the current value for the given metric", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + Description: "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, - Required: []string{"metric", "current"}, + Required: []string{"metricName"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HPAScalingPolicy is a single policy which must hold true for a specified past interval.", + Description: "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "metricName": { SchemaProps: spec.SchemaProps{ - Description: "Type is used to specify the scaling policy.", + Description: "metricName is the name of a metric used for autoscaling in metric system.", Default: "", Type: []string{"string"}, Format: "", }, }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value contains the amount of change which is permitted by the policy. It must be greater than zero", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "periodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"type", "value", "periodSeconds"}, - }, - }, - } -} - -func schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "stabilizationWindowSeconds": { + "metricSelector": { SchemaProps: spec.SchemaProps{ - Description: "StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).", - Type: []string{"integer"}, - Format: "int32", + Description: "metricSelector is used to identify a specific time series within a given metric.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "selectPolicy": { + "currentValue": { SchemaProps: spec.SchemaProps{ - Description: "selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.", - Type: []string{"string"}, - Format: "", + Description: "currentValue is the current value of the metric (as a quantity)", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "policies": { + "currentAverageValue": { SchemaProps: spec.SchemaProps{ - Description: "policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy"), - }, - }, - }, + Description: "currentAverageValue is the current value of metric averaged over autoscaled pods.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, + Required: []string{"metricName", "currentValue"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10717,52 +10970,25 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the current information about the autoscaler.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "scaleUp": { - SchemaProps: spec.SchemaProps{ - Description: "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingRules"), - }, - }, - "scaleDown": { - SchemaProps: spec.SchemaProps{ - Description: "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).", - Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingRules"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.HPAScalingRules"}, + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10815,11 +11041,11 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref c } } -func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.", + Description: "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -10851,7 +11077,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler"), }, }, }, @@ -10862,11 +11088,11 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10877,7 +11103,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common SchemaProps: spec.SchemaProps{ Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), }, }, "minReplicas": { @@ -10897,34 +11123,28 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common }, "metrics": { SchemaProps: spec.SchemaProps{ - Description: "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.", + Description: "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricSpec"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricSpec"), }, }, }, }, }, - "behavior": { - SchemaProps: spec.SchemaProps{ - Description: "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior"), - }, - }, }, Required: []string{"scaleTargetRef", "maxReplicas"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior", "k8s.io/api/autoscaling/v2beta2.MetricSpec"}, + "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta1.MetricSpec"}, } } -func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -10968,7 +11188,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricStatus"), }, }, }, @@ -10982,52 +11202,22 @@ func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition"), }, }, }, }, }, }, - Required: []string{"currentReplicas", "desiredReplicas", "conditions"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2beta2.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MetricIdentifier defines the name and optionally selector for a metric", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the name of the given metric", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - }, - Required: []string{"name"}, + Required: []string{"currentReplicas", "desiredReplicas"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2beta1.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -11045,31 +11235,31 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallbac "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ObjectMetricSource"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.ObjectMetricSource"), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.PodsMetricSource"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.PodsMetricSource"), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource"), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ExternalMetricSource"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.ExternalMetricSource"), }, }, }, @@ -11077,11 +11267,11 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v2beta2.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta2.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta2.PodsMetricSource", "k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"}, + "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v2beta1.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta1.PodsMetricSource", "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"}, } } -func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -11099,31 +11289,31 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallb "object": { SchemaProps: spec.SchemaProps{ Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus"), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.PodsMetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.PodsMetricStatus"), }, }, "resource": { SchemaProps: spec.SchemaProps{ Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"), }, }, "containerResource": { SchemaProps: spec.SchemaProps{ Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus"), }, }, "external": { SchemaProps: spec.SchemaProps{ Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", - Ref: ref("k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus"), + Ref: ref("k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus"), }, }, }, @@ -11131,224 +11321,264 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta2.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"}, + "k8s.io/api/autoscaling/v2beta1.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v2beta1.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"}, } } -func schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MetricTarget defines the target value, average value, or average utilization of a specific metric", + Description: "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "type represents whether the metric type is Utilization, Value, or AverageValue", + Description: "target is the described Kubernetes object.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), + }, + }, + "metricName": { + SchemaProps: spec.SchemaProps{ + Description: "metricName is the name of the metric in question.", Default: "", Type: []string{"string"}, Format: "", }, }, - "value": { + "targetValue": { SchemaProps: spec.SchemaProps{ - Description: "value is the target value of the metric (as a quantity).", + Description: "targetValue is the target value of the metric (as a quantity).", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "averageValue": { + "selector": { SchemaProps: spec.SchemaProps{ - Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "averageUtilization": { + "averageValue": { SchemaProps: spec.SchemaProps{ - Description: "averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type", - Type: []string{"integer"}, - Format: "int32", + Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, - Required: []string{"type"}, + Required: []string{"target", "metricName", "targetValue"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MetricValueStatus holds the current value for a metric", + Description: "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "value": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "value is the current value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "target is the described Kubernetes object.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), }, }, - "averageValue": { + "metricName": { SchemaProps: spec.SchemaProps{ - Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Description: "metricName is the name of the metric in question.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "currentValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentValue is the current value of the metric (as a quantity).", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "averageUtilization": { + "selector": { SchemaProps: spec.SchemaProps{ - Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", - Type: []string{"integer"}, - Format: "int32", + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "averageValue": { + SchemaProps: spec.SchemaProps{ + Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, + Required: []string{"target", "metricName", "currentValue"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Description: "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "describedObject": { + "metricName": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + Description: "metricName is the name of the metric in question", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "target": { + "targetAverageValue": { SchemaProps: spec.SchemaProps{ - Description: "target specifies the target value for the given metric", + Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "metric": { + "selector": { SchemaProps: spec.SchemaProps{ - Description: "metric identifies the target metric by name and selector", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, }, - Required: []string{"describedObject", "target", "metric"}, + Required: []string{"metricName", "targetAverageValue"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + Description: "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metric": { + "metricName": { SchemaProps: spec.SchemaProps{ - Description: "metric identifies the target metric by name and selector", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Description: "metricName is the name of the metric in question", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "current": { + "currentAverageValue": { SchemaProps: spec.SchemaProps{ - Description: "current contains the current value for the given metric", + Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "describedObject": { + "selector": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, }, - Required: []string{"metric", "current", "describedObject"}, + Required: []string{"metricName", "currentAverageValue"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Description: "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metric": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "metric identifies the target metric by name and selector", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Description: "name is the name of the resource in question.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "target": { + "targetAverageUtilization": { SchemaProps: spec.SchemaProps{ - Description: "target specifies the target value for the given metric", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + Description: "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "targetAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, - Required: []string{"metric", "target"}, + Required: []string{"name"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta1_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + Description: "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metric": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "metric identifies the target metric by name and selector", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), + Description: "name is the name of the resource in question.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "current": { + "currentAverageUtilization": { SchemaProps: spec.SchemaProps{ - Description: "current contains the current value for the given metric", + Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentAverageValue": { + SchemaProps: spec.SchemaProps{ + Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, - Required: []string{"metric", "current"}, + Required: []string{"name", "currentAverageValue"}, }, }, Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + Description: "ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { @@ -11366,8 +11596,16 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref common.Refere Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), }, }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "container is the name of the container in the pods of the scaling target", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, }, - Required: []string{"name", "target"}, + Required: []string{"name", "target", "container"}, }, }, Dependencies: []string{ @@ -11375,11 +11613,11 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref common.Refere } } -func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Description: "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { @@ -11397,8 +11635,16 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.Refere Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), }, }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "Container is the name of the container in the pods of the scaling target", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, }, - Required: []string{"name", "current"}, + Required: []string{"name", "current", "container"}, }, }, Dependencies: []string{ @@ -11406,224 +11652,189 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.Refere } } -func schema_k8sio_api_batch_v1_CronJob(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJob represents the configuration of a single cron job.", + Description: "CrossVersionObjectReference contains enough information to let you identify the referred resource.", 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", + Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "name": { 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", + Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + Description: "API version of the referent", + Type: []string{"string"}, + Format: "", }, }, - "spec": { + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metric": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.CronJobSpec"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, - "status": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.CronJobStatus"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), }, }, }, + Required: []string{"metric", "target"}, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.CronJobSpec", "k8s.io/api/batch/v1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, } } -func schema_k8sio_api_batch_v1_CronJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_ExternalMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJobList is a collection of cron jobs.", + Description: "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", 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": { + "metric": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, - "items": { + "current": { SchemaProps: spec.SchemaProps{ - Description: "items is the list of CronJobs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.CronJob"), - }, - }, - }, + Description: "current contains the current value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), }, }, }, - Required: []string{"items"}, + Required: []string{"metric", "current"}, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, } } -func schema_k8sio_api_batch_v1_CronJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJobSpec describes how the job execution will look like and when it will actually run.", + Description: "HPAScalingPolicy is a single policy which must hold true for a specified past interval.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "schedule": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + Description: "Type is used to specify the scaling policy.", Default: "", Type: []string{"string"}, Format: "", }, }, - "startingDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "concurrencyPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", - Type: []string{"string"}, - Format: "", - }, - }, - "suspend": { - SchemaProps: spec.SchemaProps{ - Description: "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "jobTemplate": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the job that will be created when executing a CronJob.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobTemplateSpec"), - }, - }, - "successfulJobsHistoryLimit": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.", + Description: "Value contains the amount of change which is permitted by the policy. It must be greater than zero", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "failedJobsHistoryLimit": { + "periodSeconds": { SchemaProps: spec.SchemaProps{ - Description: "The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.", + Description: "PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"schedule", "jobTemplate"}, + Required: []string{"type", "value", "periodSeconds"}, }, }, - Dependencies: []string{ - "k8s.io/api/batch/v1.JobTemplateSpec"}, } } -func schema_k8sio_api_batch_v1_CronJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJobStatus represents the current state of a cron job.", + Description: "HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "active": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, + "stabilizationWindowSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).", + Type: []string{"integer"}, + Format: "int32", }, + }, + "selectPolicy": { SchemaProps: spec.SchemaProps{ - Description: "A list of pointers to currently running jobs.", + Description: "selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "policies": { + SchemaProps: spec.SchemaProps{ + Description: "policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy"), }, }, }, }, }, - "lastScheduleTime": { - SchemaProps: spec.SchemaProps{ - Description: "Information when was the last time the job was successfully scheduled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastSuccessfulTime": { - SchemaProps: spec.SchemaProps{ - Description: "Information when was the last time the job successfully completed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/autoscaling/v2beta2.HPAScalingPolicy"}, } } -func schema_k8sio_api_batch_v1_Job(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Job represents the configuration of a single job.", + Description: "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -11642,80 +11853,100 @@ func schema_k8sio_api_batch_v1_Job(ref common.ReferenceCallback) common.OpenAPID }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "metadata is the standard object metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobSpec"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Description: "status is the current information about the autoscaler.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobStatus"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobSpec", "k8s.io/api/batch/v1.JobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_batch_v1_JobCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerBehavior(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JobCondition describes current state of a job.", + Description: "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "scaleUp": { SchemaProps: spec.SchemaProps{ - Description: "Type of job condition, Complete or Failed.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingRules"), }, }, - "status": { + "scaleDown": { SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).", + Ref: ref("k8s.io/api/autoscaling/v2beta2.HPAScalingRules"), }, }, - "lastProbeTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition was checked.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.HPAScalingRules"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type describes the current condition", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the status of the condition (True, False, Unknown)", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transit from one status to another.", + Description: "lastTransitionTime is the last time the condition transitioned from one status to another", Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "reason": { SchemaProps: spec.SchemaProps{ - Description: "(brief) reason for the condition's last transition.", + Description: "reason is the reason for the condition's last transition.", Type: []string{"string"}, Format: "", }, }, "message": { SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating details about last transition.", + Description: "message is a human-readable explanation containing details about the transition", Type: []string{"string"}, Format: "", }, @@ -11729,11 +11960,11 @@ func schema_k8sio_api_batch_v1_JobCondition(ref common.ReferenceCallback) common } } -func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JobList is a collection of jobs.", + Description: "HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -11752,20 +11983,20 @@ func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.Open }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "metadata is the standard list 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 Jobs.", + Description: "items is the list of horizontal pod autoscaler objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.Job"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler"), }, }, }, @@ -11776,659 +12007,605 @@ func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.Job", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JobSpec describes how the job execution will look like.", + Description: "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "parallelism": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "completions": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "activeDeadlineSeconds": { + "scaleTargetRef": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.", - Type: []string{"integer"}, - Format: "int64", + Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), }, }, - "backoffLimit": { + "minReplicas": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the number of retries before marking this job failed. Defaults to 6", + Description: "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.", Type: []string{"integer"}, Format: "int32", }, }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "manualSelector": { - SchemaProps: spec.SchemaProps{ - Description: "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector", - Type: []string{"boolean"}, - Format: "", - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "ttlSecondsAfterFinished": { + "maxReplicas": { SchemaProps: spec.SchemaProps{ - Description: "ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature.", + Description: "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "completionMode": { + "metrics": { SchemaProps: spec.SchemaProps{ - Description: "CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nThis field is beta-level. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job.", - Type: []string{"string"}, - Format: "", + Description: "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricSpec"), + }, + }, + }, }, }, - "suspend": { + "behavior": { SchemaProps: spec.SchemaProps{ - Description: "Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.\n\nThis field is beta-level, gated by SuspendJob feature flag (enabled by default).", - Type: []string{"boolean"}, - Format: "", + Description: "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior"), }, }, }, - Required: []string{"template"}, + Required: []string{"scaleTargetRef", "maxReplicas"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerBehavior", "k8s.io/api/autoscaling/v2beta2.MetricSpec"}, } } -func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_HorizontalPodAutoscalerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JobStatus represents the current state of a Job.", + Description: "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobCondition"), - }, - }, - }, - }, - }, - "startTime": { + "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "observedGeneration is the most recent generation observed by this autoscaler.", + Type: []string{"integer"}, + Format: "int64", }, }, - "completionTime": { + "lastScaleTime": { SchemaProps: spec.SchemaProps{ - Description: "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully.", + Description: "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "active": { - SchemaProps: spec.SchemaProps{ - Description: "The number of actively running pods.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "succeeded": { + "currentReplicas": { SchemaProps: spec.SchemaProps{ - Description: "The number of pods which reached phase Succeeded.", + Description: "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "failed": { + "desiredReplicas": { SchemaProps: spec.SchemaProps{ - Description: "The number of pods which reached phase Failed.", + Description: "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "completedIndexes": { + "currentMetrics": { SchemaProps: spec.SchemaProps{ - Description: "CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", - Type: []string{"string"}, - Format: "", + Description: "currentMetrics is the last read state of the metrics used by this autoscaler.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricStatus"), + }, + }, + }, }, }, - "uncountedTerminatedPods": { + "conditions": { SchemaProps: spec.SchemaProps{ - Description: "UncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status: (1) Add the pod UID to the arrays in this field. (2) Remove the pod finalizer. (3) Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nThis field is alpha-level. The job controller only makes use of this field when the feature gate PodTrackingWithFinalizers is enabled. Old jobs might not be tracked using this field, in which case the field remains null.", - Ref: ref("k8s.io/api/batch/v1.UncountedTerminatedPods"), + Description: "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition"), + }, + }, + }, }, }, }, + Required: []string{"currentReplicas", "desiredReplicas"}, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobCondition", "k8s.io/api/batch/v1.UncountedTerminatedPods", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/autoscaling/v2beta2.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2beta2.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_batch_v1_JobTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_MetricIdentifier(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JobTemplateSpec describes the data a Job should have when created from a template", + Description: "MetricIdentifier defines the name and optionally selector for a metric", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metadata": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata of the jobs created from this template. 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"), + Description: "name is the name of the given metric", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "spec": { + "selector": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobSpec"), + Description: "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, }, + Required: []string{"name"}, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_batch_v1_UncountedTerminatedPods(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_MetricSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.", + Description: "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "succeeded": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Succeeded holds UIDs of succeeded Pods.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "failed": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", - }, - }, + "type": { SchemaProps: spec.SchemaProps{ - Description: "Failed holds UIDs of failed Pods.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - } -} - -func schema_k8sio_api_batch_v1beta1_CronJob(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CronJob represents the configuration of a single cron job.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "object": { 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: "", + Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ObjectMetricSource"), }, }, - "apiVersion": { + "pods": { 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: "", + Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.PodsMetricSource"), }, }, - "metadata": { + "resource": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"), }, }, - "spec": { + "containerResource": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1beta1.CronJobSpec"), + Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource"), }, }, - "status": { + "external": { SchemaProps: spec.SchemaProps{ - Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1beta1.CronJobStatus"), + Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ExternalMetricSource"), }, }, }, + Required: []string{"type"}, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1beta1.CronJobSpec", "k8s.io/api/batch/v1beta1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricSource", "k8s.io/api/autoscaling/v2beta2.ExternalMetricSource", "k8s.io/api/autoscaling/v2beta2.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta2.PodsMetricSource", "k8s.io/api/autoscaling/v2beta2.ResourceMetricSource"}, } } -func schema_k8sio_api_batch_v1beta1_CronJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJobList is a collection of cron jobs.", + Description: "MetricStatus describes the last-read state of a single metric.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "type": { 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", + Description: "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "object": { 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: "", + Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus"), }, }, - "metadata": { + "pods": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. 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"), + Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.PodsMetricStatus"), }, }, - "items": { + "resource": { SchemaProps: spec.SchemaProps{ - Description: "items is the list of CronJobs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1beta1.CronJob"), - }, - }, - }, + Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"), + }, + }, + "containerResource": { + SchemaProps: spec.SchemaProps{ + Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus"), + }, + }, + "external": { + SchemaProps: spec.SchemaProps{ + Description: "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + Ref: ref("k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus"), }, }, }, - Required: []string{"items"}, + Required: []string{"type"}, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1beta1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus", "k8s.io/api/autoscaling/v2beta2.ExternalMetricStatus", "k8s.io/api/autoscaling/v2beta2.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta2.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta2.ResourceMetricStatus"}, } } -func schema_k8sio_api_batch_v1beta1_CronJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_MetricTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJobSpec describes how the job execution will look like and when it will actually run.", + Description: "MetricTarget defines the target value, average value, or average utilization of a specific metric", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "schedule": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + Description: "type represents whether the metric type is Utilization, Value, or AverageValue", Default: "", Type: []string{"string"}, Format: "", }, }, - "startingDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "concurrencyPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", - Type: []string{"string"}, - Format: "", - }, - }, - "suspend": { - SchemaProps: spec.SchemaProps{ - Description: "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "jobTemplate": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the job that will be created when executing a CronJob.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), + Description: "value is the target value of the metric (as a quantity).", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "successfulJobsHistoryLimit": { + "averageValue": { SchemaProps: spec.SchemaProps{ - Description: "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.", - Type: []string{"integer"}, - Format: "int32", + Description: "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "failedJobsHistoryLimit": { + "averageUtilization": { SchemaProps: spec.SchemaProps{ - Description: "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + Description: "averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type", Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"schedule", "jobTemplate"}, + Required: []string{"type"}, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1beta1.JobTemplateSpec"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_batch_v1beta1_CronJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJobStatus represents the current state of a cron job.", + Description: "MetricValueStatus holds the current value for a metric", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "active": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, + "value": { SchemaProps: spec.SchemaProps{ - Description: "A list of pointers to currently running jobs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, + Description: "value is the current value of the metric (as a quantity).", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "lastScheduleTime": { + "averageValue": { SchemaProps: spec.SchemaProps{ - Description: "Information when was the last time the job was successfully scheduled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, - "lastSuccessfulTime": { + "averageUtilization": { SchemaProps: spec.SchemaProps{ - Description: "Information when was the last time the job successfully completed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + Type: []string{"integer"}, + Format: "int32", }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_batch_v1beta1_JobTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JobTemplate describes a template for creating copies of a predefined pod.", + Description: "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", 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": { + "describedObject": { 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: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), }, }, - "metadata": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "target specifies the target value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), }, }, - "template": { + "metric": { SchemaProps: spec.SchemaProps{ - Description: "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, }, + Required: []string{"describedObject", "target", "metric"}, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1beta1.JobTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, } } -func schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_ObjectMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JobTemplateSpec describes the data a Job should have when created from a template", + Description: "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "metadata": { + "metric": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, - "spec": { + "current": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/batch/v1.JobSpec"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + }, + }, + "describedObject": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference"), }, }, }, + Required: []string{"metric", "current", "describedObject"}, }, }, Dependencies: []string{ - "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/autoscaling/v2beta2.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, } } -func schema_k8sio_api_certificates_v1_CertificateSigningRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_PodsMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.\n\nKubelets use this API to obtain:\n 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName).\n 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName).\n\nThis API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.", + Description: "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", 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": { + "metric": { 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: "", + Description: "metric identifies the target metric by name and selector", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, - "metadata": { + "target": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), }, }, - "spec": { + }, + Required: []string{"metric", "target"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_PodsMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metric": { SchemaProps: spec.SchemaProps{ - Description: "spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.", + Description: "metric identifies the target metric by name and selector", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestSpec"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricIdentifier"), }, }, - "status": { + "current": { SchemaProps: spec.SchemaProps{ - Description: "status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure.", + Description: "current contains the current value for the given metric", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestStatus"), + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), }, }, }, - Required: []string{"spec"}, + Required: []string{"metric", "current"}, }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1.CertificateSigningRequestSpec", "k8s.io/api/certificates/v1.CertificateSigningRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/autoscaling/v2beta2.MetricIdentifier", "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, } } -func schema_k8sio_api_certificates_v1_CertificateSigningRequestCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object", + Description: "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "type of the condition. Known conditions are \"Approved\", \"Denied\", and \"Failed\".\n\nAn \"Approved\" condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer.\n\nA \"Denied\" condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer.\n\nA \"Failed\" condition is added via the /status subresource, indicating the signer failed to issue the certificate.\n\nApproved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added.\n\nOnly one condition of a given type is allowed.", + Description: "name is the name of the resource in question.", Default: "", Type: []string{"string"}, Format: "", }, }, - "status": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\".", + Description: "target specifies the target value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricTarget"), + }, + }, + }, + Required: []string{"name", "target"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricTarget"}, + } +} + +func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the resource in question.", Default: "", Type: []string{"string"}, Format: "", }, }, - "reason": { + "current": { SchemaProps: spec.SchemaProps{ - Description: "reason indicates a brief reason for the request state", + Description: "current contains the current value for the given metric", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/autoscaling/v2beta2.MetricValueStatus"), + }, + }, + }, + Required: []string{"name", "current"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/autoscaling/v2beta2.MetricValueStatus"}, + } +} + +func schema_k8sio_api_batch_v1_CronJob(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CronJob represents the configuration of a single cron job.", + 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: "", }, }, - "message": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "message contains a human readable message with details about the request state", + 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: "", }, }, - "lastUpdateTime": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "lastUpdateTime is the time of the last update to this condition", + Description: "Standard object's metadata. 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.Time"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "lastTransitionTime": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", + Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref("k8s.io/api/batch/v1.CronJobSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.CronJobStatus"), }, }, }, - Required: []string{"type", "status"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/batch/v1.CronJobSpec", "k8s.io/api/batch/v1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1_CronJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CertificateSigningRequestList is a collection of CertificateSigningRequest objects", + Description: "CronJobList is a collection of cron jobs.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -12447,19 +12624,20 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref common.R }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard list metadata. 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 a collection of CertificateSigningRequest objects", + Description: "items is the list of CronJobs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequest"), + Ref: ref("k8s.io/api/batch/v1.CronJob"), }, }, }, @@ -12470,182 +12648,127 @@ func schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1.CertificateSigningRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/batch/v1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_certificates_v1_CertificateSigningRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1_CronJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CertificateSigningRequestSpec contains the certificate request.", + Description: "CronJobSpec describes how the job execution will look like and when it will actually run.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "request": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", - Type: []string{"string"}, - Format: "byte", - }, - }, - "signerName": { + "schedule": { SchemaProps: spec.SchemaProps{ - Description: "signerName indicates the requested signer, and is a qualified name.\n\nList/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.\n\nWell-known Kubernetes signers are:\n 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.\n Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.\n Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.\n Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n\nMore details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers\n\nCustom signerNames can also be specified. The signer defines:\n 1. Trust distribution: how trust (CA bundles) are distributed.\n 2. Permitted subjects: and behavior when a disallowed subject is requested.\n 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.\n 4. Required, permitted, or forbidden key usages / extended key usages.\n 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.\n 6. Whether or not requests for CA certificates are allowed.", + Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", Default: "", Type: []string{"string"}, Format: "", }, }, - "expirationSeconds": { + "startingDeadlineSeconds": { SchemaProps: spec.SchemaProps{ - Description: "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.\n\nAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.", + Description: "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", Type: []string{"integer"}, - Format: "int32", - }, - }, - "usages": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "usages specifies a set of key usages requested in the issued certificate.\n\nRequests for TLS client certificates typically request: \"digital signature\", \"key encipherment\", \"client auth\".\n\nRequests for TLS serving certificates typically request: \"key encipherment\", \"digital signature\", \"server auth\".\n\nValid values are:\n \"signing\", \"digital signature\", \"content commitment\",\n \"key encipherment\", \"key agreement\", \"data encipherment\",\n \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\",\n \"server auth\", \"client auth\",\n \"code signing\", \"email protection\", \"s/mime\",\n \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\",\n \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Format: "int64", }, }, - "username": { + "concurrencyPolicy": { SchemaProps: spec.SchemaProps{ - Description: "username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + Description: "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one\n\nPossible enum values:\n - `\"Allow\"` allows CronJobs to run concurrently.\n - `\"Forbid\"` forbids concurrent runs, skipping next run if previous hasn't finished yet.\n - `\"Replace\"` cancels currently running job and replaces it with a new one.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Allow", "Forbid", "Replace"}}, }, - "uid": { + "suspend": { SchemaProps: spec.SchemaProps{ - Description: "uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", - Type: []string{"string"}, + Description: "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + Type: []string{"boolean"}, Format: "", }, }, - "groups": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, + "jobTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the job that will be created when executing a CronJob.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.JobTemplateSpec"), }, + }, + "successfulJobsHistoryLimit": { SchemaProps: spec.SchemaProps{ - Description: "groups contains group membership of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.", + Type: []string{"integer"}, + Format: "int32", }, }, - "extra": { + "failedJobsHistoryLimit": { SchemaProps: spec.SchemaProps{ - Description: "extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, + Description: "The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.", + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"request", "signerName"}, + Required: []string{"schedule", "jobTemplate"}, }, }, + Dependencies: []string{ + "k8s.io/api/batch/v1.JobTemplateSpec"}, } } -func schema_k8sio_api_certificates_v1_CertificateSigningRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1_CronJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.", + Description: "CronJobStatus represents the current state of a cron job.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "conditions": { + "active": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "type", - }, - "x-kubernetes-list-type": "map", + "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\".", + Description: "A list of pointers to currently running jobs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestCondition"), + Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, }, }, }, - "certificate": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, + "lastScheduleTime": { + SchemaProps: spec.SchemaProps{ + Description: "Information when was the last time the job was successfully scheduled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, + }, + "lastSuccessfulTime": { SchemaProps: spec.SchemaProps{ - Description: "certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificate must contain one or more PEM blocks.\n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data\n must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.\n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,\n to allow for explanatory text as described in section 5.2 of RFC7468.\n\nIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.\n\nThe certificate is encoded in PEM format.\n\nWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:\n\n base64(\n -----BEGIN CERTIFICATE-----\n ...\n -----END CERTIFICATE-----\n )", - Type: []string{"string"}, - Format: "byte", + Description: "Information when was the last time the job successfully completed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1.CertificateSigningRequestCondition"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1_Job(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Describes a certificate signing request", + Description: "Job represents the configuration of a single job.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -12664,85 +12787,86 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref common. }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.", + Description: "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec"), + Ref: ref("k8s.io/api/batch/v1.JobSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "Derived information about the request.", + Description: "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus"), + Ref: ref("k8s.io/api/batch/v1.JobStatus"), }, }, }, - Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec", "k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/batch/v1.JobSpec", "k8s.io/api/batch/v1.JobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1_JobCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "JobCondition describes current state of a job.", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "type of the condition. Known conditions include \"Approved\", \"Denied\", and \"Failed\".", + Description: "Type of job condition, Complete or Failed.\n\nPossible enum values:\n - `\"Complete\"` means the job has completed its execution.\n - `\"Failed\"` means the job has failed its execution.\n - `\"Suspended\"` means the job has been suspended.", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Complete", "Failed", "Suspended"}}, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\". Defaults to \"True\". If unset, should be treated as \"True\".", + Description: "Status of the condition, one of True, False, Unknown.", Default: "", Type: []string{"string"}, Format: "", }, }, - "reason": { + "lastProbeTime": { SchemaProps: spec.SchemaProps{ - Description: "brief reason for the request state", - Type: []string{"string"}, - Format: "", + Description: "Last time the condition was checked.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "message": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "human readable message with details about the request state", - Type: []string{"string"}, - Format: "", + Description: "Last time the condition transit from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "lastUpdateTime": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "timestamp for the last update to this condition", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "(brief) reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", }, }, - "lastTransitionTime": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "Human readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"type"}, + Required: []string{"type", "status"}, }, }, Dependencies: []string{ @@ -12750,11 +12874,12 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(re } } -func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1_JobList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "JobList is a collection of jobs.", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ @@ -12772,18 +12897,20 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref com }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard list metadata. 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{ - Type: []string{"array"}, + Description: "items is the list of Jobs.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequest"), + Ref: ref("k8s.io/api/batch/v1.Job"), }, }, }, @@ -12794,180 +12921,271 @@ func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref com }, }, Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.CertificateSigningRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/batch/v1.Job", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1_JobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CertificateSigningRequestSpec contains the certificate request.", + Description: "JobSpec describes how the job execution will look like.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "request": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, + "parallelism": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + Type: []string{"integer"}, + Format: "int32", }, + }, + "completions": { SchemaProps: spec.SchemaProps{ - Description: "Base64-encoded PKCS#10 CSR data", - Type: []string{"string"}, - Format: "byte", + Description: "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + Type: []string{"integer"}, + Format: "int32", }, }, - "signerName": { + "activeDeadlineSeconds": { SchemaProps: spec.SchemaProps{ - Description: "Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`. If empty, it will be defaulted:\n 1. If it's a kubelet client certificate, it is assigned\n \"kubernetes.io/kube-apiserver-client-kubelet\".\n 2. If it's a kubelet serving certificate, it is assigned\n \"kubernetes.io/kubelet-serving\".\n 3. Otherwise, it is assigned \"kubernetes.io/legacy-unknown\".\nDistribution of trust for signers happens out of band. You can select on this field using `spec.signerName`.", - Type: []string{"string"}, - Format: "", + Description: "Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.", + Type: []string{"integer"}, + Format: "int64", }, }, - "expirationSeconds": { + "backoffLimit": { SchemaProps: spec.SchemaProps{ - Description: "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.\n\nAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.", + Description: "Specifies the number of retries before marking this job failed. Defaults to 6", Type: []string{"integer"}, Format: "int32", }, }, - "usages": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "manualSelector": { + SchemaProps: spec.SchemaProps{ + Description: "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector", + Type: []string{"boolean"}, + Format: "", }, + }, + "template": { SchemaProps: spec.SchemaProps{ - Description: "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12\nValid values are:\n \"signing\",\n \"digital signature\",\n \"content commitment\",\n \"key encipherment\",\n \"key agreement\",\n \"data encipherment\",\n \"cert sign\",\n \"crl sign\",\n \"encipher only\",\n \"decipher only\",\n \"any\",\n \"server auth\",\n \"client auth\",\n \"code signing\",\n \"email protection\",\n \"s/mime\",\n \"ipsec end system\",\n \"ipsec tunnel\",\n \"ipsec user\",\n \"timestamping\",\n \"ocsp signing\",\n \"microsoft sgc\",\n \"netscape sgc\"", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), }, }, - "username": { + "ttlSecondsAfterFinished": { SchemaProps: spec.SchemaProps{ - Description: "Information about the requesting user. See user.Info interface for details.", + Description: "ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "completionMode": { + SchemaProps: spec.SchemaProps{ + Description: "CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nThis field is beta-level. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job.", Type: []string{"string"}, Format: "", }, }, - "uid": { + "suspend": { SchemaProps: spec.SchemaProps{ - Description: "UID information about the requesting user. See user.Info interface for details.", - Type: []string{"string"}, + Description: "Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.\n\nThis field is beta-level, gated by SuspendJob feature flag (enabled by default).", + Type: []string{"boolean"}, Format: "", }, }, - "groups": { + }, + Required: []string{"template"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JobStatus represents the current state of a Job.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", + "x-kubernetes-list-type": "atomic", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", }, }, SchemaProps: spec.SchemaProps{ - Description: "Group information about the requesting user. See user.Info interface for details.", + Description: "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.JobCondition"), }, }, }, }, }, - "extra": { + "startTime": { SchemaProps: spec.SchemaProps{ - Description: "Extra information about the requesting user. See user.Info interface for details.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, + Description: "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "completionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "active": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pending and running pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "succeeded": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods which reached phase Succeeded.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failed": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods which reached phase Failed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "completedIndexes": { + SchemaProps: spec.SchemaProps{ + Description: "CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", + Type: []string{"string"}, + Format: "", + }, + }, + "uncountedTerminatedPods": { + SchemaProps: spec.SchemaProps{ + Description: "UncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status: (1) Add the pod UID to the arrays in this field. (2) Remove the pod finalizer. (3) Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nThis field is beta-level. The job controller only makes use of this field when the feature gate JobTrackingWithFinalizers is enabled (enabled by default). Old jobs might not be tracked using this field, in which case the field remains null.", + Ref: ref("k8s.io/api/batch/v1.UncountedTerminatedPods"), + }, + }, + "ready": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods which have a Ready condition.\n\nThis field is alpha-level. The job controller populates the field when the feature gate JobReadyPods is enabled (disabled by default).", + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"request"}, }, }, + Dependencies: []string{ + "k8s.io/api/batch/v1.JobCondition", "k8s.io/api/batch/v1.UncountedTerminatedPods", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1_JobTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "JobTemplateSpec describes the data a Job should have when created from a template", + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "conditions": { + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata of the jobs created from this template. 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"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.JobSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_batch_v1_UncountedTerminatedPods(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "succeeded": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "type", - }, - "x-kubernetes-list-type": "map", + "x-kubernetes-list-type": "set", }, }, SchemaProps: spec.SchemaProps{ - Description: "Conditions applied to the request, such as approval or denial.", + Description: "Succeeded holds UIDs of succeeded Pods.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "certificate": { + "failed": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", + "x-kubernetes-list-type": "set", }, }, SchemaProps: spec.SchemaProps{ - Description: "If request was approved, the controller will place the issued certificate here.", - Type: []string{"string"}, - Format: "byte", + Description: "Failed holds UIDs of failed Pods.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, }, }, - Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"}, } } -func schema_k8sio_api_coordination_v1_Lease(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1beta1_CronJob(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Lease defines a lease concept.", + Description: "CronJob represents the configuration of a single cron job.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -12986,31 +13204,38 @@ func schema_k8sio_api_coordination_v1_Lease(ref common.ReferenceCallback) common }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1.LeaseSpec"), + Ref: ref("k8s.io/api/batch/v1beta1.CronJobSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1beta1.CronJobStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1.LeaseSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/batch/v1beta1.CronJobSpec", "k8s.io/api/batch/v1beta1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1beta1_CronJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LeaseList is a list of Lease objects.", + Description: "CronJobList is a collection of cron jobs.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -13036,13 +13261,13 @@ func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) co }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", + Description: "items is the list of CronJobs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1.Lease"), + Ref: ref("k8s.io/api/batch/v1beta1.CronJob"), }, }, }, @@ -13053,106 +13278,127 @@ func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1.Lease", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/batch/v1beta1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_coordination_v1_LeaseSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1beta1_CronJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LeaseSpec is a specification of a Lease.", + Description: "CronJobSpec describes how the job execution will look like and when it will actually run.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "holderIdentity": { + "schedule": { SchemaProps: spec.SchemaProps{ - Description: "holderIdentity contains the identity of the holder of a current lease.", + Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "leaseDurationSeconds": { + "startingDeadlineSeconds": { SchemaProps: spec.SchemaProps{ - Description: "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.", + Description: "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", Type: []string{"integer"}, - Format: "int32", + Format: "int64", }, }, - "acquireTime": { + "concurrencyPolicy": { SchemaProps: spec.SchemaProps{ - Description: "acquireTime is a time when the current lease was acquired.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Description: "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", + Type: []string{"string"}, + Format: "", }, }, - "renewTime": { + "suspend": { SchemaProps: spec.SchemaProps{ - Description: "renewTime is a time when the current holder of a lease has last updated the lease.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Description: "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + Type: []string{"boolean"}, + Format: "", }, }, - "leaseTransitions": { + "jobTemplate": { SchemaProps: spec.SchemaProps{ - Description: "leaseTransitions is the number of transitions of a lease between holders.", + Description: "Specifies the job that will be created when executing a CronJob.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), + }, + }, + "successfulJobsHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failedJobsHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", Type: []string{"integer"}, Format: "int32", }, }, }, + Required: []string{"schedule", "jobTemplate"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + "k8s.io/api/batch/v1beta1.JobTemplateSpec"}, } } -func schema_k8sio_api_coordination_v1beta1_Lease(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1beta1_CronJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Lease defines a lease concept.", + Description: "CronJobStatus represents the current state of a cron job.", 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: "", + "active": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "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: "", + Description: "A list of pointers to currently running jobs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, }, }, - "metadata": { + "lastScheduleTime": { SchemaProps: spec.SchemaProps{ - Description: "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"), + Description: "Information when was the last time the job was successfully scheduled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "spec": { + "lastSuccessfulTime": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1beta1.LeaseSpec"), + Description: "Information when was the last time the job successfully completed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1beta1.LeaseSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_coordination_v1beta1_LeaseList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1beta1_JobTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LeaseList is a list of Lease objects.", + Description: "JobTemplate describes a template for creating copies of a predefined pod.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -13171,361 +13417,387 @@ func schema_k8sio_api_coordination_v1beta1_LeaseList(ref common.ReferenceCallbac }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "template": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1beta1.Lease"), - }, - }, - }, + Description: "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1beta1.Lease", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/batch/v1beta1.JobTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_batch_v1beta1_JobTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LeaseSpec is a specification of a Lease.", + Description: "JobTemplateSpec describes the data a Job should have when created from a template", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "holderIdentity": { - SchemaProps: spec.SchemaProps{ - Description: "holderIdentity contains the identity of the holder of a current lease.", - Type: []string{"string"}, - Format: "", - }, - }, - "leaseDurationSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "acquireTime": { - SchemaProps: spec.SchemaProps{ - Description: "acquireTime is a time when the current lease was acquired.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "renewTime": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "renewTime is a time when the current holder of a lease has last updated the lease.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Description: "Standard object's metadata of the jobs created from this template. 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"), }, }, - "leaseTransitions": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "leaseTransitions is the number of transitions of a lease between holders.", - Type: []string{"integer"}, - Format: "int32", + Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/batch/v1.JobSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1_CertificateSigningRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", + Description: "CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.\n\nKubelets use this API to obtain:\n 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName).\n 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName).\n\nThis API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "volumeID": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Default: "", + 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: "", }, }, - "fsType": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + 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: "", }, }, - "partition": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", - Type: []string{"integer"}, - Format: "int32", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "readOnly": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Type: []string{"boolean"}, - Format: "", + Description: "spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestStatus"), }, }, }, - Required: []string{"volumeID"}, + Required: []string{"spec"}, }, }, + Dependencies: []string{ + "k8s.io/api/certificates/v1.CertificateSigningRequestSpec", "k8s.io/api/certificates/v1.CertificateSigningRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_core_v1_Affinity(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1_CertificateSigningRequestCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Affinity is a group of affinity scheduling rules.", + Description: "CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "nodeAffinity": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "Describes node affinity scheduling rules for the pod.", - Ref: ref("k8s.io/api/core/v1.NodeAffinity"), + Description: "type of the condition. Known conditions are \"Approved\", \"Denied\", and \"Failed\".\n\nAn \"Approved\" condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer.\n\nA \"Denied\" condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer.\n\nA \"Failed\" condition is added via the /status subresource, indicating the signer failed to issue the certificate.\n\nApproved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added.\n\nOnly one condition of a given type is allowed.\n\nPossible enum values:\n - `\"Approved\"` Approved indicates the request was approved and should be issued by the signer.\n - `\"Denied\"` Denied indicates the request was denied and should not be issued by the signer.\n - `\"Failed\"` Failed indicates the signer failed to issue the certificate.", + Default: "", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Approved", "Denied", "Failed"}}, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\".", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "podAffinity": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAffinity"), + Description: "reason indicates a brief reason for the request state", + Type: []string{"string"}, + Format: "", }, }, - "podAntiAffinity": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAntiAffinity"), + Description: "message contains a human readable message with details about the request state", + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastUpdateTime is the time of the last update to this condition", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, }, + Required: []string{"type", "status"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeAffinity", "k8s.io/api/core/v1.PodAffinity", "k8s.io/api/core/v1.PodAntiAffinity"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_core_v1_AttachedVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1_CertificateSigningRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AttachedVolume describes a volume attached to a node", + Description: "CertificateSigningRequestList is a collection of CertificateSigningRequest objects", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Name of the attached volume", - Default: "", + 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: "", }, }, - "devicePath": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "DevicePath represents the device path where the volume should be available", - Default: "", + 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: "", }, }, - }, - Required: []string{"name", "devicePath"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "preferAvoidPods": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is a collection of CertificateSigningRequest objects", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), + Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequest"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PreferAvoidPodsEntry"}, + "k8s.io/api/certificates/v1.CertificateSigningRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1_CertificateSigningRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Description: "CertificateSigningRequestSpec contains the certificate request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "diskName": { + "request": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "The Name of the data disk in the blob storage", - Default: "", + Description: "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", Type: []string{"string"}, - Format: "", + Format: "byte", }, }, - "diskURI": { + "signerName": { SchemaProps: spec.SchemaProps{ - Description: "The URI the data disk in the blob storage", + Description: "signerName indicates the requested signer, and is a qualified name.\n\nList/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.\n\nWell-known Kubernetes signers are:\n 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.\n Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.\n Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.\n Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n\nMore details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers\n\nCustom signerNames can also be specified. The signer defines:\n 1. Trust distribution: how trust (CA bundles) are distributed.\n 2. Permitted subjects: and behavior when a disallowed subject is requested.\n 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.\n 4. Required, permitted, or forbidden key usages / extended key usages.\n 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.\n 6. Whether or not requests for CA certificates are allowed.", Default: "", Type: []string{"string"}, Format: "", }, }, - "cachingMode": { + "expirationSeconds": { SchemaProps: spec.SchemaProps{ - Description: "Host Caching mode: None, Read Only, Read Write.", - Type: []string{"string"}, - Format: "", + Description: "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.\n\nAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.", + Type: []string{"integer"}, + Format: "int32", }, }, - "fsType": { + "usages": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", + Description: "usages specifies a set of key usages requested in the issued certificate.\n\nRequests for TLS client certificates typically request: \"digital signature\", \"key encipherment\", \"client auth\".\n\nRequests for TLS serving certificates typically request: \"key encipherment\", \"digital signature\", \"server auth\".\n\nValid values are:\n \"signing\", \"digital signature\", \"content commitment\",\n \"key encipherment\", \"key agreement\", \"data encipherment\",\n \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\",\n \"server auth\", \"client auth\",\n \"code signing\", \"email protection\", \"s/mime\",\n \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\",\n \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "kind": { + "username": { SchemaProps: spec.SchemaProps{ - Description: "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", + Description: "username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", Type: []string{"string"}, Format: "", }, }, - }, - Required: []string{"diskName", "diskURI"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "secretName": { + "uid": { SchemaProps: spec.SchemaProps{ - Description: "the name of secret that contains Azure Storage Account Name and Key", - Default: "", + Description: "uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", Type: []string{"string"}, Format: "", }, }, - "shareName": { - SchemaProps: spec.SchemaProps{ - Description: "Share Name", - Default: "", - Type: []string{"string"}, - Format: "", + "groups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "readOnly": { SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", + Description: "groups contains group membership of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "secretNamespace": { + "extra": { SchemaProps: spec.SchemaProps{ - Description: "the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", - Type: []string{"string"}, - Format: "", + Description: "extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, }, }, }, - Required: []string{"secretName", "shareName"}, + Required: []string{"request", "signerName"}, }, }, } } -func schema_k8sio_api_core_v1_AzureFileVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1_CertificateSigningRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Description: "CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "the name of secret that contains Azure Storage Account Name and Key", - Default: "", - Type: []string{"string"}, - Format: "", + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, }, - }, - "shareName": { SchemaProps: spec.SchemaProps{ - Description: "Share Name", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\".", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1.CertificateSigningRequestCondition"), + }, + }, + }, }, }, - "readOnly": { + "certificate": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", + Description: "certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificate must contain one or more PEM blocks.\n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data\n must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.\n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,\n to allow for explanatory text as described in section 5.2 of RFC7468.\n\nIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.\n\nThe certificate is encoded in PEM format.\n\nWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:\n\n base64(\n -----BEGIN CERTIFICATE-----\n ...\n -----END CERTIFICATE-----\n )", + Type: []string{"string"}, + Format: "byte", }, }, }, - Required: []string{"secretName", "shareName"}, }, }, + Dependencies: []string{ + "k8s.io/api/certificates/v1.CertificateSigningRequestCondition"}, } } -func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", + Description: "Describes a certificate signing request", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -13544,183 +13816,181 @@ func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenA }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec"), }, }, - "target": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "The target object that you want to bind to the standard object.", + Description: "Derived information about the request.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus"), }, }, }, - Required: []string{"target"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec", "k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents storage that is managed by an external CSI volume driver (Beta feature)", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "driver": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "Driver is the name of the driver to use for this volume. Required.", + Description: "type of the condition. Known conditions include \"Approved\", \"Denied\", and \"Failed\".", Default: "", Type: []string{"string"}, Format: "", }, }, - "volumeHandle": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", + Description: "Status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\". Defaults to \"True\". If unset, should be treated as \"True\".", Default: "", Type: []string{"string"}, Format: "", }, }, - "readOnly": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", - Type: []string{"boolean"}, + Description: "brief reason for the request state", + Type: []string{"string"}, Format: "", }, }, - "fsType": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".", + Description: "human readable message with details about the request state", Type: []string{"string"}, Format: "", }, }, - "volumeAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "Attributes of the volume to publish.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "controllerPublishSecretRef": { - SchemaProps: spec.SchemaProps{ - Description: "ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "nodeStageSecretRef": { - SchemaProps: spec.SchemaProps{ - Description: "NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "nodePublishSecretRef": { + "lastUpdateTime": { SchemaProps: spec.SchemaProps{ - Description: "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Description: "timestamp for the last update to this condition", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "controllerExpandSecretRef": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "ControllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This is an alpha field and requires enabling ExpandCSIVolumes feature gate. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Description: "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, }, - Required: []string{"driver", "volumeHandle"}, + Required: []string{"type"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a source location of a volume to mount, managed by an external CSI driver", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "driver": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.", - Default: "", + 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: "", }, }, - "readOnly": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Specifies a read-only configuration for the volume. Defaults to false (read/write).", - Type: []string{"boolean"}, + 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: "", }, }, - "fsType": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "volumeAttributes": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequest"), }, }, }, }, }, - "nodePublishSecretRef": { - SchemaProps: spec.SchemaProps{ - Description: "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, }, - Required: []string{"driver"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + "k8s.io/api/certificates/v1beta1.CertificateSigningRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_core_v1_Capabilities(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Adds and removes POSIX capabilities from running containers.", + Description: "CertificateSigningRequestSpec contains the certificate request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "add": { + "request": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Added capabilities", + Description: "Base64-encoded PKCS#10 CSR data", + Type: []string{"string"}, + Format: "byte", + }, + }, + "signerName": { + SchemaProps: spec.SchemaProps{ + Description: "Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`. If empty, it will be defaulted:\n 1. If it's a kubelet client certificate, it is assigned\n \"kubernetes.io/kube-apiserver-client-kubelet\".\n 2. If it's a kubelet serving certificate, it is assigned\n \"kubernetes.io/kubelet-serving\".\n 3. Otherwise, it is assigned \"kubernetes.io/legacy-unknown\".\nDistribution of trust for signers happens out of band. You can select on this field using `spec.signerName`.", + Type: []string{"string"}, + Format: "", + }, + }, + "expirationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.\n\nAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "usages": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12\nValid values are:\n \"signing\",\n \"digital signature\",\n \"content commitment\",\n \"key encipherment\",\n \"key agreement\",\n \"data encipherment\",\n \"cert sign\",\n \"crl sign\",\n \"encipher only\",\n \"decipher only\",\n \"any\",\n \"server auth\",\n \"client auth\",\n \"code signing\",\n \"email protection\",\n \"s/mime\",\n \"ipsec end system\",\n \"ipsec tunnel\",\n \"ipsec user\",\n \"timestamping\",\n \"ocsp signing\",\n \"microsoft sgc\",\n \"netscape sgc\"", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -13733,9 +14003,28 @@ func schema_k8sio_api_core_v1_Capabilities(ref common.ReferenceCallback) common. }, }, }, - "drop": { + "username": { SchemaProps: spec.SchemaProps{ - Description: "Removed capabilities", + Description: "Information about the requesting user. See user.Info interface for details.", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID information about the requesting user. See user.Info interface for details.", + Type: []string{"string"}, + Format: "", + }, + }, + "groups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Group information about the requesting user. See user.Info interface for details.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -13748,240 +14037,214 @@ func schema_k8sio_api_core_v1_Capabilities(ref common.ReferenceCallback) common. }, }, }, + "extra": { + SchemaProps: spec.SchemaProps{ + Description: "Extra information about the requesting user. See user.Info interface for details.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, }, + Required: []string{"request"}, }, }, } } -func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_certificates_v1beta1_CertificateSigningRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "monitors": { + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Description: "Conditions applied to the request, such as approval or denial.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"), }, }, }, }, }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", + "certificate": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "secretFile": { SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Description: "If request was approved, the controller will place the issued certificate here.", Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"boolean"}, - Format: "", + Format: "byte", }, }, }, - Required: []string{"monitors"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + "k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"}, } } -func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_coordination_v1_Lease(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + Description: "Lease defines a lease concept.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + 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: "", }, }, - "secretFile": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + 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: "", }, }, - "secretRef": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Description: "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"), }, }, - "readOnly": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"boolean"}, - Format: "", + Description: "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/coordination/v1.LeaseSpec"), }, }, }, - Required: []string{"monitors"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + "k8s.io/api/coordination/v1.LeaseSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_coordination_v1_LeaseList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + Description: "LeaseList is a list of Lease objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "volumeID": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Default: "", + 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: "", }, }, - "fsType": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + 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: "", }, }, - "readOnly": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Type: []string{"boolean"}, - Format: "", + Description: "Standard list metadata. 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"), }, }, - "secretRef": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Description: "Items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/coordination/v1.Lease"), + }, + }, + }, }, }, }, - Required: []string{"volumeID"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + "k8s.io/api/coordination/v1.Lease", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_coordination_v1_LeaseSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + Description: "LeaseSpec is a specification of a Lease.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "volumeID": { + "holderIdentity": { SchemaProps: spec.SchemaProps{ - Description: "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Default: "", + Description: "holderIdentity contains the identity of the holder of a current lease.", Type: []string{"string"}, Format: "", }, }, - "fsType": { + "leaseDurationSeconds": { SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Type: []string{"string"}, - Format: "", + Description: "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.", + Type: []string{"integer"}, + Format: "int32", }, }, - "readOnly": { + "acquireTime": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Type: []string{"boolean"}, - Format: "", + Description: "acquireTime is a time when the current lease was acquired.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), }, }, - "secretRef": { + "renewTime": { SchemaProps: spec.SchemaProps{ - Description: "Optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Description: "renewTime is a time when the current holder of a lease has last updated the lease.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), }, }, - }, - Required: []string{"volumeID"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_ClientIPConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClientIPConfig represents the configurations of Client IP based session affinity.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "timeoutSeconds": { + "leaseTransitions": { SchemaProps: spec.SchemaProps{ - Description: "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", + Description: "leaseTransitions is the number of transitions of a lease between holders.", Type: []string{"integer"}, Format: "int32", }, @@ -13989,58 +14252,59 @@ func schema_k8sio_api_core_v1_ClientIPConfig(ref common.ReferenceCallback) commo }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, } } -func schema_k8sio_api_core_v1_ComponentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_coordination_v1beta1_Lease(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Information about the condition of a component.", + Description: "Lease defines a lease concept.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Type of condition for a component. Valid value: \"Healthy\"", - Default: "", + 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: "", }, }, - "status": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", - Default: "", + 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: "", }, }, - "message": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Message about the condition for a component. For example, information about a health check.", - Type: []string{"string"}, - Format: "", + Description: "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"), }, }, - "error": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Condition error code for a component. For example, a health check error code.", - Type: []string{"string"}, - Format: "", + Description: "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/coordination/v1beta1.LeaseSpec"), }, }, }, - Required: []string{"type", "status"}, }, }, + Dependencies: []string{ + "k8s.io/api/coordination/v1beta1.LeaseSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_coordination_v1beta1_LeaseList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+", + Description: "LeaseList is a list of Lease objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -14059,470 +14323,443 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard list metadata. 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"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, + "items": { SchemaProps: spec.SchemaProps{ - Description: "List of component conditions observed", + Description: "Items is a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ComponentCondition"), + Ref: ref("k8s.io/api/coordination/v1beta1.Lease"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ComponentCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/coordination/v1beta1.Lease", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+", + Description: "LeaseSpec is a specification of a Lease.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "holderIdentity": { 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", + Description: "holderIdentity contains the identity of the holder of a current lease.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "leaseDurationSeconds": { 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: "", + Description: "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.", + Type: []string{"integer"}, + Format: "int32", }, }, - "metadata": { + "acquireTime": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "acquireTime is a time when the current lease was acquired.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), }, }, - "items": { + "renewTime": { SchemaProps: spec.SchemaProps{ - Description: "List of ComponentStatus objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ComponentStatus"), - }, - }, - }, + Description: "renewTime is a time when the current holder of a lease has last updated the lease.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "leaseTransitions": { + SchemaProps: spec.SchemaProps{ + Description: "leaseTransitions is the number of transitions of a lease between holders.", + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, } } -func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConfigMap holds configuration data for pods to consume.", + Description: "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "volumeID": { 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", + Description: "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "fsType": { 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", + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "partition": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", + Type: []string{"integer"}, + Format: "int32", }, }, - "immutable": { + "readOnly": { SchemaProps: spec.SchemaProps{ - Description: "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.", + Description: "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", Type: []string{"boolean"}, Format: "", }, }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "binaryData": { - SchemaProps: spec.SchemaProps{ - Description: "BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - }, - }, }, + Required: []string{"volumeID"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_core_v1_ConfigMapEnvSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_Affinity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + Description: "Affinity is a group of affinity scheduling rules.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "nodeAffinity": { SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", + Description: "Describes node affinity scheduling rules for the pod.", + Ref: ref("k8s.io/api/core/v1.NodeAffinity"), }, }, - "optional": { + "podAffinity": { SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap must be defined", - Type: []string{"boolean"}, - Format: "", + Description: "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", + Ref: ref("k8s.io/api/core/v1.PodAffinity"), + }, + }, + "podAntiAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", + Ref: ref("k8s.io/api/core/v1.PodAntiAffinity"), }, }, }, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeAffinity", "k8s.io/api/core/v1.PodAffinity", "k8s.io/api/core/v1.PodAntiAffinity"}, } } -func schema_k8sio_api_core_v1_ConfigMapKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_AttachedVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Selects a key from a ConfigMap.", + Description: "AttachedVolume describes a volume attached to a node", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Description: "Name of the attached volume", + Default: "", Type: []string{"string"}, Format: "", }, }, - "key": { + "devicePath": { SchemaProps: spec.SchemaProps{ - Description: "The key to select.", + Description: "DevicePath represents the device path where the volume should be available", Default: "", Type: []string{"string"}, Format: "", }, }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap or its key must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"key"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", }, + Required: []string{"name", "devicePath"}, }, }, } } -func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConfigMapList is a resource containing a list of ConfigMap objects.", + Description: "AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.", 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: "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": { + "preferAvoidPods": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of ConfigMaps.", + Description: "Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ConfigMap"), + Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMap", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/core/v1.PreferAvoidPodsEntry"}, } } -func schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration", + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namespace": { + "diskName": { SchemaProps: spec.SchemaProps{ - Description: "Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.", + Description: "The Name of the data disk in the blob storage", Default: "", Type: []string{"string"}, Format: "", }, }, - "name": { + "diskURI": { SchemaProps: spec.SchemaProps{ - Description: "Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.", + Description: "The URI the data disk in the blob storage", Default: "", Type: []string{"string"}, Format: "", }, }, - "uid": { + "cachingMode": { SchemaProps: spec.SchemaProps{ - Description: "UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + Description: "Host Caching mode: None, Read Only, Read Write.", Type: []string{"string"}, Format: "", }, }, - "resourceVersion": { + "fsType": { SchemaProps: spec.SchemaProps{ - Description: "ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", Type: []string{"string"}, Format: "", }, }, - "kubeletConfigKey": { + "readOnly": { SchemaProps: spec.SchemaProps{ - Description: "KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.", - Default: "", + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"namespace", "name", "kubeletConfigKey"}, + Required: []string{"diskName", "diskURI"}, }, }, } } -func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "secretName": { SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Description: "the name of secret that contains Azure Storage Account Name and Key", + Default: "", Type: []string{"string"}, Format: "", }, }, - "items": { + "shareName": { SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, + Description: "Share Name", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "optional": { + "readOnly": { SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap or its keys must be defined", + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", Type: []string{"boolean"}, Format: "", }, }, + "secretNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", + Type: []string{"string"}, + Format: "", + }, + }, }, + Required: []string{"secretName", "shareName"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, } } -func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_AzureFileVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "secretName": { SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Description: "the name of secret that contains Azure Storage Account Name and Key", + Default: "", Type: []string{"string"}, Format: "", }, }, - "items": { + "shareName": { SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, + Description: "Share Name", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "defaultMode": { + "readOnly": { SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", }, }, - "optional": { + }, + Required: []string{"secretName", "shareName"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap or its keys must be defined", - Type: []string{"boolean"}, + 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. 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"), + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Description: "The target object that you want to bind to the standard object.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, }, + Required: []string{"target"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "A single application container that you want to run within a pod.", + Description: "Represents storage that is managed by an external CSI volume driver (Beta feature)", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "driver": { SchemaProps: spec.SchemaProps{ - Description: "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", + Description: "Driver is the name of the driver to use for this volume. Required.", Default: "", Type: []string{"string"}, Format: "", }, }, - "image": { + "volumeHandle": { SchemaProps: spec.SchemaProps{ - Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.", + Description: "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "command": { + "readOnly": { SchemaProps: spec.SchemaProps{ - Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", + Type: []string{"boolean"}, + Format: "", }, }, - "args": { + "fsType": { SchemaProps: spec.SchemaProps{ - Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "Attributes of the volume to publish.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: "", @@ -14533,210 +14770,217 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, }, }, - "workingDir": { + "controllerPublishSecretRef": { SchemaProps: spec.SchemaProps{ - Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", - Type: []string{"string"}, - Format: "", + Description: "ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), }, }, - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "containerPort", - "protocol", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "containerPort", - "x-kubernetes-patch-strategy": "merge", - }, - }, + "nodeStageSecretRef": { SchemaProps: spec.SchemaProps{ - Description: "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), - }, - }, - }, + Description: "NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), }, }, - "envFrom": { + "nodePublishSecretRef": { SchemaProps: spec.SchemaProps{ - Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "controllerExpandSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "ControllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This is an alpha field and requires enabling ExpandCSIVolumes feature gate. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + }, + Required: []string{"driver", "volumeHandle"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a source location of a volume to mount, managed by an external CSI driver", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies a read-only configuration for the volume. Defaults to false (read/write).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "env": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, + "nodePublishSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, + }, + }, + Required: []string{"driver"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_Capabilities(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adds and removes POSIX capabilities from running containers.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "add": { SchemaProps: spec.SchemaProps{ - Description: "List of environment variables to set in the container. Cannot be updated.", + Description: "Added capabilities", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), - }, - }, - "volumeMounts": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "mountPath", - "x-kubernetes-patch-strategy": "merge", - }, - }, + "drop": { SchemaProps: spec.SchemaProps{ - Description: "Pod volumes to mount into the container's filesystem. Cannot be updated.", + Description: "Removed capabilities", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "volumeDevices": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "devicePath", - "x-kubernetes-patch-strategy": "merge", - }, - }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "monitors": { SchemaProps: spec.SchemaProps{ - Description: "volumeDevices is the list of block devices to be used by the container.", + Description: "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "livenessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "readinessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "startupProbe": { - SchemaProps: spec.SchemaProps{ - Description: "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "lifecycle": { - SchemaProps: spec.SchemaProps{ - Description: "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), - }, - }, - "terminationMessagePath": { + "path": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", Type: []string{"string"}, Format: "", }, }, - "terminationMessagePolicy": { + "user": { SchemaProps: spec.SchemaProps{ - Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + Description: "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", Type: []string{"string"}, Format: "", }, }, - "imagePullPolicy": { + "secretFile": { SchemaProps: spec.SchemaProps{ - Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", Type: []string{"string"}, Format: "", }, }, - "securityContext": { - SchemaProps: spec.SchemaProps{ - Description: "SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stdinOnce": { + "secretRef": { SchemaProps: spec.SchemaProps{ - Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", - Type: []string{"boolean"}, - Format: "", + Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Ref: ref("k8s.io/api/core/v1.SecretReference"), }, }, - "tty": { + "readOnly": { SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", Type: []string{"boolean"}, Format: "", }, }, }, - Required: []string{"name"}, + Required: []string{"monitors"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + "k8s.io/api/core/v1.SecretReference"}, } } -func schema_k8sio_api_core_v1_ContainerImage(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Describe a container image", + Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "names": { + "monitors": { SchemaProps: spec.SchemaProps{ - Description: "Names by which this image is known. e.g. [\"k8s.gcr.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", + Description: "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -14749,547 +14993,440 @@ func schema_k8sio_api_core_v1_ContainerImage(ref common.ReferenceCallback) commo }, }, }, - "sizeBytes": { + "path": { SchemaProps: spec.SchemaProps{ - Description: "The size of the image in bytes.", - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretFile": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"boolean"}, + Format: "", }, }, }, + Required: []string{"monitors"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, } } -func schema_k8sio_api_core_v1_ContainerPort(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ContainerPort represents a network port in a single container.", + Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "volumeID": { SchemaProps: spec.SchemaProps{ - Description: "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", + Description: "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Default: "", Type: []string{"string"}, Format: "", }, }, - "hostPort": { - SchemaProps: spec.SchemaProps{ - Description: "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "containerPort": { + "fsType": { SchemaProps: spec.SchemaProps{ - Description: "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"string"}, + Format: "", }, }, - "protocol": { + "readOnly": { SchemaProps: spec.SchemaProps{ - Description: "Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".", - Default: "TCP", - Type: []string{"string"}, + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"boolean"}, Format: "", }, }, - "hostIP": { + "secretRef": { SchemaProps: spec.SchemaProps{ - Description: "What host IP to bind the external port to.", - Type: []string{"string"}, - Format: "", + Description: "Optional: points to a secret object containing parameters used to connect to OpenStack.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), }, }, }, - Required: []string{"containerPort"}, + Required: []string{"volumeID"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, } } -func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", + Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "waiting": { + "volumeID": { SchemaProps: spec.SchemaProps{ - Description: "Details about a waiting container", - Ref: ref("k8s.io/api/core/v1.ContainerStateWaiting"), + Description: "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "running": { + "fsType": { SchemaProps: spec.SchemaProps{ - Description: "Details about a running container", - Ref: ref("k8s.io/api/core/v1.ContainerStateRunning"), + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"string"}, + Format: "", }, }, - "terminated": { + "readOnly": { SchemaProps: spec.SchemaProps{ - Description: "Details about a terminated container", - Ref: ref("k8s.io/api/core/v1.ContainerStateTerminated"), + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: points to a secret object containing parameters used to connect to OpenStack.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, }, + Required: []string{"volumeID"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStateRunning", "k8s.io/api/core/v1.ContainerStateTerminated", "k8s.io/api/core/v1.ContainerStateWaiting"}, + "k8s.io/api/core/v1.LocalObjectReference"}, } } -func schema_k8sio_api_core_v1_ContainerStateRunning(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ClientIPConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ContainerStateRunning is a running state of a container.", + Description: "ClientIPConfig represents the configurations of Client IP based session affinity.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "startedAt": { + "timeoutSeconds": { SchemaProps: spec.SchemaProps{ - Description: "Time at which the container was last (re-)started", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", + Type: []string{"integer"}, + Format: "int32", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ComponentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ContainerStateTerminated is a terminated state of a container.", + Description: "Information about the condition of a component.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "exitCode": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "Exit status from the last termination of the container", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Type of condition for a component. Valid value: \"Healthy\"", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "signal": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "Signal from the last termination of the container", - Type: []string{"integer"}, - Format: "int32", + Description: "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "reason": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "(brief) reason from the last termination of the container", + Description: "Message about the condition for a component. For example, information about a health check.", Type: []string{"string"}, Format: "", }, }, - "message": { + "error": { SchemaProps: spec.SchemaProps{ - Description: "Message regarding the last termination of the container", + Description: "Condition error code for a component. For example, a health check error code.", Type: []string{"string"}, Format: "", }, }, - "startedAt": { + }, + Required: []string{"type", "status"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Time at which previous execution of the container started", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + 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: "", }, }, - "finishedAt": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Time at which the container last terminated", + 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. 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.Time"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "containerID": { + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Container's ID in the format 'docker://'", - Type: []string{"string"}, - Format: "", + Description: "List of component conditions observed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ComponentCondition"), + }, + }, + }, }, }, }, - Required: []string{"exitCode"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/core/v1.ComponentCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_core_v1_ContainerStateWaiting(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ContainerStateWaiting is a waiting state of a container.", + Description: "Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "reason": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "(brief) reason the container is not yet running.", + 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: "", }, }, - "message": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Message regarding why the container is not yet running.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of ComponentStatus objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ComponentStatus"), + }, + }, + }, + }, + }, }, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ContainerStatus contains details for the current status of this container.", + Description: "ConfigMap holds configuration data for pods to consume.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", - Default: "", + 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: "", }, }, - "state": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Details about the container's current condition.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerState"), + 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: "", }, }, - "lastState": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Details about the container's last termination condition.", + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerState"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "ready": { + "immutable": { SchemaProps: spec.SchemaProps{ - Description: "Specifies whether the container has passed its readiness probe.", - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "restartCount": { - SchemaProps: spec.SchemaProps{ - Description: "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "imageID": { - SchemaProps: spec.SchemaProps{ - Description: "ImageID of the container's image.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "containerID": { - SchemaProps: spec.SchemaProps{ - Description: "Container's ID in the format 'docker://'.", - Type: []string{"string"}, - Format: "", - }, - }, - "started": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies whether the container has passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. Is always true when no startupProbe is defined.", + Description: "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.", Type: []string{"boolean"}, Format: "", }, }, - }, - Required: []string{"name", "ready", "restartCount", "image", "imageID"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerState"}, - } -} - -func schema_k8sio_api_core_v1_DaemonEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonEndpoint contains information about a single Daemon endpoint.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "Port": { - SchemaProps: spec.SchemaProps{ - Description: "Port number of the given endpoint.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"Port"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "items": { + "data": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of DownwardAPIVolume file", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, - } -} - -func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPIVolumeFile represents information to create the file containing the pod field", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), - }, - }, - "resourceFieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), - }, - }, - "mode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"path"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector"}, - } -} - -func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "items": { + "binaryData": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of downward API volume file", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + Type: []string{"string"}, + Format: "byte", }, }, }, }, }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, - } -} - -func schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "medium": { - SchemaProps: spec.SchemaProps{ - Description: "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Type: []string{"string"}, - Format: "", - }, - }, - "sizeLimit": { - SchemaProps: spec.SchemaProps{ - Description: "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ConfigMapEnvSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EndpointAddress is a tuple that describes single IP address.", + Description: "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "hostname": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "The Hostname of this endpoint", + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", Type: []string{"string"}, Format: "", }, }, - "nodeName": { + "optional": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", - Type: []string{"string"}, + Description: "Specify whether the ConfigMap must be defined", + Type: []string{"boolean"}, Format: "", }, }, - "targetRef": { - SchemaProps: spec.SchemaProps{ - Description: "Reference to object providing the endpoint.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - Required: []string{"ip"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", }, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, } } -func schema_k8sio_api_core_v1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ConfigMapKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EndpointPort is a tuple that describes a single port.", + Description: "Selects a key from a ConfigMap.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.", + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", Type: []string{"string"}, Format: "", }, }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "The port number of the endpoint.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "protocol": { + "key": { SchemaProps: spec.SchemaProps{ - Description: "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + Description: "The key to select.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "appProtocol": { + "optional": { SchemaProps: spec.SchemaProps{ - Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", - Type: []string{"string"}, + Description: "Specify whether the ConfigMap or its key must be defined", + Type: []string{"boolean"}, Format: "", }, }, }, - Required: []string{"port"}, + Required: []string{"key"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -15300,68 +15437,11 @@ func schema_k8sio_api_core_v1_EndpointPort(ref common.ReferenceCallback) common. } } -func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "addresses": { - SchemaProps: spec.SchemaProps{ - Description: "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), - }, - }, - }, - }, - }, - "notReadyAddresses": { - SchemaProps: spec.SchemaProps{ - Description: "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), - }, - }, - }, - }, - }, - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "Port numbers available on the related IP addresses.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointPort"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EndpointAddress", "k8s.io/api/core/v1.EndpointPort"}, - } -} - -func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", + Description: "ConfigMapList is a resource containing a list of ConfigMap objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -15380,204 +15460,189 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "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"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "subsets": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", + Description: "Items is the list of ConfigMaps.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointSubset"), + Ref: ref("k8s.io/api/core/v1.ConfigMap"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EndpointSubset", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/core/v1.ConfigMap", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EndpointsList is a list of endpoints.", + Description: "ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "namespace": { 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", + Description: "Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "name": { 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", + Description: "Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of endpoints.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Endpoints"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Endpoints", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EnvFromSource represents the source of a set of ConfigMaps", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "prefix": { + "uid": { SchemaProps: spec.SchemaProps{ - Description: "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", + Description: "UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", Type: []string{"string"}, Format: "", }, }, - "configMapRef": { + "resourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "The ConfigMap to select from", - Ref: ref("k8s.io/api/core/v1.ConfigMapEnvSource"), + Description: "ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + Type: []string{"string"}, + Format: "", }, }, - "secretRef": { + "kubeletConfigKey": { SchemaProps: spec.SchemaProps{ - Description: "The Secret to select from", - Ref: ref("k8s.io/api/core/v1.SecretEnvSource"), + Description: "KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"namespace", "name", "kubeletConfigKey"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapEnvSource", "k8s.io/api/core/v1.SecretEnvSource"}, } } -func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EnvVar represents an environment variable present in a Container.", + Description: "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name of the environment variable. Must be a C_IDENTIFIER.", - Default: "", + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", Type: []string{"string"}, Format: "", }, }, - "value": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", - Type: []string{"string"}, - Format: "", + Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.KeyToPath"), + }, + }, + }, }, }, - "valueFrom": { + "optional": { SchemaProps: spec.SchemaProps{ - Description: "Source for the environment variable's value. Cannot be used if value is not empty.", - Ref: ref("k8s.io/api/core/v1.EnvVarSource"), + Description: "Specify whether the ConfigMap or its keys must be defined", + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"name"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EnvVarSource"}, + "k8s.io/api/core/v1.KeyToPath"}, } } -func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EnvVarSource represents a source for the value of an EnvVar.", + Description: "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "fieldRef": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", }, }, - "resourceFieldRef": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.KeyToPath"), + }, + }, + }, }, }, - "configMapKeyRef": { + "defaultMode": { SchemaProps: spec.SchemaProps{ - Description: "Selects a key of a ConfigMap.", - Ref: ref("k8s.io/api/core/v1.ConfigMapKeySelector"), + Description: "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", }, }, - "secretKeyRef": { + "optional": { SchemaProps: spec.SchemaProps{ - Description: "Selects a key of a secret in the pod's namespace", - Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), + Description: "Specify whether the ConfigMap or its keys must be defined", + Type: []string{"boolean"}, + Format: "", }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapKeySelector", "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector", "k8s.io/api/core/v1.SecretKeySelector"}, + "k8s.io/api/core/v1.KeyToPath"}, } } -func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "An EphemeralContainer is a container that may be added temporarily to an existing pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers may not be added by directly updating the pod spec. They must be added via the pod's ephemeralcontainers subresource, and they will appear in the pod spec once added. This is an alpha feature enabled by the EphemeralContainers feature flag.", + Description: "A single application container that you want to run within a pod.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", + Description: "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", Default: "", Type: []string{"string"}, Format: "", @@ -15585,7 +15650,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, "image": { SchemaProps: spec.SchemaProps{ - Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", + Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.", Type: []string{"string"}, Format: "", }, @@ -15628,8 +15693,19 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, }, "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "containerPort", + "protocol", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "containerPort", + "x-kubernetes-patch-strategy": "merge", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Ports are not allowed for ephemeral containers.", + Description: "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -15677,7 +15753,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, "resources": { SchemaProps: spec.SchemaProps{ - Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", + Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), }, @@ -15724,25 +15800,25 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, "livenessProbe": { SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", + Description: "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", Ref: ref("k8s.io/api/core/v1.Probe"), }, }, "readinessProbe": { SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", + Description: "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", Ref: ref("k8s.io/api/core/v1.Probe"), }, }, "startupProbe": { SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", + Description: "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", Ref: ref("k8s.io/api/core/v1.Probe"), }, }, "lifecycle": { SchemaProps: spec.SchemaProps{ - Description: "Lifecycle is not allowed for ephemeral containers.", + Description: "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", Ref: ref("k8s.io/api/core/v1.Lifecycle"), }, }, @@ -15755,21 +15831,21 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, "terminationMessagePolicy": { SchemaProps: spec.SchemaProps{ - Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.\n\nPossible enum values:\n - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents.\n - `\"File\"` is the default behavior and will set the container status message to the contents of the container's terminationMessagePath when the container exits.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"FallbackToLogsOnError", "File"}}, }, "imagePullPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n\nPossible enum values:\n - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.\n - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.\n - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Always", "IfNotPresent", "Never"}}, }, "securityContext": { SchemaProps: spec.SchemaProps{ - Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", + Description: "SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", Ref: ref("k8s.io/api/core/v1.SecurityContext"), }, }, @@ -15794,13 +15870,6 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Format: "", }, }, - "targetContainerName": { - SchemaProps: spec.SchemaProps{ - Description: "If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container is run in whatever namespaces are shared for the pod. Note that the container runtime must support this feature.", - Type: []string{"string"}, - Format: "", - }, - }, }, Required: []string{"name"}, }, @@ -15810,31 +15879,16 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c } } -func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ContainerImage(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EphemeralContainerCommon is a copy of all fields in Container to be inlined in EphemeralContainer. This separate type allows easy conversion from EphemeralContainer to Container and allows separate documentation for the fields of EphemeralContainer. When a new field is added to Container it must be added here as well.", + Description: "Describe a container image", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", - Type: []string{"string"}, - Format: "", - }, - }, - "command": { + "names": { SchemaProps: spec.SchemaProps{ - Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Description: "Names by which this image is known. e.g. [\"k8s.gcr.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -15847,484 +15901,340 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, }, }, - "args": { + "sizeBytes": { SchemaProps: spec.SchemaProps{ - Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "The size of the image in bytes.", + Type: []string{"integer"}, + Format: "int64", }, }, - "workingDir": { + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ContainerPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerPort represents a network port in a single container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + Description: "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", Type: []string{"string"}, Format: "", }, }, - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "Ports are not allowed for ephemeral containers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), - }, - }, - }, - }, - }, - "envFrom": { - SchemaProps: spec.SchemaProps{ - Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), - }, - }, - }, - }, - }, - "env": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of environment variables to set in the container. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), - }, - }, - "volumeMounts": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "mountPath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Pod volumes to mount into the container's filesystem. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), - }, - }, - }, - }, - }, - "volumeDevices": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "devicePath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "volumeDevices is the list of block devices to be used by the container.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), - }, - }, - }, - }, - }, - "livenessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "readinessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "startupProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "lifecycle": { + "hostPort": { SchemaProps: spec.SchemaProps{ - Description: "Lifecycle is not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Description: "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", + Type: []string{"integer"}, + Format: "int32", }, }, - "terminationMessagePath": { + "containerPort": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", - Type: []string{"string"}, - Format: "", + Description: "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "terminationMessagePolicy": { + "protocol": { SchemaProps: spec.SchemaProps{ - Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + Description: "Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".\n\nPossible enum values:\n - `\"SCTP\"` is the SCTP protocol.\n - `\"TCP\"` is the TCP protocol.\n - `\"UDP\"` is the UDP protocol.", + Default: "TCP", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"SCTP", "TCP", "UDP"}}, }, - "imagePullPolicy": { + "hostIP": { SchemaProps: spec.SchemaProps{ - Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Description: "What host IP to bind the external port to.", Type: []string{"string"}, Format: "", }, }, - "securityContext": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), - }, - }, - "stdin": { + }, + Required: []string{"containerPort"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "waiting": { SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", - Type: []string{"boolean"}, - Format: "", + Description: "Details about a waiting container", + Ref: ref("k8s.io/api/core/v1.ContainerStateWaiting"), }, }, - "stdinOnce": { + "running": { SchemaProps: spec.SchemaProps{ - Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", - Type: []string{"boolean"}, - Format: "", + Description: "Details about a running container", + Ref: ref("k8s.io/api/core/v1.ContainerStateRunning"), }, }, - "tty": { + "terminated": { SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", - Type: []string{"boolean"}, - Format: "", + Description: "Details about a terminated container", + Ref: ref("k8s.io/api/core/v1.ContainerStateTerminated"), }, }, }, - Required: []string{"name"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + "k8s.io/api/core/v1.ContainerStateRunning", "k8s.io/api/core/v1.ContainerStateTerminated", "k8s.io/api/core/v1.ContainerStateWaiting"}, } } -func schema_k8sio_api_core_v1_EphemeralVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ContainerStateRunning(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents an ephemeral volume that is handled by a normal storage driver.", + Description: "ContainerStateRunning is a running state of a container.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "volumeClaimTemplate": { + "startedAt": { SchemaProps: spec.SchemaProps{ - Description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimTemplate"), + Description: "Time at which the container was last (re-)started", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimTemplate"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", + Description: "ContainerStateTerminated is a terminated state of a container.", 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": { + "exitCode": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + Description: "Exit status from the last termination of the container", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "involvedObject": { + "signal": { SchemaProps: spec.SchemaProps{ - Description: "The object that this event is about.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Description: "Signal from the last termination of the container", + Type: []string{"integer"}, + Format: "int32", }, }, "reason": { SchemaProps: spec.SchemaProps{ - Description: "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", + Description: "(brief) reason from the last termination of the container", Type: []string{"string"}, Format: "", }, }, "message": { SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the status of this operation.", + Description: "Message regarding the last termination of the container", Type: []string{"string"}, Format: "", }, }, - "source": { - SchemaProps: spec.SchemaProps{ - Description: "The component reporting this event. Should be a short machine understandable string.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EventSource"), - }, - }, - "firstTimestamp": { + "startedAt": { SchemaProps: spec.SchemaProps{ - Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", + Description: "Time at which previous execution of the container started", Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "lastTimestamp": { + "finishedAt": { SchemaProps: spec.SchemaProps{ - Description: "The time at which the most recent occurrence of this event was recorded.", + Description: "Time at which the container last terminated", Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "count": { - SchemaProps: spec.SchemaProps{ - Description: "The number of times this event has occurred.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of this event (Normal, Warning), new types could be added in the future", - Type: []string{"string"}, - Format: "", - }, - }, - "eventTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time when this Event was first observed.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "series": { - SchemaProps: spec.SchemaProps{ - Description: "Data about the Event series this event represents or nil if it's a singleton Event.", - Ref: ref("k8s.io/api/core/v1.EventSeries"), - }, - }, - "action": { + "containerID": { SchemaProps: spec.SchemaProps{ - Description: "What action was taken/failed regarding to the Regarding object.", + Description: "Container's ID in the format 'docker://'", Type: []string{"string"}, Format: "", }, }, - "related": { - SchemaProps: spec.SchemaProps{ - Description: "Optional secondary object for more complex actions.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "reportingComponent": { + }, + Required: []string{"exitCode"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_ContainerStateWaiting(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerStateWaiting is a waiting state of a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "reason": { SchemaProps: spec.SchemaProps{ - Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", - Default: "", + Description: "(brief) reason the container is not yet running.", Type: []string{"string"}, Format: "", }, }, - "reportingInstance": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", - Default: "", + Description: "Message regarding why the container is not yet running.", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"metadata", "involvedObject"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.EventSeries", "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EventList is a list of events.", + Description: "ContainerStatus contains details for the current status of this container.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "name": { 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", + Description: "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "state": { 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: "", + Description: "Details about the container's current condition.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ContainerState"), }, }, - "metadata": { + "lastState": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Description: "Details about the container's last termination condition.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref("k8s.io/api/core/v1.ContainerState"), }, }, - "items": { + "ready": { SchemaProps: spec.SchemaProps{ - Description: "List of events", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Event"), - }, - }, - }, + Description: "Specifies whether the container has passed its readiness probe.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_EventSeries(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "count": { + "restartCount": { SchemaProps: spec.SchemaProps{ - Description: "Number of occurrences in this series up to the last heartbeat time", + Description: "The number of times the container has been restarted.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "lastObservedTime": { + "image": { SchemaProps: spec.SchemaProps{ - Description: "Time of the last occurrence observed", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Description: "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "imageID": { + SchemaProps: spec.SchemaProps{ + Description: "ImageID of the container's image.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "containerID": { + SchemaProps: spec.SchemaProps{ + Description: "Container's ID in the format 'docker://'.", + Type: []string{"string"}, + Format: "", + }, + }, + "started": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies whether the container has passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. Is always true when no startupProbe is defined.", + Type: []string{"boolean"}, + Format: "", }, }, }, + Required: []string{"name", "ready", "restartCount", "image", "imageID"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + "k8s.io/api/core/v1.ContainerState"}, } } -func schema_k8sio_api_core_v1_EventSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_DaemonEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EventSource contains information for an event.", + Description: "DaemonEndpoint contains information about a single Daemon endpoint.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "component": { - SchemaProps: spec.SchemaProps{ - Description: "Component from which the event is generated.", - Type: []string{"string"}, - Format: "", - }, - }, - "host": { + "Port": { SchemaProps: spec.SchemaProps{ - Description: "Node name on which the event is generated.", - Type: []string{"string"}, - Format: "", + Description: "Port number of the given endpoint.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, + Required: []string{"Port"}, }, }, } } -func schema_k8sio_api_core_v1_ExecAction(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecAction describes a \"run in container\" action.", + Description: "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "command": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", + Description: "Items is a list of DownwardAPIVolume file", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), }, }, }, @@ -16333,448 +16243,417 @@ func schema_k8sio_api_core_v1_ExecAction(ref common.ReferenceCallback) common.Op }, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, } } -func schema_k8sio_api_core_v1_FCVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.", + Description: "DownwardAPIVolumeFile represents information to create the file containing the pod field", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "targetWWNs": { + "path": { SchemaProps: spec.SchemaProps{ - Description: "Optional: FC target worldwide names (WWNs)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "lun": { + "fieldRef": { SchemaProps: spec.SchemaProps{ - Description: "Optional: FC target lun number", - Type: []string{"integer"}, - Format: "int32", + Description: "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", + Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), }, }, - "fsType": { + "resourceFieldRef": { SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", + Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", + Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), }, }, - "readOnly": { + "mode": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", + Description: "Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", }, }, - "wwids": { + }, + Required: []string{"path"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector"}, + } +} + +func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "items": { SchemaProps: spec.SchemaProps{ - Description: "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", + Description: "Items is a list of downward API volume file", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), }, }, }, }, }, + "defaultMode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, } } -func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.", + Description: "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "Driver is the name of the driver to use for this volume.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { + "medium": { SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + Description: "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", Type: []string{"string"}, Format: "", }, }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "options": { + "sizeLimit": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Extra command options if any.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, - Required: []string{"driver"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Description: "EndpointAddress is a tuple that describes single IP address.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "driver": { + "ip": { SchemaProps: spec.SchemaProps{ - Description: "Driver is the name of the driver to use for this volume.", + Description: "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", Default: "", Type: []string{"string"}, Format: "", }, }, - "fsType": { + "hostname": { SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + Description: "The Hostname of this endpoint", Type: []string{"string"}, Format: "", }, }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "readOnly": { + "nodeName": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, + Description: "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", + Type: []string{"string"}, Format: "", }, }, - "options": { + "targetRef": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Extra command options if any.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Reference to object providing the endpoint.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), }, }, }, - Required: []string{"driver"}, + Required: []string{"ip"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + "k8s.io/api/core/v1.ObjectReference"}, } } -func schema_k8sio_api_core_v1_FlockerVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", + Description: "EndpointPort is a tuple that describes a single port.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "datasetName": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", + Description: "The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.", Type: []string{"string"}, Format: "", }, }, - "datasetUUID": { + "port": { SchemaProps: spec.SchemaProps{ - Description: "UUID of the dataset. This is unique identifier of a Flocker dataset", - Type: []string{"string"}, - Format: "", + Description: "The port number of the endpoint.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "pdName": { + "protocol": { SchemaProps: spec.SchemaProps{ - Description: "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Default: "", + Description: "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.\n\nPossible enum values:\n - `\"SCTP\"` is the SCTP protocol.\n - `\"TCP\"` is the TCP protocol.\n - `\"UDP\"` is the UDP protocol.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"SCTP", "TCP", "UDP"}}, }, - "fsType": { + "appProtocol": { SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", Type: []string{"string"}, Format: "", }, }, - "partition": { - SchemaProps: spec.SchemaProps{ - Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"boolean"}, - Format: "", - }, - }, }, - Required: []string{"pdName"}, + Required: []string{"port"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, }, }, } } -func schema_k8sio_api_core_v1_GitRepoVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + Description: "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "repository": { + "addresses": { SchemaProps: spec.SchemaProps{ - Description: "Repository URL", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + }, + }, + }, }, }, - "revision": { + "notReadyAddresses": { SchemaProps: spec.SchemaProps{ - Description: "Commit hash for the specified revision.", - Type: []string{"string"}, - Format: "", + Description: "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + }, + }, + }, }, }, - "directory": { + "ports": { SchemaProps: spec.SchemaProps{ - Description: "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", - Type: []string{"string"}, - Format: "", + Description: "Port numbers available on the related IP addresses.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EndpointPort"), + }, + }, + }, }, }, }, - Required: []string{"repository"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.EndpointAddress", "k8s.io/api/core/v1.EndpointPort"}, } } -func schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + Description: "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "endpoints": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Default: "", + 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: "", }, }, - "path": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Default: "", + 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: "", }, }, - "readOnly": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Type: []string{"boolean"}, - Format: "", + Description: "Standard object's metadata. 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"), }, }, - "endpointsNamespace": { + "subsets": { SchemaProps: spec.SchemaProps{ - Description: "EndpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Type: []string{"string"}, - Format: "", + Description: "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EndpointSubset"), + }, + }, + }, }, }, }, - Required: []string{"endpoints", "path"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.EndpointSubset", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + Description: "EndpointsList is a list of endpoints.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "endpoints": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Default: "", + 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: "", }, }, - "path": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Default: "", + 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: "", }, }, - "readOnly": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Type: []string{"boolean"}, - Format: "", + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of endpoints.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Endpoints"), + }, + }, + }, }, }, }, - Required: []string{"endpoints", "path"}, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.Endpoints", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HTTPGetAction describes an action based on HTTP Get requests.", + Description: "EnvFromSource represents the source of a set of ConfigMaps", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path to access on the HTTP server.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "host": { + "prefix": { SchemaProps: spec.SchemaProps{ - Description: "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + Description: "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", Type: []string{"string"}, Format: "", }, }, - "scheme": { + "configMapRef": { SchemaProps: spec.SchemaProps{ - Description: "Scheme to use for connecting to the host. Defaults to HTTP.", - Type: []string{"string"}, - Format: "", + Description: "The ConfigMap to select from", + Ref: ref("k8s.io/api/core/v1.ConfigMapEnvSource"), }, }, - "httpHeaders": { + "secretRef": { SchemaProps: spec.SchemaProps{ - Description: "Custom headers to set in the request. HTTP allows repeated headers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HTTPHeader"), - }, - }, - }, + Description: "The Secret to select from", + Ref: ref("k8s.io/api/core/v1.SecretEnvSource"), }, }, }, - Required: []string{"port"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.HTTPHeader", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + "k8s.io/api/core/v1.ConfigMapEnvSource", "k8s.io/api/core/v1.SecretEnvSource"}, } } -func schema_k8sio_api_core_v1_HTTPHeader(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HTTPHeader describes a custom header to be used in HTTP probes", + Description: "EnvVar represents an environment variable present in a Container.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "The header field name", + Description: "Name of the environment variable. Must be a C_IDENTIFIER.", Default: "", Type: []string{"string"}, Format: "", @@ -16782,69 +16661,90 @@ func schema_k8sio_api_core_v1_HTTPHeader(ref common.ReferenceCallback) common.Op }, "value": { SchemaProps: spec.SchemaProps{ - Description: "The header field value", - Default: "", + Description: "Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", Type: []string{"string"}, Format: "", }, }, + "valueFrom": { + SchemaProps: spec.SchemaProps{ + Description: "Source for the environment variable's value. Cannot be used if value is not empty.", + Ref: ref("k8s.io/api/core/v1.EnvVarSource"), + }, + }, }, - Required: []string{"name", "value"}, + Required: []string{"name"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.EnvVarSource"}, } } -func schema_k8sio_api_core_v1_Handler(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Handler defines a specific action that should be taken", + Description: "EnvVarSource represents a source for the value of an EnvVar.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "exec": { + "fieldRef": { SchemaProps: spec.SchemaProps{ - Description: "One and only one of the following should be specified. Exec specifies the action to take.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), + Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", + Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), }, }, - "httpGet": { + "resourceFieldRef": { SchemaProps: spec.SchemaProps{ - Description: "HTTPGet specifies the http request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", + Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), }, }, - "tcpSocket": { + "configMapKeyRef": { SchemaProps: spec.SchemaProps{ - Description: "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + Description: "Selects a key of a ConfigMap.", + Ref: ref("k8s.io/api/core/v1.ConfigMapKeySelector"), + }, + }, + "secretKeyRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a key of a secret in the pod's namespace", + Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + "k8s.io/api/core/v1.ConfigMapKeySelector", "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector", "k8s.io/api/core/v1.SecretKeySelector"}, } } -func schema_k8sio_api_core_v1_HostAlias(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.", + Description: "An EphemeralContainer is a temporary container that you may add to an existing Pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a Pod is removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation.\n\nTo add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted.\n\nThis is a beta feature available on clusters that haven't disabled the EphemeralContainers feature gate.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ip": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "IP address of the host file entry.", + Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "hostnames": { + "image": { SchemaProps: spec.SchemaProps{ - Description: "Hostnames for the above IP address.", + Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", + Type: []string{"string"}, + Format: "", + }, + }, + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -16857,42 +16757,1312 @@ func schema_k8sio_api_core_v1_HostAlias(ref common.ReferenceCallback) common.Ope }, }, }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_HostPathVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "path": { + "args": { SchemaProps: spec.SchemaProps{ - Description: "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "type": { + "workingDir": { SchemaProps: spec.SchemaProps{ - Description: "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", Type: []string{"string"}, Format: "", }, }, - }, - Required: []string{"path"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "containerPort", + "protocol", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "containerPort", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Ports are not allowed for ephemeral containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ContainerPort"), + }, + }, + }, + }, + }, + "envFrom": { + SchemaProps: spec.SchemaProps{ + Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + }, + }, + }, + }, + }, + "env": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of environment variables to set in the container. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeMounts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "volumeDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "devicePath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "volumeDevices is the list of block devices to be used by the container.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + }, + }, + }, + }, + }, + "livenessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "readinessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "startupProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "lifecycle": { + SchemaProps: spec.SchemaProps{ + Description: "Lifecycle is not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Lifecycle"), + }, + }, + "terminationMessagePath": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationMessagePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.\n\nPossible enum values:\n - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents.\n - `\"File\"` is the default behavior and will set the container status message to the contents of the container's terminationMessagePath when the container exits.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"FallbackToLogsOnError", "File"}}, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n\nPossible enum values:\n - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.\n - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.\n - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Always", "IfNotPresent", "Never"}}, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", + Ref: ref("k8s.io/api/core/v1.SecurityContext"), + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdinOnce": { + SchemaProps: spec.SchemaProps{ + Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "targetContainerName": { + SchemaProps: spec.SchemaProps{ + Description: "If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container uses the namespaces configured in the Pod spec.\n\nThe container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + } +} + +func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EphemeralContainerCommon is a copy of all fields in Container to be inlined in EphemeralContainer. This separate type allows easy conversion from EphemeralContainer to Container and allows separate documentation for the fields of EphemeralContainer. When a new field is added to Container it must be added here as well.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", + Type: []string{"string"}, + Format: "", + }, + }, + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "args": { + SchemaProps: spec.SchemaProps{ + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "workingDir": { + SchemaProps: spec.SchemaProps{ + Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "containerPort", + "protocol", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "containerPort", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Ports are not allowed for ephemeral containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ContainerPort"), + }, + }, + }, + }, + }, + "envFrom": { + SchemaProps: spec.SchemaProps{ + Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + }, + }, + }, + }, + }, + "env": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of environment variables to set in the container. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeMounts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "volumeDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "devicePath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "volumeDevices is the list of block devices to be used by the container.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + }, + }, + }, + }, + }, + "livenessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "readinessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "startupProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "lifecycle": { + SchemaProps: spec.SchemaProps{ + Description: "Lifecycle is not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Lifecycle"), + }, + }, + "terminationMessagePath": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationMessagePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.\n\nPossible enum values:\n - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents.\n - `\"File\"` is the default behavior and will set the container status message to the contents of the container's terminationMessagePath when the container exits.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"FallbackToLogsOnError", "File"}}, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n\nPossible enum values:\n - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.\n - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.\n - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Always", "IfNotPresent", "Never"}}, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", + Ref: ref("k8s.io/api/core/v1.SecurityContext"), + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdinOnce": { + SchemaProps: spec.SchemaProps{ + Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + } +} + +func schema_k8sio_api_core_v1_EphemeralVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents an ephemeral volume that is handled by a normal storage driver.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeClaimTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimTemplate"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimTemplate"}, + } +} + +func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", + 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. 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"), + }, + }, + "involvedObject": { + SchemaProps: spec.SchemaProps{ + Description: "The object that this event is about.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable description of the status of this operation.", + Type: []string{"string"}, + Format: "", + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "The component reporting this event. Should be a short machine understandable string.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.EventSource"), + }, + }, + "firstTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The time at which the most recent occurrence of this event was recorded.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "count": { + SchemaProps: spec.SchemaProps{ + Description: "The number of times this event has occurred.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of this event (Normal, Warning), new types could be added in the future", + Type: []string{"string"}, + Format: "", + }, + }, + "eventTime": { + SchemaProps: spec.SchemaProps{ + Description: "Time when this Event was first observed.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "series": { + SchemaProps: spec.SchemaProps{ + Description: "Data about the Event series this event represents or nil if it's a singleton Event.", + Ref: ref("k8s.io/api/core/v1.EventSeries"), + }, + }, + "action": { + SchemaProps: spec.SchemaProps{ + Description: "What action was taken/failed regarding to the Regarding object.", + Type: []string{"string"}, + Format: "", + }, + }, + "related": { + SchemaProps: spec.SchemaProps{ + Description: "Optional secondary object for more complex actions.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "reportingComponent": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "reportingInstance": { + SchemaProps: spec.SchemaProps{ + Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"metadata", "involvedObject"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EventSeries", "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventList is a list of events.", + 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 list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of events", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Event"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_EventSeries(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { + SchemaProps: spec.SchemaProps{ + Description: "Number of occurrences in this series up to the last heartbeat time", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "lastObservedTime": { + SchemaProps: spec.SchemaProps{ + Description: "Time of the last occurrence observed", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + } +} + +func schema_k8sio_api_core_v1_EventSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventSource contains information for an event.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "component": { + SchemaProps: spec.SchemaProps{ + Description: "Component from which the event is generated.", + Type: []string{"string"}, + Format: "", + }, + }, + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Node name on which the event is generated.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ExecAction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecAction describes a \"run in container\" action.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_FCVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "targetWWNs": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: FC target worldwide names (WWNs)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "lun": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: FC target lun number", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "wwids": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the driver to use for this volume.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "options": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Extra command options if any.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"driver"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the driver to use for this volume.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "options": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Extra command options if any.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"driver"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_FlockerVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "datasetName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", + Type: []string{"string"}, + Format: "", + }, + }, + "datasetUUID": { + SchemaProps: spec.SchemaProps{ + Description: "UUID of the dataset. This is unique identifier of a Flocker dataset", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pdName": { + SchemaProps: spec.SchemaProps{ + Description: "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"string"}, + Format: "", + }, + }, + "partition": { + SchemaProps: spec.SchemaProps{ + Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"pdName"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GRPCAction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Port number of the gRPC service. Number must be in the range 1 to 65535.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "service": { + SchemaProps: spec.SchemaProps{ + Description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GitRepoVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "repository": { + SchemaProps: spec.SchemaProps{ + Description: "Repository URL", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "revision": { + SchemaProps: spec.SchemaProps{ + Description: "Commit hash for the specified revision.", + Type: []string{"string"}, + Format: "", + }, + }, + "directory": { + SchemaProps: spec.SchemaProps{ + Description: "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"repository"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "endpoints": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"boolean"}, + Format: "", + }, + }, + "endpointsNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"endpoints", "path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "endpoints": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"endpoints", "path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPGetAction describes an action based on HTTP Get requests.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path to access on the HTTP server.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + Type: []string{"string"}, + Format: "", + }, + }, + "scheme": { + SchemaProps: spec.SchemaProps{ + Description: "Scheme to use for connecting to the host. Defaults to HTTP.\n\nPossible enum values:\n - `\"HTTP\"` means that the scheme used will be http://\n - `\"HTTPS\"` means that the scheme used will be https://", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"HTTP", "HTTPS"}}, + }, + "httpHeaders": { + SchemaProps: spec.SchemaProps{ + Description: "Custom headers to set in the request. HTTP allows repeated headers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.HTTPHeader"), + }, + }, + }, + }, + }, + }, + Required: []string{"port"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.HTTPHeader", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_core_v1_HTTPHeader(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPHeader describes a custom header to be used in HTTP probes", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The header field name", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "The header field value", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "value"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_HostAlias(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ip": { + SchemaProps: spec.SchemaProps{ + Description: "IP address of the host file entry.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostnames": { + SchemaProps: spec.SchemaProps{ + Description: "Hostnames for the above IP address.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_HostPathVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -17145,20 +18315,53 @@ func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.Ope "postStart": { SchemaProps: spec.SchemaProps{ Description: "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.Handler"), + Ref: ref("k8s.io/api/core/v1.LifecycleHandler"), }, }, "preStop": { SchemaProps: spec.SchemaProps{ - Description: "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.Handler"), + Description: "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + Ref: ref("k8s.io/api/core/v1.LifecycleHandler"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LifecycleHandler"}, + } +} + +func schema_k8sio_api_core_v1_LifecycleHandler(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exec": { + SchemaProps: spec.SchemaProps{ + Description: "Exec specifies the action to take.", + Ref: ref("k8s.io/api/core/v1.ExecAction"), + }, + }, + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPGet specifies the http request to perform.", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "tcpSocket": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.", + Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Handler"}, + "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, } } @@ -17214,11 +18417,11 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "Type of resource that this limit applies to.", + Description: "Type of resource that this limit applies to.\n\nPossible enum values:\n - `\"Container\"` Limit that applies to all containers in a namespace\n - `\"PersistentVolumeClaim\"` Limit that applies to all persistent volume claims in a namespace\n - `\"Pod\"` Limit that applies to all pods in a namespace", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Container", "PersistentVolumeClaim", "Pod"}}, }, "max": { SchemaProps: spec.SchemaProps{ @@ -17555,7 +18758,7 @@ func schema_k8sio_api_core_v1_LocalVolumeSource(ref common.ReferenceCallback) co }, "fsType": { SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a fileystem if unspecified.", + Description: "Filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a filesystem if unspecified.", Type: []string{"string"}, Format: "", }, @@ -17663,11 +18866,11 @@ func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) c Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "Type of namespace controller condition.", + Description: "Type of namespace controller condition.\n\nPossible enum values:\n - `\"NamespaceContentRemaining\"` contains information about resources remaining in a namespace.\n - `\"NamespaceDeletionContentFailure\"` contains information about namespace deleter errors during deletion of resources.\n - `\"NamespaceDeletionDiscoveryFailure\"` contains information about namespace deleter errors during resource discovery.\n - `\"NamespaceDeletionGroupVersionParsingFailure\"` contains information about namespace deleter errors parsing GV for legacy types.\n - `\"NamespaceFinalizersRemaining\"` contains information about which finalizers are on resources remaining in a namespace.", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"NamespaceContentRemaining", "NamespaceDeletionContentFailure", "NamespaceDeletionDiscoveryFailure", "NamespaceDeletionGroupVersionParsingFailure", "NamespaceFinalizersRemaining"}}, }, "status": { SchemaProps: spec.SchemaProps{ @@ -17792,10 +18995,10 @@ func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) comm Properties: map[string]spec.Schema{ "phase": { SchemaProps: spec.SchemaProps{ - Description: "Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", + Description: "Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/\n\nPossible enum values:\n - `\"Active\"` means the namespace is available for use in the system\n - `\"Terminating\"` means the namespace is undergoing graceful termination", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Active", "Terminating"}}, }, "conditions": { VendorExtensible: spec.VendorExtensible{ @@ -17884,11 +19087,11 @@ func schema_k8sio_api_core_v1_NodeAddress(ref common.ReferenceCallback) common.O Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "Node address type, one of Hostname, ExternalIP or InternalIP.", + Description: "Node address type, one of Hostname, ExternalIP or InternalIP.\n\nPossible enum values:\n - `\"ExternalDNS\"` identifies a DNS name which resolves to an IP address which has the characteristics of a NodeExternalIP. The IP it resolves to may or may not be a listed NodeExternalIP address.\n - `\"ExternalIP\"` identifies an IP address which is, in some way, intended to be more usable from outside the cluster then an internal IP, though no specific semantics are defined. It may be a globally routable IP, though it is not required to be. External IPs may be assigned directly to an interface on the node, like a NodeInternalIP, or alternatively, packets sent to the external IP may be NAT'ed to an internal node IP rather than being delivered directly (making the IP less efficient for node-to-node traffic than a NodeInternalIP).\n - `\"Hostname\"` identifies a name of the node. Although every node can be assumed to have a NodeAddress of this type, its exact syntax and semantics are not defined, and are not consistent between different clusters.\n - `\"InternalDNS\"` identifies a DNS name which resolves to an IP address which has the characteristics of a NodeInternalIP. The IP it resolves to may or may not be a listed NodeInternalIP address.\n - `\"InternalIP\"` identifies an IP address which is assigned to one of the node's network interfaces. Every node should have at least one address of this type. An internal IP is normally expected to be reachable from every other node, but may not be visible to hosts outside the cluster. By default it is assumed that kube-apiserver can reach node internal IPs, though it is possible to configure clusters where this is not the case. NodeInternalIP is the default type of node IP, and does not necessarily imply that the IP is ONLY reachable internally. If a node has multiple internal IPs, no specific semantics are assigned to the additional IPs.", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"ExternalDNS", "ExternalIP", "Hostname", "InternalDNS", "InternalIP"}}, }, "address": { SchemaProps: spec.SchemaProps{ @@ -17949,11 +19152,11 @@ func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "Type of node condition.", + Description: "Type of node condition.\n\nPossible enum values:\n - `\"DiskPressure\"` means the kubelet is under pressure due to insufficient available disk.\n - `\"MemoryPressure\"` means the kubelet is under pressure due to insufficient available memory.\n - `\"NetworkUnavailable\"` means that network for the node is not correctly configured.\n - `\"PIDPressure\"` means the kubelet is under pressure due to insufficient available PID.\n - `\"Ready\"` means kubelet is healthy and ready to accept pods.", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"DiskPressure", "MemoryPressure", "NetworkUnavailable", "PIDPressure", "Ready"}}, }, "status": { SchemaProps: spec.SchemaProps{ @@ -18251,11 +19454,11 @@ func schema_k8sio_api_core_v1_NodeSelectorRequirement(ref common.ReferenceCallba }, "operator": { SchemaProps: spec.SchemaProps{ - Description: "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", + Description: "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n\nPossible enum values:\n - `\"DoesNotExist\"`\n - `\"Exists\"`\n - `\"Gt\"`\n - `\"In\"`\n - `\"Lt\"`\n - `\"NotIn\"`", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"DoesNotExist", "Exists", "Gt", "In", "Lt", "NotIn"}}, }, "values": { SchemaProps: spec.SchemaProps{ @@ -18449,10 +19652,10 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op }, "phase": { SchemaProps: spec.SchemaProps{ - Description: "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", + Description: "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.\n\nPossible enum values:\n - `\"Pending\"` means the node has been created/added by the system, but not configured.\n - `\"Running\"` means the node has been configured and has Kubernetes components running.\n - `\"Terminated\"` means the node has been removed from the cluster.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Pending", "Running", "Terminated"}}, }, "conditions": { VendorExtensible: spec.VendorExtensible{ @@ -18869,10 +20072,11 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.Referenc Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, + Description: "\n\n\nPossible enum values:\n - `\"FileSystemResizePending\"` - controller resize is finished and a file system resize is pending on node\n - `\"Resizing\"` - a user trigger resize of pvc has been started", + Default: "", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"FileSystemResizePending", "Resizing"}}, }, "status": { SchemaProps: spec.SchemaProps{ @@ -18999,7 +20203,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall }, "resources": { SchemaProps: spec.SchemaProps{ - Description: "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + Description: "Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", Default: map[string]interface{}{}, Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), }, @@ -19054,10 +20258,10 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa Properties: map[string]spec.Schema{ "phase": { SchemaProps: spec.SchemaProps{ - Description: "Phase represents the current phase of PersistentVolumeClaim.", + Description: "Phase represents the current phase of PersistentVolumeClaim.\n\nPossible enum values:\n - `\"Bound\"` used for PersistentVolumeClaims that are bound\n - `\"Lost\"` used for PersistentVolumeClaims that lost their underlying PersistentVolume. The claim was bound to a PersistentVolume and this volume does not exist any longer and all data on it was lost.\n - `\"Pending\"` used for PersistentVolumeClaims that are not yet bound", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Bound", "Lost", "Pending"}}, }, "accessModes": { SchemaProps: spec.SchemaProps{ @@ -19109,6 +20313,28 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa }, }, }, + "allocatedResources": { + SchemaProps: spec.SchemaProps{ + Description: "The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "resizeStatus": { + SchemaProps: spec.SchemaProps{ + Description: "ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, @@ -19551,10 +20777,10 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) }, "persistentVolumeReclaimPolicy": { SchemaProps: spec.SchemaProps{ - Description: "What happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", + Description: "What happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming\n\nPossible enum values:\n - `\"Delete\"` means the volume will be deleted from Kubernetes on release from its claim. The volume plugin must support Deletion.\n - `\"Recycle\"` means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim. The volume plugin must support Recycling.\n - `\"Retain\"` means the volume will be left in its current phase (Released) for manual reclamation by the administrator. The default policy is Retain.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Delete", "Recycle", "Retain"}}, }, "storageClassName": { SchemaProps: spec.SchemaProps{ @@ -19608,10 +20834,10 @@ func schema_k8sio_api_core_v1_PersistentVolumeStatus(ref common.ReferenceCallbac Properties: map[string]spec.Schema{ "phase": { SchemaProps: spec.SchemaProps{ - Description: "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase", + Description: "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase\n\nPossible enum values:\n - `\"Available\"` used for PersistentVolumes that are not yet bound Available volumes are held by the binder and matched to PersistentVolumeClaims\n - `\"Bound\"` used for PersistentVolumes that are bound\n - `\"Failed\"` used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim\n - `\"Pending\"` used for PersistentVolumes that are not available\n - `\"Released\"` used for PersistentVolumes where the bound PersistentVolumeClaim was deleted released volumes must be recycled before becoming available again this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Available", "Bound", "Failed", "Pending", "Released"}}, }, "message": { SchemaProps: spec.SchemaProps{ @@ -19920,11 +21146,11 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + Description: "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions\n\nPossible enum values:\n - `\"ContainersReady\"` indicates whether all containers in the pod are ready.\n - `\"Initialized\"` means that all init containers in the pod have started successfully.\n - `\"PodScheduled\"` represents status of the scheduling process for this pod.\n - `\"Ready\"` means the pod is able to service requests and should be added to the load balancing pools of all matching services.", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"ContainersReady", "Initialized", "PodScheduled", "Ready"}}, }, "status": { SchemaProps: spec.SchemaProps{ @@ -20086,14 +21312,14 @@ func schema_k8sio_api_core_v1_PodExecOptions(ref common.ReferenceCallback) commo }, "stdout": { SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard output stream of the pod for this call. Defaults to true.", + Description: "Redirect the standard output stream of the pod for this call.", Type: []string{"boolean"}, Format: "", }, }, "stderr": { SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard error stream of the pod for this call. Defaults to true.", + Description: "Redirect the standard error stream of the pod for this call.", Type: []string{"boolean"}, Format: "", }, @@ -20296,6 +21522,28 @@ func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common } } +func schema_k8sio_api_core_v1_PodOS(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodOS defines the OS parameters of a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + func schema_k8sio_api_core_v1_PodPortForwardOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -20381,11 +21629,11 @@ func schema_k8sio_api_core_v1_PodReadinessGate(ref common.ReferenceCallback) com Properties: map[string]spec.Schema{ "conditionType": { SchemaProps: spec.SchemaProps{ - Description: "ConditionType refers to a condition in the pod's condition list with matching type.", + Description: "ConditionType refers to a condition in the pod's condition list with matching type.\n\nPossible enum values:\n - `\"ContainersReady\"` indicates whether all containers in the pod are ready.\n - `\"Initialized\"` means that all init containers in the pod have started successfully.\n - `\"PodScheduled\"` represents status of the scheduling process for this pod.\n - `\"Ready\"` means the pod is able to service requests and should be added to the load balancing pools of all matching services.", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"ContainersReady", "Initialized", "PodScheduled", "Ready"}}, }, }, Required: []string{"conditionType"}, @@ -20403,26 +21651,26 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c Properties: map[string]spec.Schema{ "seLinuxOptions": { SchemaProps: spec.SchemaProps{ - Description: "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + Description: "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.", Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), }, }, "windowsOptions": { SchemaProps: spec.SchemaProps{ - Description: "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Description: "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.", Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), }, }, "runAsUser": { SchemaProps: spec.SchemaProps{ - Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"integer"}, Format: "int64", }, }, "runAsGroup": { SchemaProps: spec.SchemaProps{ - Description: "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + Description: "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"integer"}, Format: "int64", }, @@ -20436,7 +21684,7 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c }, "supplementalGroups": { SchemaProps: spec.SchemaProps{ - Description: "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", + Description: "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -20451,14 +21699,14 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c }, "fsGroup": { SchemaProps: spec.SchemaProps{ - Description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.", + Description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"integer"}, Format: "int64", }, }, "sysctls": { SchemaProps: spec.SchemaProps{ - Description: "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.", + Description: "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -20472,14 +21720,14 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c }, "fsGroupChangePolicy": { SchemaProps: spec.SchemaProps{ - Description: "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used.", + Description: "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"string"}, Format: "", }, }, "seccompProfile": { SchemaProps: spec.SchemaProps{ - Description: "The seccomp options to use by the containers in this pod.", + Description: "The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", Ref: ref("k8s.io/api/core/v1.SeccompProfile"), }, }, @@ -20587,7 +21835,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, }, SchemaProps: spec.SchemaProps{ - Description: "List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.", + Description: "List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -20601,10 +21849,10 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "restartPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", + Description: "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\nPossible enum values:\n - `\"Always\"`\n - `\"Never\"`\n - `\"OnFailure\"`", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Always", "Never", "OnFailure"}}, }, "terminationGracePeriodSeconds": { SchemaProps: spec.SchemaProps{ @@ -20622,10 +21870,10 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "dnsPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + Description: "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.\n\nPossible enum values:\n - `\"ClusterFirst\"` indicates that the pod should use cluster DNS first unless hostNetwork is true, if it is available, then fall back on the default (as determined by kubelet) DNS settings.\n - `\"ClusterFirstWithHostNet\"` indicates that the pod should use cluster DNS first, if it is available, then fall back on the default (as determined by kubelet) DNS settings.\n - `\"Default\"` indicates that the pod should use the default (as determined by kubelet) DNS settings.\n - `\"None\"` indicates that the pod should use empty DNS settings. DNS parameters such as nameservers and search paths should be defined via DNSConfig.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"ClusterFirst", "ClusterFirstWithHostNet", "Default", "None"}}, }, "nodeSelector": { VendorExtensible: spec.VendorExtensible{ @@ -20893,12 +22141,18 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Format: "", }, }, + "os": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup This is an alpha field and requires the IdentifyPodOS feature", + Ref: ref("k8s.io/api/core/v1.PodOS"), + }, + }, }, Required: []string{"containers"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EphemeralContainer", "k8s.io/api/core/v1.HostAlias", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodReadinessGate", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.TopologySpreadConstraint", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EphemeralContainer", "k8s.io/api/core/v1.HostAlias", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodOS", "k8s.io/api/core/v1.PodReadinessGate", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.TopologySpreadConstraint", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } @@ -20911,10 +22165,10 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Properties: map[string]spec.Schema{ "phase": { SchemaProps: spec.SchemaProps{ - Description: "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", + Description: "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase\n\nPossible enum values:\n - `\"Failed\"` means that all containers in the pod have terminated, and at least one container has terminated in a failure (exited with a non-zero exit code or was stopped by the system).\n - `\"Pending\"` means the pod has been accepted by the system, but one or more of the containers has not been started. This includes time before being bound to a node, as well as time spent pulling images onto the host.\n - `\"Running\"` means the pod has been bound to a node and all of the containers have been started. At least one container is still running or is in the process of being restarted.\n - `\"Succeeded\"` means that all containers in the pod have voluntarily terminated with a container exit code of 0, and the system is not going to restart any of these containers.\n - `\"Unknown\"` means that for some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. Deprecated: It isn't being set since 2015 (74da3b14b0c0f658b3bb8d2def5094686d0e9095)", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Failed", "Pending", "Running", "Succeeded", "Unknown"}}, }, "conditions": { VendorExtensible: spec.VendorExtensible{ @@ -21027,14 +22281,14 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope }, "qosClass": { SchemaProps: spec.SchemaProps{ - Description: "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md", + Description: "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md\n\nPossible enum values:\n - `\"BestEffort\"` is the BestEffort qos class.\n - `\"Burstable\"` is the Burstable qos class.\n - `\"Guaranteed\"` is the Guaranteed qos class.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"BestEffort", "Burstable", "Guaranteed"}}, }, "ephemeralContainerStatuses": { SchemaProps: spec.SchemaProps{ - Description: "Status for any ephemeral containers that have run in this pod. This field is alpha-level and is only populated by servers that enable the EphemeralContainers feature.", + Description: "Status for any ephemeral containers that have run in this pod. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -21236,11 +22490,11 @@ func schema_k8sio_api_core_v1_PortStatus(ref common.ReferenceCallback) common.Op }, "protocol": { SchemaProps: spec.SchemaProps{ - Description: "Protocol is the protocol of the service port of which status is recorded here The supported values are: \"TCP\", \"UDP\", \"SCTP\"", + Description: "Protocol is the protocol of the service port of which status is recorded here The supported values are: \"TCP\", \"UDP\", \"SCTP\"\n\nPossible enum values:\n - `\"SCTP\"` is the SCTP protocol.\n - `\"TCP\"` is the TCP protocol.\n - `\"UDP\"` is the UDP protocol.", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"SCTP", "TCP", "UDP"}}, }, "error": { SchemaProps: spec.SchemaProps{ @@ -21376,7 +22630,7 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI Properties: map[string]spec.Schema{ "exec": { SchemaProps: spec.SchemaProps{ - Description: "One and only one of the following should be specified. Exec specifies the action to take.", + Description: "Exec specifies the action to take.", Ref: ref("k8s.io/api/core/v1.ExecAction"), }, }, @@ -21388,10 +22642,16 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI }, "tcpSocket": { SchemaProps: spec.SchemaProps{ - Description: "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + Description: "TCPSocket specifies an action involving a TCP port.", Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), }, }, + "grpc": { + SchemaProps: spec.SchemaProps{ + Description: "GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate.", + Ref: ref("k8s.io/api/core/v1.GRPCAction"), + }, + }, "initialDelaySeconds": { SchemaProps: spec.SchemaProps{ Description: "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", @@ -21438,7 +22698,46 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + } +} + +func schema_k8sio_api_core_v1_ProbeHandler(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ProbeHandler defines a specific action that should be taken in a probe. One and only one of the fields must be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exec": { + SchemaProps: spec.SchemaProps{ + Description: "Exec specifies the action to take.", + Ref: ref("k8s.io/api/core/v1.ExecAction"), + }, + }, + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPGet specifies the http request to perform.", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "tcpSocket": { + SchemaProps: spec.SchemaProps{ + Description: "TCPSocket specifies an action involving a TCP port.", + Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + }, + }, + "grpc": { + SchemaProps: spec.SchemaProps{ + Description: "GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate.", + Ref: ref("k8s.io/api/core/v1.GRPCAction"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, } } @@ -22573,19 +23872,19 @@ func schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref common.Refer Properties: map[string]spec.Schema{ "scopeName": { SchemaProps: spec.SchemaProps{ - Description: "The name of the scope that the selector applies to.", + Description: "The name of the scope that the selector applies to.\n\nPossible enum values:\n - `\"BestEffort\"` Match all pod objects that have best effort quality of service\n - `\"CrossNamespacePodAffinity\"` Match all pod objects that have cross-namespace pod (anti)affinity mentioned. This is a beta feature enabled by the PodAffinityNamespaceSelector feature flag.\n - `\"NotBestEffort\"` Match all pod objects that do not have best effort quality of service\n - `\"NotTerminating\"` Match all pod objects where spec.activeDeadlineSeconds is nil\n - `\"PriorityClass\"` Match all pod objects that have priority class mentioned\n - `\"Terminating\"` Match all pod objects where spec.activeDeadlineSeconds >=0", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"BestEffort", "CrossNamespacePodAffinity", "NotBestEffort", "NotTerminating", "PriorityClass", "Terminating"}}, }, "operator": { SchemaProps: spec.SchemaProps{ - Description: "Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.", + Description: "Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.\n\nPossible enum values:\n - `\"DoesNotExist\"`\n - `\"Exists\"`\n - `\"In\"`\n - `\"NotIn\"`", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"DoesNotExist", "Exists", "In", "NotIn"}}, }, "values": { SchemaProps: spec.SchemaProps{ @@ -22618,11 +23917,11 @@ func schema_k8sio_api_core_v1_SeccompProfile(ref common.ReferenceCallback) commo Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.", + Description: "type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.\n\nPossible enum values:\n - `\"Localhost\"` indicates a profile defined in a file on the node should be used. The file's location relative to /seccomp.\n - `\"RuntimeDefault\"` represents the default container runtime seccomp profile.\n - `\"Unconfined\"` indicates no seccomp profile is applied (A.K.A. unconfined).", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Localhost", "RuntimeDefault", "Unconfined"}}, }, "localhostProfile": { SchemaProps: spec.SchemaProps{ @@ -22718,7 +24017,7 @@ func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAP }, "type": { SchemaProps: spec.SchemaProps{ - Description: "Used to facilitate programmatic handling of secret data.", + Description: "Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types", Type: []string{"string"}, Format: "", }, @@ -22984,39 +24283,39 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm Properties: map[string]spec.Schema{ "capabilities": { SchemaProps: spec.SchemaProps{ - Description: "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.", + Description: "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.", Ref: ref("k8s.io/api/core/v1.Capabilities"), }, }, "privileged": { SchemaProps: spec.SchemaProps{ - Description: "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.", + Description: "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"boolean"}, Format: "", }, }, "seLinuxOptions": { SchemaProps: spec.SchemaProps{ - Description: "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Description: "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.", Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), }, }, "windowsOptions": { SchemaProps: spec.SchemaProps{ - Description: "The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Description: "The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.", Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), }, }, "runAsUser": { SchemaProps: spec.SchemaProps{ - Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"integer"}, Format: "int64", }, }, "runAsGroup": { SchemaProps: spec.SchemaProps{ - Description: "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Description: "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"integer"}, Format: "int64", }, @@ -23030,28 +24329,28 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm }, "readOnlyRootFilesystem": { SchemaProps: spec.SchemaProps{ - Description: "Whether this container has a read-only root filesystem. Default is false.", + Description: "Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"boolean"}, Format: "", }, }, "allowPrivilegeEscalation": { SchemaProps: spec.SchemaProps{ - Description: "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN", + Description: "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.", Type: []string{"boolean"}, Format: "", }, }, "procMount": { SchemaProps: spec.SchemaProps{ - Description: "procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled.", + Description: "procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.", Type: []string{"string"}, Format: "", }, }, "seccompProfile": { SchemaProps: spec.SchemaProps{ - Description: "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.", + Description: "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.", Ref: ref("k8s.io/api/core/v1.SeccompProfile"), }, }, @@ -23380,11 +24679,11 @@ func schema_k8sio_api_core_v1_ServicePort(ref common.ReferenceCallback) common.O }, "protocol": { SchemaProps: spec.SchemaProps{ - Description: "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.", + Description: "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.\n\nPossible enum values:\n - `\"SCTP\"` is the SCTP protocol.\n - `\"TCP\"` is the TCP protocol.\n - `\"UDP\"` is the UDP protocol.", Default: "TCP", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"SCTP", "TCP", "UDP"}}, }, "appProtocol": { SchemaProps: spec.SchemaProps{ @@ -23525,7 +24824,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, }, SchemaProps: spec.SchemaProps{ - Description: "ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value.\n\nUnless the \"IPv6DualStack\" feature gate is enabled, this field is limited to one value, which must be the same as the clusterIP field. If the feature gate is enabled, this field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Description: "ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value.\n\nThis field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -23540,10 +24839,10 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, "type": { SchemaProps: spec.SchemaProps{ - Description: "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \"ExternalName\" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", + Description: "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \"ExternalName\" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types\n\nPossible enum values:\n - `\"ClusterIP\"` means a service will only be accessible inside the cluster, via the cluster IP.\n - `\"ExternalName\"` means a service consists of only a reference to an external name that kubedns or equivalent will return as a CNAME record, with no exposing or proxying of any pods involved.\n - `\"LoadBalancer\"` means a service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type.\n - `\"NodePort\"` means a service will be exposed on one port of every node, in addition to 'ClusterIP' type.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"ClusterIP", "ExternalName", "LoadBalancer", "NodePort"}}, }, "externalIPs": { SchemaProps: spec.SchemaProps{ @@ -23562,10 +24861,10 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, "sessionAffinity": { SchemaProps: spec.SchemaProps{ - Description: "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Description: "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies\n\nPossible enum values:\n - `\"ClientIP\"` is the Client IP based.\n - `\"None\"` - no session affinity.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"ClientIP", "None"}}, }, "loadBalancerIP": { SchemaProps: spec.SchemaProps{ @@ -23598,10 +24897,10 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, "externalTrafficPolicy": { SchemaProps: spec.SchemaProps{ - Description: "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", + Description: "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.\n\nPossible enum values:\n - `\"Cluster\"` specifies node-global (legacy) behavior.\n - `\"Local\"` specifies node-local endpoints behavior.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Cluster", "Local"}}, }, "healthCheckNodePort": { SchemaProps: spec.SchemaProps{ @@ -23630,7 +24929,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, }, SchemaProps: spec.SchemaProps{ - Description: "IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the \"IPv6DualStack\" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName.\n\nThis field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.", + Description: "IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName.\n\nThis field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -23645,7 +24944,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, "ipFamilyPolicy": { SchemaProps: spec.SchemaProps{ - Description: "IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the \"IPv6DualStack\" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.", + Description: "IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.", Type: []string{"string"}, Format: "", }, @@ -23928,11 +25227,11 @@ func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPI }, "effect": { SchemaProps: spec.SchemaProps{ - Description: "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", + Description: "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.\n\nPossible enum values:\n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController.\n - `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.\n - `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler.", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"NoExecute", "NoSchedule", "PreferNoSchedule"}}, }, "timeAdded": { SchemaProps: spec.SchemaProps{ @@ -23965,10 +25264,10 @@ func schema_k8sio_api_core_v1_Toleration(ref common.ReferenceCallback) common.Op }, "operator": { SchemaProps: spec.SchemaProps{ - Description: "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + Description: "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.\n\nPossible enum values:\n - `\"Equal\"`\n - `\"Exists\"`", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"Equal", "Exists"}}, }, "value": { SchemaProps: spec.SchemaProps{ @@ -23979,10 +25278,10 @@ func schema_k8sio_api_core_v1_Toleration(ref common.ReferenceCallback) common.Op }, "effect": { SchemaProps: spec.SchemaProps{ - Description: "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + Description: "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.\n\nPossible enum values:\n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController.\n - `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.\n - `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler.", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"NoExecute", "NoSchedule", "PreferNoSchedule"}}, }, "tolerationSeconds": { SchemaProps: spec.SchemaProps{ @@ -24093,11 +25392,11 @@ func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallb }, "whenUnsatisfiable": { SchemaProps: spec.SchemaProps{ - Description: "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assigment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.", + Description: "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.\n\nPossible enum values:\n - `\"DoNotSchedule\"` instructs the scheduler not to schedule the pod when constraints are not satisfied.\n - `\"ScheduleAnyway\"` instructs the scheduler to schedule the pod even if constraints are not satisfied.", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"DoNotSchedule", "ScheduleAnyway"}}, }, "labelSelector": { SchemaProps: spec.SchemaProps{ @@ -24341,7 +25640,7 @@ func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAP }, "ephemeral": { SchemaProps: spec.SchemaProps{ - Description: "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.\n\nThis is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled.", + Description: "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), }, }, @@ -24679,7 +25978,7 @@ func schema_k8sio_api_core_v1_VolumeSource(ref common.ReferenceCallback) common. }, "ephemeral": { SchemaProps: spec.SchemaProps{ - Description: "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.\n\nThis is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled.", + Description: "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), }, }, @@ -25042,11 +26341,11 @@ func schema_k8sio_api_discovery_v1_EndpointSlice(ref common.ReferenceCallback) c }, "addressType": { SchemaProps: spec.SchemaProps{ - Description: "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.", + Description: "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.\n\nPossible enum values:\n - `\"FQDN\"` represents a FQDN.\n - `\"IPv4\"` represents an IPv4 Address.\n - `\"IPv6\"` represents an IPv6 Address.", Default: "", Type: []string{"string"}, Format: "", - }, + Enum: []interface{}{"FQDN", "IPv4", "IPv6"}}, }, "endpoints": { VendorExtensible: spec.VendorExtensible{ @@ -29369,7 +30668,7 @@ func schema_k8sio_api_flowcontrol_v1alpha1_ResourcePolicyRule(ref common.Referen return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) least one member of namespaces matches the request.", + Description: "ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "verbs": { @@ -30354,7 +31653,7 @@ func schema_k8sio_api_flowcontrol_v1beta1_ResourcePolicyRule(ref common.Referenc return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) least one member of namespaces matches the request.", + Description: "ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "verbs": { @@ -30392,575 +31691,200 @@ func schema_k8sio_api_flowcontrol_v1beta1_ResourcePolicyRule(ref common.Referenc Default: "", Type: []string{"string"}, Format: "", - }, - }, - }, - }, - }, - "resources": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "clusterScope": { - SchemaProps: spec.SchemaProps{ - Description: "`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "namespaces": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"verbs", "apiGroups", "resources"}, - }, - }, - } -} - -func schema_k8sio_api_flowcontrol_v1beta1_ServiceAccountSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceAccountSubject holds detailed information for service-account-kind subject.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "`namespace` is the namespace of matching ServiceAccount objects. Required.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"namespace", "name"}, - }, - }, - } -} - -func schema_k8sio_api_flowcontrol_v1beta1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "`kind` indicates which one of the other fields is non-empty. Required", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "`user` matches based on username.", - Ref: ref("k8s.io/api/flowcontrol/v1beta1.UserSubject"), - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "`group` matches based on user group name.", - Ref: ref("k8s.io/api/flowcontrol/v1beta1.GroupSubject"), - }, - }, - "serviceAccount": { - SchemaProps: spec.SchemaProps{ - Description: "`serviceAccount` matches ServiceAccounts.", - Ref: ref("k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject"), - }, - }, - }, - Required: []string{"kind"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-unions": []interface{}{ - map[string]interface{}{ - "discriminator": "kind", - "fields-to-discriminateBy": map[string]interface{}{ - "group": "Group", - "serviceAccount": "ServiceAccount", - "user": "User", - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/flowcontrol/v1beta1.GroupSubject", "k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject", "k8s.io/api/flowcontrol/v1beta1.UserSubject"}, - } -} - -func schema_k8sio_api_flowcontrol_v1beta1_UserSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "UserSubject holds detailed information for user-kind subject.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "`name` is the username that matches, or \"*\" to match all usernames. Required.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ImageReview checks if the set of images in a pod are allowed.", - 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. 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"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the pod being evaluated", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the backend and indicates whether the pod should be allowed.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec", "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ImageReviewContainerSpec is a description of a container within the pod creation request.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "image": { - SchemaProps: spec.SchemaProps{ - Description: "This can be in the form image:tag or image@SHA:012345679abcdef.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ImageReviewSpec is a description of the pod creation request.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "containers": { - SchemaProps: spec.SchemaProps{ - Description: "Containers is a list of a subset of the information in each container of the Pod being created.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"), - }, - }, - }, - }, - }, - "annotations": { - SchemaProps: spec.SchemaProps{ - Description: "Annotations is a list of key-value pairs extracted from the Pod's annotations. It only includes keys which match the pattern `*.image-policy.k8s.io/*`. It is up to each webhook backend to determine how to interpret these annotations, if at all.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace the pod is being created in.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"}, - } -} - -func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ImageReviewStatus is the result of the review for the pod creation request.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "allowed": { - SchemaProps: spec.SchemaProps{ - Description: "Allowed indicates that all images were allowed to be run.", - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Reason should be empty unless Allowed is false in which case it may contain a short description of what is wrong. Kubernetes may truncate excessively long errors when displaying to the user.", - Type: []string{"string"}, - Format: "", - }, - }, - "auditAnnotations": { - SchemaProps: spec.SchemaProps{ - Description: "AuditAnnotations will be added to the attributes object of the admission controller request using 'AddAnnotation'. The keys should be prefix-less (i.e., the admission controller will add an appropriate prefix).", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"allowed"}, - }, - }, - } -} - -func schema_k8sio_api_networking_v1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".", - Type: []string{"string"}, - Format: "", + }, + }, + }, }, }, - "pathType": { + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types.", - Type: []string{"string"}, - Format: "", + Description: "`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "backend": { + "clusterScope": { SchemaProps: spec.SchemaProps{ - Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressBackend"), + Description: "`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.", + Type: []string{"boolean"}, + Format: "", }, }, - }, - Required: []string{"pathType", "backend"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.IngressBackend"}, - } -} - -func schema_k8sio_api_networking_v1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "paths": { + "namespaces": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", + "x-kubernetes-list-type": "set", }, }, SchemaProps: spec.SchemaProps{ - Description: "A collection of paths that map requests to backends.", + Description: "`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.HTTPIngressPath"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"paths"}, + Required: []string{"verbs", "apiGroups", "resources"}, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1.HTTPIngressPath"}, } } -func schema_k8sio_api_networking_v1_IPBlock(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_ServiceAccountSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", + Description: "ServiceAccountSubject holds detailed information for service-account-kind subject.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "cidr": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", + Description: "`namespace` is the namespace of matching ServiceAccount objects. Required.", Default: "", Type: []string{"string"}, Format: "", }, }, - "except": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"cidr"}, + Required: []string{"namespace", "name"}, }, }, } } -func schema_k8sio_api_networking_v1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", + Description: "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.", 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", + Description: "`kind` indicates which one of the other fields is non-empty. Required", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "user": { 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: "", + Description: "`user` matches based on username.", + Ref: ref("k8s.io/api/flowcontrol/v1beta1.UserSubject"), }, }, - "metadata": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + Description: "`group` matches based on user group name.", + Ref: ref("k8s.io/api/flowcontrol/v1beta1.GroupSubject"), }, }, - "spec": { + "serviceAccount": { SchemaProps: spec.SchemaProps{ - Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressSpec"), + Description: "`serviceAccount` matches ServiceAccounts.", + Ref: ref("k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject"), }, }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressStatus"), + }, + Required: []string{"kind"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "kind", + "fields-to-discriminateBy": map[string]interface{}{ + "group": "Group", + "serviceAccount": "ServiceAccount", + "user": "User", + }, }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressSpec", "k8s.io/api/networking/v1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/flowcontrol/v1beta1.GroupSubject", "k8s.io/api/flowcontrol/v1beta1.ServiceAccountSubject", "k8s.io/api/flowcontrol/v1beta1.UserSubject"}, } } -func schema_k8sio_api_networking_v1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta1_UserSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressBackend describes all endpoints for a given service and port.", + Description: "UserSubject holds detailed information for user-kind subject.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "service": { - SchemaProps: spec.SchemaProps{ - Description: "Service references a Service as a Backend. This is a mutually exclusive setting with \"Resource\".", - Ref: ref("k8s.io/api/networking/v1.IngressServiceBackend"), - }, - }, - "resource": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\".", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Description: "`name` is the username that matches, or \"*\" to match all usernames. Required.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"name"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/api/networking/v1.IngressServiceBackend"}, } } -func schema_k8sio_api_networking_v1_IngressClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_FlowDistinguisherMethod(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + Description: "FlowDistinguisherMethod specifies the method of a flow distinguisher.", 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": { + "type": { 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", + Description: "`type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressClassSpec"), - }, - }, }, + Required: []string{"type"}, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1.IngressClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_networking_v1_IngressClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_FlowSchema(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressClassList is a collection of IngressClasses.", + Description: "FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -30979,118 +31903,88 @@ func schema_k8sio_api_networking_v1_IngressClassList(ref common.ReferenceCallbac }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata.", + Description: "`metadata` is the standard object's metadata. 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"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of IngressClasses.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressClass"), - }, - }, - }, + Description: "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta2.FlowSchemaSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta2.FlowSchemaStatus"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/flowcontrol/v1beta2.FlowSchemaSpec", "k8s.io/api/flowcontrol/v1beta2.FlowSchemaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_networking_v1_IngressClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", + Description: "FlowSchemaCondition describes conditions for a FlowSchema.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced.", - Default: "", + Description: "`type` is the type of the condition. Required.", Type: []string{"string"}, Format: "", }, }, - "name": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced.", - Default: "", + Description: "`status` is the status of the condition. Can be True, False, Unknown. Required.", Type: []string{"string"}, Format: "", }, }, - "scope": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\". Field can be enabled with IngressClassNamespacedParams feature gate.", - Type: []string{"string"}, - Format: "", + Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "namespace": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", + Description: "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", Type: []string{"string"}, Format: "", }, }, - }, - Required: []string{"kind", "name"}, - }, - }, - } -} - -func schema_k8sio_api_networking_v1_IngressClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressClassSpec provides information about the class of an Ingress.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "controller": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + Description: "`message` is a human-readable message indicating details about last transition.", Type: []string{"string"}, Format: "", }, }, - "parameters": { - SchemaProps: spec.SchemaProps{ - Description: "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", - Ref: ref("k8s.io/api/networking/v1.IngressClassParametersReference"), - }, - }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressClassParametersReference"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_networking_v1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressList is a collection of Ingress.", + Description: "FlowSchemaList is a list of FlowSchema objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -31109,20 +32003,20 @@ func schema_k8sio_api_networking_v1_IngressList(ref common.ReferenceCallback) co }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "`metadata` is the standard list metadata. 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 Ingress.", + Description: "`items` is a list of FlowSchemas.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.Ingress"), + Ref: ref("k8s.io/api/flowcontrol/v1beta2.FlowSchema"), }, }, }, @@ -31133,141 +32027,90 @@ func schema_k8sio_api_networking_v1_IngressList(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_networking_v1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", - Type: []string{"string"}, - Format: "", - }, - }, - "http": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.HTTPIngressRuleValue"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.HTTPIngressRuleValue"}, - } -} - -func schema_k8sio_api_networking_v1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "http": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.HTTPIngressRuleValue"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.HTTPIngressRuleValue"}, + "k8s.io/api/flowcontrol/v1beta2.FlowSchema", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_networking_v1_IngressServiceBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressServiceBackend references a Kubernetes Service as a Backend.", + Description: "FlowSchemaSpec describes how the FlowSchema's specification looks like.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the referenced service. The service must exist in the same namespace as the Ingress object.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { + "priorityLevelConfiguration": { SchemaProps: spec.SchemaProps{ - Description: "Port of the referenced service. A port name or port number is required for a IngressServiceBackend.", + Description: "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.ServiceBackendPort"), + Ref: ref("k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationReference"), }, }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.ServiceBackendPort"}, - } -} - -func schema_k8sio_api_networking_v1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressSpec describes the Ingress the user wishes to exist.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ingressClassName": { + "matchingPrecedence": { SchemaProps: spec.SchemaProps{ - Description: "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", - Type: []string{"string"}, - Format: "", + Description: "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "defaultBackend": { + "distinguisherMethod": { SchemaProps: spec.SchemaProps{ - Description: "DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.", - Ref: ref("k8s.io/api/networking/v1.IngressBackend"), + Description: "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.", + Ref: ref("k8s.io/api/flowcontrol/v1beta2.FlowDistinguisherMethod"), }, }, - "tls": { + "rules": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + Description: "`rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressTLS"), + Ref: ref("k8s.io/api/flowcontrol/v1beta2.PolicyRulesWithSubjects"), }, }, }, }, }, - "rules": { + }, + Required: []string{"priorityLevelConfiguration"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1beta2.FlowDistinguisherMethod", "k8s.io/api/flowcontrol/v1beta2.PolicyRulesWithSubjects", "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationReference"}, + } +} + +func schema_k8sio_api_flowcontrol_v1beta2_FlowSchemaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlowSchemaStatus represents the current state of a FlowSchema.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", }, }, SchemaProps: spec.SchemaProps{ - Description: "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + Description: "`conditions` is a list of the current states of FlowSchema.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.IngressRule"), + Ref: ref("k8s.io/api/flowcontrol/v1beta2.FlowSchemaCondition"), }, }, }, @@ -31277,206 +32120,236 @@ func schema_k8sio_api_networking_v1_IngressSpec(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.IngressBackend", "k8s.io/api/networking/v1.IngressRule", "k8s.io/api/networking/v1.IngressTLS"}, + "k8s.io/api/flowcontrol/v1beta2.FlowSchemaCondition"}, } } -func schema_k8sio_api_networking_v1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_GroupSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressStatus describe the current state of the Ingress.", + Description: "GroupSubject holds detailed information for group-kind subject.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "loadBalancer": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "LoadBalancer contains the current status of the load-balancer.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + Description: "name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"name"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus"}, } } -func schema_k8sio_api_networking_v1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_LimitResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressTLS describes the transport layer security associated with an Ingress.", + Description: "LimitResponse defines how to handle requests that can not be executed right now.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "hosts": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, + "type": { SchemaProps: spec.SchemaProps{ - Description: "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "`type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "secretName": { + "queuing": { SchemaProps: spec.SchemaProps{ - Description: "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", - Type: []string{"string"}, - Format: "", + Description: "`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.", + Ref: ref("k8s.io/api/flowcontrol/v1beta2.QueuingConfiguration"), + }, + }, + }, + Required: []string{"type"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "type", + "fields-to-discriminateBy": map[string]interface{}{ + "queuing": "Queuing", + }, }, }, }, }, }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1beta2.QueuingConfiguration"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_LimitedPriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicy describes what network traffic is allowed for a set of Pods", + Description: "LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:\n * How are requests for this priority level limited?\n * What should be done with requests that exceed the limit?", 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": { + "assuredConcurrencyShares": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + Description: "`assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level:\n\n ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )\n\nbigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "spec": { + "limitResponse": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior for this NetworkPolicy.", + Description: "`limitResponse` indicates what to do with requests that can not be executed right now", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicySpec"), + Ref: ref("k8s.io/api/flowcontrol/v1beta2.LimitResponse"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/flowcontrol/v1beta2.LimitResponse"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_NonResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", + Description: "NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ports": { + "verbs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + Description: "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs. If it is present, it must be the only entry. Required.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "to": { + "nonResourceURLs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", + Description: "`nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:\n - \"/healthz\" is legal\n - \"/hea*\" is illegal\n - \"/hea\" is legal but matches nothing\n - \"/hea/*\" also matches nothing\n - \"/healthz/*\" matches all per-component health checks.\n\"*\" matches all non-resource urls. if it is present, it must be the only entry. Required.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, + Required: []string{"verbs", "nonResourceURLs"}, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_PolicyRulesWithSubjects(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", + Description: "PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ports": { + "subjects": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + Description: "subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), + Ref: ref("k8s.io/api/flowcontrol/v1beta2.Subject"), }, }, }, }, }, - "from": { + "resourceRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", + Description: "`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), + Ref: ref("k8s.io/api/flowcontrol/v1beta2.ResourcePolicyRule"), + }, + }, + }, + }, + }, + "nonResourceRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta2.NonResourcePolicyRule"), }, }, }, }, }, }, + Required: []string{"subjects"}, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, + "k8s.io/api/flowcontrol/v1beta2.NonResourcePolicyRule", "k8s.io/api/flowcontrol/v1beta2.ResourcePolicyRule", "k8s.io/api/flowcontrol/v1beta2.Subject"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyList is a list of NetworkPolicy objects.", + Description: "PriorityLevelConfiguration represents the configuration of a priority level.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -31495,525 +32368,486 @@ func schema_k8sio_api_networking_v1_NetworkPolicyList(ref common.ReferenceCallba }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "`metadata` is the standard object's metadata. 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"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicy"), - }, - }, - }, + Description: "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationStatus"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationSpec", "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed", + Description: "PriorityLevelConfigurationCondition defines the condition of priority level.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "podSelector": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "`type` is the type of the condition. Required.", + Type: []string{"string"}, + Format: "", }, }, - "namespaceSelector": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "`status` is the status of the condition. Can be True, False, Unknown. Required.", + Type: []string{"string"}, + Format: "", }, }, - "ipBlock": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", - Ref: ref("k8s.io/api/networking/v1.IPBlock"), + Description: "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.IPBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - } -} - -func schema_k8sio_api_networking_v1_NetworkPolicyPort(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyPort describes a port to allow traffic on", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "protocol": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", + Description: "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", Type: []string{"string"}, Format: "", }, }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "endPort": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate \"NetworkPolicyEndPort\".", - Type: []string{"integer"}, - Format: "int32", + Description: "`message` is a human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_networking_v1_NetworkPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicySpec provides the specification of a NetworkPolicy", + Description: "PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "podSelector": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + 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: "", }, }, - "ingress": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyIngressRule"), - }, - }, - }, + 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: "", }, }, - "egress": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyEgressRule"), - }, - }, - }, + Description: "`metadata` is the standard object's metadata. 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"), }, }, - "policyTypes": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "List of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", + Description: "`items` is a list of request-priorities.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfiguration"), }, }, }, }, }, }, - Required: []string{"podSelector"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyEgressRule", "k8s.io/api/networking/v1.NetworkPolicyIngressRule", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_networking_v1_ServiceBackendPort(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceBackendPort is the service port being referenced.", + Description: "PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", + Description: "`name` is the name of the priority level configuration being referenced Required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "number": { - SchemaProps: spec.SchemaProps{ - Description: "Number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \"Name\".", - Type: []string{"integer"}, - Format: "int32", - }, - }, }, + Required: []string{"name"}, }, }, } } -func schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", + Description: "PriorityLevelConfigurationSpec specifies the configuration of a priority level.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "path": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".", + Description: "`type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "pathType": { + "limited": { SchemaProps: spec.SchemaProps{ - Description: "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types. Defaults to ImplementationSpecific.", - Type: []string{"string"}, - Format: "", + Description: "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.", + Ref: ref("k8s.io/api/flowcontrol/v1beta2.LimitedPriorityLevelConfiguration"), }, }, - "backend": { - SchemaProps: spec.SchemaProps{ - Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), + }, + Required: []string{"type"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "type", + "fields-to-discriminateBy": map[string]interface{}{ + "limited": "Limited", + }, }, }, }, - Required: []string{"backend"}, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressBackend"}, + "k8s.io/api/flowcontrol/v1beta2.LimitedPriorityLevelConfiguration"}, } } -func schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_PriorityLevelConfigurationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", + Description: "PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "paths": { + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "A collection of paths that map requests to backends.", + Description: "`conditions` is the current state of \"request-priority\".", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressPath"), + Ref: ref("k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationCondition"), }, }, }, }, }, }, - Required: []string{"paths"}, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.HTTPIngressPath"}, + "k8s.io/api/flowcontrol/v1beta2.PriorityLevelConfigurationCondition"}, } } -func schema_k8sio_api_networking_v1beta1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_QueuingConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", + Description: "QueuingConfiguration holds the configuration parameters for queuing", 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": { + "queues": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + Description: "`queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "spec": { + "handSize": { SchemaProps: spec.SchemaProps{ - Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressSpec"), + Description: "`handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "status": { + "queueLengthLimit": { SchemaProps: spec.SchemaProps{ - Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressStatus"), + Description: "`queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressSpec", "k8s.io/api/networking/v1beta1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_networking_v1beta1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_ResourcePolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressBackend describes all endpoints for a given service and port.", + Description: "ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "serviceName": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the name of the referenced service.", - Type: []string{"string"}, - Format: "", + "verbs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, }, - }, - "servicePort": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the port of the referenced service.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Description: "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs and, if present, must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "resource": { + "apiGroups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Description: "`apiGroups` is a list of matching API groups and may not be empty. \"*\" matches all API groups and, if present, must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - } -} - -func schema_k8sio_api_networking_v1beta1_IngressClass(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, 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: "", + Description: "`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "apiVersion": { + "clusterScope": { 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"}, + Description: "`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.", + Type: []string{"boolean"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + "namespaces": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, }, - }, - "spec": { SchemaProps: spec.SchemaProps{ - Description: "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressClassSpec"), + Description: "`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, + Required: []string{"verbs", "apiGroups", "resources"}, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_ServiceAccountSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressClassList is a collection of IngressClasses.", + Description: "ServiceAccountSubject holds detailed information for service-account-kind subject.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "namespace": { 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", + Description: "`namespace` is the namespace of matching ServiceAccount objects. Required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "name": { 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", + Description: "`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list 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 IngressClasses.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressClass"), - }, - }, - }, - }, - }, }, - Required: []string{"items"}, + Required: []string{"namespace", "name"}, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_networking_v1beta1_IngressClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", + Description: "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", - Type: []string{"string"}, - Format: "", - }, - }, "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced.", + Description: "`kind` indicates which one of the other fields is non-empty. Required", Default: "", Type: []string{"string"}, Format: "", }, }, - "name": { + "user": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "`user` matches based on username.", + Ref: ref("k8s.io/api/flowcontrol/v1beta2.UserSubject"), }, }, - "scope": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\". Field can be enabled with IngressClassNamespacedParams feature gate.", - Type: []string{"string"}, - Format: "", + Description: "`group` matches based on user group name.", + Ref: ref("k8s.io/api/flowcontrol/v1beta2.GroupSubject"), }, }, - "namespace": { + "serviceAccount": { SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", - Type: []string{"string"}, - Format: "", + Description: "`serviceAccount` matches ServiceAccounts.", + Ref: ref("k8s.io/api/flowcontrol/v1beta2.ServiceAccountSubject"), + }, + }, + }, + Required: []string{"kind"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "kind", + "fields-to-discriminateBy": map[string]interface{}{ + "group": "Group", + "serviceAccount": "ServiceAccount", + "user": "User", + }, }, }, }, - Required: []string{"kind", "name"}, }, }, + Dependencies: []string{ + "k8s.io/api/flowcontrol/v1beta2.GroupSubject", "k8s.io/api/flowcontrol/v1beta2.ServiceAccountSubject", "k8s.io/api/flowcontrol/v1beta2.UserSubject"}, } } -func schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_flowcontrol_v1beta2_UserSubject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressClassSpec provides information about the class of an Ingress.", + Description: "UserSubject holds detailed information for user-kind subject.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "controller": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + Description: "`name` is the username that matches, or \"*\" to match all usernames. Required.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "parameters": { - SchemaProps: spec.SchemaProps{ - Description: "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", - Ref: ref("k8s.io/api/networking/v1beta1.IngressClassParametersReference"), - }, - }, }, + Required: []string{"name"}, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressClassParametersReference"}, } } -func schema_k8sio_api_networking_v1beta1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressList is a collection of Ingress.", + Description: "ImageReview checks if the set of images in a pod are allowed.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32034,227 +32868,263 @@ func schema_k8sio_api_networking_v1beta1_IngressList(ref common.ReferenceCallbac SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of Ingress.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.Ingress"), - }, - }, - }, + Description: "Spec holds information about the pod being evaluated", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the backend and indicates whether the pod should be allowed.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus"), }, }, }, - Required: []string{"items"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec", "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_networking_v1beta1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewContainerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + Description: "ImageReviewContainerSpec is a description of a container within the pod creation request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "host": { + "image": { SchemaProps: spec.SchemaProps{ - Description: "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + Description: "This can be in the form image:tag or image@SHA:012345679abcdef.", Type: []string{"string"}, Format: "", }, }, - "http": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), - }, - }, }, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, } } -func schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", + Description: "ImageReviewSpec is a description of the pod creation request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "http": { + "containers": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), + Description: "Containers is a list of a subset of the information in each container of the Pod being created.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"), + }, + }, + }, + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is a list of key-value pairs extracted from the Pod's annotations. It only includes keys which match the pattern `*.image-policy.k8s.io/*`. It is up to each webhook backend to determine how to interpret these annotations, if at all.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace the pod is being created in.", + Type: []string{"string"}, + Format: "", }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, + "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"}, } } -func schema_k8sio_api_networking_v1beta1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_imagepolicy_v1alpha1_ImageReviewStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressSpec describes the Ingress the user wishes to exist.", + Description: "ImageReviewStatus is the result of the review for the pod creation request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ingressClassName": { + "allowed": { SchemaProps: spec.SchemaProps{ - Description: "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", - Type: []string{"string"}, + Description: "Allowed indicates that all images were allowed to be run.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "backend": { - SchemaProps: spec.SchemaProps{ - Description: "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", - Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), - }, - }, - "tls": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressTLS"), - }, - }, - }, + Description: "Reason should be empty unless Allowed is false in which case it may contain a short description of what is wrong. Kubernetes may truncate excessively long errors when displaying to the user.", + Type: []string{"string"}, + Format: "", }, }, - "rules": { + "auditAnnotations": { SchemaProps: spec.SchemaProps{ - Description: "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "AuditAnnotations will be added to the attributes object of the admission controller request using 'AddAnnotation'. The keys should be prefix-less (i.e., the admission controller will add an appropriate prefix).", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/networking/v1beta1.IngressRule"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, + Required: []string{"allowed"}, }, }, - Dependencies: []string{ - "k8s.io/api/networking/v1beta1.IngressBackend", "k8s.io/api/networking/v1beta1.IngressRule", "k8s.io/api/networking/v1beta1.IngressTLS"}, } } -func schema_k8sio_api_networking_v1beta1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressStatus describe the current state of the Ingress.", + Description: "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "loadBalancer": { + "path": { SchemaProps: spec.SchemaProps{ - Description: "LoadBalancer contains the current status of the load-balancer.", + Description: "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".", + Type: []string{"string"}, + Format: "", + }, + }, + "pathType": { + SchemaProps: spec.SchemaProps{ + Description: "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types.", + Type: []string{"string"}, + Format: "", + }, + }, + "backend": { + SchemaProps: spec.SchemaProps{ + Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + Ref: ref("k8s.io/api/networking/v1.IngressBackend"), }, }, }, + Required: []string{"pathType", "backend"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus"}, + "k8s.io/api/networking/v1.IngressBackend"}, } } -func schema_k8sio_api_networking_v1beta1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IngressTLS describes the transport layer security associated with an Ingress.", + Description: "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "hosts": { + "paths": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + Description: "A collection of paths that map requests to backends.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.HTTPIngressPath"), }, }, }, }, }, - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", - Type: []string{"string"}, - Format: "", - }, - }, }, + Required: []string{"paths"}, }, }, + Dependencies: []string{ + "k8s.io/api/networking/v1.HTTPIngressPath"}, } } -func schema_k8sio_api_node_v1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IPBlock(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Overhead structure represents the resource overhead associated with running a pod.", + Description: "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "podFixed": { + "cidr": { SchemaProps: spec.SchemaProps{ - Description: "PodFixed represents the fixed resource overhead associated with running a pod.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "except": { + SchemaProps: spec.SchemaProps{ + Description: "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, + Required: []string{"cidr"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_node_v1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/", + Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32273,45 +33143,65 @@ func schema_k8sio_api_node_v1_RuntimeClass(ref common.ReferenceCallback) common. }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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"), }, }, - "handler": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressSpec"), }, }, - "overhead": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/\nThis field is in beta starting v1.18 and is only honored by servers that enable the PodOverhead feature.", - Ref: ref("k8s.io/api/node/v1.Overhead"), + Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressStatus"), }, }, - "scheduling": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.IngressSpec", "k8s.io/api/networking/v1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_networking_v1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressBackend describes all endpoints for a given service and port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "service": { SchemaProps: spec.SchemaProps{ - Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", - Ref: ref("k8s.io/api/node/v1.Scheduling"), + Description: "Service references a Service as a Backend. This is a mutually exclusive setting with \"Resource\".", + Ref: ref("k8s.io/api/networking/v1.IngressServiceBackend"), + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\".", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), }, }, }, - Required: []string{"handler"}, }, }, Dependencies: []string{ - "k8s.io/api/node/v1.Overhead", "k8s.io/api/node/v1.Scheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/api/networking/v1.IngressServiceBackend"}, } } -func schema_k8sio_api_node_v1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClassList is a list of RuntimeClass objects.", + Description: "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32330,168 +33220,161 @@ func schema_k8sio_api_node_v1_RuntimeClassList(ref common.ReferenceCallback) com }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/node/v1.RuntimeClass"), - }, - }, - }, + Description: "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressClassSpec"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/node/v1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1.IngressClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_node_v1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Description: "IngressClassList is a collection of IngressClasses.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "nodeSelector": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, + "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: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + 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: "", }, }, - "tolerations": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, + }, + "items": { SchemaProps: spec.SchemaProps{ - Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + Description: "Items is the list of IngressClasses.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Toleration"), + Ref: ref("k8s.io/api/networking/v1.IngressClass"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Toleration"}, + "k8s.io/api/networking/v1.IngressClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_node_v1alpha1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Overhead structure represents the resource overhead associated with running a pod.", + Description: "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "podFixed": { + "apiGroup": { SchemaProps: spec.SchemaProps{ - Description: "PodFixed represents the fixed resource overhead associated with running a pod.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, + Description: "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is the type of resource being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of resource being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\".", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"kind", "name"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_node_v1alpha1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class", + Description: "IngressClassSpec provides information about the class of an Ingress.", 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": { + "controller": { 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", + Description: "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "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"), - }, - }, - "spec": { + "parameters": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClassSpec"), + Description: "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", + Ref: ref("k8s.io/api/networking/v1.IngressClassParametersReference"), }, }, }, - Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/node/v1alpha1.RuntimeClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1.IngressClassParametersReference"}, } } -func schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClassList is a list of RuntimeClass objects.", + Description: "IngressList is a collection of Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32510,112 +33393,165 @@ func schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref common.ReferenceCallbac }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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 a list of schema objects.", + Description: "Items is the list of Ingress.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClass"), + Ref: ref("k8s.io/api/networking/v1.Ingress"), }, }, }, }, }, }, - Required: []string{"items"}, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_networking_v1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + Type: []string{"string"}, + Format: "", + }, + }, + "http": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1.HTTPIngressRuleValue"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1.HTTPIngressRuleValue"}, + } +} + +func schema_k8sio_api_networking_v1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "http": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/networking/v1.HTTPIngressRuleValue"), + }, + }, + }, }, }, Dependencies: []string{ - "k8s.io/api/node/v1alpha1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1.HTTPIngressRuleValue"}, } } -func schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressServiceBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.", + Description: "IngressServiceBackend references a Kubernetes Service as a Backend.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "runtimeHandler": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", + Description: "Name is the referenced service. The service must exist in the same namespace as the Ingress object.", Default: "", Type: []string{"string"}, Format: "", }, }, - "overhead": { - SchemaProps: spec.SchemaProps{ - Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", - Ref: ref("k8s.io/api/node/v1alpha1.Overhead"), - }, - }, - "scheduling": { + "port": { SchemaProps: spec.SchemaProps{ - Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", - Ref: ref("k8s.io/api/node/v1alpha1.Scheduling"), + Description: "Port of the referenced service. A port name or port number is required for a IngressServiceBackend.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.ServiceBackendPort"), }, }, }, - Required: []string{"runtimeHandler"}, + Required: []string{"name"}, }, }, Dependencies: []string{ - "k8s.io/api/node/v1alpha1.Overhead", "k8s.io/api/node/v1alpha1.Scheduling"}, + "k8s.io/api/networking/v1.ServiceBackendPort"}, } } -func schema_k8sio_api_node_v1alpha1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Description: "IngressSpec describes the Ingress the user wishes to exist.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "nodeSelector": { + "ingressClassName": { + SchemaProps: spec.SchemaProps{ + Description: "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", + Type: []string{"string"}, + Format: "", + }, + }, + "defaultBackend": { + SchemaProps: spec.SchemaProps{ + Description: "DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.", + Ref: ref("k8s.io/api/networking/v1.IngressBackend"), + }, + }, + "tls": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", + "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.IngressTLS"), }, }, }, }, }, - "tolerations": { + "rules": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + Description: "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Toleration"), + Ref: ref("k8s.io/api/networking/v1.IngressRule"), }, }, }, @@ -32625,102 +33561,77 @@ func schema_k8sio_api_node_v1alpha1_Scheduling(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Toleration"}, + "k8s.io/api/networking/v1.IngressBackend", "k8s.io/api/networking/v1.IngressRule", "k8s.io/api/networking/v1.IngressTLS"}, } } -func schema_k8sio_api_node_v1beta1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Overhead structure represents the resource overhead associated with running a pod.", + Description: "IngressStatus describe the current state of the Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "podFixed": { + "loadBalancer": { SchemaProps: spec.SchemaProps{ - Description: "PodFixed represents the fixed resource overhead associated with running a pod.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, + Description: "LoadBalancer contains the current status of the load-balancer.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "k8s.io/api/core/v1.LoadBalancerStatus"}, } } -func schema_k8sio_api_node_v1beta1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class", + Description: "IngressTLS describes the transport layer security associated with an Ingress.", 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: "", + "hosts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "metadata": { SchemaProps: spec.SchemaProps{ - Description: "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"), + Description: "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "handler": { + "secretName": { SchemaProps: spec.SchemaProps{ - Description: "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", - Default: "", + Description: "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", Type: []string{"string"}, Format: "", }, }, - "overhead": { - SchemaProps: spec.SchemaProps{ - Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", - Ref: ref("k8s.io/api/node/v1beta1.Overhead"), - }, - }, - "scheduling": { - SchemaProps: spec.SchemaProps{ - Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", - Ref: ref("k8s.io/api/node/v1beta1.Scheduling"), - }, - }, }, - Required: []string{"handler"}, }, }, - Dependencies: []string{ - "k8s.io/api/node/v1beta1.Overhead", "k8s.io/api/node/v1beta1.Scheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClassList is a list of RuntimeClass objects.", + Description: "NetworkPolicy describes what network traffic is allowed for a set of Pods", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32739,76 +33650,56 @@ func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/node/v1beta1.RuntimeClass"), - }, - }, - }, + Description: "Specification of the desired behavior for this NetworkPolicy.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicySpec"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/node/v1beta1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1.NetworkPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_node_v1beta1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicyEgressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Description: "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "nodeSelector": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, + "ports": { SchemaProps: spec.SchemaProps{ - Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), }, }, }, }, }, - "tolerations": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, + "to": { SchemaProps: spec.SchemaProps{ - Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + Description: "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Toleration"), + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), }, }, }, @@ -32818,57 +33709,58 @@ func schema_k8sio_api_node_v1beta1_Scheduling(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Toleration"}, + "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, } } -func schema_k8sio_api_policy_v1_Eviction(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicyIngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", + Description: "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", 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": { + "ports": { SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta describes the pod that is being evicted.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), + }, + }, + }, }, }, - "deleteOptions": { + "from": { SchemaProps: spec.SchemaProps{ - Description: "DeleteOptions may be provided", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), + Description: "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), + }, + }, + }, }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, } } -func schema_k8sio_api_policy_v1_PodDisruptionBudget(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", + Description: "NetworkPolicyList is a list of NetworkPolicy objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -32887,279 +33779,187 @@ func schema_k8sio_api_policy_v1_PodDisruptionBudget(ref common.ReferenceCallback }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the PodDisruptionBudget.", + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudgetSpec"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "status": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the PodDisruptionBudget.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudgetStatus"), + Description: "Items is a list of schema objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicy"), + }, + }, + }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1.NetworkPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicyPeer(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", + Description: "NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed", 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": { + "podSelector": { 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: "", + Description: "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "metadata": { + "namespaceSelector": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + Description: "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "items": { + "ipBlock": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of PodDisruptionBudgets", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudget"), - }, - }, - }, + Description: "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", + Ref: ref("k8s.io/api/networking/v1.IPBlock"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1.IPBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicyPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", + Description: "NetworkPolicyPort describes a port to allow traffic on", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "minAvailable": { + "protocol": { SchemaProps: spec.SchemaProps{ - Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Description: "The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", + Type: []string{"string"}, + Format: "", }, }, - "selector": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-strategy": "replace", - }, - }, + "port": { SchemaProps: spec.SchemaProps{ - Description: "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, - "maxUnavailable": { + "endPort": { SchemaProps: spec.SchemaProps{ - Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Description: "If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate \"NetworkPolicyEndPort\".", + Type: []string{"integer"}, + Format: "int32", }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, } } -func schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_NetworkPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + Description: "NetworkPolicySpec provides the specification of a NetworkPolicy", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "observedGeneration": { + "podSelector": { SchemaProps: spec.SchemaProps{ - Description: "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", - Type: []string{"integer"}, - Format: "int64", + Description: "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "disruptedPods": { + "ingress": { SchemaProps: spec.SchemaProps{ - Description: "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", + 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.Time"), + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyIngressRule"), }, }, }, }, }, - "disruptionsAllowed": { - SchemaProps: spec.SchemaProps{ - Description: "Number of pod disruptions that are currently allowed.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentHealthy": { - SchemaProps: spec.SchemaProps{ - Description: "current number of healthy pods", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "desiredHealthy": { - SchemaProps: spec.SchemaProps{ - Description: "minimum desired number of healthy pods", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "expectedPods": { + "egress": { SchemaProps: spec.SchemaProps{ - Description: "total number of pods counted by this disruption budget", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "type", + Description: "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1.NetworkPolicyEgressRule"), + }, }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", }, }, + }, + "policyTypes": { SchemaProps: spec.SchemaProps{ - Description: "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", + Description: "List of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", 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.Condition"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"disruptionsAllowed", "currentHealthy", "desiredHealthy", "expectedPods"}, + Required: []string{"podSelector"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/networking/v1.NetworkPolicyEgressRule", "k8s.io/api/networking/v1.NetworkPolicyIngressRule", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } -func schema_k8sio_api_policy_v1beta1_AllowedCSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1_ServiceBackendPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.", + Description: "ServiceBackendPort is the service port being referenced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name is the registered name of the CSI driver", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_api_policy_v1beta1_AllowedFlexVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "driver is the name of the Flexvolume driver.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"driver"}, - }, - }, - } -} - -func schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "pathPrefix": { - SchemaProps: spec.SchemaProps{ - Description: "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", + Description: "Name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", Type: []string{"string"}, Format: "", }, }, - "readOnly": { + "number": { SchemaProps: spec.SchemaProps{ - Description: "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.", - Type: []string{"boolean"}, - Format: "", + Description: "Number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \"Name\".", + Type: []string{"integer"}, + Format: "int32", }, }, }, @@ -33168,149 +33968,163 @@ func schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref common.ReferenceCallbac } } -func schema_k8sio_api_policy_v1beta1_Eviction(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", + Description: "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "path": { 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", + Description: "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "pathType": { 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", + Description: "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types. Defaults to ImplementationSpecific.", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "backend": { SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta describes the pod that is being evicted.", + Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "deleteOptions": { - SchemaProps: spec.SchemaProps{ - Description: "DeleteOptions may be provided", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), + Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), }, }, }, + Required: []string{"backend"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1beta1.IngressBackend"}, } } -func schema_k8sio_api_policy_v1beta1_FSGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", + Description: "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "rule": { - SchemaProps: spec.SchemaProps{ - Description: "rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", - Type: []string{"string"}, - Format: "", - }, - }, - "ranges": { + "paths": { SchemaProps: spec.SchemaProps{ - Description: "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.", + Description: "A collection of paths that map requests to backends.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressPath"), }, }, }, }, }, }, + Required: []string{"paths"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.IDRange"}, + "k8s.io/api/networking/v1beta1.HTTPIngressPath"}, } } -func schema_k8sio_api_policy_v1beta1_HostPortRange(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "min": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "min is the start of the range, inclusive.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - "max": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "max is the end of the range, inclusive.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + 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. 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"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressStatus"), }, }, }, - Required: []string{"min", "max"}, }, }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.IngressSpec", "k8s.io/api/networking/v1beta1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_policy_v1beta1_IDRange(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressBackend(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IDRange provides a min/max of an allowed range of IDs.", + Description: "IngressBackend describes all endpoints for a given service and port.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "min": { + "serviceName": { SchemaProps: spec.SchemaProps{ - Description: "min is the start of the range, inclusive.", - Default: 0, - Type: []string{"integer"}, - Format: "int64", + Description: "Specifies the name of the referenced service.", + Type: []string{"string"}, + Format: "", }, }, - "max": { + "servicePort": { SchemaProps: spec.SchemaProps{ - Description: "max is the end of the range, inclusive.", - Default: 0, - Type: []string{"integer"}, - Format: "int64", + Description: "Specifies the port of the referenced service.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), }, }, }, - Required: []string{"min", "max"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, } } -func schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", + Description: "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -33336,31 +34150,24 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref common.ReferenceCal }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the PodDisruptionBudget.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the PodDisruptionBudget.", + Description: "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus"), + Ref: ref("k8s.io/api/networking/v1beta1.IngressClassSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1beta1.IngressClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", + Description: "IngressClassList is a collection of IngressClasses.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -33379,20 +34186,20 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.Referenc }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard list metadata.", Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { SchemaProps: spec.SchemaProps{ - Description: "items list individual PodDisruptionBudget objects", + Description: "Items is the list of IngressClasses.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudget"), + Ref: ref("k8s.io/api/networking/v1beta1.IngressClass"), }, }, }, @@ -33403,147 +34210,94 @@ func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1beta1.IngressClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", + Description: "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "minAvailable": { + "apiGroup": { SchemaProps: spec.SchemaProps{ - Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Description: "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + Type: []string{"string"}, + Format: "", }, }, - "selector": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-strategy": "replace", - }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is the type of resource being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", }, + }, + "name": { SchemaProps: spec.SchemaProps{ - Description: "Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "Name is the name of resource being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "maxUnavailable": { + "scope": { SchemaProps: spec.SchemaProps{ - Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + Description: "Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\".", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"kind", "name", "scope"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, } } -func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + Description: "IngressClassSpec provides information about the class of an Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "disruptedPods": { - SchemaProps: spec.SchemaProps{ - Description: "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - }, - }, - "disruptionsAllowed": { - SchemaProps: spec.SchemaProps{ - Description: "Number of pod disruptions that are currently allowed.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentHealthy": { - SchemaProps: spec.SchemaProps{ - Description: "current number of healthy pods", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "desiredHealthy": { - SchemaProps: spec.SchemaProps{ - Description: "minimum desired number of healthy pods", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "expectedPods": { + "controller": { SchemaProps: spec.SchemaProps{ - Description: "total number of pods counted by this disruption budget", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + Type: []string{"string"}, + Format: "", }, }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "type", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, + "parameters": { SchemaProps: spec.SchemaProps{ - Description: "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", - 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.Condition"), - }, - }, - }, + Description: "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", + Ref: ref("k8s.io/api/networking/v1beta1.IngressClassParametersReference"), }, }, }, - Required: []string{"disruptionsAllowed", "currentHealthy", "desiredHealthy", "expectedPods"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/networking/v1beta1.IngressClassParametersReference"}, } } -func schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21.", + Description: "IngressList is a collection of Ingress.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -33564,137 +34318,167 @@ func schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. 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"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "spec": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "spec defines the policy enforced.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.PodSecurityPolicySpec"), + Description: "Items is the list of Ingress.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.Ingress"), + }, + }, + }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodSecurityPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/networking/v1beta1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_policy_v1beta1_PodSecurityPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodSecurityPolicyList is a list of PodSecurityPolicy objects.", + Description: "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", 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": { + "host": { 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", + Description: "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "http": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. 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"), + Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), }, }, - "items": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressRuleValue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "http": { SchemaProps: spec.SchemaProps{ - Description: "items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.PodSecurityPolicy"), - }, - }, - }, + Ref: ref("k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodSecurityPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue"}, } } -func schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_networking_v1beta1_IngressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodSecurityPolicySpec defines the policy enforced.", + Description: "IngressSpec describes the Ingress the user wishes to exist.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "privileged": { + "ingressClassName": { SchemaProps: spec.SchemaProps{ - Description: "privileged determines if a pod can request to be run as privileged.", - Type: []string{"boolean"}, + Description: "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", + Type: []string{"string"}, Format: "", }, }, - "defaultAddCapabilities": { + "backend": { SchemaProps: spec.SchemaProps{ - Description: "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", + Ref: ref("k8s.io/api/networking/v1beta1.IngressBackend"), }, }, - "requiredDropCapabilities": { + "tls": { SchemaProps: spec.SchemaProps{ - Description: "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", + Description: "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressTLS"), }, }, }, }, }, - "allowedCapabilities": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", + Description: "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IngressRule"), }, }, }, }, }, - "volumes": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.IngressBackend", "k8s.io/api/networking/v1beta1.IngressRule", "k8s.io/api/networking/v1beta1.IngressTLS"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressStatus describe the current state of the Ingress.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "loadBalancer": { SchemaProps: spec.SchemaProps{ - Description: "volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", + Description: "LoadBalancer contains the current status of the load-balancer.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LoadBalancerStatus"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IngressTLS(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressTLS describes the transport layer security associated with an Ingress.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hosts": { + SchemaProps: spec.SchemaProps{ + Description: "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -33707,392 +34491,608 @@ func schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref common.ReferenceC }, }, }, - "hostNetwork": { + "secretName": { SchemaProps: spec.SchemaProps{ - Description: "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", - Type: []string{"boolean"}, + Description: "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", + Type: []string{"string"}, Format: "", }, }, - "hostPorts": { + }, + }, + }, + } +} + +func schema_k8sio_api_node_v1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Overhead structure represents the resource overhead associated with running a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podFixed": { SchemaProps: spec.SchemaProps{ - Description: "hostPorts determines which host port ranges are allowed to be exposed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "PodFixed represents the fixed resource overhead associated with running a pod.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.HostPortRange"), + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, }, }, - "hostPID": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_node_v1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "hostPID determines if the policy allows the use of HostPID in the pod spec.", - Type: []string{"boolean"}, + 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: "", }, }, - "hostIPC": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", - Type: []string{"boolean"}, + 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: "", }, }, - "seLinux": { - SchemaProps: spec.SchemaProps{ - Description: "seLinux is the strategy that will dictate the allowable labels that may be set.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.SELinuxStrategyOptions"), - }, - }, - "runAsUser": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", + Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "runAsGroup": { + "handler": { SchemaProps: spec.SchemaProps{ - Description: "RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled.", - Ref: ref("k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions"), + Description: "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "supplementalGroups": { + "overhead": { SchemaProps: spec.SchemaProps{ - Description: "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions"), + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/\nThis field is in beta starting v1.18 and is only honored by servers that enable the PodOverhead feature.", + Ref: ref("k8s.io/api/node/v1.Overhead"), }, }, - "fsGroup": { + "scheduling": { SchemaProps: spec.SchemaProps{ - Description: "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.FSGroupStrategyOptions"), + Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", + Ref: ref("k8s.io/api/node/v1.Scheduling"), }, }, - "readOnlyRootFilesystem": { + }, + Required: []string{"handler"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/node/v1.Overhead", "k8s.io/api/node/v1.Scheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_node_v1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClassList is a list of RuntimeClass objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", - Type: []string{"boolean"}, + 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: "", }, }, - "defaultAllowPrivilegeEscalation": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", - Type: []string{"boolean"}, + 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: "", }, }, - "allowPrivilegeEscalation": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", - Type: []string{"boolean"}, - Format: "", + Description: "Standard list metadata. 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"), }, }, - "allowedHostPaths": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.", + Description: "Items is a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.AllowedHostPath"), + Ref: ref("k8s.io/api/node/v1.RuntimeClass"), }, }, }, }, }, - "allowedFlexVolumes": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/node/v1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_node_v1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.AllowedFlexVolume"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "allowedCSIDrivers": { + "tolerations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate.", + Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.AllowedCSIDriver"), + Ref: ref("k8s.io/api/core/v1.Toleration"), }, }, }, }, }, - "allowedUnsafeSysctls": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Toleration"}, + } +} + +func schema_k8sio_api_node_v1alpha1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Overhead structure represents the resource overhead associated with running a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podFixed": { SchemaProps: spec.SchemaProps{ - Description: "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "PodFixed represents the fixed resource overhead associated with running a pod.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, }, }, - "forbiddenSysctls": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_node_v1alpha1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + 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: "", }, }, - "allowedProcMountTypes": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + 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: "", }, }, - "runtimeClass": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.", - Ref: ref("k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions"), + Description: "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"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClassSpec"), }, }, }, - Required: []string{"seLinux", "runAsUser", "supplementalGroups", "fsGroup"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.AllowedCSIDriver", "k8s.io/api/policy/v1beta1.AllowedFlexVolume", "k8s.io/api/policy/v1beta1.AllowedHostPath", "k8s.io/api/policy/v1beta1.FSGroupStrategyOptions", "k8s.io/api/policy/v1beta1.HostPortRange", "k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions", "k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions", "k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions", "k8s.io/api/policy/v1beta1.SELinuxStrategyOptions", "k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions"}, + "k8s.io/api/node/v1alpha1.RuntimeClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_policy_v1beta1_RunAsGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1alpha1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.", + Description: "RuntimeClassList is a list of RuntimeClass objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "rule": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "rule is the strategy that will dictate the allowable RunAsGroup values that may be set.", - Default: "", + 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: "", }, }, - "ranges": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.", + 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 list metadata. 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 a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + Ref: ref("k8s.io/api/node/v1alpha1.RuntimeClass"), }, }, }, }, }, }, - Required: []string{"rule"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.IDRange"}, + "k8s.io/api/node/v1alpha1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_policy_v1beta1_RunAsUserStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1alpha1_RuntimeClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.", + Description: "RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "rule": { + "runtimeHandler": { SchemaProps: spec.SchemaProps{ - Description: "rule is the strategy that will dictate the allowable RunAsUser values that may be set.", + Description: "RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", Default: "", Type: []string{"string"}, Format: "", }, }, - "ranges": { + "overhead": { SchemaProps: spec.SchemaProps{ - Description: "ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.", + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", + Ref: ref("k8s.io/api/node/v1alpha1.Overhead"), + }, + }, + "scheduling": { + SchemaProps: spec.SchemaProps{ + Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", + Ref: ref("k8s.io/api/node/v1alpha1.Scheduling"), + }, + }, + }, + Required: []string{"runtimeHandler"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/node/v1alpha1.Overhead", "k8s.io/api/node/v1alpha1.Scheduling"}, + } +} + +func schema_k8sio_api_node_v1alpha1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tolerations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + Ref: ref("k8s.io/api/core/v1.Toleration"), }, }, }, }, }, }, - Required: []string{"rule"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.IDRange"}, + "k8s.io/api/core/v1.Toleration"}, } } -func schema_k8sio_api_policy_v1beta1_RuntimeClassStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1beta1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.", + Description: "Overhead structure represents the resource overhead associated with running a pod.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "allowedRuntimeClassNames": { + "podFixed": { SchemaProps: spec.SchemaProps{ - Description: "allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "PodFixed represents the fixed resource overhead associated with running a pod.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, }, }, - "defaultRuntimeClassName": { - SchemaProps: spec.SchemaProps{ - Description: "defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.", - Type: []string{"string"}, - Format: "", - }, - }, }, - Required: []string{"allowedRuntimeClassNames"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_policy_v1beta1_SELinuxStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1beta1_RuntimeClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.", + Description: "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "rule": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "rule is the strategy that will dictate the allowable labels that may be set.", + 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: "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"), + }, + }, + "handler": { + SchemaProps: spec.SchemaProps{ + Description: "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", Default: "", Type: []string{"string"}, Format: "", }, }, - "seLinuxOptions": { + "overhead": { SchemaProps: spec.SchemaProps{ - Description: "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", + Ref: ref("k8s.io/api/node/v1beta1.Overhead"), + }, + }, + "scheduling": { + SchemaProps: spec.SchemaProps{ + Description: "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", + Ref: ref("k8s.io/api/node/v1beta1.Scheduling"), }, }, }, - Required: []string{"rule"}, + Required: []string{"handler"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SELinuxOptions"}, + "k8s.io/api/node/v1beta1.Overhead", "k8s.io/api/node/v1beta1.Scheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_policy_v1beta1_SupplementalGroupsStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1beta1_RuntimeClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + Description: "RuntimeClassList is a list of RuntimeClass objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "rule": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", + 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: "", }, }, - "ranges": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.", + 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 list metadata. 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 a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + Ref: ref("k8s.io/api/node/v1beta1.RuntimeClass"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/policy/v1beta1.IDRange"}, + "k8s.io/api/node/v1beta1.RuntimeClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_node_v1beta1_Scheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + Description: "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "clusterRoleSelectors": { + "nodeSelector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + Description: "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "tolerations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", 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.LabelSelector"), + Ref: ref("k8s.io/api/core/v1.Toleration"), }, }, }, @@ -34102,15 +35102,15 @@ func schema_k8sio_api_rbac_v1_AggregationRule(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/core/v1.Toleration"}, } } -func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1_Eviction(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + Description: "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -34129,44 +35129,30 @@ func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.O }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "ObjectMeta describes the pod that is being evicted.", Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this ClusterRole", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), - }, - }, - }, - }, - }, - "aggregationRule": { + "deleteOptions": { SchemaProps: spec.SchemaProps{ - Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1.AggregationRule"), + Description: "DeleteOptions may be provided", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.AggregationRule", "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1_PodDisruptionBudget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + Description: "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -34185,46 +35171,38 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) c }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "Standard object's metadata. 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"), }, }, - "subjects": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.Subject"), - }, - }, - }, + Description: "Specification of the desired behavior of the PodDisruptionBudget.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudgetSpec"), }, }, - "roleRef": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Description: "Most recently observed status of the PodDisruptionBudget.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.RoleRef"), + Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudgetStatus"), }, }, }, - Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/policy/v1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1_PodDisruptionBudgetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings", + Description: "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -34243,20 +35221,20 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallbac }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "Standard object's metadata. 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 a list of ClusterRoleBindings", + Description: "Items is a list of PodDisruptionBudgets", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.ClusterRoleBinding"), + Ref: ref("k8s.io/api/policy/v1.PodDisruptionBudget"), }, }, }, @@ -34267,205 +35245,218 @@ func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallbac }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/policy/v1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1_PodDisruptionBudgetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleList is a collection of ClusterRoles", + Description: "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "minAvailable": { 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: "", + Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, - "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: "", + "selector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "replace", + }, }, - }, - "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "items": { + "maxUnavailable": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoles", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.ClusterRole"), - }, - }, - }, + Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, } } -func schema_k8sio_api_rbac_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1_PodDisruptionBudgetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Description: "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "verbs": { + "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. '*' represents all verbs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", + Type: []string{"integer"}, + Format: "int64", }, }, - "apiGroups": { + "disruptedPods": { SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, }, }, }, - "resources": { + "disruptionsAllowed": { SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. '*' represents all resources.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Number of pod disruptions that are currently allowed.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "resourceNames": { + "currentHealthy": { SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, + Description: "current number of healthy pods", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "desiredHealthy": { + SchemaProps: spec.SchemaProps{ + Description: "minimum desired number of healthy pods", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "expectedPods": { + SchemaProps: spec.SchemaProps{ + Description: "total number of pods counted by this disruption budget", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", }, }, - }, - "nonResourceURLs": { SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + Description: "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), }, }, }, }, }, }, - Required: []string{"verbs"}, + Required: []string{"disruptionsAllowed", "currentHealthy", "desiredHealthy", "expectedPods"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_rbac_v1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_AllowedCSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + Description: "AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "name": { 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", + Description: "Name is the registered name of the CSI driver", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_api_policy_v1beta1_AllowedFlexVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { 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", + Description: "driver is the name of the Flexvolume driver.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { + }, + Required: []string{"driver"}, + }, + }, + } +} + +func schema_k8sio_api_policy_v1beta1_AllowedHostPath(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pathPrefix": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", + Type: []string{"string"}, + Format: "", }, }, - "rules": { + "readOnly": { SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this Role", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), - }, - }, - }, + Description: "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.", + Type: []string{"boolean"}, + Format: "", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_Eviction(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + Description: "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -34484,383 +35475,359 @@ func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.O }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "ObjectMeta describes the pod that is being evicted.", Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "subjects": { - SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.Subject"), - }, - }, - }, - }, - }, - "roleRef": { + "deleteOptions": { SchemaProps: spec.SchemaProps{ - Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.RoleRef"), + Description: "DeleteOptions may be provided", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), }, }, }, - Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_FSGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBindingList is a collection of RoleBindings", + Description: "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", 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": { + "rule": { 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", + Description: "rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { + "ranges": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of RoleBindings", + Description: "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.RoleBinding"), + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/policy/v1beta1.IDRange"}, } } -func schema_k8sio_api_rbac_v1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_HostPortRange(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleList is a collection of Roles", + Description: "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", 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": { + "min": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "min is the start of the range, inclusive.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "items": { + "max": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of Roles", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1.Role"), - }, - }, - }, + Description: "max is the end of the range, inclusive.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"items"}, + Required: []string{"min", "max"}, }, }, - Dependencies: []string{ - "k8s.io/api/rbac/v1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_IDRange(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleRef contains information that points to the role being used", + Description: "IDRange provides a min/max of an allowed range of IDs.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { + "min": { SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "min is the start of the range, inclusive.", + Default: 0, + Type: []string{"integer"}, + Format: "int64", }, }, - "name": { + "max": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "max is the end of the range, inclusive.", + Default: 0, + Type: []string{"integer"}, + Format: "int64", }, }, }, - Required: []string{"apiGroup", "kind", "name"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, + Required: []string{"min", "max"}, }, }, } } -func schema_k8sio_api_rbac_v1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + Description: "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", - Default: "", + 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: "", }, }, - "apiGroup": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", + 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: "", }, }, - "name": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Name of the object being referenced.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Standard object's metadata. 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"), }, }, - "namespace": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", + Description: "Specification of the desired behavior of the PodDisruptionBudget.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the PodDisruptionBudget.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus"), }, }, - }, - Required: []string{"kind", "name"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", }, }, }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + Description: "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "clusterRoleSelectors": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + 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. 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 list individual PodDisruptionBudget objects", 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.LabelSelector"), + Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudget"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "k8s.io/api/policy/v1beta1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.", + Description: "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "minAvailable": { 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: "", + Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, - "apiVersion": { + "selector": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "replace", + }, + }, 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: "", + Description: "Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "metadata": { + "maxUnavailable": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), }, }, - "rules": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_policy_v1beta1_PodDisruptionBudgetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this ClusterRole", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "disruptedPods": { + SchemaProps: spec.SchemaProps{ + Description: "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, }, }, }, - "aggregationRule": { + "disruptionsAllowed": { SchemaProps: spec.SchemaProps{ - Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1alpha1.AggregationRule"), + Description: "Number of pod disruptions that are currently allowed.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.AggregationRule", "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "currentHealthy": { 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: "", + Description: "current number of healthy pods", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "apiVersion": { + "desiredHealthy": { 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: "", + Description: "minimum desired number of healthy pods", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "metadata": { + "expectedPods": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "total number of pods counted by this disruption budget", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "subjects": { + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", + Description: "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), }, }, }, }, }, - "roleRef": { - SchemaProps: spec.SchemaProps{ - Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), - }, - }, }, - Required: []string{"roleRef"}, + Required: []string{"disruptionsAllowed", "currentHealthy", "desiredHealthy", "expectedPods"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22.", + Description: "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -34879,39 +35846,31 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceC }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "Standard object's metadata. 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"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRoleBinding"), - }, - }, - }, + Description: "spec defines the policy enforced.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.PodSecurityPolicySpec"), }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/policy/v1beta1.PodSecurityPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodSecurityPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.", + Description: "PodSecurityPolicyList is a list of PodSecurityPolicy objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -34930,20 +35889,20 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "Standard list metadata. 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 a list of ClusterRoles", + Description: "items is a list of schema objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRole"), + Ref: ref("k8s.io/api/policy/v1beta1.PodSecurityPolicy"), }, }, }, @@ -34954,20 +35913,27 @@ func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/policy/v1beta1.PodSecurityPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_PodSecurityPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Description: "PodSecurityPolicySpec defines the policy enforced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "verbs": { + "privileged": { + SchemaProps: spec.SchemaProps{ + Description: "privileged determines if a pod can request to be run as privileged.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "defaultAddCapabilities": { SchemaProps: spec.SchemaProps{ - Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. '*' represents all verbs.", + Description: "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -34980,9 +35946,9 @@ func schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref common.ReferenceCallback) com }, }, }, - "apiGroups": { + "requiredDropCapabilities": { SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + Description: "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -34995,9 +35961,9 @@ func schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref common.ReferenceCallback) com }, }, }, - "resources": { + "allowedCapabilities": { SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. '*' represents all resources.", + Description: "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -35010,9 +35976,9 @@ func schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref common.ReferenceCallback) com }, }, }, - "resourceNames": { + "volumes": { SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + Description: "volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -35025,321 +35991,377 @@ func schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref common.ReferenceCallback) com }, }, }, - "nonResourceURLs": { + "hostNetwork": { SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + Description: "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "hostPorts": { + SchemaProps: spec.SchemaProps{ + Description: "hostPorts determines which host port ranges are allowed to be exposed.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.HostPortRange"), }, }, }, }, }, - }, - Required: []string{"verbs"}, - }, - }, - } -} - -func schema_k8sio_api_rbac_v1alpha1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "hostPID": { 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"}, + Description: "hostPID determines if the policy allows the use of HostPID in the pod spec.", + Type: []string{"boolean"}, Format: "", }, }, - "apiVersion": { + "hostIPC": { 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"}, + Description: "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", + Type: []string{"boolean"}, Format: "", }, }, - "metadata": { + "seLinux": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", + Description: "seLinux is the strategy that will dictate the allowable labels that may be set.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref("k8s.io/api/policy/v1beta1.SELinuxStrategyOptions"), }, }, - "rules": { + "runAsUser": { SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this Role", + Description: "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions"), + }, + }, + "runAsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled.", + Ref: ref("k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions"), + }, + }, + "supplementalGroups": { + SchemaProps: spec.SchemaProps{ + Description: "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions"), + }, + }, + "fsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.FSGroupStrategyOptions"), + }, + }, + "readOnlyRootFilesystem": { + SchemaProps: spec.SchemaProps{ + Description: "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "defaultAllowPrivilegeEscalation": { + SchemaProps: spec.SchemaProps{ + Description: "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowPrivilegeEscalation": { + SchemaProps: spec.SchemaProps{ + Description: "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowedHostPaths": { + SchemaProps: spec.SchemaProps{ + Description: "allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), + Ref: ref("k8s.io/api/policy/v1beta1.AllowedHostPath"), }, }, }, }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "allowedFlexVolumes": { 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: "", + Description: "allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.AllowedFlexVolume"), + }, + }, + }, }, }, - "apiVersion": { + "allowedCSIDrivers": { 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: "", + Description: "AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.AllowedCSIDriver"), + }, + }, + }, }, }, - "metadata": { + "allowedUnsafeSysctls": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "subjects": { + "forbiddenSysctls": { SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", + Description: "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "roleRef": { + "allowedProcMountTypes": { SchemaProps: spec.SchemaProps{ - Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), + Description: "AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "runtimeClass": { + SchemaProps: spec.SchemaProps{ + Description: "runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.", + Ref: ref("k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions"), }, }, }, - Required: []string{"roleRef"}, + Required: []string{"seLinux", "runAsUser", "supplementalGroups", "fsGroup"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/policy/v1beta1.AllowedCSIDriver", "k8s.io/api/policy/v1beta1.AllowedFlexVolume", "k8s.io/api/policy/v1beta1.AllowedHostPath", "k8s.io/api/policy/v1beta1.FSGroupStrategyOptions", "k8s.io/api/policy/v1beta1.HostPortRange", "k8s.io/api/policy/v1beta1.RunAsGroupStrategyOptions", "k8s.io/api/policy/v1beta1.RunAsUserStrategyOptions", "k8s.io/api/policy/v1beta1.RuntimeClassStrategyOptions", "k8s.io/api/policy/v1beta1.SELinuxStrategyOptions", "k8s.io/api/policy/v1beta1.SupplementalGroupsStrategyOptions"}, } } -func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_RunAsGroupStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.", + Description: "RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.", 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": { + "rule": { 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", + Description: "rule is the strategy that will dictate the allowable RunAsGroup values that may be set.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { + "ranges": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of RoleBindings", + Description: "ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleBinding"), + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), }, }, }, }, }, }, - Required: []string{"items"}, + Required: []string{"rule"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/policy/v1beta1.IDRange"}, } } -func schema_k8sio_api_rbac_v1alpha1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_RunAsUserStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.", + Description: "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.", 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": { + "rule": { 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", + Description: "rule is the strategy that will dictate the allowable RunAsUser values that may be set.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { + "ranges": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of Roles", + Description: "ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1alpha1.Role"), + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), }, }, }, }, }, }, - Required: []string{"items"}, + Required: []string{"rule"}, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/policy/v1beta1.IDRange"}, } } -func schema_k8sio_api_rbac_v1alpha1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_RuntimeClassStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleRef contains information that points to the role being used", + Description: "RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { + "allowedRuntimeClassNames": { SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "name": { + "defaultRuntimeClassName": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced", - Default: "", + Description: "defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"apiGroup", "kind", "name"}, + Required: []string{"allowedRuntimeClassNames"}, }, }, } } -func schema_k8sio_api_rbac_v1alpha1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_policy_v1beta1_SELinuxStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + Description: "SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "rule": { SchemaProps: spec.SchemaProps{ - Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + Description: "rule is the strategy that will dictate the allowable labels that may be set.", Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "seLinuxOptions": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.", - Type: []string{"string"}, - Format: "", + Description: "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", + Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), }, }, - "name": { + }, + Required: []string{"rule"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SELinuxOptions"}, + } +} + +func schema_k8sio_api_policy_v1beta1_SupplementalGroupsStrategyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { SchemaProps: spec.SchemaProps{ - Description: "Name of the object being referenced.", - Default: "", + Description: "rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", Type: []string{"string"}, Format: "", }, }, - "namespace": { + "ranges": { SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", + Description: "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/policy/v1beta1.IDRange"), + }, + }, + }, }, }, }, - Required: []string{"kind", "name"}, }, }, + Dependencies: []string{ + "k8s.io/api/policy/v1beta1.IDRange"}, } } -func schema_k8sio_api_rbac_v1beta1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -35368,11 +36390,11 @@ func schema_k8sio_api_rbac_v1beta1_AggregationRule(ref common.ReferenceCallback) } } -func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.", + Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -35404,7 +36426,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), + Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), }, }, }, @@ -35413,22 +36435,22 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) com "aggregationRule": { SchemaProps: spec.SchemaProps{ Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1beta1.AggregationRule"), + Ref: ref("k8s.io/api/rbac/v1.AggregationRule"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.AggregationRule", "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1.AggregationRule", "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.", + Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -35460,7 +36482,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), + Ref: ref("k8s.io/api/rbac/v1.Subject"), }, }, }, @@ -35470,7 +36492,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), + Ref: ref("k8s.io/api/rbac/v1.RoleRef"), }, }, }, @@ -35478,15 +36500,15 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.22.", + Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -35518,7 +36540,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRoleBinding"), + Ref: ref("k8s.io/api/rbac/v1.ClusterRoleBinding"), }, }, }, @@ -35529,15 +36551,15 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.", + Description: "ClusterRoleList is a collection of ClusterRoles", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -35569,7 +36591,7 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRole"), + Ref: ref("k8s.io/api/rbac/v1.ClusterRole"), }, }, }, @@ -35580,11 +36602,11 @@ func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -35593,7 +36615,7 @@ func schema_k8sio_api_rbac_v1beta1_PolicyRule(ref common.ReferenceCallback) comm Properties: map[string]spec.Schema{ "verbs": { SchemaProps: spec.SchemaProps{ - Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. '*' represents all verbs.", + Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -35623,7 +36645,7 @@ func schema_k8sio_api_rbac_v1beta1_PolicyRule(ref common.ReferenceCallback) comm }, "resources": { SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.", + Description: "Resources is a list of resources this rule applies to. '*' represents all resources.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -35673,11 +36695,11 @@ func schema_k8sio_api_rbac_v1beta1_PolicyRule(ref common.ReferenceCallback) comm } } -func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.", + Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -35709,7 +36731,7 @@ func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), + Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), }, }, }, @@ -35719,15 +36741,15 @@ func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.", + Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -35759,7 +36781,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), + Ref: ref("k8s.io/api/rbac/v1.Subject"), }, }, }, @@ -35769,7 +36791,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), + Ref: ref("k8s.io/api/rbac/v1.RoleRef"), }, }, }, @@ -35777,15 +36799,15 @@ func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.", + Description: "RoleBindingList is a collection of RoleBindings", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -35817,7 +36839,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.RoleBinding"), + Ref: ref("k8s.io/api/rbac/v1.RoleBinding"), }, }, }, @@ -35828,15 +36850,15 @@ func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RoleList is a collection of Roles Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.", + Description: "RoleList is a collection of Roles", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -35868,7 +36890,7 @@ func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/rbac/v1beta1.Role"), + Ref: ref("k8s.io/api/rbac/v1.Role"), }, }, }, @@ -35879,11 +36901,11 @@ func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_rbac_v1beta1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -35917,11 +36939,16 @@ func schema_k8sio_api_rbac_v1beta1_RoleRef(ref common.ReferenceCallback) common. }, Required: []string{"apiGroup", "kind", "name"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } -func schema_k8sio_api_rbac_v1beta1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -35961,15 +36988,49 @@ func schema_k8sio_api_rbac_v1beta1_Subject(ref common.ReferenceCallback) common. }, Required: []string{"kind", "name"}, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, } } -func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusterRoleSelectors": { + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + 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.LabelSelector"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -35988,54 +37049,102 @@ func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "value": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Rules holds all the PolicyRules for this ClusterRole", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), + }, + }, + }, }, }, - "globalDefault": { + "aggregationRule": { SchemaProps: spec.SchemaProps{ - Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", - Type: []string{"boolean"}, - Format: "", + Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + Ref: ref("k8s.io/api/rbac/v1alpha1.AggregationRule"), }, }, - "description": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.AggregationRule", "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + 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: "", }, }, - "preemptionPolicy": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + 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.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "subjects": { + SchemaProps: spec.SchemaProps{ + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), + }, + }, }, - Required: []string{"value"}, + Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityClassList is a collection of priority classes.", + Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36054,20 +37163,20 @@ func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallba }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's 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 PriorityClasses", + Description: "Items is a list of ClusterRoleBindings", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/scheduling/v1.PriorityClass"), + Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRoleBinding"), }, }, }, @@ -36078,15 +37187,15 @@ func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/scheduling/v1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + Description: "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36105,54 +37214,128 @@ func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCall }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "value": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Items is a list of ClusterRoles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRole"), + }, + }, + }, }, }, - "globalDefault": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/rbac/v1alpha1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "verbs": { SchemaProps: spec.SchemaProps{ - Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", - Type: []string{"boolean"}, - Format: "", + Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "description": { + "apiGroups": { SchemaProps: spec.SchemaProps{ - Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - Type: []string{"string"}, - Format: "", + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "preemptionPolicy": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", - Type: []string{"string"}, - Format: "", + Description: "Resources is a list of resources this rule applies to. '*' represents all resources.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"value"}, + Required: []string{"verbs"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityClassList is a collection of priority classes.", + Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36171,39 +37354,38 @@ func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.Reference }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "items is the list of PriorityClasses", + Description: "Rules holds all the PolicyRules for this Role", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/scheduling/v1alpha1.PriorityClass"), + Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/scheduling/v1alpha1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36222,54 +37404,46 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallb }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "globalDefault": { - SchemaProps: spec.SchemaProps{ - Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "description": { + "subjects": { SchemaProps: spec.SchemaProps{ - Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - Type: []string{"string"}, - Format: "", + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), + }, + }, + }, }, }, - "preemptionPolicy": { + "roleRef": { SchemaProps: spec.SchemaProps{ - Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", - Type: []string{"string"}, - Format: "", + Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), }, }, }, - Required: []string{"value"}, + Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityClassList is a collection of priority classes.", + Description: "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36288,20 +37462,20 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceC }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's 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 PriorityClasses", + Description: "Items is a list of RoleBindings", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/scheduling/v1beta1.PriorityClass"), + Ref: ref("k8s.io/api/rbac/v1alpha1.RoleBinding"), }, }, }, @@ -36312,15 +37486,15 @@ func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/scheduling/v1beta1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1alpha1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", + Description: "RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36339,172 +37513,206 @@ func schema_k8sio_api_storage_v1_CSIDriver(ref common.ReferenceCallback) common. }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "spec": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the CSI Driver.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSIDriverSpec"), + Description: "Items is a list of Roles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1alpha1.Role"), + }, + }, + }, }, }, }, - Required: []string{"spec"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1alpha1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_rbac_v1alpha1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleRef contains information that points to the role being used", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the group for the resource being referenced", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is the type of resource being referenced", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of resource being referenced", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"apiGroup", "kind", "name"}, + }, + }, } } -func schema_k8sio_api_storage_v1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1alpha1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIDriverList is a collection of CSIDriver objects.", + Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", 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", + Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + Default: "", 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", + Description: "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata 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"), + Description: "Name of the object being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "items": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "items is the list of CSIDriver", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSIDriver"), - }, - }, - }, + Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"items"}, + Required: []string{"kind", "name"}, }, }, - Dependencies: []string{ - "k8s.io/api/storage/v1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_AggregationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIDriverSpec is the specification of a CSIDriver.", + Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "attachRequired": { - SchemaProps: spec.SchemaProps{ - Description: "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "podInfoOnMount": { - SchemaProps: spec.SchemaProps{ - Description: "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "volumeLifecycleModes": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", - }, - }, + "clusterRoleSelectors": { SchemaProps: spec.SchemaProps{ - Description: "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.\n\nThis field is immutable.", + Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, }, }, }, - "storageCapacity": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_rbac_v1beta1_ClusterRole(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field is immutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.", - Type: []string{"boolean"}, + 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: "", }, }, - "fsGroupPolicy": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is beta, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.\n\nThis field is immutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", + 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: "", }, }, - "tokenRequests": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, + }, + "rules": { SchemaProps: spec.SchemaProps{ - Description: "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\": {\n \"token\": ,\n \"expirationTimestamp\": ,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.", + Description: "Rules holds all the PolicyRules for this ClusterRole", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.TokenRequest"), + Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), }, }, }, }, }, - "requiresRepublish": { + "aggregationRule": { SchemaProps: spec.SchemaProps{ - Description: "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.", - Type: []string{"boolean"}, - Format: "", + Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + Ref: ref("k8s.io/api/rbac/v1beta1.AggregationRule"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.TokenRequest"}, + "k8s.io/api/rbac/v1beta1.AggregationRule", "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_ClusterRoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", + Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36523,85 +37731,97 @@ func schema_k8sio_api_storage_v1_CSINode(ref common.ReferenceCallback) common.Op }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "metadata.name must be the Kubernetes node name.", + Description: "Standard object's metadata.", Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "spec": { + "subjects": { SchemaProps: spec.SchemaProps{ - Description: "spec is the specification of CSINode", + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSINodeSpec"), + Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), }, }, }, - Required: []string{"spec"}, + Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_ClusterRoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINodeDriver holds information about the specification of one CSI driver installed on a node", + Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.", - Default: "", + 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: "", }, }, - "nodeID": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.", - Default: "", + 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: "", }, }, - "topologyKeys": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.", + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoleBindings", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRoleBinding"), }, }, }, }, }, - "allocatable": { - SchemaProps: spec.SchemaProps{ - Description: "allocatable represents the volume resources of a node that are available for scheduling. This field is beta.", - Ref: ref("k8s.io/api/storage/v1.VolumeNodeResources"), - }, - }, }, - Required: []string{"name", "nodeID"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeNodeResources"}, + "k8s.io/api/rbac/v1beta1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_ClusterRoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINodeList is a collection of CSINode objects.", + Description: "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36620,20 +37840,20 @@ func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) commo }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's 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 CSINode", + Description: "Items is a list of ClusterRoles", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSINode"), + Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRole"), }, }, }, @@ -36644,88 +37864,37 @@ func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1beta1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", + Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "drivers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, + "verbs": { SchemaProps: spec.SchemaProps{ - Description: "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.", + Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.CSINodeDriver"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - }, - Required: []string{"drivers"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/storage/v1.CSINodeDriver"}, - } -} - -func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", - 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. 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"), - }, - }, - "provisioner": { - SchemaProps: spec.SchemaProps{ - Description: "Provisioner indicates the type of the provisioner.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "parameters": { + "apiGroups": { SchemaProps: spec.SchemaProps{ - Description: "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: "", @@ -36736,16 +37905,9 @@ func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) comm }, }, }, - "reclaimPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", - Type: []string{"string"}, - Format: "", - }, - }, - "mountOptions": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", + Description: "Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -36758,53 +37920,48 @@ func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) comm }, }, }, - "allowVolumeExpansion": { - SchemaProps: spec.SchemaProps{ - Description: "AllowVolumeExpansion shows whether the storage class allow volume expand", - Type: []string{"boolean"}, - Format: "", - }, - }, - "volumeBindingMode": { + "resourceNames": { SchemaProps: spec.SchemaProps{ - Description: "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.", - Type: []string{"string"}, - Format: "", - }, - }, - "allowedTopologies": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, }, }, + }, + "nonResourceURLs": { SchemaProps: spec.SchemaProps{ - Description: "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.", + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySelectorTerm"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"provisioner"}, + Required: []string{"verbs"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.TopologySelectorTerm", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_Role(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StorageClassList is a collection of storage classes.", + Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36823,68 +37980,38 @@ func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "items": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of StorageClasses", + Description: "Rules holds all the PolicyRules for this Role", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.StorageClass"), + Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_storage_v1_TokenRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TokenRequest contains parameters of a service account token.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "audience": { - SchemaProps: spec.SchemaProps{ - Description: "Audience is the intended audience of the token in \"TokenRequestSpec\". It will default to the audiences of kube apiserver.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "expirationSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "ExpirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\".", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - Required: []string{"audience"}, - }, - }, + "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_RoleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36903,39 +38030,46 @@ func schema_k8sio_api_storage_v1_VolumeAttachment(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata.", Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "spec": { + "subjects": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSpec"), + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), + }, + }, + }, }, }, - "status": { + "roleRef": { SchemaProps: spec.SchemaProps{ - Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentStatus"), + Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), }, }, }, - Required: []string{"spec"}, + Required: []string{"roleRef"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeAttachmentSpec", "k8s.io/api/storage/v1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_RoleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", + Description: "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -36954,20 +38088,20 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallba }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's 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 VolumeAttachments", + Description: "Items is a list of RoleBindings", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.VolumeAttachment"), + Ref: ref("k8s.io/api/rbac/v1beta1.RoleBinding"), }, }, }, @@ -36978,183 +38112,148 @@ func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/rbac/v1beta1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_RoleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Description: "RoleList is a collection of Roles Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "persistentVolumeName": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Name of the persistent volume to attach.", + 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: "", }, }, - "inlineVolumeSpec": { - SchemaProps: spec.SchemaProps{ - Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec"}, - } -} - -func schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "attacher": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", - Default: "", + 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: "", }, }, - "source": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Source represents the volume that should be attached.", + Description: "Standard object's metadata.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSource"), - }, - }, - "nodeName": { - SchemaProps: spec.SchemaProps{ - Description: "The node that the volume should be attached to.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"attacher", "source", "nodeName"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeAttachmentSource"}, - } -} - -func schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "attached": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "attachmentMetadata": { - SchemaProps: spec.SchemaProps{ - Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "attachError": { - SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1.VolumeError"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "detachError": { - SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1.VolumeError"), + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of Roles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/rbac/v1beta1.Role"), + }, + }, + }, }, }, }, - Required: []string{"attached"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1.VolumeError"}, + "k8s.io/api/rbac/v1beta1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_RoleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeError captures an error encountered during a volume operation.", + Description: "RoleRef contains information that points to the role being used", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "time": { + "apiGroup": { SchemaProps: spec.SchemaProps{ - Description: "Time the error was encountered.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "APIGroup is the group for the resource being referenced", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "message": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.", + Description: "Kind is the type of resource being referenced", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of resource being referenced", + Default: "", Type: []string{"string"}, Format: "", }, }, }, + Required: []string{"apiGroup", "kind", "name"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_api_storage_v1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_rbac_v1beta1_Subject(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeNodeResources is a set of resource limits for scheduling of volumes.", + Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "count": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is not specified, then the supported number of volumes on this node is unbounded.", - Type: []string{"integer"}, - Format: "int32", + Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the object being referenced.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"kind", "name"}, }, }, } } -func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", + Description: "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -37173,51 +38272,54 @@ func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref common.ReferenceCa }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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"), }, }, - "nodeTopology": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "storageClassName": { + "globalDefault": { SchemaProps: spec.SchemaProps{ - Description: "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", - Default: "", - Type: []string{"string"}, + Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + Type: []string{"boolean"}, Format: "", }, }, - "capacity": { + "description": { SchemaProps: spec.SchemaProps{ - Description: "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + Type: []string{"string"}, + Format: "", }, }, - "maximumVolumeSize": { + "preemptionPolicy": { SchemaProps: spec.SchemaProps{ - Description: "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"storageClassName"}, + Required: []string{"value"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", + Description: "PriorityClassList is a collection of priority classes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -37242,22 +38344,14 @@ func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref common.Referen }, }, "items": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "name", - }, - "x-kubernetes-list-type": "map", - }, - }, SchemaProps: spec.SchemaProps{ - Description: "Items is the list of CSIStorageCapacity objects.", + Description: "items is the list of PriorityClasses", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.CSIStorageCapacity"), + Ref: ref("k8s.io/api/scheduling/v1.PriorityClass"), }, }, }, @@ -37268,15 +38362,15 @@ func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.CSIStorageCapacity", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/scheduling/v1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + Description: "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -37295,39 +38389,54 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref common.ReferenceCall }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard object's metadata. 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"), }, }, - "spec": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec"), + Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "status": { + "globalDefault": { SchemaProps: spec.SchemaProps{ - Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus"), + Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + Type: []string{"string"}, + Format: "", + }, + }, + "preemptionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"spec"}, + Required: []string{"value"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec", "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", + Description: "PriorityClassList is a collection of priority classes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -37353,13 +38462,13 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.Reference }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of VolumeAttachments", + Description: "items is the list of PriorityClasses", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachment"), + Ref: ref("k8s.io/api/scheduling/v1alpha1.PriorityClass"), }, }, }, @@ -37370,163 +38479,132 @@ func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/scheduling/v1alpha1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Description: "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "persistentVolumeName": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Name of the persistent volume to attach.", + 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: "", }, }, - "inlineVolumeSpec": { - SchemaProps: spec.SchemaProps{ - Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec"}, - } -} - -func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "attacher": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", - Default: "", + 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: "", }, }, - "source": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Source represents the volume that should be attached.", + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "nodeName": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "The node that the volume should be attached to.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - }, - Required: []string{"attacher", "source", "nodeName"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"}, - } -} - -func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "attached": { + "globalDefault": { SchemaProps: spec.SchemaProps{ - Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Default: false, + Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", Type: []string{"boolean"}, Format: "", }, }, - "attachmentMetadata": { - SchemaProps: spec.SchemaProps{ - Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "attachError": { + "description": { SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), + Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + Type: []string{"string"}, + Format: "", }, }, - "detachError": { + "preemptionPolicy": { SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"attached"}, + Required: []string{"value"}, }, }, Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeError"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1alpha1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeError captures an error encountered during a volume operation.", + Description: "PriorityClassList is a collection of priority classes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "time": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Time the error was encountered.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + 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: "", }, }, - "message": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.", + 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 list metadata 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 PriorityClasses", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/scheduling/v1beta1.PriorityClass"), + }, + }, + }, + }, + }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/scheduling/v1beta1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", + Description: "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -37554,7 +38632,7 @@ func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Specification of the CSI Driver.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSIDriverSpec"), + Ref: ref("k8s.io/api/storage/v1.CSIDriverSpec"), }, }, }, @@ -37562,11 +38640,11 @@ func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/storage/v1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -37602,7 +38680,7 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSIDriver"), + Ref: ref("k8s.io/api/storage/v1.CSIDriver"), }, }, }, @@ -37613,11 +38691,11 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/storage/v1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -37639,8 +38717,13 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback }, }, "volumeLifecycleModes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.\n\nThis field is immutable.", + Description: "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.\n\nThis field is immutable.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -37655,14 +38738,14 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback }, "storageCapacity": { SchemaProps: spec.SchemaProps{ - Description: "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field is immutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.", + Description: "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field was immutable in Kubernetes <= 1.22 and now is mutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.", Type: []string{"boolean"}, Format: "", }, }, "fsGroupPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is beta, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.\n\nThis field is immutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", + Description: "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.\n\nThis field is immutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", Type: []string{"string"}, Format: "", }, @@ -37680,7 +38763,7 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.TokenRequest"), + Ref: ref("k8s.io/api/storage/v1.TokenRequest"), }, }, }, @@ -37697,15 +38780,15 @@ func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.TokenRequest"}, + "k8s.io/api/storage/v1.TokenRequest"}, } } -func schema_k8sio_api_storage_v1beta1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. See the release notes for more information. CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", + Description: "CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -37733,7 +38816,7 @@ func schema_k8sio_api_storage_v1beta1_CSINode(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "spec is the specification of CSINode", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSINodeSpec"), + Ref: ref("k8s.io/api/storage/v1.CSINodeSpec"), }, }, }, @@ -37741,11 +38824,11 @@ func schema_k8sio_api_storage_v1beta1_CSINode(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/storage/v1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -37785,8 +38868,8 @@ func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback }, "allocatable": { SchemaProps: spec.SchemaProps{ - Description: "allocatable represents the volume resources of a node that are available for scheduling.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeNodeResources"), + Description: "allocatable represents the volume resources of a node that are available for scheduling. This field is beta.", + Ref: ref("k8s.io/api/storage/v1.VolumeNodeResources"), }, }, }, @@ -37794,11 +38877,11 @@ func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeNodeResources"}, + "k8s.io/api/storage/v1.VolumeNodeResources"}, } } -func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -37834,7 +38917,7 @@ func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSINode"), + Ref: ref("k8s.io/api/storage/v1.CSINode"), }, }, }, @@ -37845,11 +38928,11 @@ func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/storage/v1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -37870,7 +38953,7 @@ func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSINodeDriver"), + Ref: ref("k8s.io/api/storage/v1.CSINodeDriver"), }, }, }, @@ -37881,133 +38964,11 @@ func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSINodeDriver"}, - } -} - -func schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", - 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 name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore 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"), - }, - }, - "nodeTopology": { - SchemaProps: spec.SchemaProps{ - Description: "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "storageClassName": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "capacity": { - SchemaProps: spec.SchemaProps{ - Description: "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - "maximumVolumeSize": { - SchemaProps: spec.SchemaProps{ - Description: "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"storageClassName"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", - 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 list metadata 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "name", - }, - "x-kubernetes-list-type": "map", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of CSIStorageCapacity objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.CSIStorageCapacity"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/storage/v1beta1.CSIStorageCapacity", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/storage/v1.CSINodeDriver"}, } } -func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38123,7 +39084,7 @@ func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) } } -func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38159,7 +39120,7 @@ func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.StorageClass"), + Ref: ref("k8s.io/api/storage/v1.StorageClass"), }, }, }, @@ -38170,11 +39131,11 @@ func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/storage/v1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1beta1_TokenRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_TokenRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38191,7 +39152,7 @@ func schema_k8sio_api_storage_v1beta1_TokenRequest(ref common.ReferenceCallback) }, "expirationSeconds": { SchemaProps: spec.SchemaProps{ - Description: "ExpirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\"", + Description: "ExpirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\".", Type: []string{"integer"}, Format: "int64", }, @@ -38203,7 +39164,7 @@ func schema_k8sio_api_storage_v1beta1_TokenRequest(ref common.ReferenceCallback) } } -func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38235,14 +39196,14 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSpec"), + Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentStatus"), + Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentStatus"), }, }, }, @@ -38250,11 +39211,11 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeAttachmentSpec", "k8s.io/api/storage/v1beta1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/storage/v1.VolumeAttachmentSpec", "k8s.io/api/storage/v1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38290,7 +39251,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachment"), + Ref: ref("k8s.io/api/storage/v1.VolumeAttachment"), }, }, }, @@ -38301,11 +39262,11 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/storage/v1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38333,7 +39294,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref common.Referenc } } -func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38352,7 +39313,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "Source represents the volume that should be attached.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSource"), + Ref: ref("k8s.io/api/storage/v1.VolumeAttachmentSource"), }, }, "nodeName": { @@ -38368,11 +39329,11 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeAttachmentSource"}, + "k8s.io/api/storage/v1.VolumeAttachmentSource"}, } } -func schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38406,13 +39367,13 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref common.Referenc "attachError": { SchemaProps: spec.SchemaProps{ Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + Ref: ref("k8s.io/api/storage/v1.VolumeError"), }, }, "detachError": { SchemaProps: spec.SchemaProps{ Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + Ref: ref("k8s.io/api/storage/v1.VolumeError"), }, }, }, @@ -38420,11 +39381,11 @@ func schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/storage/v1beta1.VolumeError"}, + "k8s.io/api/storage/v1.VolumeError"}, } } -func schema_k8sio_api_storage_v1beta1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38453,7 +39414,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeError(ref common.ReferenceCallback) } } -func schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -38462,7 +39423,7 @@ func schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref common.ReferenceCa Properties: map[string]spec.Schema{ "count": { SchemaProps: spec.SchemaProps{ - Description: "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is nil, then the supported number of volumes on this node is unbounded.", + Description: "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is not specified, then the supported number of volumes on this node is unbounded.", Type: []string{"integer"}, Format: "int32", }, @@ -38473,102 +39434,133 @@ func schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref common.ReferenceCa } } -func schema_pkg_apis_apiextensions_v1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConversionRequest describes the conversion request parameters.", + Description: "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "uid": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are otherwise identical (parallel requests, etc). The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", - Default: "", + 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: "", }, }, - "desiredAPIVersion": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "desiredAPIVersion is the version to convert given objects to. e.g. \"myapi.example.com/v1\"", + 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 name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore 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"), + }, + }, + "nodeTopology": { + SchemaProps: spec.SchemaProps{ + Description: "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "storageClassName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", Default: "", Type: []string{"string"}, Format: "", }, }, - "objects": { + "capacity": { SchemaProps: spec.SchemaProps{ - Description: "objects is the list of custom resource objects to be converted.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, + Description: "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "maximumVolumeSize": { + SchemaProps: spec.SchemaProps{ + Description: "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, - Required: []string{"uid", "desiredAPIVersion", "objects"}, + Required: []string{"storageClassName"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1alpha1_CSIStorageCapacityList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConversionResponse describes a conversion response.", + Description: "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "uid": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "uid is an identifier for the individual request/response. This should be copied over from the corresponding `request.uid`.", - Default: "", + 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: "", }, }, - "convertedObjects": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.", + 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 list metadata 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of CSIStorageCapacity objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref("k8s.io/api/storage/v1alpha1.CSIStorageCapacity"), }, }, }, }, }, - "result": { - SchemaProps: spec.SchemaProps{ - Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), - }, - }, }, - Required: []string{"uid", "convertedObjects", "result"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/api/storage/v1alpha1.CSIStorageCapacity", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1alpha1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ConversionReview describes a conversion request/response.", + Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -38585,224 +39577,284 @@ func schema_pkg_apis_apiextensions_v1_ConversionReview(ref common.ReferenceCallb Format: "", }, }, - "request": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "request describes the attributes for the conversion request.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest"), + Description: "Standard object metadata. 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"), }, }, - "response": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "response describes the attributes for the conversion response.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"), + Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus"), }, }, }, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"}, + "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec", "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceColumnDefinition specifies a column for server side printing.", + Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "name is a human readable name for the column.", - Default: "", + 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: "", }, }, - "type": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", - Default: "", + 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: "", }, }, - "format": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", - Type: []string{"string"}, - Format: "", + Description: "Standard list metadata 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"), }, }, - "description": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "description is a human readable description of this column.", - Type: []string{"string"}, - Format: "", + Description: "Items is the list of VolumeAttachments", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachment"), + }, + }, + }, }, }, - "priority": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1alpha1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "persistentVolumeName": { SchemaProps: spec.SchemaProps{ - Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.", - Type: []string{"integer"}, - Format: "int32", + Description: "Name of the persistent volume to attach.", + Type: []string{"string"}, + Format: "", }, }, - "jsonPath": { + "inlineVolumeSpec": { SchemaProps: spec.SchemaProps{ - Description: "jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), }, }, }, - Required: []string{"name", "type", "jsonPath"}, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeSpec"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceConversion describes how to convert different versions of a CR.", + Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "strategy": { + "attacher": { SchemaProps: spec.SchemaProps{ - Description: "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.", + Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", Default: "", Type: []string{"string"}, Format: "", }, }, - "webhook": { + "source": { SchemaProps: spec.SchemaProps{ - Description: "webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"), + Description: "Source represents the volume that should be attached.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"), + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "The node that the volume should be attached to.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"strategy"}, + Required: []string{"attacher", "source", "nodeName"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"}, + "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1alpha1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.", + Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", 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": { + "attached": { 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"}, + Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "metadata": { + "attachmentMetadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata 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"), + Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "spec": { + "attachError": { SchemaProps: spec.SchemaProps{ - Description: "spec describes how the user wants the resources to appear", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec"), + Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), }, }, - "status": { + "detachError": { SchemaProps: spec.SchemaProps{ - Description: "status indicates the actual state of the CustomResourceDefinition", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus"), + Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), }, }, }, - Required: []string{"spec"}, + Required: []string{"attached"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/storage/v1alpha1.VolumeError"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1alpha1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionCondition contains details for the current condition of this pod.", + Description: "VolumeError captures an error encountered during a volume operation.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "time": { SchemaProps: spec.SchemaProps{ - Description: "type is the type of the condition. Types include Established, NamesAccepted and Terminating.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Time the error was encountered.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "status": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "status is the status of the condition. Can be True, False, Unknown.", - Default: "", + Description: "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.", Type: []string{"string"}, Format: "", }, }, - "lastTransitionTime": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_storage_v1beta1_CSIDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "lastTransitionTime last time the condition transitioned from one status to another.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + 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: "", }, }, - "reason": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "reason is a unique, one-word, CamelCase reason for the condition's last transition.", + 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: "", }, }, - "message": { + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. 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"), + }, + }, + "spec": { SchemaProps: spec.SchemaProps{ - Description: "message is a human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", + Description: "Specification of the CSI Driver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.CSIDriverSpec"), }, }, }, - Required: []string{"type", "status"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/storage/v1beta1.CSIDriverSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSIDriverList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", + Description: "CSIDriverList is a collection of CSIDriver objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -38821,20 +39873,20 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.Re }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Description: "Standard list metadata 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 list individual CustomResourceDefinition objects", + Description: "items is the list of CSIDriver", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition"), + Ref: ref("k8s.io/api/storage/v1beta1.CSIDriver"), }, }, }, @@ -38845,35 +39897,34 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/storage/v1beta1.CSIDriver", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSIDriverSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", + Description: "CSIDriverSpec is the specification of a CSIDriver.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "plural": { + "attachRequired": { SchemaProps: spec.SchemaProps{ - Description: "plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.", - Default: "", - Type: []string{"string"}, + Description: "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable.", + Type: []string{"boolean"}, Format: "", }, }, - "singular": { + "podInfoOnMount": { SchemaProps: spec.SchemaProps{ - Description: "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.", - Type: []string{"string"}, + Description: "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable.", + Type: []string{"boolean"}, Format: "", }, }, - "shortNames": { + "volumeLifecycleModes": { SchemaProps: spec.SchemaProps{ - Description: "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.", + Description: "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.\n\nThis field is immutable.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -38886,148 +39937,124 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref common.R }, }, }, - "kind": { + "storageCapacity": { SchemaProps: spec.SchemaProps{ - Description: "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.", - Default: "", - Type: []string{"string"}, + Description: "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field was immutable in Kubernetes <= 1.22 and now is mutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.", + Type: []string{"boolean"}, Format: "", }, }, - "listKind": { + "fsGroupPolicy": { SchemaProps: spec.SchemaProps{ - Description: "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".", + Description: "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.\n\nThis field is immutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", Type: []string{"string"}, Format: "", }, }, - "categories": { + "tokenRequests": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.", + Description: "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\": {\n \"token\": ,\n \"expirationTimestamp\": ,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.TokenRequest"), }, }, }, }, }, + "requiresRepublish": { + SchemaProps: spec.SchemaProps{ + Description: "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, - Required: []string{"plural", "kind"}, }, }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.TokenRequest"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSINode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionSpec describes how a user wants their resource to appear", + Description: "DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. See the release notes for more information. CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "group": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).", - Default: "", + 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: "", }, }, - "names": { - SchemaProps: spec.SchemaProps{ - Description: "names specify the resource and kind names for the custom resource.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), - }, - }, - "scope": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`.", - Default: "", + 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: "", }, }, - "versions": { - SchemaProps: spec.SchemaProps{ - Description: "versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"), - }, - }, - }, - }, - }, - "conversion": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "conversion defines conversion settings for the CRD.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion"), + Description: "metadata.name must be the Kubernetes node name.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "preserveUnknownFields": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", - Type: []string{"boolean"}, - Format: "", + Description: "spec is the specification of CSINode", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.CSINodeSpec"), }, }, }, - Required: []string{"group", "names", "scope", "versions"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"}, + "k8s.io/api/storage/v1beta1.CSINodeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSINodeDriver(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", + Description: "CSINodeDriver holds information about the specification of one CSI driver installed on a node", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "type", - }, - "x-kubernetes-list-type": "map", - }, - }, + "name": { SchemaProps: spec.SchemaProps{ - Description: "conditions indicate state for particular aspects of a CustomResourceDefinition", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition"), - }, - }, - }, + Description: "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "acceptedNames": { + "nodeID": { SchemaProps: spec.SchemaProps{ - Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), + Description: "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "storedVersions": { + "topologyKeys": { SchemaProps: spec.SchemaProps{ - Description: "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.", + Description: "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -39040,378 +40067,272 @@ func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common. }, }, }, + "allocatable": { + SchemaProps: spec.SchemaProps{ + Description: "allocatable represents the volume resources of a node that are available for scheduling.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeNodeResources"), + }, + }, }, + Required: []string{"name", "nodeID"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"}, + "k8s.io/api/storage/v1beta1.VolumeNodeResources"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSINodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinitionVersion describes a version for CRD.", + Description: "CSINodeList is a collection of CSINode objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.", - Default: "", + 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: "", }, }, - "served": { - SchemaProps: spec.SchemaProps{ - Description: "served is a flag enabling/disabling this version from being served via REST APIs", - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "storage": { - SchemaProps: spec.SchemaProps{ - Description: "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.", - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "deprecated": { - SchemaProps: spec.SchemaProps{ - Description: "deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "deprecationWarning": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.", + 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: "", }, }, - "schema": { - SchemaProps: spec.SchemaProps{ - Description: "schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"), - }, - }, - "subresources": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "subresources specify what subresources this version of the defined custom resource have.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources"), + Description: "Standard list metadata 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"), }, }, - "additionalPrinterColumns": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.", + Description: "items is the list of CSINode", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition"), + Ref: ref("k8s.io/api/storage/v1beta1.CSINode"), }, }, }, }, }, }, - Required: []string{"name", "served", "storage"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"}, + "k8s.io/api/storage/v1beta1.CSINode", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSINodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", + Description: "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "specReplicasPath": { - SchemaProps: spec.SchemaProps{ - Description: "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "statusReplicasPath": { - SchemaProps: spec.SchemaProps{ - Description: "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.", - Default: "", - Type: []string{"string"}, - Format: "", + "drivers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, }, - }, - "labelSelectorPath": { SchemaProps: spec.SchemaProps{ - Description: "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.", - Type: []string{"string"}, - Format: "", + Description: "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.CSINodeDriver"), + }, + }, + }, }, }, }, - Required: []string{"specReplicasPath", "statusReplicasPath"}, - }, - }, - } -} - -func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", - Type: []string{"object"}, + Required: []string{"drivers"}, }, }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.CSINodeDriver"}, } } -func schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSIStorageCapacity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + Description: "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "status": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"), + 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: "", }, }, - "scale": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale"), + 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: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"}, - } -} - -func schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CustomResourceValidation is a list of validation methods for CustomResources.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "openAPIV3Schema": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Description: "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore 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"), }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"}, - } -} - -func schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExternalDocumentation allows referencing an external resource for extended documentation.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "description": { + "nodeTopology": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), }, }, - "url": { + "storageClassName": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "maximumVolumeSize": { + SchemaProps: spec.SchemaProps{ + Description: "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), }, }, }, + Required: []string{"storageClassName"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", - Type: v1.JSON{}.OpenAPISchemaType(), - Format: v1.JSON{}.OpenAPISchemaFormat(), - }, - }, - } -} - -func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_CSIStorageCapacityList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", + Description: "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "id": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "$schema": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "$ref": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "format": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + 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: "", }, }, - "title": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "default": { - SchemaProps: spec.SchemaProps{ - Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), - }, - }, - "maximum": { - SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", - }, - }, - "exclusiveMaximum": { - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, - "minimum": { - SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", - }, - }, - "exclusiveMinimum": { - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, - "maxLength": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "minLength": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "pattern": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "maxItems": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "minItems": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + 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: "", }, }, - "uniqueItems": { + "metadata": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Standard list metadata 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"), }, }, - "multipleOf": { - SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", + "items": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, }, - }, - "enum": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "Items is the list of CSIStorageCapacity objects.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + Ref: ref("k8s.io/api/storage/v1beta1.CSIStorageCapacity"), }, }, }, }, }, - "maxProperties": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.CSIStorageCapacity", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_StorageClass(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + 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: "", }, }, - "minProperties": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + 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: "", }, }, - "required": { + "metadata": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Standard object's metadata. 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"), + }, + }, + "provisioner": { + SchemaProps: spec.SchemaProps{ + Description: "Provisioner indicates the type of the provisioner.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "parameters": { + SchemaProps: spec.SchemaProps{ + Description: "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: "", @@ -39422,348 +40343,421 @@ func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallba }, }, }, - "items": { + "reclaimPolicy": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray"), + Description: "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", + Type: []string{"string"}, + Format: "", }, }, - "allOf": { + "mountOptions": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "oneOf": { + "allowVolumeExpansion": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), - }, - }, - }, + Description: "AllowVolumeExpansion shows whether the storage class allow volume expand", + Type: []string{"boolean"}, + Format: "", }, }, - "anyOf": { + "volumeBindingMode": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.", + Type: []string{"string"}, + Format: "", + }, + }, + "allowedTopologies": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref("k8s.io/api/core/v1.TopologySelectorTerm"), }, }, }, }, }, - "not": { + }, + Required: []string{"provisioner"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TopologySelectorTerm", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_StorageClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageClassList is a collection of storage classes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + 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: "", }, }, - "properties": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), - }, - }, - }, + 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: "", }, }, - "additionalProperties": { + "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + Description: "Standard list metadata 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"), }, }, - "patternProperties": { + "items": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "Items is the list of StorageClasses", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + Ref: ref("k8s.io/api/storage/v1beta1.StorageClass"), }, }, }, }, }, - "dependencies": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_TokenRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TokenRequest contains parameters of a service account token.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "audience": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"), - }, - }, - }, + Description: "Audience is the intended audience of the token in \"TokenRequestSpec\". It will default to the audiences of kube apiserver.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "additionalItems": { + "expirationSeconds": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + Description: "ExpirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\"", + Type: []string{"integer"}, + Format: "int64", }, }, - "definitions": { + }, + Required: []string{"audience"}, + }, + }, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeAttachment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), - }, - }, - }, + 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: "", }, }, - "externalDocs": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation"), + 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: "", }, }, - "example": { + "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + Description: "Standard object metadata. 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"), }, }, - "nullable": { + "spec": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSpec"), }, }, - "x-kubernetes-preserve-unknown-fields": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", - Type: []string{"boolean"}, - Format: "", + Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentStatus"), }, }, - "x-kubernetes-embedded-resource": { + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.VolumeAttachmentSpec", "k8s.io/api/storage/v1beta1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", - Type: []string{"boolean"}, + 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: "", }, }, - "x-kubernetes-int-or-string": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", - Type: []string{"boolean"}, + 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: "", }, }, - "x-kubernetes-list-map-keys": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", + Description: "Standard list metadata 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 VolumeAttachments", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachment"), }, }, }, }, }, - "x-kubernetes-list-type": { - SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", - Type: []string{"string"}, - Format: "", - }, - }, - "x-kubernetes-map-type": { - SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", - Type: []string{"string"}, - Format: "", - }, - }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"}, - } -} - -func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", - Type: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), - Format: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), - }, - }, - } -} - -func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", - Type: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), - Format: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), - }, - }, + "k8s.io/api/storage/v1beta1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", - Type: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), - Format: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), + Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "persistentVolumeName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the persistent volume to attach.", + Type: []string{"string"}, + Format: "", + }, + }, + "inlineVolumeSpec": { + SchemaProps: spec.SchemaProps{ + Description: "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + }, + }, + }, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeSpec"}, } } -func schema_pkg_apis_apiextensions_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namespace": { + "attacher": { SchemaProps: spec.SchemaProps{ - Description: "namespace is the namespace of the service. Required", + Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", Default: "", Type: []string{"string"}, Format: "", }, }, - "name": { + "source": { SchemaProps: spec.SchemaProps{ - Description: "name is the name of the service. Required", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Source represents the volume that should be attached.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/storage/v1beta1.VolumeAttachmentSource"), }, }, - "path": { + "nodeName": { SchemaProps: spec.SchemaProps{ - Description: "path is an optional URL path at which the webhook will be contacted.", + Description: "The node that the volume should be attached to.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", - Type: []string{"integer"}, - Format: "int32", - }, - }, }, - Required: []string{"namespace", "name"}, + Required: []string{"attacher", "source", "nodeName"}, }, }, + Dependencies: []string{ + "k8s.io/api/storage/v1beta1.VolumeAttachmentSource"}, } } -func schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_VolumeAttachmentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "url": { + "attached": { SchemaProps: spec.SchemaProps{ - Description: "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", - Type: []string{"string"}, + Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "service": { + "attachmentMetadata": { SchemaProps: spec.SchemaProps{ - Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"), + Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "caBundle": { + "attachError": { SchemaProps: spec.SchemaProps{ - Description: "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", - Type: []string{"string"}, - Format: "byte", + Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), + }, + }, + "detachError": { + SchemaProps: spec.SchemaProps{ + Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + Ref: ref("k8s.io/api/storage/v1beta1.VolumeError"), }, }, }, + Required: []string{"attached"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"}, + "k8s.io/api/storage/v1beta1.VolumeError"}, } } -func schema_pkg_apis_apiextensions_v1_WebhookConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_VolumeError(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "WebhookConversion describes how to call a conversion webhook", + Description: "VolumeError captures an error encountered during a volume operation.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "clientConfig": { + "time": { SchemaProps: spec.SchemaProps{ - Description: "clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"), + Description: "Time the error was encountered.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "conversionReviewVersions": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"conversionReviewVersions"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_storage_v1beta1_VolumeNodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeNodeResources is a set of resource limits for scheduling of volumes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { + SchemaProps: spec.SchemaProps{ + Description: "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is nil, then the supported number of volumes on this node is unbounded.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -39809,7 +40803,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.Referenc } } -func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -39854,7 +40848,7 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.Referen } } -func schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -39878,24 +40872,24 @@ func schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref common.Reference "request": { SchemaProps: spec.SchemaProps{ Description: "request describes the attributes for the conversion request.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest"), }, }, "response": { SchemaProps: spec.SchemaProps{ Description: "response describes the attributes for the conversion response.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ConversionResponse"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -39939,22 +40933,22 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref co Format: "int32", }, }, - "JSONPath": { + "jsonPath": { SchemaProps: spec.SchemaProps{ - Description: "JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", + Description: "jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"name", "type", "JSONPath"}, + Required: []string{"name", "type", "jsonPath"}, }, }, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -39963,31 +40957,16 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.R Properties: map[string]spec.Schema{ "strategy": { SchemaProps: spec.SchemaProps{ - Description: "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.", + Description: "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.", Default: "", Type: []string{"string"}, Format: "", }, }, - "webhookClientConfig": { - SchemaProps: spec.SchemaProps{ - Description: "webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Required when `strategy` is set to `Webhook`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"), - }, - }, - "conversionReviewVersions": { + "webhook": { SchemaProps: spec.SchemaProps{ - Description: "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Defaults to `[\"v1beta1\"]`.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"), }, }, }, @@ -39995,15 +40974,15 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.R }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookConversion"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead.", + Description: "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -40031,14 +41010,14 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.R SchemaProps: spec.SchemaProps{ Description: "spec describes how the user wants the resources to appear", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status indicates the actual state of the CustomResourceDefinition", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus"), }, }, }, @@ -40046,11 +41025,11 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.R }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40103,7 +41082,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40139,7 +41118,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition"), }, }, }, @@ -40150,11 +41129,11 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref comm }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40228,7 +41207,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref com } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40243,63 +41222,30 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm Format: "", }, }, - "version": { - SchemaProps: spec.SchemaProps{ - Description: "version is the API version of the defined custom resource. The custom resources are served under `/apis///...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.", - Type: []string{"string"}, - Format: "", - }, - }, "names": { SchemaProps: spec.SchemaProps{ Description: "names specify the resource and kind names for the custom resource.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), }, }, "scope": { SchemaProps: spec.SchemaProps{ - Description: "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.", + Description: "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`.", Default: "", Type: []string{"string"}, Format: "", }, }, - "validation": { - SchemaProps: spec.SchemaProps{ - Description: "validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), - }, - }, - "subresources": { - SchemaProps: spec.SchemaProps{ - Description: "subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), - }, - }, "versions": { SchemaProps: spec.SchemaProps{ - Description: "versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion"), - }, - }, - }, - }, - }, - "additionalPrinterColumns": { - SchemaProps: spec.SchemaProps{ - Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", + Description: "versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"), }, }, }, @@ -40308,26 +41254,26 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref comm "conversion": { SchemaProps: spec.SchemaProps{ Description: "conversion defines conversion settings for the CRD.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion"), }, }, "preserveUnknownFields": { SchemaProps: spec.SchemaProps{ - Description: "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", + Description: "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", Type: []string{"boolean"}, Format: "", }, }, }, - Required: []string{"group", "names", "scope"}, + Required: []string{"group", "names", "scope", "versions"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionVersion"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40350,7 +41296,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition"), }, }, }, @@ -40360,7 +41306,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref co SchemaProps: spec.SchemaProps{ Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"), }, }, "storedVersions": { @@ -40382,11 +41328,11 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref co }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceDefinitionNames"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40433,25 +41379,25 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref c }, "schema": { SchemaProps: spec.SchemaProps{ - Description: "schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + Description: "schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"), }, }, "subresources": { SchemaProps: spec.SchemaProps{ - Description: "subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + Description: "subresources specify what subresources this version of the defined custom resource have.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources"), }, }, "additionalPrinterColumns": { SchemaProps: spec.SchemaProps{ - Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", + Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition"), }, }, }, @@ -40462,11 +41408,11 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref c }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceValidation"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40503,7 +41449,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref co } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40514,7 +41460,7 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref c } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40524,24 +41470,24 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref common "status": { SchemaProps: spec.SchemaProps{ Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"), }, }, "scale": { SchemaProps: spec.SchemaProps{ Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.CustomResourceSubresourceStatus"}, } } -func schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40551,18 +41497,18 @@ func schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref common.R "openAPIV3Schema": { SchemaProps: spec.SchemaProps{ Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"}, } } -func schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40587,19 +41533,19 @@ func schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref common.Refe } } -func schema_pkg_apis_apiextensions_v1beta1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", - Type: v1beta1.JSON{}.OpenAPISchemaType(), - Format: v1beta1.JSON{}.OpenAPISchemaFormat(), + Type: v1.JSON{}.OpenAPISchemaType(), + Format: v1.JSON{}.OpenAPISchemaFormat(), }, }, } } -func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40651,8 +41597,8 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "default": { SchemaProps: spec.SchemaProps{ - Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), }, }, "maximum": { @@ -40717,38 +41663,423 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, "multipleOf": { SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", + Type: []string{"number"}, + Format: "double", + }, + }, + "enum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + }, + }, + }, + }, + }, + "maxProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "required": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray"), + }, + }, + "allOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "oneOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "anyOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "not": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + "properties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "additionalProperties": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + }, + }, + "patternProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "dependencies": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray"), + }, + }, + }, + }, + }, + "additionalItems": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool"), + }, + }, + "definitions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps"), + }, + }, + }, + }, + }, + "externalDocs": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation"), + }, + }, + "example": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), + }, + }, + "nullable": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-preserve-unknown-fields": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-embedded-resource": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-int-or-string": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", + Type: []string{"boolean"}, + Format: "", + }, + }, + "x-kubernetes-list-map-keys": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "x-kubernetes-list-type": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", + Type: []string{"string"}, + Format: "", + }, + }, + "x-kubernetes-map-type": { + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "x-kubernetes-validations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "rule", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "rule", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSONSchemaPropsOrStringArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ValidationRule"}, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", + Type: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), + Format: v1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", + Type: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), + Format: v1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", + Type: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), + Format: v1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "namespace is the namespace of the service. Required", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the service. Required", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "path is an optional URL path at which the webhook will be contacted.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_ValidationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ValidationRule describes a validation rule written in the CEL expression language.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rule": { + SchemaProps: spec.SchemaProps{ + Description: "Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {\"rule\": \"self.status.actual <= self.spec.maxDesired\"}\n\nIf the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. If the Rule is scoped to a scalar, `self` is bound to the scalar value. Examples: - Rule scoped to a map of objects: {\"rule\": \"self.components['Widget'].priority < 10\"} - Rule scoped to a list of integers: {\"rule\": \"self.values.all(value, value >= 0 && value < 100)\"} - Rule scoped to a string value: {\"rule\": \"self.startsWith('kube')\"}\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.\n\nUnknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an \"unknown type\". An \"unknown type\" is recursively defined as:\n - A schema with no type and x-kubernetes-preserve-unknown-fields set to true\n - An array where the items schema is of an \"unknown type\"\n - An object where the additionalProperties schema is of an \"unknown type\"\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Rule accessing a property named \"namespace\": {\"rule\": \"self.__namespace__ > 0\"}\n - Rule accessing a property named \"x-prop\": {\"rule\": \"self.x__dash__prop > 0\"}\n - Rule accessing a property named \"redact__d\": {\"rule\": \"self.redact__underscores__d > 0\"}\n\nEquality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\"", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"rule"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + Type: []string{"string"}, + Format: "", }, }, - "enum": { + "service": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), - }, - }, - }, + Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"), }, }, - "maxProperties": { + "caBundle": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", }, }, - "minProperties": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.ServiceReference"}, + } +} + +func schema_pkg_apis_apiextensions_v1_WebhookConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WebhookConversion describes how to call a conversion webhook", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clientConfig": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"), }, }, - "required": { + "conversionReviewVersions": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -40760,161 +42091,230 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, }, }, - "items": { + }, + Required: []string{"conversionReviewVersions"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.WebhookClientConfig"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ConversionRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionRequest describes the conversion request parameters.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray"), + Description: "uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are otherwise identical (parallel requests, etc). The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "allOf": { + "desiredAPIVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), - }, - }, - }, + Description: "desiredAPIVersion is the version to convert given objects to. e.g. \"myapi.example.com/v1\"", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "oneOf": { + "objects": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "objects is the list of custom resource objects to be converted.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, }, }, - "anyOf": { + }, + Required: []string{"uid", "desiredAPIVersion", "objects"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ConversionResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionResponse describes a conversion response.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "uid is an identifier for the individual request/response. This should be copied over from the corresponding `request.uid`.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "convertedObjects": { + SchemaProps: spec.SchemaProps{ + Description: "convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, }, }, - "not": { + "result": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + Description: "result contains the result of conversion with extra details if the conversion failed. `result.status` determines if the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` will be used to construct an error message for the end user.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), }, }, - "properties": { + }, + Required: []string{"uid", "convertedObjects", "result"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ConversionReview(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConversionReview describes a conversion request/response.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), - }, - }, - }, + 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: "", }, }, - "additionalProperties": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + 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: "", }, }, - "patternProperties": { + "request": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), - }, - }, - }, + Description: "request describes the attributes for the conversion request.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest"), }, }, - "dependencies": { + "response": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"), - }, - }, - }, + Description: "response describes the attributes for the conversion response.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"), }, }, - "additionalItems": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionRequest", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ConversionResponse"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceColumnDefinition specifies a column for server side printing.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), + Description: "name is a human readable name for the column.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "definitions": { + "type": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), - }, - }, - }, + Description: "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "externalDocs": { + "format": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation"), + Description: "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + Type: []string{"string"}, + Format: "", }, }, - "example": { + "description": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + Description: "description is a human readable description of this column.", + Type: []string{"string"}, + Format: "", }, }, - "nullable": { + "priority": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.", + Type: []string{"integer"}, + Format: "int32", }, }, - "x-kubernetes-preserve-unknown-fields": { + "JSONPath": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", - Type: []string{"boolean"}, + Description: "JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "x-kubernetes-embedded-resource": { + }, + Required: []string{"name", "type", "JSONPath"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceConversion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceConversion describes how to convert different versions of a CR.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "strategy": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", - Type: []string{"boolean"}, + Description: "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "x-kubernetes-int-or-string": { + "webhookClientConfig": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", - Type: []string{"boolean"}, - Format: "", + Description: "webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Required when `strategy` is set to `Webhook`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"), }, }, - "x-kubernetes-list-map-keys": { + "conversionReviewVersions": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", + Description: "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Defaults to `[\"v1beta1\"]`.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -40927,548 +42327,765 @@ func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceC }, }, }, - "x-kubernetes-list-type": { + }, + Required: []string{"strategy"}, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.WebhookClientConfig"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", + 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: "", }, }, - "x-kubernetes-map-type": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", + 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 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"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec describes how the user wants the resources to appear", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status indicates the actual state of the CustomResourceDefinition", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus"), + }, + }, }, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"}, - } -} - -func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", - Type: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), - Format: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), - }, - }, - } -} - -func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", - Type: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), - Format: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), - }, - }, - } -} - -func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", - Type: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), - Format: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), - }, - }, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionSpec", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Description: "CustomResourceDefinitionCondition contains details for the current condition of this pod.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namespace": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "namespace is the namespace of the service. Required", + Description: "type is the type of the condition. Types include Established, NamesAccepted and Terminating.", Default: "", Type: []string{"string"}, Format: "", }, }, - "name": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "name is the name of the service. Required", + Description: "status is the status of the condition. Can be True, False, Unknown.", Default: "", Type: []string{"string"}, Format: "", }, }, - "path": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "path is an optional URL path at which the webhook will be contacted.", + Description: "lastTransitionTime last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason is a unique, one-word, CamelCase reason for the condition's last transition.", Type: []string{"string"}, Format: "", }, }, - "port": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", - Type: []string{"integer"}, - Format: "int32", + Description: "message is a human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"namespace", "name"}, + Required: []string{"type", "status"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + Description: "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "url": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + 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: "", }, }, - "service": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"), + 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: "", }, }, - "caBundle": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", - Type: []string{"string"}, - Format: "byte", + Description: "Standard object's metadata 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 list individual CustomResourceDefinition objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition"), + }, + }, + }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"}, - } -} - -func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", - Type: resource.Quantity{}.OpenAPISchemaType(), - Format: resource.Quantity{}.OpenAPISchemaFormat(), - }, - }, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_apimachinery_pkg_api_resource_int64Amount(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionNames(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", + Description: "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "value": { + "plural": { + SchemaProps: spec.SchemaProps{ + Description: "plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "singular": { + SchemaProps: spec.SchemaProps{ + Description: "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.", + Type: []string{"string"}, + Format: "", + }, + }, + "shortNames": { + SchemaProps: spec.SchemaProps{ + Description: "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "listKind": { SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int64", + Description: "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".", + Type: []string{"string"}, + Format: "", }, }, - "scale": { + "categories": { SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"value", "scale"}, + Required: []string{"plural", "kind"}, }, }, } } -func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIGroup contains the name, the supported versions, and the preferred version of a group.", + Description: "CustomResourceDefinitionSpec describes how a user wants their resource to appear", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "group": { 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", + Description: "group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "version": { 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", + Description: "version is the API version of the defined custom resource. The custom resources are served under `/apis///...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.", Type: []string{"string"}, Format: "", }, }, - "name": { + "names": { SchemaProps: spec.SchemaProps{ - Description: "name is the name of the group.", + Description: "names specify the resource and kind names for the custom resource.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.", Default: "", Type: []string{"string"}, Format: "", }, }, + "validation": { + SchemaProps: spec.SchemaProps{ + Description: "validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), + }, + }, + "subresources": { + SchemaProps: spec.SchemaProps{ + Description: "subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), + }, + }, "versions": { SchemaProps: spec.SchemaProps{ - Description: "versions are the versions supported in this group.", + Description: "versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", 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.GroupVersionForDiscovery"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion"), }, }, }, }, }, - "preferredVersion": { - SchemaProps: spec.SchemaProps{ - Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), - }, - }, - "serverAddressByClientCIDRs": { + "additionalPrinterColumns": { SchemaProps: spec.SchemaProps{ - Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", 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.ServerAddressByClientCIDR"), + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), }, }, }, }, }, + "conversion": { + SchemaProps: spec.SchemaProps{ + Description: "conversion defines conversion settings for the CRD.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion"), + }, + }, + "preserveUnknownFields": { + SchemaProps: spec.SchemaProps{ + Description: "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, - Required: []string{"name", "versions"}, + Required: []string{"group", "names", "scope"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceConversion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionVersion", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"}, } } -func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + Description: "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, 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: "", + Description: "conditions indicate state for particular aspects of a CustomResourceDefinition", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition"), + }, + }, + }, }, }, - "apiVersion": { + "acceptedNames": { 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: "", + Description: "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"), }, }, - "groups": { + "storedVersions": { SchemaProps: spec.SchemaProps{ - Description: "groups is a list of APIGroup.", + Description: "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.", 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.APIGroup"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"groups"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionCondition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceDefinitionNames"}, } } -func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceDefinitionVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIResource specifies the name of a resource and whether it is namespaced.", + Description: "CustomResourceDefinitionVersion describes a version for CRD.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "name is the plural name of the resource.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "singularName": { - SchemaProps: spec.SchemaProps{ - Description: "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + Description: "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.", Default: "", Type: []string{"string"}, Format: "", }, }, - "namespaced": { + "served": { SchemaProps: spec.SchemaProps{ - Description: "namespaced indicates if a resource is namespaced or not.", + Description: "served is a flag enabling/disabling this version from being served via REST APIs", Default: false, Type: []string{"boolean"}, Format: "", }, }, - "group": { + "storage": { SchemaProps: spec.SchemaProps{ - Description: "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", - Type: []string{"string"}, + Description: "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "version": { + "deprecated": { SchemaProps: spec.SchemaProps{ - Description: "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", - Type: []string{"string"}, + Description: "deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.", + Type: []string{"boolean"}, Format: "", }, }, - "kind": { + "deprecationWarning": { SchemaProps: spec.SchemaProps{ - Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", - Default: "", + Description: "deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.", Type: []string{"string"}, Format: "", }, }, - "verbs": { + "schema": { SchemaProps: spec.SchemaProps{ - Description: "verbs is a list of supported kube verbs (this includes 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: "", - }, - }, - }, + Description: "schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"), }, }, - "shortNames": { + "subresources": { 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: "", - }, - }, - }, + Description: "subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources"), }, }, - "categories": { + "additionalPrinterColumns": { SchemaProps: spec.SchemaProps{ - Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + Description: "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition"), }, }, }, }, }, - "storageVersionHash": { - SchemaProps: spec.SchemaProps{ - Description: "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", - Type: []string{"string"}, - Format: "", - }, - }, }, - Required: []string{"name", "singularName", "namespaced", "kind", "verbs"}, + Required: []string{"name", "served", "storage"}, }, }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresources", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceValidation"}, } } -func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceScale(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + Description: "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "specReplicasPath": { 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", + Description: "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "statusReplicasPath": { 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", + Description: "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "groupVersion": { + "labelSelectorPath": { SchemaProps: spec.SchemaProps{ - Description: "groupVersion is the group and version this APIResourceList is for.", - Default: "", + Description: "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.", Type: []string{"string"}, Format: "", }, }, - "resources": { + }, + Required: []string{"specReplicasPath", "statusReplicasPath"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceSubresources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "status": { SchemaProps: spec.SchemaProps{ - Description: "resources contains the name of the resources and if they are namespaced.", - 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.APIResource"), - }, - }, - }, + Description: "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"), + }, + }, + "scale": { + SchemaProps: spec.SchemaProps{ + Description: "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale"), }, }, }, - Required: []string{"groupVersion", "resources"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceScale", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceSubresourceStatus"}, } } -func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_CustomResourceValidation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", + Description: "CustomResourceValidation is a list of validation methods for CustomResources.", 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": { + "openAPIV3Schema": { 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: "", + Description: "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), }, }, - "versions": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"}, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_ExternalDocumentation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalDocumentation allows referencing an external resource for extended documentation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "description": { SchemaProps: spec.SchemaProps{ - Description: "versions are the api versions that are available.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Type: []string{"string"}, + Format: "", }, }, - "serverAddressByClientCIDRs": { + "url": { SchemaProps: spec.SchemaProps{ - Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", - 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.ServerAddressByClientCIDR"), - }, - }, - }, + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"versions", "serverAddressByClientCIDRs"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, } } -func schema_pkg_apis_meta_v1_ApplyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_JSON(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ApplyOptions may be provided when applying an API object. FieldManager is required for apply requests. ApplyOptions is equivalent to PatchOptions. It is provided as a convenience with documentation that speaks specifically to how the options fields relate to apply.", + Description: "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", + Type: v1beta1.JSON{}.OpenAPISchemaType(), + Format: v1beta1.JSON{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "id": { 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: "", + }, + }, + "$schema": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "$ref": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "title": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "default": { + SchemaProps: spec.SchemaProps{ + Description: "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + }, + }, + "maximum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "exclusiveMaximum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "minimum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "exclusiveMinimum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "maxLength": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minLength": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "pattern": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "maxItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "uniqueItems": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "multipleOf": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + "enum": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), + }, + }, + }, + }, + }, + "maxProperties": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "minProperties": { 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: "", + Type: []string{"integer"}, + Format: "int64", }, }, - "dryRun": { + "required": { SchemaProps: spec.SchemaProps{ - Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - Type: []string{"array"}, + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -41480,191 +43097,161 @@ func schema_pkg_apis_meta_v1_ApplyOptions(ref common.ReferenceCallback) common.O }, }, }, - "force": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people.", - Default: false, - Type: []string{"boolean"}, - Format: "", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray"), }, }, - "fieldManager": { + "allOf": { SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required.", - Default: "", - Type: []string{"string"}, - Format: "", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, }, }, - }, - Required: []string{"force", "fieldManager"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Condition contains details for one aspect of the current state of this API Resource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { + "oneOf": { SchemaProps: spec.SchemaProps{ - Description: "type of condition in CamelCase or in foo.example.com/CamelCase.", - Default: "", - Type: []string{"string"}, - Format: "", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, }, }, - "status": { + "anyOf": { SchemaProps: spec.SchemaProps{ - Description: "status of the condition, one of True, False, Unknown.", - Default: "", - Type: []string{"string"}, - Format: "", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, }, }, - "observedGeneration": { + "not": { SchemaProps: spec.SchemaProps{ - Description: "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", - Type: []string{"integer"}, - Format: "int64", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), }, }, - "lastTransitionTime": { + "properties": { SchemaProps: spec.SchemaProps{ - Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, }, }, - "reason": { + "additionalProperties": { SchemaProps: spec.SchemaProps{ - Description: "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", - Default: "", - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), }, }, - "message": { + "patternProperties": { SchemaProps: spec.SchemaProps{ - Description: "message is a human readable message indicating details about the transition. This may be an empty string.", - Default: "", - Type: []string{"string"}, - Format: "", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), + }, + }, + }, }, }, - }, - Required: []string{"type", "status", "lastTransitionTime", "reason", "message"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CreateOptions may be provided when creating an API object.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "dependencies": { 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: "", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray"), + }, + }, + }, }, }, - "apiVersion": { + "additionalItems": { 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: "", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool"), }, }, - "dryRun": { + "definitions": { SchemaProps: spec.SchemaProps{ - Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps"), }, }, }, }, }, - "fieldManager": { - SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeleteOptions may be provided when deleting an API object.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "externalDocs": { 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: "", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation"), }, }, - "apiVersion": { + "example": { 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: "", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON"), }, }, - "gracePeriodSeconds": { + "nullable": { SchemaProps: spec.SchemaProps{ - Description: "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - Type: []string{"integer"}, - Format: "int64", + Type: []string{"boolean"}, + Format: "", }, }, - "preconditions": { + "x-kubernetes-preserve-unknown-fields": { SchemaProps: spec.SchemaProps{ - Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + Description: "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", + Type: []string{"boolean"}, + Format: "", }, }, - "orphanDependents": { + "x-kubernetes-embedded-resource": { SchemaProps: spec.SchemaProps{ - Description: "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + Description: "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", Type: []string{"boolean"}, Format: "", }, }, - "propagationPolicy": { + "x-kubernetes-int-or-string": { SchemaProps: spec.SchemaProps{ - Description: "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - Type: []string{"string"}, + Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", + Type: []string{"boolean"}, Format: "", }, }, - "dryRun": { + "x-kubernetes-list-map-keys": { SchemaProps: spec.SchemaProps{ - Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Description: "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -41677,390 +43264,241 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. }, }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, - } -} - -func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", - Type: metav1.Duration{}.OpenAPISchemaType(), - Format: metav1.Duration{}.OpenAPISchemaFormat(), - }, - }, - } -} - -func schema_pkg_apis_meta_v1_FieldsV1(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", - Type: []string{"object"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GetOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GetOptions is the standard query options to the standard REST get call.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "x-kubernetes-list-type": { 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", + Description: "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "x-kubernetes-map-type": { 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", + Description: "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", Type: []string{"string"}, Format: "", }, }, - "resourceVersion": { + "x-kubernetes-validations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "rule", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "rule", + "x-kubernetes-patch-strategy": "merge", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - Type: []string{"string"}, - Format: "", + Description: "x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule"), + }, + }, + }, }, }, }, }, }, + Dependencies: []string{ + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ExternalDocumentation", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSON", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaProps", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrBool", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.JSONSchemaPropsOrStringArray", "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ValidationRule"}, } } -func schema_pkg_apis_meta_v1_GroupKind(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrArray(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "kind"}, + Description: "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", + Type: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaType(), + Format: v1beta1.JSONSchemaPropsOrArray{}.OpenAPISchemaFormat(), }, }, } } -func schema_pkg_apis_meta_v1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrBool(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "resource"}, + Description: "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", + Type: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaType(), + Format: v1beta1.JSONSchemaPropsOrBool{}.OpenAPISchemaFormat(), }, }, } } -func schema_pkg_apis_meta_v1_GroupVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_JSONSchemaPropsOrStringArray(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version"}, + Description: "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", + Type: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaType(), + Format: v1beta1.JSONSchemaPropsOrStringArray{}.OpenAPISchemaFormat(), }, }, } } -func schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "groupVersion": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "groupVersion specifies the API group and version in the form \"group/version\"", + Description: "namespace is the namespace of the service. Required", Default: "", Type: []string{"string"}, Format: "", }, }, - "version": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", + Description: "name is the name of the service. Required", Default: "", Type: []string{"string"}, Format: "", }, }, - }, - Required: []string{"groupVersion", "version"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GroupVersionKind(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { + "path": { SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Description: "path is an optional URL path at which the webhook will be contacted.", + Type: []string{"string"}, + Format: "", }, }, - "kind": { + "port": { SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Description: "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"group", "version", "kind"}, + Required: []string{"namespace", "name"}, }, }, } } -func schema_pkg_apis_meta_v1_GroupVersionResource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_ValidationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", + Description: "ValidationRule describes a validation rule written in the CEL expression language.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { + "rule": { SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {\"rule\": \"self.status.actual <= self.spec.maxDesired\"}\n\nIf the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. If the Rule is scoped to a scalar, `self` is bound to the scalar value. Examples: - Rule scoped to a map of objects: {\"rule\": \"self.components['Widget'].priority < 10\"} - Rule scoped to a list of integers: {\"rule\": \"self.values.all(value, value >= 0 && value < 100)\"} - Rule scoped to a string value: {\"rule\": \"self.startsWith('kube')\"}\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.\n\nUnknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an \"unknown type\". An \"unknown type\" is recursively defined as:\n - A schema with no type and x-kubernetes-preserve-unknown-fields set to true\n - An array where the items schema is of an \"unknown type\"\n - An object where the additionalProperties schema is of an \"unknown type\"\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Rule accessing a property named \"namespace\": {\"rule\": \"self.__namespace__ > 0\"}\n - Rule accessing a property named \"x-prop\": {\"rule\": \"self.x__dash__prop > 0\"}\n - Rule accessing a property named \"redact__d\": {\"rule\": \"self.redact__underscores__d > 0\"}\n\nEquality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "resource": { + "message": { SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\"", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"group", "version", "resource"}, + Required: []string{"rule"}, }, }, } } -func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiextensions_v1beta1_WebhookClientConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "InternalEvent makes watch.Event versioned", + Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "Type": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "Object": { + "url": { SchemaProps: spec.SchemaProps{ - Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), + Description: "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + Type: []string{"string"}, + Format: "", }, }, - }, - Required: []string{"Type", "Object"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Object"}, - } -} - -func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "matchLabels": { + "service": { SchemaProps: spec.SchemaProps{ - Description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"), }, }, - "matchExpressions": { + "caBundle": { SchemaProps: spec.SchemaProps{ - Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.", - 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.LabelSelectorRequirement"), - }, - }, - }, + Description: "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", }, }, }, }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.ServiceReference"}, } } -func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + Description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + Type: resource.Quantity{}.OpenAPISchemaType(), + Format: resource.Quantity{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_apimachinery_pkg_api_resource_int64Amount(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "key": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "key", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "key is the label key that the selector applies to.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "operator": { + "value": { SchemaProps: spec.SchemaProps{ - Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", - Default: "", - Type: []string{"string"}, - Format: "", + Default: 0, + Type: []string{"integer"}, + Format: "int64", }, }, - "values": { + "scale": { SchemaProps: spec.SchemaProps{ - Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"key", "operator"}, + Required: []string{"value", "scale"}, }, }, } } -func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "List holds a list of objects, which may not be known by the server.", + Description: "APIGroup contains the name, the supported versions, and the preferred version of a group.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -42077,339 +43515,292 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe Format: "", }, }, - "metadata": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Description: "name is the name of the group.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions are the versions supported in this group.", + 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.GroupVersionForDiscovery"), + }, + }, + }, + }, + }, + "preferredVersion": { + SchemaProps: spec.SchemaProps{ + Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), }, }, - "items": { + "serverAddressByClientCIDRs": { SchemaProps: spec.SchemaProps{ - Description: "List of objects", + Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), }, }, }, }, }, }, - Required: []string{"items"}, + Required: []string{"name", "versions"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, } } -func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + Description: "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "selfLink": { - SchemaProps: spec.SchemaProps{ - Description: "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + 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: "", }, }, - "continue": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", + 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: "", }, }, - "remainingItemCount": { + "groups": { SchemaProps: spec.SchemaProps{ - Description: "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", - Type: []string{"integer"}, - Format: "int64", + Description: "groups is a list of APIGroup.", + 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.APIGroup"), + }, + }, + }, }, }, }, + Required: []string{"groups"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, } } -func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ListOptions is the query options to a standard REST list call.", + Description: "APIResource specifies the name of a resource and whether it is namespaced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "name": { 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", + Description: "name is the plural name of the resource.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "singularName": { 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", + Description: "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "labelSelector": { + "namespaced": { SchemaProps: spec.SchemaProps{ - Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - Type: []string{"string"}, + Description: "namespaced indicates if a resource is namespaced or not.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "fieldSelector": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + Description: "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", Type: []string{"string"}, Format: "", }, }, - "watch": { - SchemaProps: spec.SchemaProps{ - Description: "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "allowWatchBookmarks": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - Type: []string{"boolean"}, + Description: "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + Type: []string{"string"}, Format: "", }, }, - "resourceVersion": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + Default: "", Type: []string{"string"}, Format: "", }, }, - "resourceVersionMatch": { + "verbs": { SchemaProps: spec.SchemaProps{ - Description: "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - Type: []string{"string"}, - Format: "", + Description: "verbs is a list of supported kube verbs (this includes 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: "", + }, + }, + }, }, }, - "timeoutSeconds": { + "shortNames": { SchemaProps: spec.SchemaProps{ - Description: "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - Type: []string{"integer"}, - Format: "int64", + 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: "", + }, + }, + }, }, }, - "limit": { + "categories": { SchemaProps: spec.SchemaProps{ - Description: "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - Type: []string{"integer"}, - Format: "int64", + Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "continue": { + "storageVersionHash": { SchemaProps: spec.SchemaProps{ - Description: "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + Description: "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", Type: []string{"string"}, Format: "", }, }, }, + Required: []string{"name", "singularName", "namespaced", "kind", "verbs"}, }, }, } } -func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", + Description: "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "manager": { - SchemaProps: spec.SchemaProps{ - Description: "Manager is an identifier of the workflow managing these fields.", - Type: []string{"string"}, - Format: "", - }, - }, - "operation": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", + 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 version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", + 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: "", }, }, - "time": { - SchemaProps: spec.SchemaProps{ - Description: "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "fieldsType": { + "groupVersion": { SchemaProps: spec.SchemaProps{ - Description: "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", + Description: "groupVersion is the group and version this APIResourceList is for.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "fieldsV1": { - SchemaProps: spec.SchemaProps{ - Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), - }, - }, - "subresource": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", - Type: []string{"string"}, - Format: "", + Description: "resources contains the name of the resources and if they are namespaced.", + 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.APIResource"), + }, + }, + }, }, }, }, + Required: []string{"groupVersion", "resources"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_pkg_apis_meta_v1_MicroTime(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MicroTime is version of Time with microsecond level precision.", - Type: metav1.MicroTime{}.OpenAPISchemaType(), - Format: metav1.MicroTime{}.OpenAPISchemaFormat(), - }, - }, + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, } } -func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + Description: "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - Type: []string{"string"}, - Format: "", - }, - }, - "generateName": { - SchemaProps: spec.SchemaProps{ - Description: "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", - Type: []string{"string"}, - Format: "", - }, - }, - "selfLink": { - SchemaProps: spec.SchemaProps{ - Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + 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: "", }, }, - "resourceVersion": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + 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: "", }, }, - "generation": { - SchemaProps: spec.SchemaProps{ - Description: "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "creationTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. 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.Time"), - }, - }, - "deletionTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "deletionGracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "labels": { - SchemaProps: spec.SchemaProps{ - Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "annotations": { + "versions": { SchemaProps: spec.SchemaProps{ - Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "versions are the api versions that are available.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: "", @@ -42420,34 +43811,53 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, }, - "ownerReferences": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "uid", - "x-kubernetes-patch-strategy": "merge", - }, - }, + "serverAddressByClientCIDRs": { SchemaProps: spec.SchemaProps{ - Description: "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", 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.OwnerReference"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), }, }, }, }, }, - "finalizers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-strategy": "merge", - }, + }, + Required: []string{"versions", "serverAddressByClientCIDRs"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + } +} + +func schema_pkg_apis_meta_v1_ApplyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ApplyOptions may be provided when applying an API object. FieldManager is required for apply requests. ApplyOptions is equivalent to PatchOptions. It is provided as a convenience with documentation that speaks specifically to how the options fields relate to apply.", + 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: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", + 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: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -42460,105 +43870,96 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, }, - "clusterName": { + "force": { SchemaProps: spec.SchemaProps{ - Description: "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", - Type: []string{"string"}, + Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "managedFields": { + "fieldManager": { SchemaProps: spec.SchemaProps{ - Description: "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", - 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.ManagedFieldsEntry"), - }, - }, - }, + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"force", "fieldManager"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", + Description: "Condition contains details for one aspect of the current state of this API Resource.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiVersion": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "API version of the referent.", + Description: "type of condition in CamelCase or in foo.example.com/CamelCase.", Default: "", Type: []string{"string"}, Format: "", }, }, - "kind": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Description: "status of the condition, one of True, False, Unknown.", Default: "", Type: []string{"string"}, Format: "", }, }, - "name": { + "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + Type: []string{"integer"}, + Format: "int64", }, }, - "uid": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "controller": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "If true, this reference points to the managing controller.", - Type: []string{"boolean"}, + Description: "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "blockOwnerDeletion": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", - Type: []string{"boolean"}, + Description: "message is a human readable message indicating details about the transition. This may be an empty string.", + Default: "", + Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"apiVersion", "kind", "name", "uid"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, + Required: []string{"type", "status", "lastTransitionTime", "reason", "message"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.", + Description: "CreateOptions may be provided when creating an API object.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -42575,26 +43976,46 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) Format: "", }, }, - "metadata": { + "dryRun": { SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "fieldManager": { + SchemaProps: spec.SchemaProps{ + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldValidation": { + SchemaProps: spec.SchemaProps{ + Description: "fieldValidation determines how the server should respond to unknown/duplicate fields in the object in the request. Introduced as alpha in 1.23, older servers or servers with the `ServerSideFieldValidation` feature disabled will discard valid values specified in this param and not perform any server side field validation. Valid values are: - Ignore: ignores unknown/duplicate fields. - Warn: responds with a warning for each unknown/duplicate field, but successfully serves the request. - Strict: fails the request on unknown/duplicate fields.", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PartialObjectMetadataList contains a list of objects containing only their metadata", + Description: "DeleteOptions may be provided when deleting an API object.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -42611,52 +44032,84 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb Format: "", }, }, - "metadata": { + "gracePeriodSeconds": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + Type: []string{"integer"}, + Format: "int64", }, }, - "items": { + "preconditions": { SchemaProps: spec.SchemaProps{ - Description: "items contains each of the included items.", + Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + }, + }, + "orphanDependents": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "propagationPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", 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.PartialObjectMetadata"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, } } -func schema_pkg_apis_meta_v1_Patch(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", + Type: metav1.Duration{}.OpenAPISchemaType(), + Format: metav1.Duration{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_FieldsV1(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", Type: []string{"object"}, }, }, } } -func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_GetOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.", + Description: "GetOptions is the standard query options to the standard REST get call.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -42673,300 +44126,338 @@ func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.O Format: "", }, }, - "dryRun": { + "resourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + Type: []string{"string"}, + Format: "", }, }, - "force": { + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupKind(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { SchemaProps: spec.SchemaProps{ - Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - Type: []string{"boolean"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "fieldManager": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"group", "kind"}, }, }, } } -func schema_pkg_apis_meta_v1_Preconditions(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + Description: "GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "uid": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the target UID.", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "resourceVersion": { + "resource": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the target ResourceVersion", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"group", "resource"}, }, }, } } -func schema_pkg_apis_meta_v1_RootPaths(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_GroupVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", + Description: "GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "paths": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "paths are the paths available at root.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"paths"}, + Required: []string{"group", "version"}, }, }, } } -func schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + Description: "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "clientCIDR": { + "groupVersion": { SchemaProps: spec.SchemaProps{ - Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", + Description: "groupVersion specifies the API group and version in the form \"group/version\"", Default: "", Type: []string{"string"}, Format: "", }, }, - "serverAddress": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"clientCIDR", "serverAddress"}, + Required: []string{"groupVersion", "version"}, }, }, } } -func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_GroupVersionKind(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Status is a return value for calls that don't return other objects.", + Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "group": { 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: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "apiVersion": { + "version": { 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: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "metadata": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "status": { + }, + Required: []string{"group", "version", "kind"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupVersionResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { SchemaProps: spec.SchemaProps{ - Description: "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "message": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the status of this operation.", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "reason": { + "resource": { SchemaProps: spec.SchemaProps{ - Description: "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "details": { + }, + Required: []string{"group", "version", "resource"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalEvent makes watch.Event versioned", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Type": { SchemaProps: spec.SchemaProps{ - Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "code": { + "Object": { SchemaProps: spec.SchemaProps{ - Description: "Suggested HTTP return code for this status, 0 if not set.", - Type: []string{"integer"}, - Format: "int32", + Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), }, }, }, + Required: []string{"Type", "Object"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, + "k8s.io/apimachinery/pkg/runtime.Object"}, } } -func schema_pkg_apis_meta_v1_StatusCause(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "A machine-readable description of the cause of the error. If this value is empty there is no information available.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { + "matchLabels": { SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", - Type: []string{"string"}, - Format: "", + Description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "field": { + "matchExpressions": { SchemaProps: spec.SchemaProps{ - Description: "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", - Type: []string{"string"}, - Format: "", + Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + 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.LabelSelectorRequirement"), + }, + }, + }, }, }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, } } -func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "The group attribute of the resource associated with the status StatusReason.", - Type: []string{"string"}, - Format: "", + "key": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "key", + "x-kubernetes-patch-strategy": "merge", + }, }, - }, - "kind": { SchemaProps: spec.SchemaProps{ - Description: "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Description: "key is the label key that the selector applies to.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "uid": { + "operator": { SchemaProps: spec.SchemaProps{ - Description: "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "causes": { + "values": { SchemaProps: spec.SchemaProps{ - Description: "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", 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.StatusCause"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "retryAfterSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", - Type: []string{"integer"}, - Format: "int32", - }, - }, }, + Required: []string{"key", "operator"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, } } -func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.", + Description: "List holds a list of objects, which may not be known by the server.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -42990,321 +44481,316 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "columnDefinitions": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.", + Description: "List of objects", 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.TableColumnDefinition"), + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, }, }, - "rows": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "selfLink": { SchemaProps: spec.SchemaProps{ - Description: "rows is the list of items in the table.", - 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.TableRow"), - }, - }, - }, + Description: "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + Type: []string{"string"}, + Format: "", + }, + }, + "continue": { + SchemaProps: spec.SchemaProps{ + Description: "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", + Type: []string{"string"}, + Format: "", + }, + }, + "remainingItemCount": { + SchemaProps: spec.SchemaProps{ + Description: "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", + Type: []string{"integer"}, + Format: "int64", }, }, }, - Required: []string{"columnDefinitions", "rows"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, } } -func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TableColumnDefinition contains information about a column returned in the Table.", + Description: "ListOptions is the query options to a standard REST list call.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "name is a human readable name for the column.", - Default: "", + 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: "", }, }, - "type": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "type is an OpenAPI type definition for this column, such as number, integer, string, or array. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", - Default: "", + 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: "", }, }, - "format": { + "labelSelector": { SchemaProps: spec.SchemaProps{ - Description: "format is an optional OpenAPI type modifier for this column. A format modifies the type and imposes additional rules, like date or time formatting for a string. The 'name' format is applied to the primary identifier column which has type 'string' to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", - Default: "", + Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", Type: []string{"string"}, Format: "", }, }, - "description": { + "fieldSelector": { SchemaProps: spec.SchemaProps{ - Description: "description is a human readable description of this column.", - Default: "", + Description: "A selector to restrict the list of returned objects by their fields. Defaults to everything.", Type: []string{"string"}, Format: "", }, }, - "priority": { + "watch": { SchemaProps: spec.SchemaProps{ - Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + Type: []string{"boolean"}, + Format: "", }, }, - }, - Required: []string{"name", "type", "format", "description", "priority"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_TableOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TableOptions are used when a Table is requested by the caller.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "allowWatchBookmarks": { 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"}, + Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + Type: []string{"boolean"}, Format: "", }, }, - "apiVersion": { + "resourceVersion": { 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", + Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", Type: []string{"string"}, Format: "", }, }, - "includeObject": { + "resourceVersionMatch": { SchemaProps: spec.SchemaProps{ - Description: "includeObject decides whether to include each object along with its columnar information. Specifying \"None\" will return no object, specifying \"Object\" will return the full object contents, and specifying \"Metadata\" (the default) will return the object's metadata in the PartialObjectMetadata kind in version v1beta1 of the meta.k8s.io API group.", + Description: "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TableRow is an individual row in a table.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "cells": { + "timeoutSeconds": { SchemaProps: spec.SchemaProps{ - Description: "cells will be as wide as the column definitions array and may contain strings, numbers (float64 or int64), booleans, simple maps, lists, or null. See the type field of the column definition for a more detailed description.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Format: "", - }, - }, - }, + Description: "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + Type: []string{"integer"}, + Format: "int64", }, }, - "conditions": { + "limit": { SchemaProps: spec.SchemaProps{ - Description: "conditions describe additional status of a row that are relevant for a human user. These conditions apply to the row, not to the object, and will be specific to table output. The only defined condition type is 'Completed', for a row that indicates a resource that has run to completion and can be given less visual priority.", - 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.TableRowCondition"), - }, - }, - }, + Description: "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + Type: []string{"integer"}, + Format: "int64", }, }, - "object": { + "continue": { SchemaProps: spec.SchemaProps{ - Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Description: "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"cells"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_pkg_apis_meta_v1_TableRowCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TableRowCondition allows a row to be marked with additional information.", + Description: "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "manager": { SchemaProps: spec.SchemaProps{ - Description: "Type of row condition. The only defined value is 'Completed' indicating that the object this row represents has reached a completed state and may be given less visual priority than other rows. Clients are not required to honor any conditions but should be consistent where possible about handling the conditions.", - Default: "", + Description: "Manager is an identifier of the workflow managing these fields.", Type: []string{"string"}, Format: "", }, }, - "status": { + "operation": { SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Default: "", + Description: "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", Type: []string{"string"}, Format: "", }, }, - "reason": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "(brief) machine readable reason for the condition's last transition.", + Description: "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", Type: []string{"string"}, Format: "", }, }, - "message": { + "time": { SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating details about last transition.", + Description: "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "fieldsType": { + SchemaProps: spec.SchemaProps{ + Description: "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldsV1": { + SchemaProps: spec.SchemaProps{ + Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), + }, + }, + "subresource": { + SchemaProps: spec.SchemaProps{ + Description: "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"type", "status"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_meta_v1_Time(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_MicroTime(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", - Type: metav1.Time{}.OpenAPISchemaType(), - Format: metav1.Time{}.OpenAPISchemaFormat(), + Description: "MicroTime is version of Time with microsecond level precision.", + Type: metav1.MicroTime{}.OpenAPISchemaType(), + Format: metav1.MicroTime{}.OpenAPISchemaFormat(), }, }, } } -func schema_pkg_apis_meta_v1_Timestamp(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.", + Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "seconds": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", - Default: 0, - Type: []string{"integer"}, - Format: "int64", + Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", }, }, - "nanos": { + "generateName": { SchemaProps: spec.SchemaProps{ - Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", + Type: []string{"string"}, + Format: "", }, }, - }, - Required: []string{"seconds", "nanos"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "namespace": { 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", + Description: "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "selfLink": { 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", + Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "uid": { 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", + Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "resourceVersion": { 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", + Description: "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", Type: []string{"string"}, Format: "", }, }, - "dryRun": { + "generation": { SchemaProps: spec.SchemaProps{ - Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "creationTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. 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.Time"), + }, + }, + "deletionTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deletionGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: "", @@ -43315,279 +44801,197 @@ func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common. }, }, }, - "fieldManager": { + "annotations": { SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - Type: []string{"string"}, - Format: "", + Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Event represents a single event to a watched resource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + "ownerReferences": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge", + }, }, - }, - "object": { SchemaProps: spec.SchemaProps{ - Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Description: "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + 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.OwnerReference"), + }, + }, + }, }, }, - }, - Required: []string{"type", "object"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PartialObjectMetadataList contains a list of objects containing only their metadata.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "finalizers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "merge", + }, + }, 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: "", + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "apiVersion": { + "clusterName": { 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", + Description: "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { + "managedFields": { SchemaProps: spec.SchemaProps{ - Description: "items contains each of the included items.", + Description: "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", 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.PartialObjectMetadata"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, - } -} - -func schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", - Type: []string{"object"}, - }, - }, + "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this: type MyAwesomeAPIObject struct {\n runtime.TypeMeta `json:\",inline\"`\n ... // other fields\n} func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind\n\nTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.", + Description: "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "apiVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "API version of the referent.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "kind": { + "name": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "Raw": { + "uid": { SchemaProps: spec.SchemaProps{ - Description: "Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.", + Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Default: "", Type: []string{"string"}, - Format: "byte", + Format: "", }, }, - "ContentEncoding": { + "controller": { SchemaProps: spec.SchemaProps{ - Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", - Default: "", - Type: []string{"string"}, + Description: "If true, this reference points to the managing controller.", + Type: []string{"boolean"}, Format: "", }, }, - "ContentType": { + "blockOwnerDeletion": { SchemaProps: spec.SchemaProps{ - Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", - Default: "", - Type: []string{"string"}, + Description: "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + Type: []string{"boolean"}, Format: "", }, }, }, - Required: []string{"Raw", "ContentEncoding", "ContentType"}, + Required: []string{"apiVersion", "kind", "name", "uid"}, }, - }, - } -} - -func schema_apimachinery_pkg_util_intstr_IntOrString(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.", - Type: intstr.IntOrString{}.OpenAPISchemaType(), - Format: intstr.IntOrString{}.OpenAPISchemaFormat(), + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, }, }, } } -func schema_k8sio_apimachinery_pkg_version_Info(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Info contains versioning information. how we'll want to distribute that information.", + Description: "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "major": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "minor": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "gitVersion": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "gitCommit": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "gitTreeState": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "buildDate": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "goVersion": { + "kind": { SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + 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: "", }, }, - "compiler": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + 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: "", }, }, - "platform": { + "metadata": { SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Standard object's metadata. 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"), }, }, }, - Required: []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Event captures all the information that can be included in an API audit log.", + Description: "PartialObjectMetadataList contains a list of objects containing only their metadata", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -43604,62 +45008,71 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI Format: "", }, }, - "level": { - SchemaProps: spec.SchemaProps{ - Description: "AuditLevel at which event was generated", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "auditID": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Unique audit ID, generated for each request.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "stage": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Stage of the request handling when this event instance was generated.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "items contains each of the included items.", + 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.PartialObjectMetadata"), + }, + }, + }, }, }, - "requestURI": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, + } +} + +func schema_pkg_apis_meta_v1_Patch(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "RequestURI is the request URI as sent by the client to a server.", - Default: "", + 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: "", }, }, - "verb": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", - Default: "", + 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: "", }, }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "Authenticated user information.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), - }, - }, - "impersonatedUser": { - SchemaProps: spec.SchemaProps{ - Description: "Impersonated user information.", - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), - }, - }, - "sourceIPs": { + "dryRun": { SchemaProps: spec.SchemaProps{ - Description: "Source IPs, from where the request originated and intermediate proxies.", + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -43672,57 +45085,72 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI }, }, }, - "userAgent": { + "force": { SchemaProps: spec.SchemaProps{ - Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", - Type: []string{"string"}, + Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + Type: []string{"boolean"}, Format: "", }, }, - "objectRef": { - SchemaProps: spec.SchemaProps{ - Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"), - }, - }, - "responseStatus": { - SchemaProps: spec.SchemaProps{ - Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), - }, - }, - "requestObject": { + "fieldManager": { SchemaProps: spec.SchemaProps{ - Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + Type: []string{"string"}, + Format: "", }, }, - "responseObject": { + "fieldValidation": { SchemaProps: spec.SchemaProps{ - Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + Description: "fieldValidation determines how the server should respond to unknown/duplicate fields in the object in the request. Introduced as alpha in 1.23, older servers or servers with the `ServerSideFieldValidation` feature disabled will discard valid values specified in this param and not perform any server side field validation. Valid values are: - Ignore: ignores unknown/duplicate fields. - Warn: responds with a warning for each unknown/duplicate field, but successfully serves the request. - Strict: fails the request on unknown/duplicate fields.", + Type: []string{"string"}, + Format: "", }, }, - "requestReceivedTimestamp": { + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Preconditions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { SchemaProps: spec.SchemaProps{ - Description: "Time the request reached the apiserver.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Description: "Specifies the target UID.", + Type: []string{"string"}, + Format: "", }, }, - "stageTimestamp": { + "resourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "Time the request reached current audit stage.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Description: "Specifies the target ResourceVersion", + Type: []string{"string"}, + Format: "", }, }, - "annotations": { + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_RootPaths(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "paths": { SchemaProps: spec.SchemaProps{ - Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + Description: "paths are the paths available at root.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: "", @@ -43734,19 +45162,47 @@ func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPI }, }, }, - Required: []string{"level", "auditID", "stage", "requestURI", "verb", "user"}, + Required: []string{"paths"}, }, }, - Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"}, } } -func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EventList is a list of audit Events.", + Description: "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clientCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "serverAddress": { + SchemaProps: spec.SchemaProps{ + Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"clientCIDR", "serverAddress"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Status is a return value for calls that don't return other objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -43765,74 +45221,79 @@ func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.Ope }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "items": { + "status": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Event"), - }, - }, - }, + Description: "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable description of the status of this operation.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + Type: []string{"string"}, + Format: "", + }, + }, + "details": { + SchemaProps: spec.SchemaProps{ + Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), + }, + }, + "code": { + SchemaProps: spec.SchemaProps{ + Description: "Suggested HTTP return code for this status, 0 if not set.", + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Event"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, } } -func schema_pkg_apis_audit_v1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_StatusCause(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupResources represents resource kinds in an API group.", + Description: "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "group": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", + Description: "A machine-readable description of the cause of the error. If this value is empty there is no information available.", Type: []string{"string"}, Format: "", }, }, - "resources": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + Type: []string{"string"}, + Format: "", }, }, - "resourceNames": { + "field": { SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", + Type: []string{"string"}, + Format: "", }, }, }, @@ -43841,74 +45302,75 @@ func schema_pkg_apis_audit_v1_GroupResources(ref common.ReferenceCallback) commo } } -func schema_pkg_apis_audit_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Description: "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "resource": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, "name": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", + Type: []string{"string"}, + Format: "", }, }, - "uid": { + "group": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The group attribute of the resource associated with the status StatusReason.", + Type: []string{"string"}, + Format: "", }, }, - "apiGroup": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the name of the API group that contains the referred object. The empty string represents the core API group.", + Description: "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "uid": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion is the version of the API group that contains the referred object.", + Description: "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", Type: []string{"string"}, Format: "", }, }, - "resourceVersion": { + "causes": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + 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.StatusCause"), + }, + }, + }, }, }, - "subresource": { + "retryAfterSeconds": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", + Type: []string{"integer"}, + Format: "int32", }, }, }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, } } -func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", + Description: "Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -43927,317 +45389,324 @@ func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAP }, "metadata": { SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is included for interoperability with API infrastructure.", + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "rules": { + "columnDefinitions": { SchemaProps: spec.SchemaProps{ - Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", + Description: "columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), }, }, }, }, }, - "omitStages": { + "rows": { SchemaProps: spec.SchemaProps{ - Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", + Description: "rows is the list of items in the table.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), }, }, }, }, }, }, - Required: []string{"rules"}, + Required: []string{"columnDefinitions", "rows"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, } } -func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyList is a list of audit Policies.", + Description: "TableColumnDefinition contains information about a column returned in the Table.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "name": { 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", + Description: "name is a human readable name for the column.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "type": { 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", + Description: "type is an OpenAPI type definition for this column, such as number, integer, string, or array. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "format": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "format is an optional OpenAPI type modifier for this column. A format modifies the type and imposes additional rules, like date or time formatting for a string. The 'name' format is applied to the primary identifier column which has type 'string' to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "items": { + "description": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Policy"), - }, - }, - }, + Description: "description is a human readable description of this column.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "priority": { + SchemaProps: spec.SchemaProps{ + Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"items"}, + Required: []string{"name", "type", "format", "description", "priority"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Policy"}, } } -func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_TableOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", + Description: "TableOptions are used when a Table is requested by the caller.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "level": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "The Level that requests matching this rule are recorded at.", - Default: "", + 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: "", }, }, - "users": { - SchemaProps: spec.SchemaProps{ - Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "userGroups": { - SchemaProps: spec.SchemaProps{ - Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "verbs": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "The verbs that match this rule. An empty list implies every verb.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + 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: "", }, }, - "resources": { + "includeObject": { SchemaProps: spec.SchemaProps{ - Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"), - }, - }, - }, + Description: "includeObject decides whether to include each object along with its columnar information. Specifying \"None\" will return no object, specifying \"Object\" will return the full object contents, and specifying \"Metadata\" (the default) will return the object's metadata in the PartialObjectMetadata kind in version v1beta1 of the meta.k8s.io API group.", + Type: []string{"string"}, + Format: "", }, }, - "namespaces": { + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableRow is an individual row in a table.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cells": { SchemaProps: spec.SchemaProps{ - Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", + Description: "cells will be as wide as the column definitions array and may contain strings, numbers (float64 or int64), booleans, simple maps, lists, or null. See the type field of the column definition for a more detailed description.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Type: []string{"object"}, + Format: "", }, }, }, }, }, - "nonResourceURLs": { + "conditions": { SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", + Description: "conditions describe additional status of a row that are relevant for a human user. These conditions apply to the row, not to the object, and will be specific to table output. The only defined condition type is 'Completed', for a row that indicates a resource that has run to completion and can be given less visual priority.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), }, }, }, }, }, - "omitStages": { + "object": { SchemaProps: spec.SchemaProps{ - Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, - Required: []string{"level"}, + Required: []string{"cells"}, }, }, Dependencies: []string{ - "k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_pkg_apis_audit_v1alpha1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1_TableRowCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for more information. Event captures all the information that can be included in an API audit log.", + Description: "TableRowCondition allows a row to be marked with additional information.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "type": { 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", + Description: "Type of row condition. The only defined value is 'Completed' indicating that the object this row represents has reached a completed state and may be given less visual priority than other rows. Clients are not required to honor any conditions but should be consistent where possible about handling the conditions.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "status": { 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", + Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is included for interoperability with API infrastructure.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "(brief) machine readable reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", }, }, - "level": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "AuditLevel at which event was generated", - Default: "", + Description: "Human readable message indicating details about last transition.", Type: []string{"string"}, Format: "", }, }, - "timestamp": { + }, + Required: []string{"type", "status"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Time(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + Type: metav1.Time{}.OpenAPISchemaType(), + Format: metav1.Time{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Timestamp(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "seconds": { SchemaProps: spec.SchemaProps{ - Description: "Time the request reached the apiserver.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", + Default: 0, + Type: []string{"integer"}, + Format: "int64", }, }, - "auditID": { + "nanos": { SchemaProps: spec.SchemaProps{ - Description: "Unique audit ID, generated for each request.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "stage": { + }, + Required: []string{"seconds", "nanos"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Stage of the request handling when this event instance was generated.", - Default: "", + 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: "", }, }, - "requestURI": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "RequestURI is the request URI as sent by the client to a server.", - Default: "", + 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: "", }, }, - "verb": { + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", - Default: "", + 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: "", }, }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "Authenticated user information.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), - }, - }, - "impersonatedUser": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Impersonated user information.", - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + 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: "", }, }, - "sourceIPs": { + "dryRun": { SchemaProps: spec.SchemaProps{ - Description: "Source IPs, from where the request originated and intermediate proxies.", + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -44250,81 +45719,61 @@ func schema_pkg_apis_audit_v1alpha1_Event(ref common.ReferenceCallback) common.O }, }, }, - "userAgent": { + "fieldManager": { SchemaProps: spec.SchemaProps{ - Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", Type: []string{"string"}, Format: "", }, }, - "objectRef": { - SchemaProps: spec.SchemaProps{ - Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference"), - }, - }, - "responseStatus": { - SchemaProps: spec.SchemaProps{ - Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), - }, - }, - "requestObject": { - SchemaProps: spec.SchemaProps{ - Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), - }, - }, - "responseObject": { + "fieldValidation": { SchemaProps: spec.SchemaProps{ - Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + Description: "fieldValidation determines how the server should respond to unknown/duplicate fields in the object in the request. Introduced as alpha in 1.23, older servers or servers with the `ServerSideFieldValidation` feature disabled will discard valid values specified in this param and not perform any server side field validation. Valid values are: - Ignore: ignores unknown/duplicate fields. - Warn: responds with a warning for each unknown/duplicate field, but successfully serves the request. - Strict: fails the request on unknown/duplicate fields.", + Type: []string{"string"}, + Format: "", }, }, - "requestReceivedTimestamp": { + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event represents a single event to a watched resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { SchemaProps: spec.SchemaProps{ - Description: "Time the request reached the apiserver.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "stageTimestamp": { + "object": { SchemaProps: spec.SchemaProps{ - Description: "Time the request reached current audit stage.", + Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "annotations": { - SchemaProps: spec.SchemaProps{ - Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, - Required: []string{"level", "timestamp", "auditID", "stage", "requestURI", "verb", "user"}, + Required: []string{"type", "object"}, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference"}, + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_pkg_apis_audit_v1alpha1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_meta_v1beta1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EventList is a list of audit Events.", + Description: "PartialObjectMetadataList contains a list of objects containing only their metadata.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -44343,18 +45792,20 @@ func schema_pkg_apis_audit_v1alpha1_EventList(ref common.ReferenceCallback) comm }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "items contains each of the included items.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), }, }, }, @@ -44365,104 +45816,35 @@ func schema_pkg_apis_audit_v1alpha1_EventList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, } } -func schema_pkg_apis_audit_v1alpha1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupResources represents resource kinds in an API group.", + Description: "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", - Type: []string{"string"}, - Format: "", - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resourceNames": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, }, }, } } -func schema_pkg_apis_audit_v1alpha1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Description: "TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this: type MyAwesomeAPIObject struct {\n runtime.TypeMeta `json:\",inline\"`\n ... // other fields\n} func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind\n\nTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "resource": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, "apiVersion": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "subresource": { + "kind": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", @@ -44474,254 +45856,149 @@ func schema_pkg_apis_audit_v1alpha1_ObjectReference(ref common.ReferenceCallback } } -func schema_pkg_apis_audit_v1alpha1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for more information. Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", + Description: "Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "apiVersion": { 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: "", + Type: []string{"string"}, + Format: "", }, }, - "apiVersion": { + "kind": { 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: "", + Type: []string{"string"}, + Format: "", }, }, - "metadata": { + "Raw": { SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is included for interoperability with API infrastructure.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.", + Type: []string{"string"}, + Format: "byte", }, }, - "rules": { + "ContentEncoding": { SchemaProps: spec.SchemaProps{ - Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule"), - }, - }, - }, + Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "omitStages": { + "ContentType": { SchemaProps: spec.SchemaProps{ - Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"rules"}, + Required: []string{"Raw", "ContentEncoding", "ContentType"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule"}, } } -func schema_pkg_apis_audit_v1alpha1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_pkg_util_intstr_IntOrString(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyList is a list of audit Policies.", - 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{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, + Description: "IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.", + Type: intstr.IntOrString{}.OpenAPISchemaType(), + Format: intstr.IntOrString{}.OpenAPISchemaFormat(), }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy"}, } } -func schema_pkg_apis_audit_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_apimachinery_pkg_version_Info(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", + Description: "Info contains versioning information. how we'll want to distribute that information.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "level": { + "major": { SchemaProps: spec.SchemaProps{ - Description: "The Level that requests matching this rule are recorded at.", - Default: "", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "users": { + "minor": { SchemaProps: spec.SchemaProps{ - Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "userGroups": { + "gitVersion": { SchemaProps: spec.SchemaProps{ - Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "The verbs that match this rule. An empty list implies every verb.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + "gitCommit": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "resources": { + "gitTreeState": { SchemaProps: spec.SchemaProps{ - Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources"), - }, - }, - }, + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "namespaces": { + "buildDate": { SchemaProps: spec.SchemaProps{ - Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "nonResourceURLs": { + "goVersion": { SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "omitStages": { + "compiler": { SchemaProps: spec.SchemaProps{ - Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "platform": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"level"}, + Required: []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, }, }, - Dependencies: []string{ - "k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources"}, } } -func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for more information. Event captures all the information that can be included in an API audit log.", + Description: "Event captures all the information that can be included in an API audit log.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -44738,13 +46015,6 @@ func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.Op Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is included for interoperability with API infrastructure. DEPRECATED: Use StageTimestamp which supports micro second instead of ObjectMeta.CreateTimestamp and the rest of the object is not used", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, "level": { SchemaProps: spec.SchemaProps{ Description: "AuditLevel at which event was generated", @@ -44753,13 +46023,6 @@ func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.Op Format: "", }, }, - "timestamp": { - SchemaProps: spec.SchemaProps{ - Description: "Time the request reached the apiserver. DEPRECATED: Use RequestReceivedTimestamp which supports micro second instead.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, "auditID": { SchemaProps: spec.SchemaProps{ Description: "Unique audit ID, generated for each request.", @@ -44830,7 +46093,7 @@ func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.Op "objectRef": { SchemaProps: spec.SchemaProps{ Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference"), + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"), }, }, "responseStatus": { @@ -44882,15 +46145,15 @@ func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.Op }, }, }, - Required: []string{"level", "timestamp", "auditID", "stage", "requestURI", "verb", "user"}, + Required: []string{"level", "auditID", "stage", "requestURI", "verb", "user"}, }, }, Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference"}, + "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1.ObjectReference"}, } } -func schema_pkg_apis_audit_v1beta1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -44924,7 +46187,7 @@ func schema_pkg_apis_audit_v1beta1_EventList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.Event"), + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Event"), }, }, }, @@ -44935,11 +46198,11 @@ func schema_pkg_apis_audit_v1beta1_EventList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.Event"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Event"}, } } -func schema_pkg_apis_audit_v1beta1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -44989,7 +46252,7 @@ func schema_pkg_apis_audit_v1beta1_GroupResources(ref common.ReferenceCallback) } } -func schema_pkg_apis_audit_v1beta1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45052,11 +46315,11 @@ func schema_pkg_apis_audit_v1beta1_ObjectReference(ref common.ReferenceCallback) } } -func schema_pkg_apis_audit_v1beta1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for more information. Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", + Description: "Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -45088,7 +46351,7 @@ func schema_pkg_apis_audit_v1beta1_Policy(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule"), + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"), }, }, }, @@ -45109,16 +46372,23 @@ func schema_pkg_apis_audit_v1beta1_Policy(ref common.ReferenceCallback) common.O }, }, }, + "omitManagedFields": { + SchemaProps: spec.SchemaProps{ + Description: "OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. This is used as a global default - a value of 'true' will omit the managed fileds, otherwise the managed fields will be included in the API audit log. Note that this can also be specified per rule in which case the value specified in a rule will override the global default.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"rules"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1.PolicyRule"}, } } -func schema_pkg_apis_audit_v1beta1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45152,7 +46422,7 @@ func schema_pkg_apis_audit_v1beta1_PolicyList(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy"), + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.Policy"), }, }, }, @@ -45163,11 +46433,11 @@ func schema_pkg_apis_audit_v1beta1_PolicyList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1.Policy"}, } } -func schema_pkg_apis_audit_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45235,7 +46505,7 @@ func schema_pkg_apis_audit_v1beta1_PolicyRule(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources"), + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"), }, }, }, @@ -45286,84 +46556,200 @@ func schema_pkg_apis_audit_v1beta1_PolicyRule(ref common.ReferenceCallback) comm }, }, }, + "omitManagedFields": { + SchemaProps: spec.SchemaProps{ + Description: "OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. - a value of 'true' will drop the managed fields from the API audit log - a value of 'false' indicates that the managed fileds should be included\n in the API audit log\nNote that the value, if specified, in this rule will override the global default If a value is not specified then the global default specified in Policy.OmitManagedFields will stand.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"level"}, }, }, Dependencies: []string{ - "k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources"}, + "k8s.io/apiserver/pkg/apis/audit/v1.GroupResources"}, } } -func schema_pkg_apis_clientauthentication_v1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to.\n\nTo ensure that this struct contains everything someone would need to communicate with a kubernetes cluster (just like they would via a kubeconfig), the fields should shadow \"k8s.io/client-go/tools/clientcmd/api/v1\".Cluster, with the exception of CertificateAuthority, since CA data will always be passed to the plugin as bytes.", + Description: "DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for more information. Event captures all the information that can be included in an API audit log.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "server": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Server is the address of the kubernetes cluster (https://hostname:port).", + 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: "ObjectMeta is included for interoperability with API infrastructure.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "level": { + SchemaProps: spec.SchemaProps{ + Description: "AuditLevel at which event was generated", Default: "", Type: []string{"string"}, Format: "", }, }, - "tls-server-name": { + "timestamp": { SchemaProps: spec.SchemaProps{ - Description: "TLSServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", + Description: "Time the request reached the apiserver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "auditID": { + SchemaProps: spec.SchemaProps{ + Description: "Unique audit ID, generated for each request.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "insecure-skip-tls-verify": { + "stage": { SchemaProps: spec.SchemaProps{ - Description: "InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.", - Type: []string{"boolean"}, + Description: "Stage of the request handling when this event instance was generated.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "certificate-authority-data": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, + "requestURI": { + SchemaProps: spec.SchemaProps{ + Description: "RequestURI is the request URI as sent by the client to a server.", + Default: "", + Type: []string{"string"}, + Format: "", }, + }, + "verb": { SchemaProps: spec.SchemaProps{ - Description: "CAData contains PEM-encoded certificate authority certificates. If empty, system roots should be used.", + Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", + Default: "", Type: []string{"string"}, - Format: "byte", + Format: "", }, }, - "proxy-url": { + "user": { SchemaProps: spec.SchemaProps{ - Description: "ProxyURL is the URL to the proxy to be used for all requests to this cluster.", + Description: "Authenticated user information.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "impersonatedUser": { + SchemaProps: spec.SchemaProps{ + Description: "Impersonated user information.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "sourceIPs": { + SchemaProps: spec.SchemaProps{ + Description: "Source IPs, from where the request originated and intermediate proxies.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "userAgent": { + SchemaProps: spec.SchemaProps{ + Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", Type: []string{"string"}, Format: "", }, }, - "config": { + "objectRef": { SchemaProps: spec.SchemaProps{ - Description: "Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.\n\nThis data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:\n\nclusters: - name: my-cluster\n cluster:\n ...\n extensions:\n - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config\n extension:\n audience: 06e3fbd18de8 # arbitrary config\n\nIn some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need to be stored directly in the kubeconfig.", + Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference"), + }, + }, + "responseStatus": { + SchemaProps: spec.SchemaProps{ + Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + "requestObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "responseObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "requestReceivedTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached the apiserver.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "stageTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached current audit stage.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"server"}, + Required: []string{"level", "timestamp", "auditID", "stage", "requestURI", "verb", "user"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.ObjectReference"}, } } -func schema_pkg_apis_clientauthentication_v1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", + Description: "EventList is a list of audit Events.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -45380,323 +46766,401 @@ func schema_pkg_apis_clientauthentication_v1_ExecCredential(ref common.Reference Format: "", }, }, - "spec": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Spec holds information passed to the plugin by the transport.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "status": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus"), + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event"), + }, + }, + }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Event"}, } } -func schema_pkg_apis_clientauthentication_v1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredentialSpec holds request and runtime specific information provided by the transport.", + Description: "GroupResources represents resource kinds in an API group.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "cluster": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., ExecConfig.ProvideClusterInfo).", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster"), + Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", + Type: []string{"string"}, + Format: "", }, }, - "interactive": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "Interactive declares whether stdin has been passed to this exec plugin.", - Default: false, - Type: []string{"boolean"}, - Format: "", + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"interactive"}, }, }, - Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster"}, } } -func schema_pkg_apis_clientauthentication_v1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "expirationTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "token": { + "resource": { SchemaProps: spec.SchemaProps{ - Description: "Token is a bearer token used by the client for request authentication.", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "clientCertificateData": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded client TLS certificates (including intermediates, if any).", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "clientKeyData": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded private key for the above certificate.", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "uid": { 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: "", + 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: "", + Type: []string{"string"}, + Format: "", }, }, - "spec": { + "resourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "Spec holds information passed to the plugin by the transport. This contains request and runtime specific information, such as if the session is interactive.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec"), + Type: []string{"string"}, + Format: "", }, }, - "status": { + "subresource": { SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus"), + Type: []string{"string"}, + Format: "", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus"}, } } -func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredentialSpec holds request and runtime specific information provided by the transport.", + Description: "DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for more information. Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "response": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Response is populated when the transport encounters HTTP status codes, such as 401, suggesting previous credentials were invalid.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response"), + 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: "", }, }, - "interactive": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Interactive is true when the transport detects the command is being called from an interactive prompt.", - Type: []string{"boolean"}, + 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: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response"}, - } -} - -func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "expirationTimestamp": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "ObjectMeta is included for interoperability with API infrastructure.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "token": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "Token is a bearer token used by the client for request authentication.", - Type: []string{"string"}, - Format: "", + Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule"), + }, + }, + }, }, }, - "clientCertificateData": { + "omitStages": { SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded client TLS certificates (including intermediates, if any).", - Type: []string{"string"}, - Format: "", + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "clientKeyData": { + "omitManagedFields": { SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded private key for the above certificate.", - Type: []string{"string"}, + Description: "OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. This is used as a global default - a value of 'true' will omit the managed fileds, otherwise the managed fields will be included in the API audit log. Note that this can also be specified per rule in which case the value specified in a rule will override the global default.", + Type: []string{"boolean"}, Format: "", }, }, }, + Required: []string{"rules"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.PolicyRule"}, } } -func schema_pkg_apis_clientauthentication_v1alpha1_Response(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Response defines metadata about a failed request, including HTTP status code and response headers.", + Description: "PolicyList is a list of audit Policies.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "header": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Header holds HTTP headers returned by the server.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, + 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{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy"), }, }, }, }, }, - "code": { - SchemaProps: spec.SchemaProps{ - Description: "Code is the HTTP status code returned by the server.", - Type: []string{"integer"}, - Format: "int32", - }, - }, }, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1alpha1.Policy"}, } } -func schema_pkg_apis_clientauthentication_v1beta1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1alpha1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to.\n\nTo ensure that this struct contains everything someone would need to communicate with a kubernetes cluster (just like they would via a kubeconfig), the fields should shadow \"k8s.io/client-go/tools/clientcmd/api/v1\".Cluster, with the exception of CertificateAuthority, since CA data will always be passed to the plugin as bytes.", + Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "server": { + "level": { SchemaProps: spec.SchemaProps{ - Description: "Server is the address of the kubernetes cluster (https://hostname:port).", + Description: "The Level that requests matching this rule are recorded at.", Default: "", Type: []string{"string"}, Format: "", }, }, - "tls-server-name": { + "users": { SchemaProps: spec.SchemaProps{ - Description: "TLSServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", - Type: []string{"string"}, - Format: "", + Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "insecure-skip-tls-verify": { + "userGroups": { SchemaProps: spec.SchemaProps{ - Description: "InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.", - Type: []string{"boolean"}, - Format: "", + Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "certificate-authority-data": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "The verbs that match this rule. An empty list implies every verb.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, }, }, + }, + "resources": { SchemaProps: spec.SchemaProps{ - Description: "CAData contains PEM-encoded certificate authority certificates. If empty, system roots should be used.", - Type: []string{"string"}, - Format: "byte", + Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources"), + }, + }, + }, }, }, - "proxy-url": { + "namespaces": { SchemaProps: spec.SchemaProps{ - Description: "ProxyURL is the URL to the proxy to be used for all requests to this cluster.", - Type: []string{"string"}, - Format: "", + Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "config": { + "nonResourceURLs": { SchemaProps: spec.SchemaProps{ - Description: "Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.\n\nThis data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:\n\nclusters: - name: my-cluster\n cluster:\n ...\n extensions:\n - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config\n extension:\n audience: 06e3fbd18de8 # arbitrary config\n\nIn some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need to be stored directly in the kubeconfig.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "omitStages": { + SchemaProps: spec.SchemaProps{ + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "omitManagedFields": { + SchemaProps: spec.SchemaProps{ + Description: "OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. - a value of 'true' will drop the managed fields from the API audit log - a value of 'false' indicates that the managed fileds should be included\n in the API audit log\nNote that the value, if specified, in this rule will override the global default If a value is not specified then the global default specified in Policy.OmitManagedFields will stand.", + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"server"}, + Required: []string{"level"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/apiserver/pkg/apis/audit/v1alpha1.GroupResources"}, } } -func schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", + Description: "DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for more information. Event captures all the information that can be included in an API audit log.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -45713,104 +47177,164 @@ func schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref common.Refe Format: "", }, }, - "spec": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Spec holds information passed to the plugin by the transport.", + Description: "ObjectMeta is included for interoperability with API infrastructure. DEPRECATED: Use StageTimestamp which supports micro second instead of ObjectMeta.CreateTimestamp and the rest of the object is not used", Default: map[string]interface{}{}, - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "status": { + "level": { SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"), + Description: "AuditLevel at which event was generated", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"}, - } -} - -func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExecCredentialSpec holds request and runtime specific information provided by the transport.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "cluster": { + "timestamp": { SchemaProps: spec.SchemaProps{ - Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., ExecConfig.ProvideClusterInfo).", - Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster"), + Description: "Time the request reached the apiserver. DEPRECATED: Use RequestReceivedTimestamp which supports micro second instead.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "interactive": { + "auditID": { SchemaProps: spec.SchemaProps{ - Description: "Interactive declares whether stdin has been passed to this exec plugin.", - Default: false, - Type: []string{"boolean"}, + Description: "Unique audit ID, generated for each request.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - }, - Required: []string{"interactive"}, - }, - }, - Dependencies: []string{ - "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster"}, - } -} - -func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "expirationTimestamp": { + "stage": { SchemaProps: spec.SchemaProps{ - Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "Stage of the request handling when this event instance was generated.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "token": { + "requestURI": { SchemaProps: spec.SchemaProps{ - Description: "Token is a bearer token used by the client for request authentication.", + Description: "RequestURI is the request URI as sent by the client to a server.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "clientCertificateData": { + "verb": { SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded client TLS certificates (including intermediates, if any).", + Description: "Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "clientKeyData": { + "user": { SchemaProps: spec.SchemaProps{ - Description: "PEM-encoded private key for the above certificate.", + Description: "Authenticated user information.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "impersonatedUser": { + SchemaProps: spec.SchemaProps{ + Description: "Impersonated user information.", + Ref: ref("k8s.io/api/authentication/v1.UserInfo"), + }, + }, + "sourceIPs": { + SchemaProps: spec.SchemaProps{ + Description: "Source IPs, from where the request originated and intermediate proxies.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "userAgent": { + SchemaProps: spec.SchemaProps{ + Description: "UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.", Type: []string{"string"}, Format: "", }, }, + "objectRef": { + SchemaProps: spec.SchemaProps{ + Description: "Object reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.", + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference"), + }, + }, + "responseStatus": { + SchemaProps: spec.SchemaProps{ + Description: "The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + "requestObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "responseObject": { + SchemaProps: spec.SchemaProps{ + Description: "API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Unknown"), + }, + }, + "requestReceivedTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached the apiserver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "stageTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Time the request reached current audit stage.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, }, + Required: []string{"level", "timestamp", "auditID", "stage", "requestURI", "verb", "user"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/api/authentication/v1.UserInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Status", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.Unknown", "k8s.io/apiserver/pkg/apis/audit/v1beta1.ObjectReference"}, } } -func schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "EventList is a list of audit Events.", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ @@ -45826,264 +47350,346 @@ func schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfigura Format: "", }, }, - "Generic": { - SchemaProps: spec.SchemaProps{ - Description: "Generic holds configuration for a generic controller-manager", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), - }, - }, - "KubeCloudShared": { - SchemaProps: spec.SchemaProps{ - Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration"), - }, - }, - "ServiceController": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "NodeStatusUpdateFrequency": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.Event"), + }, + }, + }, }, }, }, - Required: []string{"Generic", "KubeCloudShared", "ServiceController", "NodeStatusUpdateFrequency"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration", "k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.Event"}, } } -func schema_k8sio_cloud_provider_config_v1alpha1_CloudProviderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CloudProviderConfiguration contains basically elements about cloud provider.", + Description: "GroupResources represents resource kinds in an API group.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "Name": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "Name is the provider for cloud services.", - Default: "", + Description: "Group is the name of the API group that contains the resources. The empty string represents the core API group.", Type: []string{"string"}, Format: "", }, }, - "CloudConfigFile": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "cloudConfigFile is the path to the cloud provider configuration file.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. '*' matches all resources and their subresources. 'pods/*' matches all subresources of pods. '*/scale' matches all scale subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nAn empty list implies all resources and subresources in this API groups apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, - Required: []string{"Name", "CloudConfigFile"}, }, }, } } -func schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeCloudSharedConfiguration contains elements shared by both kube-controller manager and cloud-controller manager, but not genericconfig.", + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "CloudProvider": { + "resource": { SchemaProps: spec.SchemaProps{ - Description: "CloudProviderConfiguration holds configuration for CloudProvider related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration"), + Type: []string{"string"}, + Format: "", }, }, - "ExternalCloudVolumePlugin": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "externalCloudVolumePlugin specifies the plugin to use when cloudProvider is \"external\". It is currently used by the in repo cloud providers to handle node and volume control in the KCM.", - Default: "", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "UseServiceAccountCredentials": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "useServiceAccountCredentials indicates whether controllers should be run with individual service account credentials.", - Default: false, - Type: []string{"boolean"}, + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the name of the API group that contains the referred object. The empty string represents the core API group.", + Type: []string{"string"}, Format: "", }, }, - "AllowUntaggedCloud": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "run with untagged cloud instances", - Default: false, - Type: []string{"boolean"}, + Description: "APIVersion is the version of the API group that contains the referred object.", + Type: []string{"string"}, Format: "", }, }, - "RouteReconciliationPeriod": { + "resourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "routeReconciliationPeriod is the period for reconciling routes created for Nodes by cloud provider..", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Type: []string{"string"}, + Format: "", }, }, - "NodeMonitorPeriod": { + "subresource": { SchemaProps: spec.SchemaProps{ - Description: "nodeMonitorPeriod is the period for syncing NodeStatus in NodeController.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Type: []string{"string"}, + Format: "", }, }, - "ClusterName": { + }, + }, + }, + } +} + +func schema_pkg_apis_audit_v1beta1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for more information. Policy defines the configuration of audit logging, and the rules for how different request categories are logged.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "clusterName is the instance prefix for the cluster.", - Default: "", + 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: "", }, }, - "ClusterCIDR": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "clusterCIDR is CIDR Range for Pods in cluster.", - Default: "", + 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: "", }, }, - "AllocateNodeCIDRs": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "AllocateNodeCIDRs enables CIDRs for Pods to be allocated and, if ConfigureCloudRoutes is true, to be set on the cloud provider.", - Default: false, - Type: []string{"boolean"}, - Format: "", + Description: "ObjectMeta is included for interoperability with API infrastructure.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "CIDRAllocatorType": { + "rules": { SchemaProps: spec.SchemaProps{ - Description: "CIDRAllocatorType determines what kind of pod CIDR allocator will be used.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. PolicyRules are strictly ordered.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule"), + }, + }, + }, }, }, - "ConfigureCloudRoutes": { + "omitStages": { SchemaProps: spec.SchemaProps{ - Description: "configureCloudRoutes enables CIDRs allocated with allocateNodeCIDRs to be configured on the cloud provider.", - Type: []string{"boolean"}, - Format: "", + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified per rule in which case the union of both are omitted.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "NodeSyncPeriod": { + "omitManagedFields": { SchemaProps: spec.SchemaProps{ - Description: "nodeSyncPeriod is the period for syncing nodes from cloudprovider. Longer periods will result in fewer calls to cloud provider, but may delay addition of new nodes to cluster.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. This is used as a global default - a value of 'true' will omit the managed fileds, otherwise the managed fields will be included in the API audit log. Note that this can also be specified per rule in which case the value specified in a rule will override the global default.", + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"CloudProvider", "ExternalCloudVolumePlugin", "UseServiceAccountCredentials", "AllowUntaggedCloud", "RouteReconciliationPeriod", "NodeMonitorPeriod", "ClusterName", "ClusterCIDR", "AllocateNodeCIDRs", "CIDRAllocatorType", "ConfigureCloudRoutes", "NodeSyncPeriod"}, + Required: []string{"rules"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.PolicyRule"}, } } -func schema_k8sio_controller_manager_config_v1alpha1_ControllerLeaderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ControllerLeaderConfiguration provides the configuration for a migrating leader lock.", + Description: "PolicyList is a list of audit Policies.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the controller being migrated E.g. service-controller, route-controller, cloud-node-controller, etc", - Default: "", + 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: "", }, }, - "component": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Component is the name of the component in which the controller should be running. E.g. kube-controller-manager, cloud-controller-manager, etc Or '*' meaning the controller can be run under any component that participates in the migration", - Default: "", + 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{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy"), + }, + }, + }, + }, + }, }, - Required: []string{"name", "component"}, + Required: []string{"items"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apiserver/pkg/apis/audit/v1beta1.Policy"}, } } -func schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_audit_v1beta1_PolicyRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GenericControllerManagerConfiguration holds configuration for a generic controller-manager.", + Description: "PolicyRule maps requests based off metadata to an audit Level. Requests must match the rules of every field (an intersection of rules).", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "Port": { - SchemaProps: spec.SchemaProps{ - Description: "port is the port that the controller-manager's http service runs on.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "Address": { + "level": { SchemaProps: spec.SchemaProps{ - Description: "address is the IP address to serve on (set to 0.0.0.0 for all interfaces).", + Description: "The Level that requests matching this rule are recorded at.", Default: "", Type: []string{"string"}, Format: "", }, }, - "MinResyncPeriod": { + "users": { SchemaProps: spec.SchemaProps{ - Description: "minResyncPeriod is the resync period in reflectors; will be random between minResyncPeriod and 2*minResyncPeriod.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "The users (by authenticated user name) this rule applies to. An empty list implies every user.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "ClientConnection": { + "userGroups": { SchemaProps: spec.SchemaProps{ - Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + Description: "The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. An empty list implies every user group.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "ControllerStartInterval": { + "verbs": { SchemaProps: spec.SchemaProps{ - Description: "How long to wait between starting controller managers", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "The verbs that match this rule. An empty list implies every verb.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "LeaderElection": { + "resources": { SchemaProps: spec.SchemaProps{ - Description: "leaderElection defines the configuration of leader election client.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"), + Description: "Resources that this rule matches. An empty list implies all kinds in all API groups.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources"), + }, + }, + }, }, }, - "Controllers": { + "namespaces": { SchemaProps: spec.SchemaProps{ - Description: "Controllers is the list of controllers to enable or disable '*' means \"all enabled by default controllers\" 'foo' means \"enable 'foo'\" '-foo' means \"disable 'foo'\" first item for a particular name wins", + Description: "Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -46096,197 +47702,235 @@ func schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerCon }, }, }, - "Debugging": { + "nonResourceURLs": { SchemaProps: spec.SchemaProps{ - Description: "DebuggingConfiguration holds configuration for Debugging related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/config/v1alpha1.DebuggingConfiguration"), + Description: "NonResourceURLs is a set of URL paths that should be audited. *s are allowed, but only as the full, final step in the path. Examples:\n \"/metrics\" - Log requests for apiserver metrics\n \"/healthz*\" - Log all health checks", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "LeaderMigrationEnabled": { + "omitStages": { SchemaProps: spec.SchemaProps{ - Description: "LeaderMigrationEnabled indicates whether Leader Migration should be enabled for the controller manager.", - Default: false, - Type: []string{"boolean"}, - Format: "", + Description: "OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. An empty list means no restrictions will apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "LeaderMigration": { + "omitManagedFields": { SchemaProps: spec.SchemaProps{ - Description: "LeaderMigration holds the configuration for Leader Migration.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration"), + Description: "OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. - a value of 'true' will drop the managed fields from the API audit log - a value of 'false' indicates that the managed fileds should be included\n in the API audit log\nNote that the value, if specified, in this rule will override the global default If a value is not specified then the global default specified in Policy.OmitManagedFields will stand.", + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"Port", "Address", "MinResyncPeriod", "ClientConnection", "ControllerStartInterval", "LeaderElection", "Controllers", "Debugging", "LeaderMigrationEnabled", "LeaderMigration"}, + Required: []string{"level"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.DebuggingConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration"}, + "k8s.io/apiserver/pkg/apis/audit/v1beta1.GroupResources"}, } } -func schema_k8sio_controller_manager_config_v1alpha1_LeaderMigrationConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LeaderMigrationConfiguration provides versioned configuration for all migrating leader locks.", + Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to.\n\nTo ensure that this struct contains everything someone would need to communicate with a kubernetes cluster (just like they would via a kubeconfig), the fields should shadow \"k8s.io/client-go/tools/clientcmd/api/v1\".Cluster, with the exception of CertificateAuthority, since CA data will always be passed to the plugin as bytes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "server": { 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", + Description: "Server is the address of the kubernetes cluster (https://hostname:port).", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "tls-server-name": { 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", + Description: "TLSServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", Type: []string{"string"}, Format: "", }, }, - "leaderName": { + "insecure-skip-tls-verify": { SchemaProps: spec.SchemaProps{ - Description: "LeaderName is the name of the leader election resource that protects the migration E.g. 1-20-KCM-to-1-21-CCM", - Default: "", - Type: []string{"string"}, + Description: "InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.", + Type: []string{"boolean"}, Format: "", }, }, - "resourceLock": { + "certificate-authority-data": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "ResourceLock indicates the resource object type that will be used to lock Should be \"leases\" or \"endpoints\"", - Default: "", + Description: "CAData contains PEM-encoded certificate authority certificates. If empty, system roots should be used.", + Type: []string{"string"}, + Format: "byte", + }, + }, + "proxy-url": { + SchemaProps: spec.SchemaProps{ + Description: "ProxyURL is the URL to the proxy to be used for all requests to this cluster.", Type: []string{"string"}, Format: "", }, }, - "controllerLeaders": { + "config": { SchemaProps: spec.SchemaProps{ - Description: "ControllerLeaders contains a list of migrating leader lock configurations", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration"), - }, - }, - }, + Description: "Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.\n\nThis data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:\n\nclusters: - name: my-cluster\n cluster:\n ...\n extensions:\n - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config\n extension:\n audience: 06e3fbd18de8 # arbitrary config\n\nIn some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need to be stored directly in the kubeconfig.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, - Required: []string{"leaderName", "resourceLock", "controllerLeaders"}, + Required: []string{"server"}, }, }, Dependencies: []string{ - "k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration"}, + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_k8sio_controller_manager_config_v1beta1_ControllerLeaderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ControllerLeaderConfiguration provides the configuration for a migrating leader lock.", + Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the controller being migrated E.g. service-controller, route-controller, cloud-node-controller, etc", - Default: "", + 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: "", }, }, - "component": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Component is the name of the component in which the controller should be running. E.g. kube-controller-manager, cloud-controller-manager, etc Or '*' meaning the controller can be run under any component that participates in the migration", - Default: "", + 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: "", }, }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information passed to the plugin by the transport.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus"), + }, + }, }, - Required: []string{"name", "component"}, }, }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1.ExecCredentialStatus"}, } } -func schema_k8sio_controller_manager_config_v1beta1_LeaderMigrationConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LeaderMigrationConfiguration provides versioned configuration for all migrating leader locks.", + Description: "ExecCredentialSpec holds request and runtime specific information provided by the transport.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "cluster": { 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: "", + Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., ExecConfig.ProvideClusterInfo).", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster"), }, }, - "apiVersion": { + "interactive": { 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"}, + Description: "Interactive declares whether stdin has been passed to this exec plugin.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "leaderName": { + }, + Required: []string{"interactive"}, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1.Cluster"}, + } +} + +func schema_pkg_apis_clientauthentication_v1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "expirationTimestamp": { SchemaProps: spec.SchemaProps{ - Description: "LeaderName is the name of the leader election resource that protects the migration E.g. 1-20-KCM-to-1-21-CCM", - Default: "", + Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "token": { + SchemaProps: spec.SchemaProps{ + Description: "Token is a bearer token used by the client for request authentication.", Type: []string{"string"}, Format: "", }, }, - "resourceLock": { + "clientCertificateData": { SchemaProps: spec.SchemaProps{ - Description: "ResourceLock indicates the resource object type that will be used to lock Should be \"leases\" or \"endpoints\"", - Default: "", + Description: "PEM-encoded client TLS certificates (including intermediates, if any).", Type: []string{"string"}, Format: "", }, }, - "controllerLeaders": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, + "clientKeyData": { SchemaProps: spec.SchemaProps{ - Description: "ControllerLeaders contains a list of migrating leader lock configurations", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration"), - }, - }, - }, + Description: "PEM-encoded private key for the above certificate.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"leaderName", "resourceLock", "controllerLeaders"}, }, }, Dependencies: []string{ - "k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_apiregistration_v1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -46303,81 +47947,90 @@ func schema_pkg_apis_apiregistration_v1_APIService(ref common.ReferenceCallback) Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), - }, - }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Spec contains information for locating and communicating with a server", + Description: "Spec holds information passed to the plugin by the transport. This contains request and runtime specific information, such as if the session is interactive.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec"), + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "Status contains derived information about an API server", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"), + Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"}, + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.ExecCredentialStatus"}, } } -func schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceCondition describes the state of an APIService at a particular point", + Description: "ExecCredentialSpec holds request and runtime specific information provided by the transport.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "response": { SchemaProps: spec.SchemaProps{ - Description: "Type is the type of the condition.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Response is populated when the transport encounters HTTP status codes, such as 401, suggesting previous credentials were invalid.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response"), }, }, - "status": { + "interactive": { SchemaProps: spec.SchemaProps{ - Description: "Status is the status of the condition. Can be True, False, Unknown.", - Default: "", - Type: []string{"string"}, + Description: "Interactive is true when the transport detects the command is being called from an interactive prompt.", + Type: []string{"boolean"}, Format: "", }, }, - "lastTransitionTime": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1.Response"}, + } +} + +func schema_pkg_apis_clientauthentication_v1alpha1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "expirationTimestamp": { SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Default: map[string]interface{}{}, + Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "reason": { + "token": { SchemaProps: spec.SchemaProps{ - Description: "Unique, one-word, CamelCase reason for the condition's last transition.", + Description: "Token is a bearer token used by the client for request authentication.", Type: []string{"string"}, Format: "", }, }, - "message": { + "clientCertificateData": { SchemaProps: spec.SchemaProps{ - Description: "Human-readable message indicating details about last transition.", + Description: "PEM-encoded client TLS certificates (including intermediates, if any).", + Type: []string{"string"}, + Format: "", + }, + }, + "clientKeyData": { + SchemaProps: spec.SchemaProps{ + Description: "PEM-encoded private key for the above certificate.", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"type", "status"}, }, }, Dependencies: []string{ @@ -46385,2016 +48038,2207 @@ func schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref common.Reference } } -func schema_pkg_apis_apiregistration_v1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1alpha1_Response(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceList is a list of APIService objects.", + Description: "Response defines metadata about a failed request, including HTTP status code and response headers.", 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 list metadata 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": { + "header": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of APIService", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Header holds HTTP headers returned by the server.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"), + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, }, }, + "code": { + SchemaProps: spec.SchemaProps{ + Description: "Code is the HTTP status code returned by the server.", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, - Required: []string{"items"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"}, } } -func schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1beta1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", + Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to.\n\nTo ensure that this struct contains everything someone would need to communicate with a kubernetes cluster (just like they would via a kubeconfig), the fields should shadow \"k8s.io/client-go/tools/clientcmd/api/v1\".Cluster, with the exception of CertificateAuthority, since CA data will always be passed to the plugin as bytes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "service": { - SchemaProps: spec.SchemaProps{ - Description: "Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"), - }, - }, - "group": { + "server": { SchemaProps: spec.SchemaProps{ - Description: "Group is the API group name this server hosts", + Description: "Server is the address of the kubernetes cluster (https://hostname:port).", + Default: "", Type: []string{"string"}, Format: "", }, }, - "version": { + "tls-server-name": { SchemaProps: spec.SchemaProps{ - Description: "Version is the API version this server hosts. For example, \"v1\"", + Description: "TLSServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", Type: []string{"string"}, Format: "", }, }, - "insecureSkipTLSVerify": { + "insecure-skip-tls-verify": { SchemaProps: spec.SchemaProps{ - Description: "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", + Description: "InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.", Type: []string{"boolean"}, Format: "", }, }, - "caBundle": { + "certificate-authority-data": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", + Description: "CAData contains PEM-encoded certificate authority certificates. If empty, system roots should be used.", Type: []string{"string"}, Format: "byte", }, }, - "groupPriorityMinimum": { + "proxy-url": { SchemaProps: spec.SchemaProps{ - Description: "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "ProxyURL is the URL to the proxy to be used for all requests to this cluster.", + Type: []string{"string"}, + Format: "", }, }, - "versionPriority": { + "config": { SchemaProps: spec.SchemaProps{ - Description: "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.\n\nThis data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:\n\nclusters: - name: my-cluster\n cluster:\n ...\n extensions:\n - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config\n extension:\n audience: 06e3fbd18de8 # arbitrary config\n\nIn some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need to be stored directly in the kubeconfig.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, - Required: []string{"groupPriorityMinimum", "versionPriority"}, + Required: []string{"server"}, }, }, Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"}, + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1beta1_ExecCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceStatus contains derived information about an API server", + Description: "ExecCredential is used by exec-based plugins to communicate credentials to HTTP transports.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "type", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, + "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: "Current service state of apiService.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"), - }, - }, - }, + 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: "", + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec holds information passed to the plugin by the transport.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is filled in by the plugin and holds the credentials that the transport should use to contact the API.", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"}, + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialSpec", "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.ExecCredentialStatus"}, } } -func schema_pkg_apis_apiregistration_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceReference holds a reference to Service.legacy.k8s.io", + Description: "ExecCredentialSpec holds request and runtime specific information provided by the transport.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namespace": { + "cluster": { SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace of the service", - Type: []string{"string"}, - Format: "", + Description: "Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., ExecConfig.ProvideClusterInfo).", + Ref: ref("k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster"), }, }, - "name": { + "interactive": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the service", - Type: []string{"string"}, + Description: "Interactive declares whether stdin has been passed to this exec plugin.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", - Type: []string{"integer"}, - Format: "int32", - }, - }, }, + Required: []string{"interactive"}, }, }, + Dependencies: []string{ + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1.Cluster"}, } } -func schema_pkg_apis_apiregistration_v1beta1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_clientauthentication_v1beta1_ExecCredentialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + Description: "ExecCredentialStatus holds credentials for the transport to use.\n\nToken and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin itself should at least be protected via file permissions.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "expirationTimestamp": { 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: "", + Description: "ExpirationTimestamp indicates a time when the provided credentials expire.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "apiVersion": { + "token": { 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", + Description: "Token is a bearer token used by the client for request authentication.", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. 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"), - }, - }, - "spec": { + "clientCertificateData": { SchemaProps: spec.SchemaProps{ - Description: "Spec contains information for locating and communicating with a server", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec"), + Description: "PEM-encoded client TLS certificates (including intermediates, if any).", + Type: []string{"string"}, + Format: "", }, }, - "status": { + "clientKeyData": { SchemaProps: spec.SchemaProps{ - Description: "Status contains derived information about an API server", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"), + Description: "PEM-encoded private key for the above certificate.", + Type: []string{"string"}, + Format: "", }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_cloud_provider_config_v1alpha1_CloudControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceCondition describes the state of an APIService at a particular point", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Type is the type of the condition.", - Default: "", + 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: "", }, }, - "status": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Status is the status of the condition. Can be True, False, Unknown.", - Default: "", + 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: "", }, }, - "lastTransitionTime": { + "Generic": { SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", + Description: "Generic holds configuration for a generic controller-manager", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref("k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), }, }, - "reason": { + "KubeCloudShared": { SchemaProps: spec.SchemaProps{ - Description: "Unique, one-word, CamelCase reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", + Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration"), }, }, - "message": { + "ServiceController": { SchemaProps: spec.SchemaProps{ - Description: "Human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", + Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration"), + }, + }, + "NodeStatusUpdateFrequency": { + SchemaProps: spec.SchemaProps{ + Description: "NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"type", "status"}, + Required: []string{"Generic", "KubeCloudShared", "ServiceController", "NodeStatusUpdateFrequency"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration", "k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"}, } } -func schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_cloud_provider_config_v1alpha1_CloudProviderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceList is a list of APIService objects.", + Description: "CloudProviderConfiguration contains basically elements about cloud provider.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "Name": { 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", + Description: "Name is the provider for cloud services.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "CloudConfigFile": { 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", + Description: "cloudConfigFile is the path to the cloud provider configuration file.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata 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 APIService", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"), - }, - }, - }, - }, - }, }, - Required: []string{"items"}, + Required: []string{"Name", "CloudConfigFile"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"}, } } -func schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_cloud_provider_config_v1alpha1_KubeCloudSharedConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", + Description: "KubeCloudSharedConfiguration contains elements shared by both kube-controller manager and cloud-controller manager, but not genericconfig.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "service": { + "CloudProvider": { SchemaProps: spec.SchemaProps{ - Description: "Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"), + Description: "CloudProviderConfiguration holds configuration for CloudProvider related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration"), }, }, - "group": { + "ExternalCloudVolumePlugin": { SchemaProps: spec.SchemaProps{ - Description: "Group is the API group name this server hosts", + Description: "externalCloudVolumePlugin specifies the plugin to use when cloudProvider is \"external\". It is currently used by the in repo cloud providers to handle node and volume control in the KCM.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "version": { + "UseServiceAccountCredentials": { SchemaProps: spec.SchemaProps{ - Description: "Version is the API version this server hosts. For example, \"v1\"", - Type: []string{"string"}, + Description: "useServiceAccountCredentials indicates whether controllers should be run with individual service account credentials.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "insecureSkipTLSVerify": { + "AllowUntaggedCloud": { SchemaProps: spec.SchemaProps{ - Description: "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", + Description: "run with untagged cloud instances", + Default: false, Type: []string{"boolean"}, Format: "", }, }, - "caBundle": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", - Type: []string{"string"}, - Format: "byte", - }, - }, - "groupPriorityMinimum": { + "RouteReconciliationPeriod": { SchemaProps: spec.SchemaProps{ - Description: "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", + Description: "routeReconciliationPeriod is the period for reconciling routes created for Nodes by cloud provider..", Default: 0, - Type: []string{"integer"}, - Format: "int32", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "versionPriority": { + "NodeMonitorPeriod": { SchemaProps: spec.SchemaProps{ - Description: "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Description: "nodeMonitorPeriod is the period for syncing NodeStatus in NodeController.", Default: 0, - Type: []string{"integer"}, - Format: "int32", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - }, - Required: []string{"groupPriorityMinimum", "versionPriority"}, - }, - }, - Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"}, - } -} - -func schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIServiceStatus contains derived information about an API server", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "type", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, + "ClusterName": { SchemaProps: spec.SchemaProps{ - Description: "Current service state of apiService.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"), - }, - }, - }, + Description: "clusterName is the instance prefix for the cluster.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"}, - } -} - -func schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceReference holds a reference to Service.legacy.k8s.io", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "namespace": { + "ClusterCIDR": { SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace of the service", + Description: "clusterCIDR is CIDR Range for Pods in cluster.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "name": { + "AllocateNodeCIDRs": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the service", - Type: []string{"string"}, + Description: "AllocateNodeCIDRs enables CIDRs for Pods to be allocated and, if ConfigureCloudRoutes is true, to be set on the cloud provider.", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, - "port": { + "CIDRAllocatorType": { SchemaProps: spec.SchemaProps{ - Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", - Type: []string{"integer"}, - Format: "int32", + Description: "CIDRAllocatorType determines what kind of pod CIDR allocator will be used.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - } -} - -func schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AttachDetachControllerConfiguration contains elements describing AttachDetachController.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "DisableAttachDetachReconcilerSync": { + "ConfigureCloudRoutes": { SchemaProps: spec.SchemaProps{ - Description: "Reconciler runs a periodic loop to reconcile the desired state of the with the actual state of the world by triggering attach detach operations. This flag enables or disables reconcile. Is false by default, and thus enabled.", - Default: false, + Description: "configureCloudRoutes enables CIDRs allocated with allocateNodeCIDRs to be configured on the cloud provider.", Type: []string{"boolean"}, Format: "", }, }, - "ReconcilerSyncLoopPeriod": { + "NodeSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop wait between successive executions. Is set to 5 sec by default.", - Default: map[string]interface{}{}, + Description: "nodeSyncPeriod is the period for syncing nodes from cloudprovider. Longer periods will result in fewer calls to cloud provider, but may delay addition of new nodes to cluster.", + Default: 0, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"DisableAttachDetachReconcilerSync", "ReconcilerSyncLoopPeriod"}, + Required: []string{"CloudProvider", "ExternalCloudVolumePlugin", "UseServiceAccountCredentials", "AllowUntaggedCloud", "RouteReconciliationPeriod", "NodeMonitorPeriod", "ClusterName", "ClusterCIDR", "AllocateNodeCIDRs", "CIDRAllocatorType", "ConfigureCloudRoutes", "NodeSyncPeriod"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/cloud-provider/config/v1alpha1.CloudProviderConfiguration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_controller_manager_config_v1alpha1_ControllerLeaderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSRSigningConfiguration holds information about a particular CSR signer", + Description: "ControllerLeaderConfiguration provides the configuration for a migrating leader lock.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "CertFile": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "certFile is the filename containing a PEM-encoded X509 CA certificate used to issue certificates", + Description: "Name is the name of the controller being migrated E.g. service-controller, route-controller, cloud-node-controller, etc", Default: "", Type: []string{"string"}, Format: "", }, }, - "KeyFile": { + "component": { SchemaProps: spec.SchemaProps{ - Description: "keyFile is the filename containing a PEM-encoded RSA or ECDSA private key used to issue certificates", + Description: "Component is the name of the component in which the controller should be running. E.g. kube-controller-manager, cloud-controller-manager, etc Or '*' meaning the controller can be run under any component that participates in the migration", Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"CertFile", "KeyFile"}, + Required: []string{"name", "component"}, }, }, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_controller_manager_config_v1alpha1_GenericControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CSRSigningControllerConfiguration contains elements describing CSRSigningController.", + Description: "GenericControllerManagerConfiguration holds configuration for a generic controller-manager.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ClusterSigningCertFile": { + "Port": { SchemaProps: spec.SchemaProps{ - Description: "clusterSigningCertFile is the filename containing a PEM-encoded X509 CA certificate used to issue cluster-scoped certificates", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "port is the port that the controller-manager's http service runs on.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "ClusterSigningKeyFile": { + "Address": { SchemaProps: spec.SchemaProps{ - Description: "clusterSigningCertFile is the filename containing a PEM-encoded RSA or ECDSA private key used to issue cluster-scoped certificates", + Description: "address is the IP address to serve on (set to 0.0.0.0 for all interfaces).", Default: "", Type: []string{"string"}, Format: "", }, }, - "KubeletServingSignerConfiguration": { + "MinResyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "kubeletServingSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kubelet-serving signer", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + Description: "minResyncPeriod is the resync period in reflectors; will be random between minResyncPeriod and 2*minResyncPeriod.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "KubeletClientSignerConfiguration": { + "ClientConnection": { SchemaProps: spec.SchemaProps{ - Description: "kubeletClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client-kubelet", + Description: "ClientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), }, }, - "KubeAPIServerClientSignerConfiguration": { + "ControllerStartInterval": { SchemaProps: spec.SchemaProps{ - Description: "kubeAPIServerClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client", + Description: "How long to wait between starting controller managers", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "LeaderElection": { + SchemaProps: spec.SchemaProps{ + Description: "leaderElection defines the configuration of leader election client.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + Ref: ref("k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration"), }, }, - "LegacyUnknownSignerConfiguration": { + "Controllers": { SchemaProps: spec.SchemaProps{ - Description: "legacyUnknownSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/legacy-unknown", + Description: "Controllers is the list of controllers to enable or disable '*' means \"all enabled by default controllers\" 'foo' means \"enable 'foo'\" '-foo' means \"disable 'foo'\" first item for a particular name wins", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "Debugging": { + SchemaProps: spec.SchemaProps{ + Description: "DebuggingConfiguration holds configuration for Debugging related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), + Ref: ref("k8s.io/component-base/config/v1alpha1.DebuggingConfiguration"), + }, + }, + "LeaderMigrationEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "LeaderMigrationEnabled indicates whether Leader Migration should be enabled for the controller manager.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "ClusterSigningDuration": { + "LeaderMigration": { SchemaProps: spec.SchemaProps{ - Description: "clusterSigningDuration is the max length of duration signed certificates will be given. Individual CSRs may request shorter certs by setting spec.expirationSeconds.", + Description: "LeaderMigration holds the configuration for Leader Migration.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref("k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration"), }, }, }, - Required: []string{"ClusterSigningCertFile", "ClusterSigningKeyFile", "KubeletServingSignerConfiguration", "KubeletClientSignerConfiguration", "KubeAPIServerClientSignerConfiguration", "LegacyUnknownSignerConfiguration", "ClusterSigningDuration"}, + Required: []string{"Port", "Address", "MinResyncPeriod", "ClientConnection", "ControllerStartInterval", "LeaderElection", "Controllers", "Debugging", "LeaderMigrationEnabled", "LeaderMigration"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.DebuggingConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/controller-manager/config/v1alpha1.LeaderMigrationConfiguration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_CronJobControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_controller_manager_config_v1alpha1_LeaderMigrationConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CronJobControllerConfiguration contains elements describing CrongJob2Controller.", + Description: "LeaderMigrationConfiguration provides versioned configuration for all migrating leader locks.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentCronJobSyncs": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "concurrentCronJobSyncs is the number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - }, - Required: []string{"ConcurrentCronJobSyncs"}, - }, - }, - } -} - -func schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetControllerConfiguration contains elements describing DaemonSetController.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ConcurrentDaemonSetSyncs": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "concurrentDaemonSetSyncs is the number of daemonset objects that are allowed to sync concurrently. Larger number = more responsive daemonset, but more CPU (and network) load.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + 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: "", + }, + }, + "leaderName": { + SchemaProps: spec.SchemaProps{ + Description: "LeaderName is the name of the leader election resource that protects the migration E.g. 1-20-KCM-to-1-21-CCM", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceLock": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceLock indicates the resource object type that will be used to lock Should be \"leases\" or \"endpoints\"", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "controllerLeaders": { + SchemaProps: spec.SchemaProps{ + Description: "ControllerLeaders contains a list of migrating leader lock configurations", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration"), + }, + }, + }, }, }, }, - Required: []string{"ConcurrentDaemonSetSyncs"}, + Required: []string{"leaderName", "resourceLock", "controllerLeaders"}, }, }, + Dependencies: []string{ + "k8s.io/controller-manager/config/v1alpha1.ControllerLeaderConfiguration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_controller_manager_config_v1beta1_ControllerLeaderConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DeploymentControllerConfiguration contains elements describing DeploymentController.", + Description: "ControllerLeaderConfiguration provides the configuration for a migrating leader lock.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentDeploymentSyncs": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "concurrentDeploymentSyncs is the number of deployment objects that are allowed to sync concurrently. Larger number = more responsive deployments, but more CPU (and network) load.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Name is the name of the controller being migrated E.g. service-controller, route-controller, cloud-node-controller, etc", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "DeploymentControllerSyncPeriod": { + "component": { SchemaProps: spec.SchemaProps{ - Description: "deploymentControllerSyncPeriod is the period for syncing the deployments.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "Component is the name of the component in which the controller should be running. E.g. kube-controller-manager, cloud-controller-manager, etc Or '*' meaning the controller can be run under any component that participates in the migration", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"ConcurrentDeploymentSyncs", "DeploymentControllerSyncPeriod"}, + Required: []string{"name", "component"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_controller_manager_config_v1beta1_LeaderMigrationConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DeprecatedControllerConfiguration contains elements be deprecated.", + Description: "LeaderMigrationConfiguration provides versioned configuration for all migrating leader locks.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "DeletingPodsQPS": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in case of node failure.", - Default: 0, - Type: []string{"number"}, - Format: "float", + 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: "", }, }, - "DeletingPodsBurst": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED: deletingPodsBurst is the number of nodes on which pods are bursty deleted in case of node failure. For more details look into RateLimiter.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - "RegisterRetryCount": { + "leaderName": { SchemaProps: spec.SchemaProps{ - Description: "registerRetryCount is the number of retries for initial node registration. Retry interval equals node-sync-period.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "LeaderName is the name of the leader election resource that protects the migration E.g. 1-20-KCM-to-1-21-CCM", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - }, - Required: []string{"DeletingPodsQPS", "DeletingPodsBurst", "RegisterRetryCount"}, - }, - }, - } -} - -func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointControllerConfiguration contains elements describing EndpointController.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ConcurrentEndpointSyncs": { + "resourceLock": { SchemaProps: spec.SchemaProps{ - Description: "concurrentEndpointSyncs is the number of endpoint syncing operations that will be done concurrently. Larger number = faster endpoint updating, but more CPU (and network) load.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "ResourceLock indicates the resource object type that will be used to lock Should be \"leases\" or \"endpoints\"", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "EndpointUpdatesBatchPeriod": { + "controllerLeaders": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "ControllerLeaders contains a list of migrating leader lock configurations", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration"), + }, + }, + }, }, }, }, - Required: []string{"ConcurrentEndpointSyncs", "EndpointUpdatesBatchPeriod"}, + Required: []string{"leaderName", "resourceLock", "controllerLeaders"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/controller-manager/config/v1beta1.ControllerLeaderConfiguration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EndpointSliceControllerConfiguration contains elements describing EndpointSliceController.", + Description: "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentServiceEndpointSyncs": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "concurrentServiceEndpointSyncs is the number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - "MaxEndpointsPerSlice": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "maxEndpointsPerSlice is the maximum number of endpoints that will be added to an EndpointSlice. More endpoints per slice will result in fewer and larger endpoint slices, but larger resources.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - "EndpointUpdatesBatchPeriod": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", + Description: "Standard object's metadata. 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.Duration"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec contains information for locating and communicating with a server", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status contains derived information about an API server", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"), }, }, }, - Required: []string{"ConcurrentServiceEndpointSyncs", "MaxEndpointsPerSlice", "EndpointUpdatesBatchPeriod"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceStatus"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroringControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "EndpointSliceMirroringControllerConfiguration contains elements describing EndpointSliceMirroringController.", + Description: "APIServiceCondition describes the state of an APIService at a particular point", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "MirroringConcurrentServiceEndpointSyncs": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "mirroringConcurrentServiceEndpointSyncs is the number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Type is the type of the condition.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "MirroringMaxEndpointsPerSubset": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "mirroringMaxEndpointsPerSubset is the maximum number of endpoints that will be mirrored to an EndpointSlice for an EndpointSubset.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Status is the status of the condition. Can be True, False, Unknown.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "MirroringEndpointUpdatesBatchPeriod": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "mirroringEndpointUpdatesBatchPeriod can be used to batch EndpointSlice updates. All updates triggered by EndpointSlice changes will be delayed by up to 'mirroringEndpointUpdatesBatchPeriod'. If other addresses in the same Endpoints resource change in that period, they will be batched to a single EndpointSlice update. Default 0 value means that each Endpoints update triggers an EndpointSlice update.", + Description: "Last time the condition transitioned from one status to another.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"MirroringConcurrentServiceEndpointSyncs", "MirroringMaxEndpointsPerSubset", "MirroringEndpointUpdatesBatchPeriod"}, + Required: []string{"type", "status"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController.", + Description: "APIServiceList is a list of APIService objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "EnableGarbageCollector": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "enables the generic garbage collector. MUST be synced with the corresponding flag of the kube-apiserver. WARNING: the generic garbage collector is an alpha feature.", - Type: []string{"boolean"}, + 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: "", }, }, - "ConcurrentGCSyncs": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "concurrentGCSyncs is the number of garbage collector workers that are allowed to sync concurrently.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + 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: "", }, }, - "GCIgnoredResources": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "gcIgnoredResources is the list of GroupResources that garbage collection should ignore.", + Description: "Standard list metadata 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 APIService", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"), + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"), }, }, }, }, }, }, - Required: []string{"EnableGarbageCollector", "ConcurrentGCSyncs", "GCIgnoredResources"}, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIService"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GroupResource describes an group resource.", + Description: "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "Group": { + "service": { SchemaProps: spec.SchemaProps{ - Description: "group is the group portion of the GroupResource.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"), }, }, - "Resource": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "resource is the resource portion of the GroupResource.", - Default: "", + Description: "Group is the API group name this server hosts", Type: []string{"string"}, Format: "", }, }, - }, - Required: []string{"Group", "Resource"}, - }, - }, - } -} - -func schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HPAControllerConfiguration contains elements describing HPAController.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "HorizontalPodAutoscalerSyncPeriod": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerSyncPeriod is the period for syncing the number of pods in horizontal pod autoscaler.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "Version is the API version this server hosts. For example, \"v1\"", + Type: []string{"string"}, + Format: "", }, }, - "HorizontalPodAutoscalerUpscaleForbiddenWindow": { + "insecureSkipTLSVerify": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerUpscaleForbiddenWindow is a period after which next upscale allowed.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", + Type: []string{"boolean"}, + Format: "", }, }, - "HorizontalPodAutoscalerDownscaleStabilizationWindow": { - SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerDowncaleStabilizationWindow is a period for which autoscaler will look backwards and not scale down below any recommendation it made during that period.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + "caBundle": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "HorizontalPodAutoscalerDownscaleForbiddenWindow": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerDownscaleForbiddenWindow is a period after which next downscale allowed.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", }, }, - "HorizontalPodAutoscalerTolerance": { + "groupPriorityMinimum": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerTolerance is the tolerance for when resource usage suggests upscaling/downscaling", + Description: "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", Default: 0, - Type: []string{"number"}, - Format: "double", - }, - }, - "HorizontalPodAutoscalerCPUInitializationPeriod": { - SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerCPUInitializationPeriod is the period after pod start when CPU samples might be skipped.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Type: []string{"integer"}, + Format: "int32", }, }, - "HorizontalPodAutoscalerInitialReadinessDelay": { + "versionPriority": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerInitialReadinessDelay is period after pod start during which readiness changes are treated as readiness being set for the first time. The only effect of this is that HPA will disregard CPU samples from unready pods that had last readiness change during that period.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"HorizontalPodAutoscalerSyncPeriod", "HorizontalPodAutoscalerUpscaleForbiddenWindow", "HorizontalPodAutoscalerDownscaleStabilizationWindow", "HorizontalPodAutoscalerDownscaleForbiddenWindow", "HorizontalPodAutoscalerTolerance", "HorizontalPodAutoscalerCPUInitializationPeriod", "HorizontalPodAutoscalerInitialReadinessDelay"}, + Required: []string{"groupPriorityMinimum", "versionPriority"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.ServiceReference"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "JobControllerConfiguration contains elements describing JobController.", + Description: "APIServiceStatus contains derived information about an API server", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentJobSyncs": { + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "concurrentJobSyncs is the number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Current service state of apiService.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"), + }, + }, + }, }, }, }, - Required: []string{"ConcurrentJobSyncs"}, }, }, + Dependencies: []string{ + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1.APIServiceCondition"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeControllerManagerConfiguration contains elements describing kube-controller manager.", + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "namespace": { 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", + Description: "Namespace is the namespace of the service", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "name": { 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", + Description: "Name is the name of the service", Type: []string{"string"}, Format: "", }, }, - "Generic": { - SchemaProps: spec.SchemaProps{ - Description: "Generic holds configuration for a generic controller-manager", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), - }, - }, - "KubeCloudShared": { - SchemaProps: spec.SchemaProps{ - Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration"), - }, - }, - "AttachDetachController": { - SchemaProps: spec.SchemaProps{ - Description: "AttachDetachControllerConfiguration holds configuration for AttachDetachController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration"), - }, - }, - "CSRSigningController": { + "port": { SchemaProps: spec.SchemaProps{ - Description: "CSRSigningControllerConfiguration holds configuration for CSRSigningController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration"), + Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + Type: []string{"integer"}, + Format: "int32", }, }, - "DaemonSetController": { + }, + }, + }, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIService(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "DaemonSetControllerConfiguration holds configuration for DaemonSetController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration"), + 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: "", }, }, - "DeploymentController": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "DeploymentControllerConfiguration holds configuration for DeploymentController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration"), + 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: "", }, }, - "StatefulSetController": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "StatefulSetControllerConfiguration holds configuration for StatefulSetController related features.", + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "DeprecatedController": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "DeprecatedControllerConfiguration holds configuration for some deprecated features.", + Description: "Spec contains information for locating and communicating with a server", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration"), + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec"), }, }, - "EndpointController": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "EndpointControllerConfiguration holds configuration for EndpointController related features.", + Description: "Status contains derived information about an API server", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration"), + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"), }, }, - "EndpointSliceController": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceSpec", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceStatus"}, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIServiceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceCondition describes the state of an APIService at a particular point", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { SchemaProps: spec.SchemaProps{ - Description: "EndpointSliceControllerConfiguration holds configuration for EndpointSliceController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration"), + Description: "Type is the type of the condition.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "EndpointSliceMirroringController": { + "status": { SchemaProps: spec.SchemaProps{ - Description: "EndpointSliceMirroringControllerConfiguration holds configuration for EndpointSliceMirroringController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration"), + Description: "Status is the status of the condition. Can be True, False, Unknown.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "GarbageCollectorController": { + "lastTransitionTime": { SchemaProps: spec.SchemaProps{ - Description: "GarbageCollectorControllerConfiguration holds configuration for GarbageCollectorController related features.", + Description: "Last time the condition transitioned from one status to another.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, - "HPAController": { + "reason": { SchemaProps: spec.SchemaProps{ - Description: "HPAControllerConfiguration holds configuration for HPAController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration"), + Description: "Unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", }, }, - "JobController": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "JobControllerConfiguration holds configuration for JobController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration"), + Description: "Human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", }, }, - "CronJobController": { + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceList is a list of APIService objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "CronJobControllerConfiguration holds configuration for CronJobController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration"), + 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: "", }, }, - "NamespaceController": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "NamespaceControllerConfiguration holds configuration for NamespaceController related features. NamespaceControllerConfiguration holds configuration for NamespaceController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration"), + 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: "", }, }, - "NodeIPAMController": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "NodeIPAMControllerConfiguration holds configuration for NodeIPAMController related features.", + Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "NodeLifecycleController": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "NodeLifecycleControllerConfiguration holds configuration for NodeLifecycleController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration"), + Description: "Items is the list of APIService", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"), + }, + }, + }, }, }, - "PersistentVolumeBinderController": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIService"}, + } +} + +func schema_pkg_apis_apiregistration_v1beta1_APIServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "service": { SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeBinderControllerConfiguration holds configuration for PersistentVolumeBinderController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration"), + Description: "Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"), }, }, - "PodGCController": { + "group": { SchemaProps: spec.SchemaProps{ - Description: "PodGCControllerConfiguration holds configuration for PodGCController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration"), + Description: "Group is the API group name this server hosts", + Type: []string{"string"}, + Format: "", }, }, - "ReplicaSetController": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetControllerConfiguration holds configuration for ReplicaSet related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration"), + Description: "Version is the API version this server hosts. For example, \"v1\"", + Type: []string{"string"}, + Format: "", }, }, - "ReplicationController": { + "insecureSkipTLSVerify": { SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerConfiguration holds configuration for ReplicationController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration"), + Description: "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", + Type: []string{"boolean"}, + Format: "", }, }, - "ResourceQuotaController": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaControllerConfiguration holds configuration for ResourceQuotaController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration"), + "caBundle": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "SAController": { SchemaProps: spec.SchemaProps{ - Description: "SAControllerConfiguration holds configuration for ServiceAccountController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration"), + Description: "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", + Type: []string{"string"}, + Format: "byte", }, }, - "ServiceController": { + "groupPriorityMinimum": { SchemaProps: spec.SchemaProps{ - Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration"), + Description: "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "TTLAfterFinishedController": { + "versionPriority": { SchemaProps: spec.SchemaProps{ - Description: "TTLAfterFinishedControllerConfiguration holds configuration for TTLAfterFinishedController related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"), + Description: "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"Generic", "KubeCloudShared", "AttachDetachController", "CSRSigningController", "DaemonSetController", "DeploymentController", "StatefulSetController", "DeprecatedController", "EndpointController", "EndpointSliceController", "EndpointSliceMirroringController", "GarbageCollectorController", "HPAController", "JobController", "CronJobController", "NamespaceController", "NodeIPAMController", "NodeLifecycleController", "PersistentVolumeBinderController", "PodGCController", "ReplicaSetController", "ReplicationController", "ResourceQuotaController", "SAController", "ServiceController", "TTLAfterFinishedController"}, + Required: []string{"groupPriorityMinimum", "versionPriority"}, }, }, Dependencies: []string{ - "k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration", "k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"}, + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.ServiceReference"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1beta1_APIServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NamespaceControllerConfiguration contains elements describing NamespaceController.", + Description: "APIServiceStatus contains derived information about an API server", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "NamespaceSyncPeriod": { - SchemaProps: spec.SchemaProps{ - Description: "namespaceSyncPeriod is the period for syncing namespace life-cycle updates.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, }, - }, - "ConcurrentNamespaceSyncs": { SchemaProps: spec.SchemaProps{ - Description: "concurrentNamespaceSyncs is the number of namespace objects that are allowed to sync concurrently.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Current service state of apiService.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"), + }, + }, + }, }, }, }, - Required: []string{"NamespaceSyncPeriod", "ConcurrentNamespaceSyncs"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1.APIServiceCondition"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_pkg_apis_apiregistration_v1beta1_ServiceReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NodeIPAMControllerConfiguration contains elements describing NodeIpamController.", + Description: "ServiceReference holds a reference to Service.legacy.k8s.io", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ServiceCIDR": { + "namespace": { SchemaProps: spec.SchemaProps{ - Description: "serviceCIDR is CIDR Range for Services in cluster.", - Default: "", + Description: "Namespace is the namespace of the service", Type: []string{"string"}, Format: "", }, }, - "SecondaryServiceCIDR": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "secondaryServiceCIDR is CIDR Range for Services in cluster. This is used in dual stack clusters. SecondaryServiceCIDR must be of different IP family than ServiceCIDR", - Default: "", + Description: "Name is the name of the service", Type: []string{"string"}, Format: "", }, }, - "NodeCIDRMaskSize": { + "port": { SchemaProps: spec.SchemaProps{ - Description: "NodeCIDRMaskSize is the mask size for node cidr in cluster.", - Default: 0, + Description: "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", Type: []string{"integer"}, Format: "int32", }, }, - "NodeCIDRMaskSizeIPv4": { + }, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_AttachDetachControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AttachDetachControllerConfiguration contains elements describing AttachDetachController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "DisableAttachDetachReconcilerSync": { SchemaProps: spec.SchemaProps{ - Description: "NodeCIDRMaskSizeIPv4 is the mask size for node cidr in dual-stack cluster.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "Reconciler runs a periodic loop to reconcile the desired state of the with the actual state of the world by triggering attach detach operations. This flag enables or disables reconcile. Is false by default, and thus enabled.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "NodeCIDRMaskSizeIPv6": { + "ReconcilerSyncLoopPeriod": { SchemaProps: spec.SchemaProps{ - Description: "NodeCIDRMaskSizeIPv6 is the mask size for node cidr in dual-stack cluster.", + Description: "ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop wait between successive executions. Is set to 5 sec by default.", Default: 0, - Type: []string{"integer"}, - Format: "int32", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"ServiceCIDR", "SecondaryServiceCIDR", "NodeCIDRMaskSize", "NodeCIDRMaskSizeIPv4", "NodeCIDRMaskSizeIPv6"}, + Required: []string{"DisableAttachDetachReconcilerSync", "ReconcilerSyncLoopPeriod"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NodeLifecycleControllerConfiguration contains elements describing NodeLifecycleController.", + Description: "CSRSigningConfiguration holds information about a particular CSR signer", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "EnableTaintManager": { + "CertFile": { SchemaProps: spec.SchemaProps{ - Description: "If set to true enables NoExecute Taints and will evict all not-tolerating Pod running on Nodes tainted with this kind of Taints.", - Type: []string{"boolean"}, + Description: "certFile is the filename containing a PEM-encoded X509 CA certificate used to issue certificates", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "NodeEvictionRate": { + "KeyFile": { SchemaProps: spec.SchemaProps{ - Description: "nodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is healthy", - Default: 0, - Type: []string{"number"}, - Format: "float", + Description: "keyFile is the filename containing a PEM-encoded RSA or ECDSA private key used to issue certificates", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "SecondaryNodeEvictionRate": { + }, + Required: []string{"CertFile", "KeyFile"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_CSRSigningControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CSRSigningControllerConfiguration contains elements describing CSRSigningController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ClusterSigningCertFile": { SchemaProps: spec.SchemaProps{ - Description: "secondaryNodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy", - Default: 0, - Type: []string{"number"}, - Format: "float", + Description: "clusterSigningCertFile is the filename containing a PEM-encoded X509 CA certificate used to issue cluster-scoped certificates", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "NodeStartupGracePeriod": { + "ClusterSigningKeyFile": { SchemaProps: spec.SchemaProps{ - Description: "nodeStartupGracePeriod is the amount of time which we allow starting a node to be unresponsive before marking it unhealthy.", + Description: "clusterSigningCertFile is the filename containing a PEM-encoded RSA or ECDSA private key used to issue cluster-scoped certificates", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "KubeletServingSignerConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "kubeletServingSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kubelet-serving signer", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), }, }, - "NodeMonitorGracePeriod": { + "KubeletClientSignerConfiguration": { SchemaProps: spec.SchemaProps{ - Description: "nodeMontiorGracePeriod is the amount of time which we allow a running node to be unresponsive before marking it unhealthy. Must be N times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.", + Description: "kubeletClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client-kubelet", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), }, }, - "PodEvictionTimeout": { + "KubeAPIServerClientSignerConfiguration": { SchemaProps: spec.SchemaProps{ - Description: "podEvictionTimeout is the grace period for deleting pods on failed nodes.", + Description: "kubeAPIServerClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), }, }, - "LargeClusterSizeThreshold": { + "LegacyUnknownSignerConfiguration": { SchemaProps: spec.SchemaProps{ - Description: "secondaryNodeEvictionRate is implicitly overridden to 0 for clusters smaller than or equal to largeClusterSizeThreshold", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "legacyUnknownSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/legacy-unknown", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"), }, }, - "UnhealthyZoneThreshold": { + "ClusterSigningDuration": { SchemaProps: spec.SchemaProps{ - Description: "Zone is treated as unhealthy in nodeEvictionRate and secondaryNodeEvictionRate when at least unhealthyZoneThreshold (no less than 3) of Nodes in the zone are NotReady", + Description: "clusterSigningDuration is the max length of duration signed certificates will be given. Individual CSRs may request shorter certs by setting spec.expirationSeconds.", Default: 0, - Type: []string{"number"}, - Format: "float", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"EnableTaintManager", "NodeEvictionRate", "SecondaryNodeEvictionRate", "NodeStartupGracePeriod", "NodeMonitorGracePeriod", "PodEvictionTimeout", "LargeClusterSizeThreshold", "UnhealthyZoneThreshold"}, + Required: []string{"ClusterSigningCertFile", "ClusterSigningKeyFile", "KubeletServingSignerConfiguration", "KubeletClientSignerConfiguration", "KubeAPIServerClientSignerConfiguration", "LegacyUnknownSignerConfiguration", "ClusterSigningDuration"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningConfiguration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_CronJobControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeBinderControllerConfiguration contains elements describing PersistentVolumeBinderController.", + Description: "CronJobControllerConfiguration contains elements describing CrongJob2Controller.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "PVClaimBinderSyncPeriod": { + "ConcurrentCronJobSyncs": { SchemaProps: spec.SchemaProps{ - Description: "pvClaimBinderSyncPeriod is the period for syncing persistent volumes and persistent volume claims.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "concurrentCronJobSyncs is the number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "VolumeConfiguration": { + }, + Required: []string{"ConcurrentCronJobSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_DaemonSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonSetControllerConfiguration contains elements describing DaemonSetController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentDaemonSetSyncs": { SchemaProps: spec.SchemaProps{ - Description: "volumeConfiguration holds configuration for volume related features.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"), + Description: "concurrentDaemonSetSyncs is the number of daemonset objects that are allowed to sync concurrently. Larger number = more responsive daemonset, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "VolumeHostCIDRDenylist": { + }, + Required: []string{"ConcurrentDaemonSetSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentControllerConfiguration contains elements describing DeploymentController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentDeploymentSyncs": { SchemaProps: spec.SchemaProps{ - Description: "VolumeHostCIDRDenylist is a list of CIDRs that should not be reachable by the controller from plugins.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "concurrentDeploymentSyncs is the number of deployment objects that are allowed to sync concurrently. Larger number = more responsive deployments, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "VolumeHostAllowLocalLoopback": { + "DeploymentControllerSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "VolumeHostAllowLocalLoopback indicates if local loopback hosts (127.0.0.1, etc) should be allowed from plugins.", - Type: []string{"boolean"}, - Format: "", + Description: "deploymentControllerSyncPeriod is the period for syncing the deployments.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"PVClaimBinderSyncPeriod", "VolumeConfiguration", "VolumeHostCIDRDenylist", "VolumeHostAllowLocalLoopback"}, + Required: []string{"ConcurrentDeploymentSyncs", "DeploymentControllerSyncPeriod"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_DeprecatedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeRecyclerConfiguration contains elements describing persistent volume plugins.", + Description: "DeprecatedControllerConfiguration contains elements be deprecated.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "MaximumRetry": { + "DeletingPodsQPS": { SchemaProps: spec.SchemaProps{ - Description: "maximumRetry is number of retries the PV recycler will execute on failure to recycle PV.", + Description: "DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in case of node failure.", Default: 0, - Type: []string{"integer"}, - Format: "int32", + Type: []string{"number"}, + Format: "float", }, }, - "MinimumTimeoutNFS": { + "DeletingPodsBurst": { SchemaProps: spec.SchemaProps{ - Description: "minimumTimeoutNFS is the minimum ActiveDeadlineSeconds to use for an NFS Recycler pod.", + Description: "DEPRECATED: deletingPodsBurst is the number of nodes on which pods are bursty deleted in case of node failure. For more details look into RateLimiter.", Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "PodTemplateFilePathNFS": { - SchemaProps: spec.SchemaProps{ - Description: "podTemplateFilePathNFS is the file path to a pod definition used as a template for NFS persistent volume recycling", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "IncrementTimeoutNFS": { + "RegisterRetryCount": { SchemaProps: spec.SchemaProps{ - Description: "incrementTimeoutNFS is the increment of time added per Gi to ActiveDeadlineSeconds for an NFS scrubber pod.", + Description: "registerRetryCount is the number of retries for initial node registration. Retry interval equals node-sync-period.", Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "PodTemplateFilePathHostPath": { - SchemaProps: spec.SchemaProps{ - Description: "podTemplateFilePathHostPath is the file path to a pod definition used as a template for HostPath persistent volume recycling. This is for development and testing only and will not work in a multi-node cluster.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "MinimumTimeoutHostPath": { + }, + Required: []string{"DeletingPodsQPS", "DeletingPodsBurst", "RegisterRetryCount"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointControllerConfiguration contains elements describing EndpointController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentEndpointSyncs": { SchemaProps: spec.SchemaProps{ - Description: "minimumTimeoutHostPath is the minimum ActiveDeadlineSeconds to use for a HostPath Recycler pod. This is for development and testing only and will not work in a multi-node cluster.", + Description: "concurrentEndpointSyncs is the number of endpoint syncing operations that will be done concurrently. Larger number = faster endpoint updating, but more CPU (and network) load.", Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "IncrementTimeoutHostPath": { + "EndpointUpdatesBatchPeriod": { SchemaProps: spec.SchemaProps{ - Description: "incrementTimeoutHostPath is the increment of time added per Gi to ActiveDeadlineSeconds for a HostPath scrubber pod. This is for development and testing only and will not work in a multi-node cluster.", + Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", Default: 0, - Type: []string{"integer"}, - Format: "int32", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"MaximumRetry", "MinimumTimeoutNFS", "PodTemplateFilePathNFS", "IncrementTimeoutNFS", "PodTemplateFilePathHostPath", "MinimumTimeoutHostPath", "IncrementTimeoutHostPath"}, + Required: []string{"ConcurrentEndpointSyncs", "EndpointUpdatesBatchPeriod"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodGCControllerConfiguration contains elements describing PodGCController.", + Description: "EndpointSliceControllerConfiguration contains elements describing EndpointSliceController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "TerminatedPodGCThreshold": { + "ConcurrentServiceEndpointSyncs": { SchemaProps: spec.SchemaProps{ - Description: "terminatedPodGCThreshold is the number of terminated pods that can exist before the terminated pod garbage collector starts deleting terminated pods. If <= 0, the terminated pod garbage collector is disabled.", + Description: "concurrentServiceEndpointSyncs is the number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "MaxEndpointsPerSlice": { + SchemaProps: spec.SchemaProps{ + Description: "maxEndpointsPerSlice is the maximum number of endpoints that will be added to an EndpointSlice. More endpoints per slice will result in fewer and larger endpoint slices, but larger resources.", Default: 0, Type: []string{"integer"}, Format: "int32", }, }, + "EndpointUpdatesBatchPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, }, - Required: []string{"TerminatedPodGCThreshold"}, + Required: []string{"ConcurrentServiceEndpointSyncs", "MaxEndpointsPerSlice", "EndpointUpdatesBatchPeriod"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_EndpointSliceMirroringControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetControllerConfiguration contains elements describing ReplicaSetController.", + Description: "EndpointSliceMirroringControllerConfiguration contains elements describing EndpointSliceMirroringController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentRSSyncs": { + "MirroringConcurrentServiceEndpointSyncs": { SchemaProps: spec.SchemaProps{ - Description: "concurrentRSSyncs is the number of replica sets that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.", + Description: "mirroringConcurrentServiceEndpointSyncs is the number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "MirroringMaxEndpointsPerSubset": { + SchemaProps: spec.SchemaProps{ + Description: "mirroringMaxEndpointsPerSubset is the maximum number of endpoints that will be mirrored to an EndpointSlice for an EndpointSubset.", Default: 0, Type: []string{"integer"}, Format: "int32", }, }, + "MirroringEndpointUpdatesBatchPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "mirroringEndpointUpdatesBatchPeriod can be used to batch EndpointSlice updates. All updates triggered by EndpointSlice changes will be delayed by up to 'mirroringEndpointUpdatesBatchPeriod'. If other addresses in the same Endpoints resource change in that period, they will be batched to a single EndpointSlice update. Default 0 value means that each Endpoints update triggers an EndpointSlice update.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, }, - Required: []string{"ConcurrentRSSyncs"}, + Required: []string{"MirroringConcurrentServiceEndpointSyncs", "MirroringMaxEndpointsPerSubset", "MirroringEndpointUpdatesBatchPeriod"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_EphemeralVolumeControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerConfiguration contains elements describing ReplicationController.", + Description: "EphemeralVolumeControllerConfiguration contains elements describing EphemeralVolumeController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentRCSyncs": { + "ConcurrentEphemeralVolumeSyncs": { SchemaProps: spec.SchemaProps{ - Description: "concurrentRCSyncs is the number of replication controllers that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.", + Description: "ConcurrentEphemeralVolumeSyncseSyncs is the number of ephemeral volume syncing operations that will be done concurrently. Larger number = faster ephemeral volume updating, but more CPU (and network) load.", Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"ConcurrentRCSyncs"}, + Required: []string{"ConcurrentEphemeralVolumeSyncs"}, }, }, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_GarbageCollectorControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaControllerConfiguration contains elements describing ResourceQuotaController.", + Description: "GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ResourceQuotaSyncPeriod": { + "EnableGarbageCollector": { SchemaProps: spec.SchemaProps{ - Description: "resourceQuotaSyncPeriod is the period for syncing quota usage status in the system.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "enables the generic garbage collector. MUST be synced with the corresponding flag of the kube-apiserver. WARNING: the generic garbage collector is an alpha feature.", + Type: []string{"boolean"}, + Format: "", }, }, - "ConcurrentResourceQuotaSyncs": { + "ConcurrentGCSyncs": { SchemaProps: spec.SchemaProps{ - Description: "concurrentResourceQuotaSyncs is the number of resource quotas that are allowed to sync concurrently. Larger number = more responsive quota management, but more CPU (and network) load.", + Description: "concurrentGCSyncs is the number of garbage collector workers that are allowed to sync concurrently.", Default: 0, Type: []string{"integer"}, Format: "int32", }, }, + "GCIgnoredResources": { + SchemaProps: spec.SchemaProps{ + Description: "gcIgnoredResources is the list of GroupResources that garbage collection should ignore.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"), + }, + }, + }, + }, + }, }, - Required: []string{"ResourceQuotaSyncPeriod", "ConcurrentResourceQuotaSyncs"}, + Required: []string{"EnableGarbageCollector", "ConcurrentGCSyncs", "GCIgnoredResources"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/kube-controller-manager/config/v1alpha1.GroupResource"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "SAControllerConfiguration contains elements describing ServiceAccountController.", + Description: "GroupResource describes an group resource.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ServiceAccountKeyFile": { + "Group": { SchemaProps: spec.SchemaProps{ - Description: "serviceAccountKeyFile is the filename containing a PEM-encoded private RSA key used to sign service account tokens.", + Description: "group is the group portion of the GroupResource.", Default: "", Type: []string{"string"}, Format: "", }, }, - "ConcurrentSATokenSyncs": { - SchemaProps: spec.SchemaProps{ - Description: "concurrentSATokenSyncs is the number of service account token syncing operations that will be done concurrently.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "RootCAFile": { + "Resource": { SchemaProps: spec.SchemaProps{ - Description: "rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.", + Description: "resource is the resource portion of the GroupResource.", Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"ServiceAccountKeyFile", "ConcurrentSATokenSyncs", "RootCAFile"}, + Required: []string{"Group", "Resource"}, }, }, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_HPAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StatefulSetControllerConfiguration contains elements describing StatefulSetController.", + Description: "HPAControllerConfiguration contains elements describing HPAController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentStatefulSetSyncs": { + "HorizontalPodAutoscalerSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "concurrentStatefulSetSyncs is the number of statefulset objects that are allowed to sync concurrently. Larger number = more responsive statefulsets, but more CPU (and network) load.", + Description: "HorizontalPodAutoscalerSyncPeriod is the period for syncing the number of pods in horizontal pod autoscaler.", Default: 0, - Type: []string{"integer"}, - Format: "int32", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerUpscaleForbiddenWindow": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerUpscaleForbiddenWindow is a period after which next upscale allowed.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerDownscaleStabilizationWindow": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerDowncaleStabilizationWindow is a period for which autoscaler will look backwards and not scale down below any recommendation it made during that period.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerDownscaleForbiddenWindow": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerDownscaleForbiddenWindow is a period after which next downscale allowed.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerTolerance": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerTolerance is the tolerance for when resource usage suggests upscaling/downscaling", + Default: 0, + Type: []string{"number"}, + Format: "double", + }, + }, + "HorizontalPodAutoscalerCPUInitializationPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerCPUInitializationPeriod is the period after pod start when CPU samples might be skipped.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "HorizontalPodAutoscalerInitialReadinessDelay": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerInitialReadinessDelay is period after pod start during which readiness changes are treated as readiness being set for the first time. The only effect of this is that HPA will disregard CPU samples from unready pods that had last readiness change during that period.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"ConcurrentStatefulSetSyncs"}, + Required: []string{"HorizontalPodAutoscalerSyncPeriod", "HorizontalPodAutoscalerUpscaleForbiddenWindow", "HorizontalPodAutoscalerDownscaleStabilizationWindow", "HorizontalPodAutoscalerDownscaleForbiddenWindow", "HorizontalPodAutoscalerTolerance", "HorizontalPodAutoscalerCPUInitializationPeriod", "HorizontalPodAutoscalerInitialReadinessDelay"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_JobControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TTLAfterFinishedControllerConfiguration contains elements describing TTLAfterFinishedController.", + Description: "JobControllerConfiguration contains elements describing JobController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "ConcurrentTTLSyncs": { + "ConcurrentJobSyncs": { SchemaProps: spec.SchemaProps{ - Description: "concurrentTTLSyncs is the number of TTL-after-finished collector workers that are allowed to sync concurrently.", + Description: "concurrentJobSyncs is the number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load.", Default: 0, Type: []string{"integer"}, Format: "int32", }, }, }, - Required: []string{"ConcurrentTTLSyncs"}, + Required: []string{"ConcurrentJobSyncs"}, }, }, } } -func schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_KubeControllerManagerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "VolumeConfiguration contains *all* enumerated flags meant to configure all volume plugins. From this config, the controller-manager binary will create many instances of volume.VolumeConfig, each containing only the configuration needed for that plugin which are then passed to the appropriate plugin. The ControllerManager binary is the only part of the code which knows what plugins are supported and which flags correspond to each plugin.", + Description: "KubeControllerManagerConfiguration contains elements describing kube-controller manager.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "EnableHostPathProvisioning": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "enableHostPathProvisioning enables HostPath PV provisioning when running without a cloud provider. This allows testing and development of provisioning features. HostPath provisioning is not supported in any way, won't work in a multi-node cluster, and should not be used for anything other than testing or development.", - Type: []string{"boolean"}, + 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: "", }, }, - "EnableDynamicProvisioning": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "enableDynamicProvisioning enables the provisioning of volumes when running within an environment that supports dynamic provisioning. Defaults to true.", - Type: []string{"boolean"}, + 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: "", }, }, - "PersistentVolumeRecyclerConfiguration": { + "Generic": { SchemaProps: spec.SchemaProps{ - Description: "persistentVolumeRecyclerConfiguration holds configuration for persistent volume plugins.", + Description: "Generic holds configuration for a generic controller-manager", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"), + Ref: ref("k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration"), }, }, - "FlexVolumePluginDir": { + "KubeCloudShared": { SchemaProps: spec.SchemaProps{ - Description: "volumePluginDir is the full path of the directory in which the flex volume plugin should search for additional third party volume plugins", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "KubeCloudSharedConfiguration holds configuration for shared related features both in cloud controller manager and kube-controller manager.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration"), }, }, - }, - Required: []string{"EnableHostPathProvisioning", "EnableDynamicProvisioning", "PersistentVolumeRecyclerConfiguration", "FlexVolumePluginDir"}, - }, - }, - Dependencies: []string{ - "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"}, - } -} - -func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "KubeProxyConfiguration contains everything necessary to configure the Kubernetes proxy server.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "AttachDetachController": { 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: "", + Description: "AttachDetachControllerConfiguration holds configuration for AttachDetachController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration"), }, }, - "apiVersion": { + "CSRSigningController": { 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: "", + Description: "CSRSigningControllerConfiguration holds configuration for CSRSigningController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration"), }, }, - "featureGates": { + "DaemonSetController": { SchemaProps: spec.SchemaProps{ - Description: "featureGates is a map of feature names to bools that enable or disable alpha/experimental features.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - }, + Description: "DaemonSetControllerConfiguration holds configuration for DaemonSetController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration"), }, }, - "bindAddress": { + "DeploymentController": { SchemaProps: spec.SchemaProps{ - Description: "bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0 for all interfaces)", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "DeploymentControllerConfiguration holds configuration for DeploymentController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration"), }, }, - "healthzBindAddress": { + "StatefulSetController": { SchemaProps: spec.SchemaProps{ - Description: "healthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10256", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "StatefulSetControllerConfiguration holds configuration for StatefulSetController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration"), }, }, - "metricsBindAddress": { + "DeprecatedController": { SchemaProps: spec.SchemaProps{ - Description: "metricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces)", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "DeprecatedControllerConfiguration holds configuration for some deprecated features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration"), }, }, - "bindAddressHardFail": { + "EndpointController": { SchemaProps: spec.SchemaProps{ - Description: "bindAddressHardFail, if true, kube-proxy will treat failure to bind to a port as fatal and exit", - Default: false, - Type: []string{"boolean"}, - Format: "", + Description: "EndpointControllerConfiguration holds configuration for EndpointController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration"), }, }, - "enableProfiling": { + "EndpointSliceController": { SchemaProps: spec.SchemaProps{ - Description: "enableProfiling enables profiling via web interface on /debug/pprof handler. Profiling handlers will be handled by metrics server.", - Default: false, - Type: []string{"boolean"}, - Format: "", + Description: "EndpointSliceControllerConfiguration holds configuration for EndpointSliceController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration"), }, }, - "clusterCIDR": { + "EndpointSliceMirroringController": { SchemaProps: spec.SchemaProps{ - Description: "clusterCIDR is the CIDR range of the pods in the cluster. It is used to bridge traffic coming from outside of the cluster. If not provided, no off-cluster bridging will be performed.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "EndpointSliceMirroringControllerConfiguration holds configuration for EndpointSliceMirroringController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration"), }, }, - "hostnameOverride": { + "EphemeralVolumeController": { SchemaProps: spec.SchemaProps{ - Description: "hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "EphemeralVolumeControllerConfiguration holds configuration for EphemeralVolumeController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.EphemeralVolumeControllerConfiguration"), }, }, - "clientConnection": { + "GarbageCollectorController": { SchemaProps: spec.SchemaProps{ - Description: "clientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Description: "GarbageCollectorControllerConfiguration holds configuration for GarbageCollectorController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration"), }, }, - "iptables": { + "HPAController": { SchemaProps: spec.SchemaProps{ - Description: "iptables contains iptables-related configuration options.", + Description: "HPAControllerConfiguration holds configuration for HPAController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration"), + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration"), }, }, - "ipvs": { + "JobController": { SchemaProps: spec.SchemaProps{ - Description: "ipvs contains ipvs-related configuration options.", + Description: "JobControllerConfiguration holds configuration for JobController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration"), + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration"), }, }, - "oomScoreAdj": { + "CronJobController": { SchemaProps: spec.SchemaProps{ - Description: "oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]", - Type: []string{"integer"}, - Format: "int32", + Description: "CronJobControllerConfiguration holds configuration for CronJobController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration"), }, }, - "mode": { + "NamespaceController": { SchemaProps: spec.SchemaProps{ - Description: "mode specifies which proxy mode to use.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "NamespaceControllerConfiguration holds configuration for NamespaceController related features. NamespaceControllerConfiguration holds configuration for NamespaceController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration"), }, }, - "portRange": { + "NodeIPAMController": { SchemaProps: spec.SchemaProps{ - Description: "portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "NodeIPAMControllerConfiguration holds configuration for NodeIPAMController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration"), }, }, - "udpIdleTimeout": { + "NodeLifecycleController": { SchemaProps: spec.SchemaProps{ - Description: "udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxyMode=userspace.", + Description: "NodeLifecycleControllerConfiguration holds configuration for NodeLifecycleController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration"), }, }, - "conntrack": { + "PersistentVolumeBinderController": { SchemaProps: spec.SchemaProps{ - Description: "conntrack contains conntrack-related configuration options.", + Description: "PersistentVolumeBinderControllerConfiguration holds configuration for PersistentVolumeBinderController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration"), + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration"), }, }, - "configSyncPeriod": { + "PodGCController": { SchemaProps: spec.SchemaProps{ - Description: "configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater than 0.", + Description: "PodGCControllerConfiguration holds configuration for PodGCController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration"), }, }, - "nodePortAddresses": { + "ReplicaSetController": { SchemaProps: spec.SchemaProps{ - Description: "nodePortAddresses is the --nodeport-addresses value for kube-proxy process. Values must be valid IP blocks. These values are as a parameter to select the interfaces where nodeport works. In case someone would like to expose a service on localhost for local visit and some other interfaces for particular purpose, a list of IP blocks would do that. If set it to \"127.0.0.0/8\", kube-proxy will only select the loopback interface for NodePort. If set it to a non-zero IP block, kube-proxy will filter that down to just the IPs that applied to the node. An empty string slice is meant to select all network interfaces.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "ReplicaSetControllerConfiguration holds configuration for ReplicaSet related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration"), }, }, - "winkernel": { + "ReplicationController": { SchemaProps: spec.SchemaProps{ - Description: "winkernel contains winkernel-related configuration options.", + Description: "ReplicationControllerConfiguration holds configuration for ReplicationController related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"), + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration"), }, }, - "showHiddenMetricsForVersion": { + "ResourceQuotaController": { SchemaProps: spec.SchemaProps{ - Description: "ShowHiddenMetricsForVersion is the version for which you want to show hidden metrics.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "ResourceQuotaControllerConfiguration holds configuration for ResourceQuotaController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration"), }, }, - "detectLocalMode": { + "SAController": { SchemaProps: spec.SchemaProps{ - Description: "DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "SAControllerConfiguration holds configuration for ServiceAccountController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration"), + }, + }, + "ServiceController": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceControllerConfiguration holds configuration for ServiceController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration"), + }, + }, + "TTLAfterFinishedController": { + SchemaProps: spec.SchemaProps{ + Description: "TTLAfterFinishedControllerConfiguration holds configuration for TTLAfterFinishedController related features.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"), }, }, }, - Required: []string{"bindAddress", "healthzBindAddress", "metricsBindAddress", "bindAddressHardFail", "enableProfiling", "clusterCIDR", "hostnameOverride", "clientConnection", "iptables", "ipvs", "oomScoreAdj", "mode", "portRange", "udpIdleTimeout", "conntrack", "configSyncPeriod", "nodePortAddresses", "winkernel", "showHiddenMetricsForVersion", "detectLocalMode"}, + Required: []string{"Generic", "KubeCloudShared", "AttachDetachController", "CSRSigningController", "DaemonSetController", "DeploymentController", "StatefulSetController", "DeprecatedController", "EndpointController", "EndpointSliceController", "EndpointSliceMirroringController", "EphemeralVolumeController", "GarbageCollectorController", "HPAController", "JobController", "CronJobController", "NamespaceController", "NodeIPAMController", "NodeLifecycleController", "PersistentVolumeBinderController", "PodGCController", "ReplicaSetController", "ReplicationController", "ResourceQuotaController", "SAController", "ServiceController", "TTLAfterFinishedController"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"}, + "k8s.io/cloud-provider/config/v1alpha1.KubeCloudSharedConfiguration", "k8s.io/cloud-provider/controllers/service/config/v1alpha1.ServiceControllerConfiguration", "k8s.io/controller-manager/config/v1alpha1.GenericControllerManagerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.AttachDetachControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.CSRSigningControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.CronJobControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DaemonSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeploymentControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.DeprecatedControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EndpointSliceMirroringControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.EphemeralVolumeControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.GarbageCollectorControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.HPAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.JobControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NamespaceControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeIPAMControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.NodeLifecycleControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeBinderControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.PodGCControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicaSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ReplicationControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.ResourceQuotaControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.SAControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.StatefulSetControllerConfiguration", "k8s.io/kube-controller-manager/config/v1alpha1.TTLAfterFinishedControllerConfiguration"}, } } -func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_NamespaceControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeProxyConntrackConfiguration contains conntrack settings for the Kubernetes proxy server.", + Description: "NamespaceControllerConfiguration contains elements describing NamespaceController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "maxPerCore": { + "NamespaceSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "maxPerCore is the maximum number of NAT connections to track per CPU core (0 to leave the limit as-is and ignore min).", + Description: "namespaceSyncPeriod is the period for syncing namespace life-cycle updates.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "ConcurrentNamespaceSyncs": { + SchemaProps: spec.SchemaProps{ + Description: "concurrentNamespaceSyncs is the number of namespace objects that are allowed to sync concurrently.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "min": { + }, + Required: []string{"NamespaceSyncPeriod", "ConcurrentNamespaceSyncs"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeIPAMControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeIPAMControllerConfiguration contains elements describing NodeIpamController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ServiceCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "serviceCIDR is CIDR Range for Services in cluster.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "SecondaryServiceCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "secondaryServiceCIDR is CIDR Range for Services in cluster. This is used in dual stack clusters. SecondaryServiceCIDR must be of different IP family than ServiceCIDR", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "NodeCIDRMaskSize": { SchemaProps: spec.SchemaProps{ - Description: "min is the minimum value of connect-tracking records to allocate, regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is).", + Description: "NodeCIDRMaskSize is the mask size for node cidr in cluster.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "tcpEstablishedTimeout": { + "NodeCIDRMaskSizeIPv4": { SchemaProps: spec.SchemaProps{ - Description: "tcpEstablishedTimeout is how long an idle TCP connection will be kept open (e.g. '2s'). Must be greater than 0 to set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "NodeCIDRMaskSizeIPv4 is the mask size for node cidr in dual-stack cluster.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "tcpCloseWaitTimeout": { + "NodeCIDRMaskSizeIPv6": { SchemaProps: spec.SchemaProps{ - Description: "tcpCloseWaitTimeout is how long an idle conntrack entry in CLOSE_WAIT state will remain in the conntrack table. (e.g. '60s'). Must be greater than 0 to set.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "NodeCIDRMaskSizeIPv6 is the mask size for node cidr in dual-stack cluster.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"maxPerCore", "min", "tcpEstablishedTimeout", "tcpCloseWaitTimeout"}, + Required: []string{"ServiceCIDR", "SecondaryServiceCIDR", "NodeCIDRMaskSize", "NodeCIDRMaskSizeIPv4", "NodeCIDRMaskSizeIPv6"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_NodeLifecycleControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeProxyIPTablesConfiguration contains iptables-related configuration details for the Kubernetes proxy server.", + Description: "NodeLifecycleControllerConfiguration contains elements describing NodeLifecycleController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "masqueradeBit": { + "EnableTaintManager": { SchemaProps: spec.SchemaProps{ - Description: "masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using the pure iptables proxy mode. Values must be within the range [0, 31].", - Type: []string{"integer"}, - Format: "int32", + Description: "If set to true enables NoExecute Taints and will evict all not-tolerating Pod running on Nodes tainted with this kind of Taints.", + Type: []string{"boolean"}, + Format: "", }, }, - "masqueradeAll": { + "NodeEvictionRate": { SchemaProps: spec.SchemaProps{ - Description: "masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.", - Default: false, - Type: []string{"boolean"}, - Format: "", + Description: "nodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is healthy", + Default: 0, + Type: []string{"number"}, + Format: "float", }, }, - "syncPeriod": { + "SecondaryNodeEvictionRate": { SchemaProps: spec.SchemaProps{ - Description: "syncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.", - Default: map[string]interface{}{}, + Description: "secondaryNodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy", + Default: 0, + Type: []string{"number"}, + Format: "float", + }, + }, + "NodeStartupGracePeriod": { + SchemaProps: spec.SchemaProps{ + Description: "nodeStartupGracePeriod is the amount of time which we allow starting a node to be unresponsive before marking it unhealthy.", + Default: 0, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "minSyncPeriod": { + "NodeMonitorGracePeriod": { SchemaProps: spec.SchemaProps{ - Description: "minSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m').", - Default: map[string]interface{}{}, + Description: "nodeMontiorGracePeriod is the amount of time which we allow a running node to be unresponsive before marking it unhealthy. Must be N times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "PodEvictionTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "podEvictionTimeout is the grace period for deleting pods on failed nodes.", + Default: 0, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, + "LargeClusterSizeThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "secondaryNodeEvictionRate is implicitly overridden to 0 for clusters smaller than or equal to largeClusterSizeThreshold", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "UnhealthyZoneThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "Zone is treated as unhealthy in nodeEvictionRate and secondaryNodeEvictionRate when at least unhealthyZoneThreshold (no less than 3) of Nodes in the zone are NotReady", + Default: 0, + Type: []string{"number"}, + Format: "float", + }, + }, }, - Required: []string{"masqueradeBit", "masqueradeAll", "syncPeriod", "minSyncPeriod"}, + Required: []string{"EnableTaintManager", "NodeEvictionRate", "SecondaryNodeEvictionRate", "NodeStartupGracePeriod", "NodeMonitorGracePeriod", "PodEvictionTimeout", "LargeClusterSizeThreshold", "UnhealthyZoneThreshold"}, }, }, Dependencies: []string{ @@ -48402,38 +50246,30 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref } } -func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeBinderControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeProxyIPVSConfiguration contains ipvs-related configuration details for the Kubernetes proxy server.", + Description: "PersistentVolumeBinderControllerConfiguration contains elements describing PersistentVolumeBinderController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "syncPeriod": { + "PVClaimBinderSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "syncPeriod is the period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.", - Default: map[string]interface{}{}, + Description: "pvClaimBinderSyncPeriod is the period for syncing persistent volumes and persistent volume claims.", + Default: 0, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "minSyncPeriod": { + "VolumeConfiguration": { SchemaProps: spec.SchemaProps{ - Description: "minSyncPeriod is the minimum period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m').", + Description: "volumeConfiguration holds configuration for volume related features.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "scheduler": { - SchemaProps: spec.SchemaProps{ - Description: "ipvs scheduler", - Default: "", - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"), }, }, - "excludeCIDRs": { + "VolumeHostCIDRDenylist": { SchemaProps: spec.SchemaProps{ - Description: "excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch when cleaning up ipvs services.", + Description: "VolumeHostCIDRDenylist is a list of CIDRs that should not be reachable by the controller from plugins.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -48446,726 +50282,729 @@ func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref comm }, }, }, - "strictARP": { + "VolumeHostAllowLocalLoopback": { SchemaProps: spec.SchemaProps{ - Description: "strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries from kube-ipvs0 interface", - Default: false, + Description: "VolumeHostAllowLocalLoopback indicates if local loopback hosts (127.0.0.1, etc) should be allowed from plugins.", Type: []string{"boolean"}, Format: "", }, }, - "tcpTimeout": { - SchemaProps: spec.SchemaProps{ - Description: "tcpTimeout is the timeout value used for idle IPVS TCP sessions. The default value is 0, which preserves the current timeout value on the system.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "tcpFinTimeout": { - SchemaProps: spec.SchemaProps{ - Description: "tcpFinTimeout is the timeout value used for IPVS TCP sessions after receiving a FIN. The default value is 0, which preserves the current timeout value on the system.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "udpTimeout": { - SchemaProps: spec.SchemaProps{ - Description: "udpTimeout is the timeout value used for IPVS UDP packets. The default value is 0, which preserves the current timeout value on the system.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, }, - Required: []string{"syncPeriod", "minSyncPeriod", "scheduler", "excludeCIDRs", "strictARP", "tcpTimeout", "tcpFinTimeout", "udpTimeout"}, + Required: []string{"PVClaimBinderSyncPeriod", "VolumeConfiguration", "VolumeHostCIDRDenylist", "VolumeHostAllowLocalLoopback"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-controller-manager/config/v1alpha1.VolumeConfiguration"}, } } -func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_PersistentVolumeRecyclerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeProxyWinkernelConfiguration contains Windows/HNS settings for the Kubernetes proxy server.", + Description: "PersistentVolumeRecyclerConfiguration contains elements describing persistent volume plugins.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "networkName": { + "MaximumRetry": { SchemaProps: spec.SchemaProps{ - Description: "networkName is the name of the network kube-proxy will use to create endpoints and policies", + Description: "maximumRetry is number of retries the PV recycler will execute on failure to recycle PV.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "MinimumTimeoutNFS": { + SchemaProps: spec.SchemaProps{ + Description: "minimumTimeoutNFS is the minimum ActiveDeadlineSeconds to use for an NFS Recycler pod.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "PodTemplateFilePathNFS": { + SchemaProps: spec.SchemaProps{ + Description: "podTemplateFilePathNFS is the file path to a pod definition used as a template for NFS persistent volume recycling", Default: "", Type: []string{"string"}, Format: "", }, }, - "sourceVip": { + "IncrementTimeoutNFS": { SchemaProps: spec.SchemaProps{ - Description: "sourceVip is the IP address of the source VIP endoint used for NAT when loadbalancing", + Description: "incrementTimeoutNFS is the increment of time added per Gi to ActiveDeadlineSeconds for an NFS scrubber pod.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "PodTemplateFilePathHostPath": { + SchemaProps: spec.SchemaProps{ + Description: "podTemplateFilePathHostPath is the file path to a pod definition used as a template for HostPath persistent volume recycling. This is for development and testing only and will not work in a multi-node cluster.", Default: "", Type: []string{"string"}, Format: "", }, }, - "enableDSR": { + "MinimumTimeoutHostPath": { SchemaProps: spec.SchemaProps{ - Description: "enableDSR tells kube-proxy whether HNS policies should be created with DSR", - Default: false, - Type: []string{"boolean"}, - Format: "", + Description: "minimumTimeoutHostPath is the minimum ActiveDeadlineSeconds to use for a HostPath Recycler pod. This is for development and testing only and will not work in a multi-node cluster.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "IncrementTimeoutHostPath": { + SchemaProps: spec.SchemaProps{ + Description: "incrementTimeoutHostPath is the increment of time added per Gi to ActiveDeadlineSeconds for a HostPath scrubber pod. This is for development and testing only and will not work in a multi-node cluster.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"networkName", "sourceVip", "enableDSR"}, + Required: []string{"MaximumRetry", "MinimumTimeoutNFS", "PodTemplateFilePathNFS", "IncrementTimeoutNFS", "PodTemplateFilePathHostPath", "MinimumTimeoutHostPath", "IncrementTimeoutHostPath"}, }, }, } } -func schema_k8sio_kube_scheduler_config_v1_ExtenderManagedResource(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_PodGCControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExtenderManagedResource describes the arguments of extended resources managed by an extender.", + Description: "PodGCControllerConfiguration contains elements describing PodGCController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the extended resource name.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "ignoredByScheduler": { + "TerminatedPodGCThreshold": { SchemaProps: spec.SchemaProps{ - Description: "IgnoredByScheduler indicates whether kube-scheduler should ignore this resource when applying predicates.", - Type: []string{"boolean"}, - Format: "", + Description: "terminatedPodGCThreshold is the number of terminated pods that can exist before the terminated pod garbage collector starts deleting terminated pods. If <= 0, the terminated pod garbage collector is disabled.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"name"}, + Required: []string{"TerminatedPodGCThreshold"}, }, }, } } -func schema_k8sio_kube_scheduler_config_v1_ExtenderTLSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicaSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ExtenderTLSConfig contains settings to enable TLS with extender", + Description: "ReplicaSetControllerConfiguration contains elements describing ReplicaSetController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "insecure": { + "ConcurrentRSSyncs": { SchemaProps: spec.SchemaProps{ - Description: "Server should be accessed without verifying the TLS certificate. For testing only.", - Type: []string{"boolean"}, - Format: "", + Description: "concurrentRSSyncs is the number of replica sets that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "serverName": { + }, + Required: []string{"ConcurrentRSSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_ReplicationControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerConfiguration contains elements describing ReplicationController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentRCSyncs": { SchemaProps: spec.SchemaProps{ - Description: "ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", - Type: []string{"string"}, - Format: "", + Description: "concurrentRCSyncs is the number of replication controllers that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "certFile": { + }, + Required: []string{"ConcurrentRCSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_ResourceQuotaControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuotaControllerConfiguration contains elements describing ResourceQuotaController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ResourceQuotaSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "Server requires TLS client certificate authentication", - Type: []string{"string"}, - Format: "", + Description: "resourceQuotaSyncPeriod is the period for syncing quota usage status in the system.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "keyFile": { + "ConcurrentResourceQuotaSyncs": { SchemaProps: spec.SchemaProps{ - Description: "Server requires TLS client certificate authentication", - Type: []string{"string"}, - Format: "", + Description: "concurrentResourceQuotaSyncs is the number of resource quotas that are allowed to sync concurrently. Larger number = more responsive quota management, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "caFile": { + }, + Required: []string{"ResourceQuotaSyncPeriod", "ConcurrentResourceQuotaSyncs"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_SAControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SAControllerConfiguration contains elements describing ServiceAccountController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ServiceAccountKeyFile": { SchemaProps: spec.SchemaProps{ - Description: "Trusted root certificates for server", + Description: "serviceAccountKeyFile is the filename containing a PEM-encoded private RSA key used to sign service account tokens.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "certData": { - SchemaProps: spec.SchemaProps{ - Description: "CertData holds PEM-encoded bytes (typically read from a client certificate file). CertData takes precedence over CertFile", - Type: []string{"string"}, - Format: "byte", - }, - }, - "keyData": { + "ConcurrentSATokenSyncs": { SchemaProps: spec.SchemaProps{ - Description: "KeyData holds PEM-encoded bytes (typically read from a client certificate key file). KeyData takes precedence over KeyFile", - Type: []string{"string"}, - Format: "byte", + Description: "concurrentSATokenSyncs is the number of service account token syncing operations that will be done concurrently.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "caData": { + "RootCAFile": { SchemaProps: spec.SchemaProps{ - Description: "CAData holds PEM-encoded bytes (typically read from a root certificates bundle). CAData takes precedence over CAFile", + Description: "rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.", + Default: "", Type: []string{"string"}, - Format: "byte", + Format: "", }, }, }, + Required: []string{"ServiceAccountKeyFile", "ConcurrentSATokenSyncs", "RootCAFile"}, }, }, } } -func schema_k8sio_kube_scheduler_config_v1_LabelPreference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_StatefulSetControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LabelPreference holds the parameters that are used to configure the corresponding priority function", + Description: "StatefulSetControllerConfiguration contains elements describing StatefulSetController.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "label": { + "ConcurrentStatefulSetSyncs": { SchemaProps: spec.SchemaProps{ - Description: "Used to identify node \"groups\"", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "concurrentStatefulSetSyncs is the number of statefulset objects that are allowed to sync concurrently. Larger number = more responsive statefulsets, but more CPU (and network) load.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "presence": { + }, + Required: []string{"ConcurrentStatefulSetSyncs"}, + }, + }, + } +} + +func schema_k8sio_kube_controller_manager_config_v1alpha1_TTLAfterFinishedControllerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TTLAfterFinishedControllerConfiguration contains elements describing TTLAfterFinishedController.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ConcurrentTTLSyncs": { SchemaProps: spec.SchemaProps{ - Description: "This is a boolean flag If true, higher priority is given to nodes that have the label If false, higher priority is given to nodes that do not have the label", - Default: false, - Type: []string{"boolean"}, - Format: "", + Description: "concurrentTTLSyncs is the number of TTL-after-finished collector workers that are allowed to sync concurrently.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, }, - Required: []string{"label", "presence"}, + Required: []string{"ConcurrentTTLSyncs"}, }, }, } } -func schema_k8sio_kube_scheduler_config_v1_LabelsPresence(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_controller_manager_config_v1alpha1_VolumeConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LabelsPresence holds the parameters that are used to configure the corresponding predicate in scheduler policy configuration.", + Description: "VolumeConfiguration contains *all* enumerated flags meant to configure all volume plugins. From this config, the controller-manager binary will create many instances of volume.VolumeConfig, each containing only the configuration needed for that plugin which are then passed to the appropriate plugin. The ControllerManager binary is the only part of the code which knows what plugins are supported and which flags correspond to each plugin.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "labels": { + "EnableHostPathProvisioning": { SchemaProps: spec.SchemaProps{ - Description: "The list of labels that identify node \"groups\" All of the labels should be either present (or absent) for the node to be considered a fit for hosting the pod", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "enableHostPathProvisioning enables HostPath PV provisioning when running without a cloud provider. This allows testing and development of provisioning features. HostPath provisioning is not supported in any way, won't work in a multi-node cluster, and should not be used for anything other than testing or development.", + Type: []string{"boolean"}, + Format: "", }, }, - "presence": { + "EnableDynamicProvisioning": { SchemaProps: spec.SchemaProps{ - Description: "The boolean flag that indicates whether the labels should be present or absent from the node", - Default: false, + Description: "enableDynamicProvisioning enables the provisioning of volumes when running within an environment that supports dynamic provisioning. Defaults to true.", Type: []string{"boolean"}, Format: "", }, }, + "PersistentVolumeRecyclerConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "persistentVolumeRecyclerConfiguration holds configuration for persistent volume plugins.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"), + }, + }, + "FlexVolumePluginDir": { + SchemaProps: spec.SchemaProps{ + Description: "volumePluginDir is the full path of the directory in which the flex volume plugin should search for additional third party volume plugins", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, }, - Required: []string{"labels", "presence"}, + Required: []string{"EnableHostPathProvisioning", "EnableDynamicProvisioning", "PersistentVolumeRecyclerConfiguration", "FlexVolumePluginDir"}, }, }, + Dependencies: []string{ + "k8s.io/kube-controller-manager/config/v1alpha1.PersistentVolumeRecyclerConfiguration"}, } } -func schema_k8sio_kube_scheduler_config_v1_LegacyExtender(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LegacyExtender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, it is assumed that the extender chose not to provide that extension.", + Description: "KubeProxyConfiguration contains everything necessary to configure the Kubernetes proxy server.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "urlPrefix": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "URLPrefix at which the extender is available", - Default: "", + 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: "", }, }, - "filterVerb": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.", + 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: "", }, }, - "preemptVerb": { + "featureGates": { SchemaProps: spec.SchemaProps{ - Description: "Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.", - Type: []string{"string"}, - Format: "", + Description: "featureGates is a map of feature names to bools that enable or disable alpha/experimental features.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, }, }, - "prioritizeVerb": { + "bindAddress": { SchemaProps: spec.SchemaProps{ - Description: "Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.", + Description: "bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0 for all interfaces)", + Default: "", Type: []string{"string"}, Format: "", }, }, - "weight": { + "healthzBindAddress": { SchemaProps: spec.SchemaProps{ - Description: "The numeric multiplier for the node scores that the prioritize call generates. The weight should be a positive integer", - Type: []string{"integer"}, - Format: "int64", + Description: "healthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10256", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "bindVerb": { + "metricsBindAddress": { SchemaProps: spec.SchemaProps{ - Description: "Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender can implement this function.", + Description: "metricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces)", + Default: "", Type: []string{"string"}, Format: "", }, }, - "enableHttps": { + "bindAddressHardFail": { SchemaProps: spec.SchemaProps{ - Description: "EnableHTTPS specifies whether https should be used to communicate with the extender", + Description: "bindAddressHardFail, if true, kube-proxy will treat failure to bind to a port as fatal and exit", + Default: false, Type: []string{"boolean"}, Format: "", }, }, - "tlsConfig": { + "enableProfiling": { SchemaProps: spec.SchemaProps{ - Description: "TLSConfig specifies the transport layer security config", - Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"), + Description: "enableProfiling enables profiling via web interface on /debug/pprof handler. Profiling handlers will be handled by metrics server.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "httpTimeout": { + "clusterCIDR": { SchemaProps: spec.SchemaProps{ - Description: "HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.", - Type: []string{"integer"}, - Format: "int64", + Description: "clusterCIDR is the CIDR range of the pods in the cluster. It is used to bridge traffic coming from outside of the cluster. If not provided, no off-cluster bridging will be performed.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "nodeCacheCapable": { + "hostnameOverride": { SchemaProps: spec.SchemaProps{ - Description: "NodeCacheCapable specifies that the extender is capable of caching node information, so the scheduler should only send minimal information about the eligible nodes assuming that the extender already cached full details of all nodes in the cluster", - Type: []string{"boolean"}, + Description: "hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.", + Default: "", + Type: []string{"string"}, Format: "", }, }, - "managedResources": { + "clientConnection": { SchemaProps: spec.SchemaProps{ - Description: "ManagedResources is a list of extended resources that are managed by this extender. - A pod will be sent to the extender on the Filter, Prioritize and Bind\n (if the extender is the binder) phases iff the pod requests at least\n one of the extended resources in this list. If empty or unspecified,\n all pods will be sent to this extender.\n- If IgnoredByScheduler is set to true for a resource, kube-scheduler\n will skip checking the resource in predicates.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderManagedResource"), - }, - }, - }, + Description: "clientConnection specifies the kubeconfig file and client connection settings for the proxy server to use when communicating with the apiserver.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), + }, + }, + "iptables": { + SchemaProps: spec.SchemaProps{ + Description: "iptables contains iptables-related configuration options.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration"), + }, + }, + "ipvs": { + SchemaProps: spec.SchemaProps{ + Description: "ipvs contains ipvs-related configuration options.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration"), }, }, - "ignorable": { + "oomScoreAdj": { SchemaProps: spec.SchemaProps{ - Description: "Ignorable specifies if the extender is ignorable, i.e. scheduling should not fail when the extender returns an error or is not reachable.", - Type: []string{"boolean"}, - Format: "", + Description: "oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]", + Type: []string{"integer"}, + Format: "int32", }, }, - }, - Required: []string{"urlPrefix"}, - }, - }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"}, - } -} - -func schema_k8sio_kube_scheduler_config_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Policy describes a struct for a policy resource used in api.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { + "mode": { 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", + Description: "mode specifies which proxy mode to use.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "portRange": { 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", + Description: "portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "predicates": { + "udpIdleTimeout": { SchemaProps: spec.SchemaProps{ - Description: "Holds the information to configure the fit predicate functions", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PredicatePolicy"), - }, - }, - }, + Description: "udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxyMode=userspace.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "priorities": { + "conntrack": { SchemaProps: spec.SchemaProps{ - Description: "Holds the information to configure the priority functions", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.PriorityPolicy"), - }, - }, - }, + Description: "conntrack contains conntrack-related configuration options.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration"), }, }, - "extenders": { + "configSyncPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater than 0.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "nodePortAddresses": { SchemaProps: spec.SchemaProps{ - Description: "Holds the information to communicate with the extender(s)", + Description: "nodePortAddresses is the --nodeport-addresses value for kube-proxy process. Values must be valid IP blocks. These values are as a parameter to select the interfaces where nodeport works. In case someone would like to expose a service on localhost for local visit and some other interfaces for particular purpose, a list of IP blocks would do that. If set it to \"127.0.0.0/8\", kube-proxy will only select the loopback interface for NodePort. If set it to a non-zero IP block, kube-proxy will filter that down to just the IPs that applied to the node. An empty string slice is meant to select all network interfaces.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.LegacyExtender"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "hardPodAffinitySymmetricWeight": { + "winkernel": { SchemaProps: spec.SchemaProps{ - Description: "RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding to every RequiredDuringScheduling affinity rule. HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 1-100.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "winkernel contains winkernel-related configuration options.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"), }, }, - "alwaysCheckAllPredicates": { + "showHiddenMetricsForVersion": { SchemaProps: spec.SchemaProps{ - Description: "When AlwaysCheckAllPredicates is set to true, scheduler checks all the configured predicates even after one or more of them fails. When the flag is set to false, scheduler skips checking the rest of the predicates after it finds one predicate that failed.", - Default: false, - Type: []string{"boolean"}, + Description: "ShowHiddenMetricsForVersion is the version for which you want to show hidden metrics.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "detectLocalMode": { + SchemaProps: spec.SchemaProps{ + Description: "DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR", + Default: "", + Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"predicates", "priorities", "extenders", "hardPodAffinitySymmetricWeight", "alwaysCheckAllPredicates"}, + Required: []string{"bindAddress", "healthzBindAddress", "metricsBindAddress", "bindAddressHardFail", "enableProfiling", "clusterCIDR", "hostnameOverride", "clientConnection", "iptables", "ipvs", "oomScoreAdj", "mode", "portRange", "udpIdleTimeout", "conntrack", "configSyncPeriod", "nodePortAddresses", "winkernel", "showHiddenMetricsForVersion", "detectLocalMode"}, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.LegacyExtender", "k8s.io/kube-scheduler/config/v1.PredicatePolicy", "k8s.io/kube-scheduler/config/v1.PriorityPolicy"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyConntrackConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPTablesConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyIPVSConfiguration", "k8s.io/kube-proxy/config/v1alpha1.KubeProxyWinkernelConfiguration"}, } } -func schema_k8sio_kube_scheduler_config_v1_PredicateArgument(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyConntrackConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PredicateArgument represents the arguments to configure predicate functions in scheduler policy configuration. Only one of its members may be specified", + Description: "KubeProxyConntrackConfiguration contains conntrack settings for the Kubernetes proxy server.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "serviceAffinity": { + "maxPerCore": { SchemaProps: spec.SchemaProps{ - Description: "The predicate that provides affinity for pods belonging to a service It uses a label to identify nodes that belong to the same \"group\"", - Ref: ref("k8s.io/kube-scheduler/config/v1.ServiceAffinity"), + Description: "maxPerCore is the maximum number of NAT connections to track per CPU core (0 to leave the limit as-is and ignore min).", + Type: []string{"integer"}, + Format: "int32", }, }, - "labelsPresence": { + "min": { SchemaProps: spec.SchemaProps{ - Description: "The predicate that checks whether a particular node has a certain label defined or not, regardless of value", - Ref: ref("k8s.io/kube-scheduler/config/v1.LabelsPresence"), + Description: "min is the minimum value of connect-tracking records to allocate, regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is).", + Type: []string{"integer"}, + Format: "int32", }, }, - }, - Required: []string{"serviceAffinity", "labelsPresence"}, - }, - }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.LabelsPresence", "k8s.io/kube-scheduler/config/v1.ServiceAffinity"}, - } -} - -func schema_k8sio_kube_scheduler_config_v1_PredicatePolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PredicatePolicy describes a struct of a predicate policy.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { + "tcpEstablishedTimeout": { SchemaProps: spec.SchemaProps{ - Description: "Identifier of the predicate policy For a custom predicate, the name can be user-defined For the Kubernetes provided predicates, the name is the identifier of the pre-defined predicate", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "tcpEstablishedTimeout is how long an idle TCP connection will be kept open (e.g. '2s'). Must be greater than 0 to set.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "argument": { + "tcpCloseWaitTimeout": { SchemaProps: spec.SchemaProps{ - Description: "Holds the parameters to configure the given predicate", - Ref: ref("k8s.io/kube-scheduler/config/v1.PredicateArgument"), + Description: "tcpCloseWaitTimeout is how long an idle conntrack entry in CLOSE_WAIT state will remain in the conntrack table. (e.g. '60s'). Must be greater than 0 to set.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"name", "argument"}, + Required: []string{"maxPerCore", "min", "tcpEstablishedTimeout", "tcpCloseWaitTimeout"}, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.PredicateArgument"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_scheduler_config_v1_PriorityArgument(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPTablesConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityArgument represents the arguments to configure priority functions in scheduler policy configuration. Only one of its members may be specified", + Description: "KubeProxyIPTablesConfiguration contains iptables-related configuration details for the Kubernetes proxy server.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "serviceAntiAffinity": { + "masqueradeBit": { + SchemaProps: spec.SchemaProps{ + Description: "masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using the pure iptables proxy mode. Values must be within the range [0, 31].", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "masqueradeAll": { SchemaProps: spec.SchemaProps{ - Description: "The priority function that ensures a good spread (anti-affinity) for pods belonging to a service It uses a label to identify nodes that belong to the same \"group\"", - Ref: ref("k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity"), + Description: "masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - "labelPreference": { + "syncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "The priority function that checks whether a particular node has a certain label defined or not, regardless of value", - Ref: ref("k8s.io/kube-scheduler/config/v1.LabelPreference"), + Description: "syncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "requestedToCapacityRatioArguments": { + "minSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "The RequestedToCapacityRatio priority function is parametrized with function shape.", - Ref: ref("k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments"), + Description: "minSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m', '2h22m').", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"serviceAntiAffinity", "labelPreference", "requestedToCapacityRatioArguments"}, + Required: []string{"masqueradeBit", "masqueradeAll", "syncPeriod", "minSyncPeriod"}, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.LabelPreference", "k8s.io/kube-scheduler/config/v1.RequestedToCapacityRatioArguments", "k8s.io/kube-scheduler/config/v1.ServiceAntiAffinity"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_scheduler_config_v1_PriorityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyIPVSConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PriorityPolicy describes a struct of a priority policy.", + Description: "KubeProxyIPVSConfiguration contains ipvs-related configuration details for the Kubernetes proxy server.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "syncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "Identifier of the priority policy For a custom priority, the name can be user-defined For the Kubernetes provided priority functions, the name is the identifier of the pre-defined priority function", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "syncPeriod is the period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "weight": { + "minSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "The numeric multiplier for the node scores that the priority function generates The weight should be non-zero and can be a positive or a negative integer", + Description: "minSyncPeriod is the minimum period that ipvs rules are refreshed (e.g. '5s', '1m', '2h22m').", Default: 0, - Type: []string{"integer"}, - Format: "int64", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "argument": { + "scheduler": { SchemaProps: spec.SchemaProps{ - Description: "Holds the parameters to configure the given priority function", - Ref: ref("k8s.io/kube-scheduler/config/v1.PriorityArgument"), + Description: "ipvs scheduler", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - }, - Required: []string{"name", "weight", "argument"}, - }, - }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.PriorityArgument"}, - } -} - -func schema_k8sio_kube_scheduler_config_v1_RequestedToCapacityRatioArguments(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RequestedToCapacityRatioArguments holds arguments specific to RequestedToCapacityRatio priority function.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "shape": { + "excludeCIDRs": { SchemaProps: spec.SchemaProps{ - Description: "Array of point defining priority function shape.", + Description: "excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch when cleaning up ipvs services.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "resources": { + "strictARP": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.ResourceSpec"), - }, - }, - }, + Description: "strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries from kube-ipvs0 interface", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, - }, - Required: []string{"shape"}, - }, - }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1.ResourceSpec", "k8s.io/kube-scheduler/config/v1.UtilizationShapePoint"}, - } -} - -func schema_k8sio_kube_scheduler_config_v1_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceSpec represents single resource and weight for bin packing of priority RequestedToCapacityRatioArguments.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { + "tcpTimeout": { SchemaProps: spec.SchemaProps{ - Description: "Name of the resource to be managed by RequestedToCapacityRatio function.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "tcpTimeout is the timeout value used for idle IPVS TCP sessions. The default value is 0, which preserves the current timeout value on the system.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "weight": { + "tcpFinTimeout": { SchemaProps: spec.SchemaProps{ - Description: "Weight of the resource.", - Type: []string{"integer"}, - Format: "int64", + Description: "tcpFinTimeout is the timeout value used for IPVS TCP sessions after receiving a FIN. The default value is 0, which preserves the current timeout value on the system.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_kube_scheduler_config_v1_ServiceAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceAffinity holds the parameters that are used to configure the corresponding predicate in scheduler policy configuration.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "labels": { + "udpTimeout": { SchemaProps: spec.SchemaProps{ - Description: "The list of labels that identify node \"groups\" All of the labels should match for the node to be considered a fit for hosting the pod", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "udpTimeout is the timeout value used for IPVS UDP packets. The default value is 0, which preserves the current timeout value on the system.", + Default: 0, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, }, - Required: []string{"labels"}, + Required: []string{"syncPeriod", "minSyncPeriod", "scheduler", "excludeCIDRs", "strictARP", "tcpTimeout", "tcpFinTimeout", "udpTimeout"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, } } -func schema_k8sio_kube_scheduler_config_v1_ServiceAntiAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_proxy_config_v1alpha1_KubeProxyWinkernelConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ServiceAntiAffinity holds the parameters that are used to configure the corresponding priority function", + Description: "KubeProxyWinkernelConfiguration contains Windows/HNS settings for the Kubernetes proxy server.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "label": { + "networkName": { SchemaProps: spec.SchemaProps{ - Description: "Used to identify node \"groups\"", + Description: "networkName is the name of the network kube-proxy will use to create endpoints and policies", Default: "", Type: []string{"string"}, Format: "", }, }, - }, - Required: []string{"label"}, - }, - }, - } -} - -func schema_k8sio_kube_scheduler_config_v1_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "UtilizationShapePoint represents single point of priority function shape.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "utilization": { + "sourceVip": { SchemaProps: spec.SchemaProps{ - Description: "Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "sourceVip is the IP address of the source VIP endoint used for NAT when loadbalancing", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "score": { + "enableDSR": { SchemaProps: spec.SchemaProps{ - Description: "Score assigned to given utilization (y axis). Valid values are 0 to 10.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "enableDSR tells kube-proxy whether HNS policies should be created with DSR", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"utilization", "score"}, + Required: []string{"networkName", "sourceVip", "enableDSR"}, }, }, } } -func schema_k8sio_kube_scheduler_config_v1beta1_DefaultPreemptionArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_DefaultPreemptionArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49206,7 +51045,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_DefaultPreemptionArgs(ref common } } -func schema_k8sio_kube_scheduler_config_v1beta1_Extender(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_Extender(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49266,13 +51105,12 @@ func schema_k8sio_kube_scheduler_config_v1beta1_Extender(ref common.ReferenceCal "tlsConfig": { SchemaProps: spec.SchemaProps{ Description: "TLSConfig specifies the transport layer security config", - Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ExtenderTLSConfig"), }, }, "httpTimeout": { SchemaProps: spec.SchemaProps{ Description: "HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -49296,7 +51134,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_Extender(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderManagedResource"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ExtenderManagedResource"), }, }, }, @@ -49314,11 +51152,109 @@ func schema_k8sio_kube_scheduler_config_v1beta1_Extender(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-scheduler/config/v1beta2.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1beta2.ExtenderTLSConfig"}, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta2_ExtenderManagedResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExtenderManagedResource describes the arguments of extended resources managed by an extender.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the extended resource name.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ignoredByScheduler": { + SchemaProps: spec.SchemaProps{ + Description: "IgnoredByScheduler indicates whether kube-scheduler should ignore this resource when applying predicates.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta2_ExtenderTLSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExtenderTLSConfig contains settings to enable TLS with extender", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "insecure": { + SchemaProps: spec.SchemaProps{ + Description: "Server should be accessed without verifying the TLS certificate. For testing only.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "serverName": { + SchemaProps: spec.SchemaProps{ + Description: "ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "certFile": { + SchemaProps: spec.SchemaProps{ + Description: "Server requires TLS client certificate authentication", + Type: []string{"string"}, + Format: "", + }, + }, + "keyFile": { + SchemaProps: spec.SchemaProps{ + Description: "Server requires TLS client certificate authentication", + Type: []string{"string"}, + Format: "", + }, + }, + "caFile": { + SchemaProps: spec.SchemaProps{ + Description: "Trusted root certificates for server", + Type: []string{"string"}, + Format: "", + }, + }, + "certData": { + SchemaProps: spec.SchemaProps{ + Description: "CertData holds PEM-encoded bytes (typically read from a client certificate file). CertData takes precedence over CertFile", + Type: []string{"string"}, + Format: "byte", + }, + }, + "keyData": { + SchemaProps: spec.SchemaProps{ + Description: "KeyData holds PEM-encoded bytes (typically read from a client certificate key file). KeyData takes precedence over KeyFile", + Type: []string{"string"}, + Format: "byte", + }, + }, + "caData": { + SchemaProps: spec.SchemaProps{ + Description: "CAData holds PEM-encoded bytes (typically read from a root certificates bundle). CAData takes precedence over CAFile", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, } } -func schema_k8sio_kube_scheduler_config_v1beta1_InterPodAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_InterPodAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49352,7 +51288,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_InterPodAffinityArgs(ref common. } } -func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49396,14 +51332,14 @@ func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerConfiguration(ref c }, "healthzBindAddress": { SchemaProps: spec.SchemaProps{ - Description: "HealthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10251", + Description: "Note: Both HealthzBindAddress and MetricsBindAddress fields are deprecated. Only empty address or port 0 is allowed. Anything else will fail validation. HealthzBindAddress is the IP address and port for the health check server to serve on.", Type: []string{"string"}, Format: "", }, }, "metricsBindAddress": { SchemaProps: spec.SchemaProps{ - Description: "MetricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 0.0.0.0:10251.", + Description: "MetricsBindAddress is the IP address and port for the metrics server to serve on.", Type: []string{"string"}, Format: "", }, @@ -49459,7 +51395,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerConfiguration(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.KubeSchedulerProfile"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile"), }, }, }, @@ -49478,7 +51414,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerConfiguration(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.Extender"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Extender"), }, }, }, @@ -49489,11 +51425,11 @@ func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerConfiguration(ref c }, }, Dependencies: []string{ - "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1beta1.Extender", "k8s.io/kube-scheduler/config/v1beta1.KubeSchedulerProfile"}, + "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1beta2.Extender", "k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile"}, } } -func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49510,7 +51446,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerProfile(ref common. "plugins": { SchemaProps: spec.SchemaProps{ Description: "Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and PluginConfig must be specified for all profiles.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.Plugins"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Plugins"), }, }, "pluginConfig": { @@ -49529,7 +51465,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerProfile(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginConfig"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginConfig"), }, }, }, @@ -49539,11 +51475,11 @@ func schema_k8sio_kube_scheduler_config_v1beta1_KubeSchedulerProfile(ref common. }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.PluginConfig", "k8s.io/kube-scheduler/config/v1beta1.Plugins"}, + "k8s.io/kube-scheduler/config/v1beta2.PluginConfig", "k8s.io/kube-scheduler/config/v1beta2.Plugins"}, } } -func schema_k8sio_kube_scheduler_config_v1beta1_NodeAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_NodeAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49578,114 +51514,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_NodeAffinityArgs(ref common.Refe } } -func schema_k8sio_kube_scheduler_config_v1beta1_NodeLabelArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeLabelArgs holds arguments used to configure the NodeLabel plugin.\n\nThis plugin has been deprecated and is only configurable through the scheduler policy API and the v1beta1 component config API. It is recommended to use the NodeAffinity plugin instead.", - 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: "", - }, - }, - "presentLabels": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "PresentLabels should be present for the node to be considered a fit for hosting the pod", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "absentLabels": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "AbsentLabels should be absent for the node to be considered a fit for hosting the pod", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "presentLabelsPreference": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Nodes that have labels in the list will get a higher score.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "absentLabelsPreference": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Nodes that don't have labels in the list will get a higher score.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesBalancedAllocationArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesBalancedAllocationArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49722,7 +51551,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesBalancedAllocationA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"), }, }, }, @@ -49732,11 +51561,11 @@ func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesBalancedAllocationA }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"}, + "k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"}, } } -func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesFitArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesFitArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49800,114 +51629,18 @@ func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesFitArgs(ref common. "scoringStrategy": { SchemaProps: spec.SchemaProps{ Description: "ScoringStrategy selects the node resource scoring strategy. The default strategy is LeastAllocated with an equal \"cpu\" and \"memory\" weight.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ScoringStrategy"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.ScoringStrategy"}, - } -} - -func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesLeastAllocatedArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeResourcesLeastAllocatedArgs holds arguments used to configure NodeResourcesLeastAllocated plugin.", - 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: "", - }, - }, - "resources": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Resources to be managed, if no resource is provided, default resource set with both the weight of \"cpu\" and \"memory\" set to \"1\" will be applied. Resource with \"0\" weight will not accountable for the final score.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"}, - } -} - -func schema_k8sio_kube_scheduler_config_v1beta1_NodeResourcesMostAllocatedArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeResourcesMostAllocatedArgs holds arguments used to configure NodeResourcesMostAllocated plugin.", - 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: "", - }, - }, - "resources": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Resources to be managed, if no resource is provided, default resource set with both the weight of \"cpu\" and \"memory\" set to \"1\" will be applied. Resource with \"0\" weight will not accountable for the final score.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"), - }, - }, - }, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"}, + "k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy"}, } } -func schema_k8sio_kube_scheduler_config_v1beta1_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49936,7 +51669,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_Plugin(ref common.ReferenceCallb } } -func schema_k8sio_kube_scheduler_config_v1beta1_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49967,7 +51700,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_PluginConfig(ref common.Referenc } } -func schema_k8sio_kube_scheduler_config_v1beta1_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -49981,13 +51714,13 @@ func schema_k8sio_kube_scheduler_config_v1beta1_PluginSet(ref common.ReferenceCa }, }, SchemaProps: spec.SchemaProps{ - Description: "Enabled specifies plugins that should be enabled in addition to default plugins. These are called after default plugins and in the same order specified here.", + Description: "Enabled specifies plugins that should be enabled in addition to default plugins. If the default plugin is also configured in the scheduler config file, the weight of plugin will be overridden accordingly. These are called after default plugins and in the same order specified here.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.Plugin"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Plugin"), }, }, }, @@ -50009,7 +51742,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_PluginSet(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.Plugin"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Plugin"), }, }, }, @@ -50019,11 +51752,11 @@ func schema_k8sio_kube_scheduler_config_v1beta1_PluginSet(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.Plugin"}, + "k8s.io/kube-scheduler/config/v1beta2.Plugin"}, } } -func schema_k8sio_kube_scheduler_config_v1beta1_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50033,78 +51766,96 @@ func schema_k8sio_kube_scheduler_config_v1beta1_Plugins(ref common.ReferenceCall "queueSort": { SchemaProps: spec.SchemaProps{ Description: "QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "preFilter": { SchemaProps: spec.SchemaProps{ Description: "PreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "filter": { SchemaProps: spec.SchemaProps{ Description: "Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "postFilter": { SchemaProps: spec.SchemaProps{ - Description: "PostFilter is a list of plugins that are invoked after filtering phase, no matter whether filtering succeeds or not.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Description: "PostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "preScore": { SchemaProps: spec.SchemaProps{ Description: "PreScore is a list of plugins that are invoked before scoring.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "score": { SchemaProps: spec.SchemaProps{ Description: "Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "reserve": { SchemaProps: spec.SchemaProps{ Description: "Reserve is a list of plugins invoked when reserving/unreserving resources after a node is assigned to run the pod.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "permit": { SchemaProps: spec.SchemaProps{ Description: "Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "preBind": { SchemaProps: spec.SchemaProps{ Description: "PreBind is a list of plugins that should be invoked before a pod is bound.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "bind": { SchemaProps: spec.SchemaProps{ Description: "Bind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework. The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, "postBind": { SchemaProps: spec.SchemaProps{ Description: "PostBind is a list of plugins that should be invoked after a pod is successfully bound.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.PluginSet"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + }, + }, + "multiPoint": { + SchemaProps: spec.SchemaProps{ + Description: "MultiPoint is a simplified config section to enable plugins for all valid extension points.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.PluginSet"}, + "k8s.io/kube-scheduler/config/v1beta2.PluginSet"}, } } -func schema_k8sio_kube_scheduler_config_v1beta1_PodTopologySpreadArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_PodTopologySpreadArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50159,75 +51910,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_PodTopologySpreadArgs(ref common } } -func schema_k8sio_kube_scheduler_config_v1beta1_RequestedToCapacityRatioArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RequestedToCapacityRatioArgs holds arguments used to configure RequestedToCapacityRatio plugin.", - 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: "", - }, - }, - "shape": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Points defining priority function shape", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"), - }, - }, - }, - }, - }, - "resources": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Resources to be managed", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"), - }, - }, - }, - }, - }, - }, - Required: []string{"shape"}, - }, - }, - Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec", "k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"}, - } -} - -func schema_k8sio_kube_scheduler_config_v1beta1_RequestedToCapacityRatioParam(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_RequestedToCapacityRatioParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50247,7 +51930,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_RequestedToCapacityRatioParam(re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"), }, }, }, @@ -50257,11 +51940,11 @@ func schema_k8sio_kube_scheduler_config_v1beta1_RequestedToCapacityRatioParam(re }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"}, + "k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"}, } } -func schema_k8sio_kube_scheduler_config_v1beta1_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50290,7 +51973,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_ResourceSpec(ref common.Referenc } } -func schema_k8sio_kube_scheduler_config_v1beta1_ScoringStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_ScoringStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50308,7 +51991,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_ScoringStrategy(ref common.Refer VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-map-keys": []interface{}{ - "name", + "topologyKey", }, "x-kubernetes-list-type": "map", }, @@ -50320,7 +52003,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_ScoringStrategy(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"), }, }, }, @@ -50329,85 +52012,18 @@ func schema_k8sio_kube_scheduler_config_v1beta1_ScoringStrategy(ref common.Refer "requestedToCapacityRatio": { SchemaProps: spec.SchemaProps{ Description: "Arguments specific to RequestedToCapacityRatio strategy.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.RequestedToCapacityRatioParam"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.RequestedToCapacityRatioParam"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.RequestedToCapacityRatioParam", "k8s.io/kube-scheduler/config/v1beta1.ResourceSpec"}, - } -} - -func schema_k8sio_kube_scheduler_config_v1beta1_ServiceAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceAffinityArgs holds arguments used to configure the ServiceAffinity plugin.\n\nThis plugin has been deprecated and is only configurable through the scheduler policy API and the v1beta1 component config API. It is recommended to use the InterPodAffinity plugin instead.", - 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: "", - }, - }, - "affinityLabels": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "AffinityLabels are homogeneous for pods that are scheduled to a node. (i.e. it returns true IFF this pod can be added to this node such that all other pods in the same service are running on nodes with the exact same values for Labels).", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "antiAffinityLabelsPreference": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "AntiAffinityLabelsPreference are the labels to consider for service anti affinity scoring.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, + "k8s.io/kube-scheduler/config/v1beta2.RequestedToCapacityRatioParam", "k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"}, } } -func schema_k8sio_kube_scheduler_config_v1beta1_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50437,7 +52053,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_UtilizationShapePoint(ref common } } -func schema_k8sio_kube_scheduler_config_v1beta1_VolumeBindingArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta2_VolumeBindingArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50478,7 +52094,7 @@ func schema_k8sio_kube_scheduler_config_v1beta1_VolumeBindingArgs(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"), }, }, }, @@ -50488,11 +52104,11 @@ func schema_k8sio_kube_scheduler_config_v1beta1_VolumeBindingArgs(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta1.UtilizationShapePoint"}, + "k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"}, } } -func schema_k8sio_kube_scheduler_config_v1beta2_DefaultPreemptionArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_DefaultPreemptionArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50533,7 +52149,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_DefaultPreemptionArgs(ref common } } -func schema_k8sio_kube_scheduler_config_v1beta2_Extender(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_Extender(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50593,13 +52209,12 @@ func schema_k8sio_kube_scheduler_config_v1beta2_Extender(ref common.ReferenceCal "tlsConfig": { SchemaProps: spec.SchemaProps{ Description: "TLSConfig specifies the transport layer security config", - Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.ExtenderTLSConfig"), }, }, "httpTimeout": { SchemaProps: spec.SchemaProps{ Description: "HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize timeout is ignored, k8s/other extenders priorities are used to select the node.", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -50623,7 +52238,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_Extender(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1.ExtenderManagedResource"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.ExtenderManagedResource"), }, }, }, @@ -50641,11 +52256,109 @@ func schema_k8sio_kube_scheduler_config_v1beta2_Extender(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-scheduler/config/v1.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1.ExtenderTLSConfig"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kube-scheduler/config/v1beta3.ExtenderManagedResource", "k8s.io/kube-scheduler/config/v1beta3.ExtenderTLSConfig"}, } } -func schema_k8sio_kube_scheduler_config_v1beta2_InterPodAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_ExtenderManagedResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExtenderManagedResource describes the arguments of extended resources managed by an extender.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the extended resource name.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ignoredByScheduler": { + SchemaProps: spec.SchemaProps{ + Description: "IgnoredByScheduler indicates whether kube-scheduler should ignore this resource when applying predicates.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta3_ExtenderTLSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExtenderTLSConfig contains settings to enable TLS with extender", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "insecure": { + SchemaProps: spec.SchemaProps{ + Description: "Server should be accessed without verifying the TLS certificate. For testing only.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "serverName": { + SchemaProps: spec.SchemaProps{ + Description: "ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used.", + Type: []string{"string"}, + Format: "", + }, + }, + "certFile": { + SchemaProps: spec.SchemaProps{ + Description: "Server requires TLS client certificate authentication", + Type: []string{"string"}, + Format: "", + }, + }, + "keyFile": { + SchemaProps: spec.SchemaProps{ + Description: "Server requires TLS client certificate authentication", + Type: []string{"string"}, + Format: "", + }, + }, + "caFile": { + SchemaProps: spec.SchemaProps{ + Description: "Trusted root certificates for server", + Type: []string{"string"}, + Format: "", + }, + }, + "certData": { + SchemaProps: spec.SchemaProps{ + Description: "CertData holds PEM-encoded bytes (typically read from a client certificate file). CertData takes precedence over CertFile", + Type: []string{"string"}, + Format: "byte", + }, + }, + "keyData": { + SchemaProps: spec.SchemaProps{ + Description: "KeyData holds PEM-encoded bytes (typically read from a client certificate key file). KeyData takes precedence over KeyFile", + Type: []string{"string"}, + Format: "byte", + }, + }, + "caData": { + SchemaProps: spec.SchemaProps{ + Description: "CAData holds PEM-encoded bytes (typically read from a root certificates bundle). CAData takes precedence over CAFile", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_kube_scheduler_config_v1beta3_InterPodAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50679,7 +52392,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_InterPodAffinityArgs(ref common. } } -func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_KubeSchedulerConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50721,20 +52434,6 @@ func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref c Ref: ref("k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration"), }, }, - "healthzBindAddress": { - SchemaProps: spec.SchemaProps{ - Description: "HealthzBindAddress is the IP address and port for the health check server to serve on, defaulting to 0.0.0.0:10251", - Type: []string{"string"}, - Format: "", - }, - }, - "metricsBindAddress": { - SchemaProps: spec.SchemaProps{ - Description: "MetricsBindAddress is the IP address and port for the metrics server to serve on, defaulting to 0.0.0.0:10251.", - Type: []string{"string"}, - Format: "", - }, - }, "enableProfiling": { SchemaProps: spec.SchemaProps{ Description: "enableProfiling enables profiling via web interface host:port/debug/pprof/", @@ -50786,7 +52485,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.KubeSchedulerProfile"), }, }, }, @@ -50805,7 +52504,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Extender"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.Extender"), }, }, }, @@ -50816,11 +52515,11 @@ func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerConfiguration(ref c }, }, Dependencies: []string{ - "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1beta2.Extender", "k8s.io/kube-scheduler/config/v1beta2.KubeSchedulerProfile"}, + "k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration", "k8s.io/component-base/config/v1alpha1.LeaderElectionConfiguration", "k8s.io/kube-scheduler/config/v1beta3.Extender", "k8s.io/kube-scheduler/config/v1beta3.KubeSchedulerProfile"}, } } -func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_KubeSchedulerProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50837,7 +52536,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerProfile(ref common. "plugins": { SchemaProps: spec.SchemaProps{ Description: "Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and PluginConfig must be specified for all profiles.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Plugins"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.Plugins"), }, }, "pluginConfig": { @@ -50856,7 +52555,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerProfile(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginConfig"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginConfig"), }, }, }, @@ -50866,11 +52565,11 @@ func schema_k8sio_kube_scheduler_config_v1beta2_KubeSchedulerProfile(ref common. }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta2.PluginConfig", "k8s.io/kube-scheduler/config/v1beta2.Plugins"}, + "k8s.io/kube-scheduler/config/v1beta3.PluginConfig", "k8s.io/kube-scheduler/config/v1beta3.Plugins"}, } } -func schema_k8sio_kube_scheduler_config_v1beta2_NodeAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_NodeAffinityArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50905,7 +52604,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_NodeAffinityArgs(ref common.Refe } } -func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesBalancedAllocationArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_NodeResourcesBalancedAllocationArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -50942,7 +52641,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesBalancedAllocationA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.ResourceSpec"), }, }, }, @@ -50952,11 +52651,11 @@ func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesBalancedAllocationA }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"}, + "k8s.io/kube-scheduler/config/v1beta3.ResourceSpec"}, } } -func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesFitArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_NodeResourcesFitArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51020,18 +52719,18 @@ func schema_k8sio_kube_scheduler_config_v1beta2_NodeResourcesFitArgs(ref common. "scoringStrategy": { SchemaProps: spec.SchemaProps{ Description: "ScoringStrategy selects the node resource scoring strategy. The default strategy is LeastAllocated with an equal \"cpu\" and \"memory\" weight.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.ScoringStrategy"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta2.ScoringStrategy"}, + "k8s.io/kube-scheduler/config/v1beta3.ScoringStrategy"}, } } -func schema_k8sio_kube_scheduler_config_v1beta2_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_Plugin(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51060,7 +52759,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_Plugin(ref common.ReferenceCallb } } -func schema_k8sio_kube_scheduler_config_v1beta2_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_PluginConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51091,7 +52790,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_PluginConfig(ref common.Referenc } } -func schema_k8sio_kube_scheduler_config_v1beta2_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_PluginSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51111,7 +52810,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_PluginSet(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Plugin"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.Plugin"), }, }, }, @@ -51133,7 +52832,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_PluginSet(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.Plugin"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.Plugin"), }, }, }, @@ -51143,11 +52842,11 @@ func schema_k8sio_kube_scheduler_config_v1beta2_PluginSet(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta2.Plugin"}, + "k8s.io/kube-scheduler/config/v1beta3.Plugin"}, } } -func schema_k8sio_kube_scheduler_config_v1beta2_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_Plugins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51158,88 +52857,95 @@ func schema_k8sio_kube_scheduler_config_v1beta2_Plugins(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, "preFilter": { SchemaProps: spec.SchemaProps{ Description: "PreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, "filter": { SchemaProps: spec.SchemaProps{ Description: "Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, "postFilter": { SchemaProps: spec.SchemaProps{ - Description: "PostFilter is a list of plugins that are invoked after filtering phase, no matter whether filtering succeeds or not.", + Description: "PostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, "preScore": { SchemaProps: spec.SchemaProps{ Description: "PreScore is a list of plugins that are invoked before scoring.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, "score": { SchemaProps: spec.SchemaProps{ Description: "Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, "reserve": { SchemaProps: spec.SchemaProps{ Description: "Reserve is a list of plugins invoked when reserving/unreserving resources after a node is assigned to run the pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, "permit": { SchemaProps: spec.SchemaProps{ Description: "Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, "preBind": { SchemaProps: spec.SchemaProps{ Description: "PreBind is a list of plugins that should be invoked before a pod is bound.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, "bind": { SchemaProps: spec.SchemaProps{ Description: "Bind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework. The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, "postBind": { SchemaProps: spec.SchemaProps{ Description: "PostBind is a list of plugins that should be invoked after a pod is successfully bound.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.PluginSet"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), + }, + }, + "multiPoint": { + SchemaProps: spec.SchemaProps{ + Description: "MultiPoint is a simplified config section to enable plugins for all valid extension points. Plugins enabled through MultiPoint will automatically register for every individual extension point the plugin has implemented. Disabling a plugin through MultiPoint disables that behavior. The same is true for disabling \"*\" through MultiPoint (no default plugins will be automatically registered). Plugins can still be disabled through their individual extension points.\n\nIn terms of precedence, plugin config follows this basic hierarchy\n 1. Specific extension points\n 2. Explicitly configured MultiPoint plugins\n 3. The set of default plugins, as MultiPoint plugins\nThis implies that a higher precedence plugin will run first and overwrite any settings within MultiPoint. Explicitly user-configured plugins also take a higher precedence over default plugins. Within this hierarchy, an Enabled setting takes precedence over Disabled. For example, if a plugin is set in both `multiPoint.Enabled` and `multiPoint.Disabled`, the plugin will be enabled. Similarly, including `multiPoint.Disabled = '*'` and `multiPoint.Enabled = pluginA` will still register that specific plugin through MultiPoint. This follows the same behavior as all other extension point configurations.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.PluginSet"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta2.PluginSet"}, + "k8s.io/kube-scheduler/config/v1beta3.PluginSet"}, } } -func schema_k8sio_kube_scheduler_config_v1beta2_PodTopologySpreadArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_PodTopologySpreadArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51294,7 +53000,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_PodTopologySpreadArgs(ref common } } -func schema_k8sio_kube_scheduler_config_v1beta2_RequestedToCapacityRatioParam(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_RequestedToCapacityRatioParam(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51314,7 +53020,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_RequestedToCapacityRatioParam(re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.UtilizationShapePoint"), }, }, }, @@ -51324,11 +53030,11 @@ func schema_k8sio_kube_scheduler_config_v1beta2_RequestedToCapacityRatioParam(re }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"}, + "k8s.io/kube-scheduler/config/v1beta3.UtilizationShapePoint"}, } } -func schema_k8sio_kube_scheduler_config_v1beta2_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_ResourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51357,7 +53063,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_ResourceSpec(ref common.Referenc } } -func schema_k8sio_kube_scheduler_config_v1beta2_ScoringStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_ScoringStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51387,7 +53093,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_ScoringStrategy(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.ResourceSpec"), }, }, }, @@ -51396,18 +53102,18 @@ func schema_k8sio_kube_scheduler_config_v1beta2_ScoringStrategy(ref common.Refer "requestedToCapacityRatio": { SchemaProps: spec.SchemaProps{ Description: "Arguments specific to RequestedToCapacityRatio strategy.", - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.RequestedToCapacityRatioParam"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.RequestedToCapacityRatioParam"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta2.RequestedToCapacityRatioParam", "k8s.io/kube-scheduler/config/v1beta2.ResourceSpec"}, + "k8s.io/kube-scheduler/config/v1beta3.RequestedToCapacityRatioParam", "k8s.io/kube-scheduler/config/v1beta3.ResourceSpec"}, } } -func schema_k8sio_kube_scheduler_config_v1beta2_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_UtilizationShapePoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51437,7 +53143,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_UtilizationShapePoint(ref common } } -func schema_k8sio_kube_scheduler_config_v1beta2_VolumeBindingArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_kube_scheduler_config_v1beta3_VolumeBindingArgs(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -51478,7 +53184,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_VolumeBindingArgs(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"), + Ref: ref("k8s.io/kube-scheduler/config/v1beta3.UtilizationShapePoint"), }, }, }, @@ -51488,7 +53194,7 @@ func schema_k8sio_kube_scheduler_config_v1beta2_VolumeBindingArgs(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/kube-scheduler/config/v1beta2.UtilizationShapePoint"}, + "k8s.io/kube-scheduler/config/v1beta3.UtilizationShapePoint"}, } } @@ -51766,21 +53472,18 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "syncFrequency": { SchemaProps: spec.SchemaProps{ Description: "syncFrequency is the max period between synchronizing running containers and config. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening this duration may have a negative performance impact, especially as the number of Pods on the node increases. Alternatively, increasing this duration will result in longer refresh times for ConfigMaps and Secrets. Default: \"1m\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "fileCheckFrequency": { SchemaProps: spec.SchemaProps{ Description: "fileCheckFrequency is the duration between checking config files for new data. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the duration will cause the Kubelet to reload local Static Pod configurations more frequently, which may have a negative performance impact. Default: \"20s\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "httpCheckFrequency": { SchemaProps: spec.SchemaProps{ Description: "httpCheckFrequency is the duration between checking http for new data. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the duration will cause the Kubelet to poll staticPodURL more frequently, which may have a negative performance impact. Default: \"20s\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -51987,35 +53690,31 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "streamingConnectionIdleTimeout": { SchemaProps: spec.SchemaProps{ Description: "streamingConnectionIdleTimeout is the maximum time a streaming connection can be idle before the connection is automatically closed. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact components that rely on infrequent updates over streaming connections to the Kubelet server. Default: \"4h\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "nodeStatusUpdateFrequency": { SchemaProps: spec.SchemaProps{ Description: "nodeStatusUpdateFrequency is the frequency that kubelet computes node status. If node lease feature is not enabled, it is also the frequency that kubelet posts node status to master. Note: When node lease feature is not enabled, be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact node scalability, and also that the node controller's nodeMonitorGracePeriod must be set to N*NodeStatusUpdateFrequency, where N is the number of retries before the node controller marks the node unhealthy. Default: \"10s\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "nodeStatusReportFrequency": { SchemaProps: spec.SchemaProps{ Description: "nodeStatusReportFrequency is the frequency that kubelet posts node status to master if node status does not change. Kubelet will ignore this frequency and post node status immediately if any change is detected. It is only used when node lease feature is enabled. nodeStatusReportFrequency's default value is 5m. But if nodeStatusUpdateFrequency is set explicitly, nodeStatusReportFrequency's default value will be set to nodeStatusUpdateFrequency for backward compatibility. Default: \"5m\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "nodeLeaseDurationSeconds": { SchemaProps: spec.SchemaProps{ - Description: "nodeLeaseDurationSeconds is the duration the Kubelet will set on its corresponding Lease, when the NodeLease feature is enabled. This feature provides an indicator of node health by having the Kubelet create and periodically renew a lease, named after the node, in the kube-node-lease namespace. If the lease expires, the node can be considered unhealthy. The lease is currently renewed every 10s, per KEP-0009. In the future, the lease renewal interval may be set based on the lease duration. The field value must be greater than 0. Requires the NodeLease feature gate to be enabled. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that decreasing the duration may reduce tolerance for issues that temporarily prevent the Kubelet from renewing the lease (e.g. a short-lived network issue). Default: 40", + Description: "nodeLeaseDurationSeconds is the duration the Kubelet will set on its corresponding Lease. NodeLease provides an indicator of node health by having the Kubelet create and periodically renew a lease, named after the node, in the kube-node-lease namespace. If the lease expires, the node can be considered unhealthy. The lease is currently renewed every 10s, per KEP-0009. In the future, the lease renewal interval may be set based on the lease duration. The field value must be greater than 0. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that decreasing the duration may reduce tolerance for issues that temporarily prevent the Kubelet from renewing the lease (e.g. a short-lived network issue). Default: 40", Type: []string{"integer"}, Format: "int32", }, }, "imageMinimumGCAge": { SchemaProps: spec.SchemaProps{ - Description: "imageMinimumGCAge is the minimum age for an unused image before it is garbage collected. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: \"2m\"", - Default: map[string]interface{}{}, + Description: "imageMinimumGCAge is the minimum age for an unused image before it is garbage collected. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. Default: \"2m\"", Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -52036,7 +53735,6 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "volumeStatsAggPeriod": { SchemaProps: spec.SchemaProps{ Description: "volumeStatsAggPeriod is the frequency for calculating and caching volume disk usage for all pods. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the period may carry a performance impact. Default: \"1m\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -52101,7 +53799,6 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "cpuManagerReconcilePeriod": { SchemaProps: spec.SchemaProps{ Description: "cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager. Requires the CPUManager feature gate to be enabled. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the period may carry a performance impact. Default: \"10s\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -52114,7 +53811,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "topologyManagerPolicy": { SchemaProps: spec.SchemaProps{ - Description: "topologyManagerPolicy is the name of the topology manager policy to use. Valid values include:\n\n- `restricted`: kubelet only allows pods with optimal NUMA node alignment for\n requested resources;\n- `best-effort`: kubelet will favor pods with NUMA alignment of CPU and device\n resources;\n- `none`: kublet has no knowledge of NUMA alignment of a pod's CPU and device resources. - `single-numa-node`: kubelet only allows pods with a single NUMA alignment\n of CPU and device resources.\n\nPolicies other than \"none\" require the TopologyManager feature gate to be enabled. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"none\"", + Description: "topologyManagerPolicy is the name of the topology manager policy to use. Valid values include:\n\n- `restricted`: kubelet only allows pods with optimal NUMA node alignment for\n requested resources;\n- `best-effort`: kubelet will favor pods with NUMA alignment of CPU and device\n resources;\n- `none`: kubelet has no knowledge of NUMA alignment of a pod's CPU and device resources. - `single-numa-node`: kubelet only allows pods with a single NUMA alignment\n of CPU and device resources.\n\nPolicies other than \"none\" require the TopologyManager feature gate to be enabled. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. Default: \"none\"", Type: []string{"string"}, Format: "", }, @@ -52145,7 +53842,6 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "runtimeRequestTimeout": { SchemaProps: spec.SchemaProps{ Description: "runtimeRequestTimeout is the timeout for all runtime requests except long running requests - pull, logs, exec and attach. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Default: \"2m\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -52179,7 +53875,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "resolvConf": { SchemaProps: spec.SchemaProps{ - Description: "resolvConf is the resolver configuration file used as the basis for the container DNS resolution configuration. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changes will only take effect on Pods created after the update. Draining the node is recommended before changing this field. Default: \"/etc/resolv.conf\"", + Description: "resolvConf is the resolver configuration file used as the basis for the container DNS resolution configuration. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changes will only take effect on Pods created after the update. Draining the node is recommended before changing this field. If set to the empty string, will override the default and effectively disable DNS lookups. Default: \"/etc/resolv.conf\"", Type: []string{"string"}, Format: "", }, @@ -52297,7 +53993,6 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "evictionPressureTransitionPeriod": { SchemaProps: spec.SchemaProps{ Description: "evictionPressureTransitionPeriod is the duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that lowering it may decrease the stability of the node when the node is overcommitted. Default: \"5m\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -52545,17 +54240,29 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen "shutdownGracePeriod": { SchemaProps: spec.SchemaProps{ Description: "shutdownGracePeriod specifies the total duration that the node should delay the shutdown and total grace period for pod termination during a node shutdown. Default: \"0s\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "shutdownGracePeriodCriticalPods": { SchemaProps: spec.SchemaProps{ Description: "shutdownGracePeriodCriticalPods specifies the duration used to terminate critical pods during a node shutdown. This should be less than shutdownGracePeriod. For example, if shutdownGracePeriod=30s, and shutdownGracePeriodCriticalPods=10s, during a node shutdown the first 20 seconds would be reserved for gracefully terminating normal pods, and the last 10 seconds would be reserved for terminating critical pods. Default: \"0s\"", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, + "shutdownGracePeriodByPodPriority": { + SchemaProps: spec.SchemaProps{ + Description: "shutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods based on their associated priority class value. When a shutdown request is received, the Kubelet will initiate shutdown on all pods running on the node with a grace period that depends on the priority of the pod, and then wait for all pods to exit. Each entry in the array represents the graceful shutdown time a pod with a priority class value that lies in the range of that value and the next higher entry in the list when the node is shutting down. For example, to allow critical pods 10s to shutdown, priority>=10000 pods 20s to shutdown, and all remaining pods 30s to shutdown.\n\nshutdownGracePeriodByPodPriority:\n - priority: 2000000000\n shutdownGracePeriodSeconds: 10\n - priority: 10000\n shutdownGracePeriodSeconds: 20\n - priority: 0\n shutdownGracePeriodSeconds: 30\n\nThe time the Kubelet will wait before exiting will at most be the maximum of all shutdownGracePeriodSeconds for each priority class range represented on the node. When all pods have exited or reached their grace periods, the Kubelet will release the shutdown inhibit lock. Requires the GracefulNodeShutdown feature gate to be enabled. This configuration must be empty if either ShutdownGracePeriod or ShutdownGracePeriodCriticalPods is set. Default: nil", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority"), + }, + }, + }, + }, + }, "reservedMemory": { SchemaProps: spec.SchemaProps{ Description: "reservedMemory specifies a comma-separated list of memory reservations for NUMA nodes. The parameter makes sense only in the context of the memory manager feature. The memory manager will not allocate reserved memory for container workloads. For example, if you have a NUMA0 with 10Gi of memory and the reservedMemory was specified to reserve 1Gi of memory at NUMA0, the memory manager will assume that only 9Gi is available for allocation. You can specify a different amount of NUMA node and memory types. You can omit this parameter at all, but you should be aware that the amount of reserved memory from all NUMA nodes should be equal to the amount of memory specified by the [node allocatable](https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable). If at least one node allocatable parameter has a non-zero value, you will need to specify at least one NUMA node. Also, avoid specifying:\n\n1. Duplicates, the same NUMA node, and memory type, but with a different value. 2. zero limits for any memory type. 3. NUMAs nodes IDs that do not exist under the machine. 4. memory types except for memory and hugepages-\n\nDefault: nil", @@ -52598,11 +54305,32 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen Format: "double", }, }, + "registerWithTaints": { + SchemaProps: spec.SchemaProps{ + Description: "registerWithTaints are an array of taints to add to a node object when the kubelet registers itself. This only takes effect when registerNode is true and upon the initial registration of the node. Default: nil", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.Taint"), + }, + }, + }, + }, + }, + "registerNode": { + SchemaProps: spec.SchemaProps{ + Description: "registerNode enables automatic registration with the apiserver. Default: true", + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.LoggingConfiguration", "k8s.io/kubelet/config/v1beta1.KubeletAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletAuthorization", "k8s.io/kubelet/config/v1beta1.MemoryReservation", "k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration"}, + "k8s.io/api/core/v1.Taint", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/config/v1alpha1.LoggingConfiguration", "k8s.io/kubelet/config/v1beta1.KubeletAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletAuthorization", "k8s.io/kubelet/config/v1beta1.MemoryReservation", "k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration", "k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority"}, } } @@ -52622,7 +54350,6 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthentication(ref common "cacheTTL": { SchemaProps: spec.SchemaProps{ Description: "cacheTTL enables caching of authentication results", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -52643,14 +54370,12 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletWebhookAuthorization(ref common. "cacheAuthorizedTTL": { SchemaProps: spec.SchemaProps{ Description: "cacheAuthorizedTTL is the duration to cache 'authorized' responses from the webhook authorizer.", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "cacheUnauthorizedTTL": { SchemaProps: spec.SchemaProps{ Description: "cacheUnauthorizedTTL is the duration to cache 'unauthorized' responses from the webhook authorizer.", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -52773,6 +54498,36 @@ func schema_k8sio_kubelet_config_v1beta1_SerializedNodeConfigSource(ref common.R } } +func schema_k8sio_kubelet_config_v1beta1_ShutdownGracePeriodByPodPriority(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ShutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods based on their associated priority class value", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "priority": { + SchemaProps: spec.SchemaProps{ + Description: "priority is the priority value associated with the shutdown grace period", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "shutdownGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "shutdownGracePeriodSeconds is the shutdown grace period in seconds", + Default: 0, + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"priority", "shutdownGracePeriodSeconds"}, + }, + }, + } +} + func schema_pkg_apis_abac_v1beta1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -53407,8 +55162,9 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref common.ReferenceCallback) }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, "timestamp": { @@ -53420,7 +55176,7 @@ func schema_pkg_apis_metrics_v1alpha1_NodeMetrics(ref common.ReferenceCallback) }, "window": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, + Default: 0, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -53522,8 +55278,9 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref common.ReferenceCallback) c }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, "timestamp": { @@ -53535,7 +55292,7 @@ func schema_pkg_apis_metrics_v1alpha1_PodMetrics(ref common.ReferenceCallback) c }, "window": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, + Default: 0, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -53675,8 +55432,9 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref common.ReferenceCallback) c }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, "timestamp": { @@ -53688,7 +55446,7 @@ func schema_pkg_apis_metrics_v1beta1_NodeMetrics(ref common.ReferenceCallback) c }, "window": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, + Default: 0, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, @@ -53790,8 +55548,9 @@ func schema_pkg_apis_metrics_v1beta1_PodMetrics(ref common.ReferenceCallback) co }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Standard object's metadata. 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"), }, }, "timestamp": { @@ -53803,7 +55562,7 @@ func schema_pkg_apis_metrics_v1beta1_PodMetrics(ref common.ReferenceCallback) co }, "window": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, + Default: 0, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, From 67e40f9fdefdb99fd6f6152840c02cbf751951da Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 15 Dec 2021 17:07:39 -0500 Subject: [PATCH 74/87] REACT(1.23): enable flowcontrol v1b2 Signed-off-by: Andy Goldstein --- pkg/genericcontrolplane/apis/apis.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/genericcontrolplane/apis/apis.go b/pkg/genericcontrolplane/apis/apis.go index b2b92a70051fa..8ab940e81a795 100644 --- a/pkg/genericcontrolplane/apis/apis.go +++ b/pkg/genericcontrolplane/apis/apis.go @@ -48,6 +48,7 @@ import ( "k8s.io/component-helpers/apimachinery/lease" "k8s.io/klog/v2" flowcontrolv1beta1 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta1" + flowcontrolv1beta2 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta2" "k8s.io/kubernetes/pkg/controlplane/controller/apiserverleasegc" "k8s.io/kubernetes/pkg/controlplane/controller/clusterauthenticationtrust" "k8s.io/kubernetes/pkg/routes" @@ -437,6 +438,7 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig { eventsv1.SchemeGroupVersion, rbacv1.SchemeGroupVersion, flowcontrolv1beta1.SchemeGroupVersion, + flowcontrolv1beta2.SchemeGroupVersion, ) // disable alpha versions explicitly so we have a full list of what's possible to serve ret.DisableVersions( From 68a51580e6b9758bdab1183a3d76842bea35b978 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Thu, 16 Dec 2021 11:25:29 -0500 Subject: [PATCH 75/87] UNDO: most kube-aggregator hacks Undo most of our kube-aggregator hacks, now that we're no longer using it for genericcontrolplane. Signed-off-by: Andy Goldstein --- .../pkg/apiserver/apiserver.go | 74 ++++--------------- .../pkg/apiserver/apiservice_controller.go | 2 +- .../pkg/apiserver/handler_apis.go | 42 ++--------- .../autoregister/autoregister_controller.go | 59 +++++++-------- .../status/available_controller.go | 22 +++++- 5 files changed, 64 insertions(+), 135 deletions(-) diff --git a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go index 6f09d501b4d79..45223e53cd8d8 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go @@ -38,7 +38,6 @@ import ( openapicommon "k8s.io/kube-openapi/pkg/common" "k8s.io/apiserver/pkg/server/dynamiccertificates" - "k8s.io/client-go/tools/clusters" v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" v1helper "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/helper" "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" @@ -135,9 +134,6 @@ type APIAggregator struct { // handledGroups are the groups that already have routes handledGroups sets.String - // pathToClusters is a map that provids a list of clusters for which a given path is to be visible - pathToClusters map[string][]string - // lister is used to add group handling for /apis/ aggregator lookups based on // controller state lister listers.APIServiceLister @@ -206,7 +202,6 @@ func (c completedConfig) NewWithDelegate(delegationTarget genericapiserver.Deleg delegateHandler: delegationTarget.UnprotectedHandler(), proxyTransport: c.ExtraConfig.ProxyTransport, proxyHandlers: map[string]*proxyHandler{}, - pathToClusters: map[string][]string{}, handledGroups: sets.String{}, lister: informerFactory.Apiregistration().V1().APIServices().Lister(), APIRegistrationInformers: informerFactory, @@ -216,21 +211,6 @@ func (c completedConfig) NewWithDelegate(delegationTarget genericapiserver.Deleg proxyCurrentCertKeyContent: func() (bytes []byte, bytes2 []byte) { return nil, nil }, } - s.GenericAPIServer.Handler.PathValidForCluster = func(path, clusterName string) bool { - clusters, found := s.pathToClusters[path] - if !found { - return true - } - - for _, cluster := range clusters { - if cluster == clusterName { - return true - } - } - - return false - } - // used later to filter the served resource by those that have expired. resourceExpirationEvaluator, err := genericapiserver.NewResourceExpirationEvaluator(*c.GenericConfig.Version) if err != nil { @@ -278,8 +258,8 @@ func (c completedConfig) NewWithDelegate(delegationTarget genericapiserver.Deleg availableController, err := statuscontrollers.NewAvailableConditionController( informerFactory.Apiregistration().V1().APIServices(), - nil, - nil, + c.GenericConfig.SharedInformerFactory.Core().V1().Services(), + c.GenericConfig.SharedInformerFactory.Core().V1().Endpoints(), apiregistrationClient.ApiregistrationV1(), c.ExtraConfig.ProxyTransport, (func() ([]byte, []byte))(s.proxyCurrentCertKeyContent), @@ -451,12 +431,6 @@ func (s *APIAggregator) AddAPIService(apiService *v1.APIService) error { s.openAPIV3AggregationController.AddAPIService(proxyHandler, apiService) } s.proxyHandlers[apiService.Name] = proxyHandler - - if !IsVersionForAllClusters(apiService.Spec) { - s.pathToClusters[proxyPath] = append(s.pathToClusters[proxyPath], apiService.GetClusterName()) - s.pathToClusters[proxyPath+"/"] = append(s.pathToClusters[proxyPath+"/"], apiService.GetClusterName()) - } - s.GenericAPIServer.Handler.NonGoRestfulMux.Handle(proxyPath, proxyHandler) s.GenericAPIServer.Handler.NonGoRestfulMux.UnlistedHandlePrefix(proxyPath+"/", proxyHandler) @@ -479,11 +453,6 @@ func (s *APIAggregator) AddAPIService(apiService *v1.APIService) error { delegate: s.delegateHandler, } // aggregation is protected - - if !IsGroupForAllClusters(apiService.Spec.Group) { - s.pathToClusters[groupPath] = append(s.pathToClusters[groupPath], apiService.GetClusterName()) - s.pathToClusters[groupPath+"/"] = s.pathToClusters[groupPath] - } s.GenericAPIServer.Handler.NonGoRestfulMux.Handle(groupPath, groupDiscoveryHandler) s.GenericAPIServer.Handler.NonGoRestfulMux.UnlistedHandle(groupPath+"/", groupDiscoveryHandler) s.handledGroups.Insert(apiService.Spec.Group) @@ -492,8 +461,7 @@ func (s *APIAggregator) AddAPIService(apiService *v1.APIService) error { // RemoveAPIService removes the APIService from being handled. It is not thread-safe, so only call it on one thread at a time please. // It's a slow moving API, so it's ok to run the controller on a single thread. -func (s *APIAggregator) RemoveAPIService(clusterAndApiServiceName string) { - clusterName, apiServiceName := clusters.SplitClusterAwareKey(clusterAndApiServiceName) +func (s *APIAggregator) RemoveAPIService(apiServiceName string) { version := v1helper.APIServiceNameToGroupVersion(apiServiceName) proxyPath := "/apis/" + version.Group + "/" + version.Version @@ -501,32 +469,18 @@ func (s *APIAggregator) RemoveAPIService(clusterAndApiServiceName string) { if apiServiceName == legacyAPIServiceName { proxyPath = "/api" } - - if clusterName != "" { - newPathToClusters := sets.NewString(s.pathToClusters[proxyPath]...).Delete(clusterName).List() - - if len(newPathToClusters) > 0 { - s.pathToClusters[proxyPath] = newPathToClusters - s.pathToClusters[proxyPath+"/"] = s.pathToClusters[proxyPath] - } else { - s.GenericAPIServer.Handler.NonGoRestfulMux.Unregister(proxyPath) - s.GenericAPIServer.Handler.NonGoRestfulMux.Unregister(proxyPath + "/") - if s.openAPIAggregationController != nil { - s.openAPIAggregationController.RemoveAPIService(apiServiceName) - } - if s.openAPIV3AggregationController != nil { - s.openAPIAggregationController.RemoveAPIService(apiServiceName) - } - delete(s.proxyHandlers, apiServiceName) - - // TODO unregister group level discovery when there are no more versions for the group - // We don't need this right away because the handler properly delegates when no versions are present - - delete(s.pathToClusters, proxyPath) - delete(s.pathToClusters, proxyPath+"/") - } - + s.GenericAPIServer.Handler.NonGoRestfulMux.Unregister(proxyPath) + s.GenericAPIServer.Handler.NonGoRestfulMux.Unregister(proxyPath + "/") + if s.openAPIAggregationController != nil { + s.openAPIAggregationController.RemoveAPIService(apiServiceName) } + if s.openAPIV3AggregationController != nil { + s.openAPIAggregationController.RemoveAPIService(apiServiceName) + } + delete(s.proxyHandlers, apiServiceName) + + // TODO unregister group level discovery when there are no more versions for the group + // We don't need this right away because the handler properly delegates when no versions are present } // DefaultAPIResourceConfigSource returns default configuration for an APIResource. diff --git a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go index 2ead7d721186b..52df3cb25fad2 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go @@ -38,7 +38,7 @@ import ( // APIHandlerManager defines the behaviour that an API handler should have. type APIHandlerManager interface { AddAPIService(apiService *v1.APIService) error - RemoveAPIService(clusterAndApiServiceName string) + RemoveAPIService(apiServiceName string) } // APIServiceRegistrationController is responsible for registering and removing API services. diff --git a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_apis.go b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_apis.go index b52ce7fb6b4aa..c014e044aad7e 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_apis.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_apis.go @@ -28,13 +28,10 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" apiregistrationv1api "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" apiregistrationv1apihelper "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/helper" apiregistrationv1beta1api "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" listers "k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1" - "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" ) // apisHandler serves the `/apis` endpoint. @@ -77,12 +74,6 @@ func (r *apisHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { Groups: []metav1.APIGroup{r.discoveryGroup}, } - clusterName, err := genericapirequest.ClusterNameFrom(req.Context()) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - apiServices, err := r.lister.List(labels.Everything()) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) @@ -94,7 +85,7 @@ func (r *apisHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { if len(apiGroupServers[0].Spec.Group) == 0 { continue } - discoveryGroup := convertToDiscoveryAPIGroup(clusterName, apiGroupServers) + discoveryGroup := convertToDiscoveryAPIGroup(apiGroupServers) if discoveryGroup != nil { discoveryGroupList.Groups = append(discoveryGroupList.Groups, *discoveryGroup) } @@ -103,31 +94,14 @@ func (r *apisHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { responsewriters.WriteObjectNegotiated(r.codecs, negotiation.DefaultEndpointRestrictions, schema.GroupVersion{}, w, req, http.StatusOK, discoveryGroupList) } -func IsVersionForAllClusters(serviceSpec apiregistrationv1api.APIServiceSpec) bool { - return genericcontrolplanescheme.Scheme.IsVersionRegistered(schema.GroupVersion{ - Group: serviceSpec.Group, - Version: serviceSpec.Version, - }) || extensionsapiserver.Scheme.IsVersionRegistered(schema.GroupVersion{ - Group: serviceSpec.Group, - Version: serviceSpec.Version, - }) -} - -func IsGroupForAllClusters(group string) bool { - return genericcontrolplanescheme.Scheme.IsGroupRegistered(group) || extensionsapiserver.Scheme.IsGroupRegistered(group) -} - // convertToDiscoveryAPIGroup takes apiservices in a single group and returns a discovery compatible object. // if none of the services are available, it will return nil. -func convertToDiscoveryAPIGroup(clusterName string, apiServices []*apiregistrationv1api.APIService) *metav1.APIGroup { +func convertToDiscoveryAPIGroup(apiServices []*apiregistrationv1api.APIService) *metav1.APIGroup { apiServicesByGroup := apiregistrationv1apihelper.SortedByGroupAndVersion(apiServices)[0] var discoveryGroup *metav1.APIGroup - for _, apiService := range apiServicesByGroup { - if !IsVersionForAllClusters(apiService.Spec) && apiService.GetClusterName() != clusterName { - continue - } + for _, apiService := range apiServicesByGroup { // the first APIService which is valid becomes the default if discoveryGroup == nil { discoveryGroup = &metav1.APIGroup{ @@ -161,12 +135,6 @@ type apiGroupHandler struct { } func (r *apiGroupHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - clusterName, err := genericapirequest.ClusterNameFrom(req.Context()) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - apiServices, err := r.lister.List(labels.Everything()) if statusErr, ok := err.(*apierrors.StatusError); ok { responsewriters.WriteRawJSON(int(statusErr.Status().Code), statusErr.Status(), w) @@ -179,7 +147,7 @@ func (r *apiGroupHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { apiServicesForGroup := []*apiregistrationv1api.APIService{} for _, apiService := range apiServices { - if apiService.Spec.Group == r.groupName && apiService.GetClusterName() == clusterName { + if apiService.Spec.Group == r.groupName { apiServicesForGroup = append(apiServicesForGroup, apiService) } } @@ -189,7 +157,7 @@ func (r *apiGroupHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { return } - discoveryGroup := convertToDiscoveryAPIGroup(clusterName, apiServicesForGroup) + discoveryGroup := convertToDiscoveryAPIGroup(apiServicesForGroup) if discoveryGroup == nil { http.Error(w, "", http.StatusNotFound) return diff --git a/staging/src/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go b/staging/src/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go index ef68639d41c02..fe40f595a3736 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go @@ -33,8 +33,6 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/client-go/tools/clusters" v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" apiregistrationclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1" informers "k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1" @@ -60,7 +58,7 @@ type AutoAPIServiceRegistration interface { // AddAPIServiceToSync adds an API service to sync continuously. AddAPIServiceToSync(in *v1.APIService) // RemoveAPIServiceToSync removes an API service to auto-register. - RemoveAPIServiceToSync(clusterAndName string) + RemoveAPIServiceToSync(name string) } // autoRegisterController is used to keep a particular set of APIServices present in the API. It is useful @@ -73,7 +71,7 @@ type autoRegisterController struct { apiServicesToSyncLock sync.RWMutex apiServicesToSync map[string]*v1.APIService - syncHandler func(clusterAndApiServiceName string) error + syncHandler func(apiServiceName string) error // track which services we have synced syncedSuccessfullyLock *sync.RWMutex @@ -106,11 +104,11 @@ func NewAutoRegisterController(apiServiceInformer informers.APIServiceInformer, apiServiceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { cast := obj.(*v1.APIService) - c.queue.Add(clusters.ToClusterAwareKey(cast.GetClusterName(), cast.Name)) + c.queue.Add(cast.Name) }, UpdateFunc: func(_, obj interface{}) { cast := obj.(*v1.APIService) - c.queue.Add(clusters.ToClusterAwareKey(cast.GetClusterName(), cast.Name)) + c.queue.Add(cast.Name) }, DeleteFunc: func(obj interface{}) { cast, ok := obj.(*v1.APIService) @@ -126,7 +124,7 @@ func NewAutoRegisterController(apiServiceInformer informers.APIServiceInformer, return } } - c.queue.Add(clusters.ToClusterAwareKey(cast.GetClusterName(), cast.Name)) + c.queue.Add(cast.Name) }, }) @@ -151,7 +149,7 @@ func (c *autoRegisterController) Run(workers int, stopCh <-chan struct{}) { // record APIService objects that existed when we started if services, err := c.apiServiceLister.List(labels.Everything()); err == nil { for _, service := range services { - c.apiServicesAtStart[clusters.ToClusterAwareKey(service.GetClusterName(), service.Name)] = true + c.apiServicesAtStart[service.Name] = true } } @@ -214,16 +212,16 @@ func (c *autoRegisterController) processNextWorkItem() bool { // 4. current: sync on start, not present at start | - | - | - // 5. current: sync on start, present at start | delete once | update once | update once // 6. current: sync always | delete | update once | update -func (c *autoRegisterController) checkAPIService(clusterAndName string) (err error) { - desired := c.GetAPIServiceToSync(clusterAndName) - curr, err := c.apiServiceLister.Get(clusterAndName) +func (c *autoRegisterController) checkAPIService(name string) (err error) { + desired := c.GetAPIServiceToSync(name) + curr, err := c.apiServiceLister.Get(name) // if we've never synced this service successfully, record a successful sync. - hasSynced := c.hasSyncedSuccessfully(clusterAndName) + hasSynced := c.hasSyncedSuccessfully(name) if !hasSynced { defer func() { if err == nil { - c.setSyncedSuccessfully(clusterAndName) + c.setSyncedSuccessfully(name) } }() } @@ -243,10 +241,7 @@ func (c *autoRegisterController) checkAPIService(clusterAndName string) (err err // we don't have an entry and we do want one (2B,2C) case apierrors.IsNotFound(err) && desired != nil: - context := genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{ - Name: desired.GetClusterName(), - }) - _, err := c.apiServiceClient.APIServices().Create(context, desired, metav1.CreateOptions{}) + _, err := c.apiServiceClient.APIServices().Create(context.TODO(), desired, metav1.CreateOptions{}) if apierrors.IsAlreadyExists(err) { // created in the meantime, we'll get called again return nil @@ -258,7 +253,7 @@ func (c *autoRegisterController) checkAPIService(clusterAndName string) (err err return nil // the remote object only wants to sync on start, but was added after we started (4A,4B,4C) - case isAutomanagedOnStart(curr) && !c.apiServicesAtStart[clusterAndName]: + case isAutomanagedOnStart(curr) && !c.apiServicesAtStart[name]: return nil // the remote object only wants to sync on start and has already synced (5A,5B,5C "once" enforcement) @@ -268,10 +263,7 @@ func (c *autoRegisterController) checkAPIService(clusterAndName string) (err err // we have a spurious APIService that we're managing, delete it (5A,6A) case desired == nil: opts := metav1.DeleteOptions{Preconditions: metav1.NewUIDPreconditions(string(curr.UID))} - context := genericapirequest.WithCluster(context.TODO(), genericapirequest.Cluster{ - Name: curr.GetClusterName(), - }) - err := c.apiServiceClient.APIServices().Delete(context, curr.Name, opts) + err := c.apiServiceClient.APIServices().Delete(context.TODO(), curr.Name, opts) if apierrors.IsNotFound(err) || apierrors.IsConflict(err) { // deleted or changed in the meantime, we'll get called again return nil @@ -295,11 +287,11 @@ func (c *autoRegisterController) checkAPIService(clusterAndName string) (err err } // GetAPIServiceToSync gets a single API service to sync. -func (c *autoRegisterController) GetAPIServiceToSync(clusterAndName string) *v1.APIService { +func (c *autoRegisterController) GetAPIServiceToSync(name string) *v1.APIService { c.apiServicesToSyncLock.RLock() defer c.apiServicesToSyncLock.RUnlock() - return c.apiServicesToSync[clusterAndName] + return c.apiServicesToSync[name] } // AddAPIServiceToSyncOnStart registers an API service to sync only when the controller starts. @@ -322,30 +314,29 @@ func (c *autoRegisterController) addAPIServiceToSync(in *v1.APIService, syncType } apiService.Labels[AutoRegisterManagedLabel] = syncType - clusterAndName := clusters.ToClusterAwareKey(apiService.GetClusterName(), apiService.Name) - c.apiServicesToSync[clusterAndName] = apiService - c.queue.Add(clusterAndName) + c.apiServicesToSync[apiService.Name] = apiService + c.queue.Add(apiService.Name) } // RemoveAPIServiceToSync deletes a registered APIService. -func (c *autoRegisterController) RemoveAPIServiceToSync(clusterAndName string) { +func (c *autoRegisterController) RemoveAPIServiceToSync(name string) { c.apiServicesToSyncLock.Lock() defer c.apiServicesToSyncLock.Unlock() - delete(c.apiServicesToSync, clusterAndName) - c.queue.Add(clusterAndName) + delete(c.apiServicesToSync, name) + c.queue.Add(name) } -func (c *autoRegisterController) hasSyncedSuccessfully(clusterAndName string) bool { +func (c *autoRegisterController) hasSyncedSuccessfully(name string) bool { c.syncedSuccessfullyLock.RLock() defer c.syncedSuccessfullyLock.RUnlock() - return c.syncedSuccessfully[clusterAndName] + return c.syncedSuccessfully[name] } -func (c *autoRegisterController) setSyncedSuccessfully(clusterAndName string) { +func (c *autoRegisterController) setSyncedSuccessfully(name string) { c.syncedSuccessfullyLock.Lock() defer c.syncedSuccessfullyLock.Unlock() - c.syncedSuccessfully[clusterAndName] = true + c.syncedSuccessfully[name] = true } func automanagedType(service *v1.APIService) string { diff --git a/staging/src/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go b/staging/src/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go index 500d906a087b0..9c89b313167fb 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go @@ -145,8 +145,8 @@ func tlsConfigKey(c *rest.Config) tlsCacheKey { // NewAvailableConditionController returns a new AvailableConditionController. func NewAvailableConditionController( apiServiceInformer informers.APIServiceInformer, - _ v1informers.ServiceInformer, - _ v1informers.EndpointsInformer, + serviceInformer v1informers.ServiceInformer, + endpointsInformer v1informers.EndpointsInformer, apiServiceClient apiregistrationclient.APIServicesGetter, proxyTransport *http.Transport, proxyCurrentCertKeyContent certKeyFunc, @@ -157,6 +157,10 @@ func NewAvailableConditionController( apiServiceClient: apiServiceClient, apiServiceLister: apiServiceInformer.Lister(), apiServiceSynced: apiServiceInformer.Informer().HasSynced, + serviceLister: serviceInformer.Lister(), + servicesSynced: serviceInformer.Informer().HasSynced, + endpointsLister: endpointsInformer.Lister(), + endpointsSynced: endpointsInformer.Informer().HasSynced, serviceResolver: serviceResolver, queue: workqueue.NewNamedRateLimitingQueue( // We want a fairly tight requeue time. The controller listens to the API, but because it relies on the routability of the @@ -193,6 +197,18 @@ func NewAvailableConditionController( }, 30*time.Second) + serviceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: c.addService, + UpdateFunc: c.updateService, + DeleteFunc: c.deleteService, + }) + + endpointsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: c.addEndpoints, + UpdateFunc: c.updateEndpoints, + DeleteFunc: c.deleteEndpoints, + }) + c.syncFn = c.sync // TODO: decouple from legacyregistry @@ -475,7 +491,7 @@ func (c *AvailableConditionController) Run(workers int, stopCh <-chan struct{}) klog.Info("Starting AvailableConditionController") defer klog.Info("Shutting down AvailableConditionController") - if !controllers.WaitForCacheSync("AvailableConditionController", stopCh, c.apiServiceSynced) { + if !controllers.WaitForCacheSync("AvailableConditionController", stopCh, c.apiServiceSynced, c.servicesSynced, c.endpointsSynced) { return } From 631c66d5a66c9787d80d1d4d0fd14ec7f99fe3d4 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Thu, 6 Jan 2022 15:39:29 -0800 Subject: [PATCH 76/87] revert logical cluster prefixing code Signed-off-by: Steve Kuznetsov (cherry picked from commit 31f5bdccde8fbf9ad46011e980b8eeb121aaa798) --- pkg/genericcontrolplane/server.go | 23 ----------------------- test/e2e/kcpapimachinery/watch.go | 7 ++----- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 2d4bdd3b64523..2864e37fec2b1 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -22,7 +22,6 @@ package genericcontrolplane import ( "fmt" "os" - "regexp" "strings" "time" @@ -70,28 +69,6 @@ const ( RootClusterName = "admin" ) -func SanitizeClusterId(id string) string { - r := regexp.MustCompile(`[^a-zA-Z0-9]`) - return r.ReplaceAllString(id, "-") -} - -func SanitizedClusterName(id, name string) string { - return fmt.Sprintf("%s---%s", SanitizeClusterId(id), name) -} - -func ParseClusterName(name string) (string, string, error) { - parts := strings.Split(name, "---") - switch len(parts) { - case 1: - // nothing provided, no error though - return "", "", nil - case 2: - return parts[0], parts[1], nil - default: - return "", "", fmt.Errorf("invalid cluster: %v", name) - } -} - // Run runs the specified APIServer. This should never exit. func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) error { // To help debugging, immediately log version diff --git a/test/e2e/kcpapimachinery/watch.go b/test/e2e/kcpapimachinery/watch.go index 5b7d6f412df5b..f3928da5d1300 100644 --- a/test/e2e/kcpapimachinery/watch.go +++ b/test/e2e/kcpapimachinery/watch.go @@ -21,7 +21,6 @@ import ( "encoding/base64" "encoding/json" "fmt" - "k8s.io/kubernetes/pkg/genericcontrolplane" "math/rand" "sort" "strconv" @@ -421,17 +420,15 @@ var _ = SIGDescribe("KCP MultiCluster", func() { simpleRvFor := func(e *v1.ConfigMap) int64 { complexRv := ShardedResourceVersions{} framework.ExpectNoError(complexRv.Decode(e.ResourceVersion), "decoding complex RV from watch event") - clusterName, _, err := genericcontrolplane.ParseClusterName(e.ObjectMeta.ClusterName) - framework.ExpectNoError(err, "parsing cluster name from watch event object") simpleRv := int64(-1) for _, item := range complexRv.ResourceVersions { - if item.Identifier == clusterName { + if item.Identifier == e.ObjectMeta.ClusterName { simpleRv = item.ResourceVersion break } } if simpleRv == -1 { - framework.Failf("could not find resource version for cluster %q in complex RV %#v", clusterName, complexRv) + framework.Failf("could not find resource version for cluster %q in complex RV %#v", e.ObjectMeta.ClusterName, complexRv) } return simpleRv } From 11a61c15ec8997e7ecb5791ff9e86048140da2c5 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Fri, 28 Jan 2022 12:10:35 +0100 Subject: [PATCH 77/87] genericcontrolplane: make config plumbing composable (cherry picked from commit 101b6042139d7b72c6e6c618127bc520c5349c26) --- pkg/genericcontrolplane/apiextensions.go | 16 ++-- pkg/genericcontrolplane/options/options.go | 7 -- pkg/genericcontrolplane/server.go | 91 ++++++++++------------ 3 files changed, 45 insertions(+), 69 deletions(-) diff --git a/pkg/genericcontrolplane/apiextensions.go b/pkg/genericcontrolplane/apiextensions.go index f043b949106bb..7e91fe6e24575 100644 --- a/pkg/genericcontrolplane/apiextensions.go +++ b/pkg/genericcontrolplane/apiextensions.go @@ -37,7 +37,7 @@ import ( "k8s.io/kubernetes/pkg/genericcontrolplane/options" ) -func createAPIExtensionsConfig( +func CreateAPIExtensionsConfig( kubeAPIServerConfig genericapiserver.Config, externalInformers kubeexternalinformers.SharedInformerFactory, pluginInitializers []admission.PluginInitializer, @@ -86,12 +86,10 @@ func createAPIExtensionsConfig( SharedInformerFactory: externalInformers, }, ExtraConfig: apiextensionsapiserver.ExtraConfig{ - CRDRESTOptionsGetter: apiextensionsoptions.NewCRDRESTOptionsGetter(etcdOptions), - MasterCount: 1, // TODO: pass this in correctly - AuthResolverWrapper: authResolverWrapper, - ServiceResolver: serviceResolver, - NewClientFunc: commandOptions.APIExtensionsNewClientFunc, - NewInformerFactoryFunc: commandOptions.APIExtensionsNewSharedInformerFactoryFunc, + CRDRESTOptionsGetter: apiextensionsoptions.NewCRDRESTOptionsGetter(etcdOptions), + MasterCount: 1, // TODO: pass this in correctly + AuthResolverWrapper: authResolverWrapper, + ServiceResolver: serviceResolver, }, } @@ -100,7 +98,3 @@ func createAPIExtensionsConfig( return apiextensionsConfig, nil } - -func createAPIExtensionsServer(apiextensionsConfig *apiextensionsapiserver.Config, delegateAPIServer genericapiserver.DelegationTarget) (*apiextensionsapiserver.CustomResourceDefinitions, error) { - return apiextensionsConfig.Complete().New(delegateAPIServer) -} diff --git a/pkg/genericcontrolplane/options/options.go b/pkg/genericcontrolplane/options/options.go index 99f3fe04f49f4..8b1a3d1b101d4 100644 --- a/pkg/genericcontrolplane/options/options.go +++ b/pkg/genericcontrolplane/options/options.go @@ -20,14 +20,11 @@ import ( "net/http" "time" - apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - apiextensionsinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions" "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating" "k8s.io/apiserver/pkg/admission/plugin/webhook/validating" genericapiserver "k8s.io/apiserver/pkg/server" genericoptions "k8s.io/apiserver/pkg/server/options" "k8s.io/apiserver/pkg/storage/storagebackend" - "k8s.io/client-go/rest" "k8s.io/component-base/logs" "k8s.io/component-base/metrics" @@ -74,10 +71,6 @@ type ServerRunOptions struct { // BuildHandlerChainFunc allows you to build custom handler chains by decorating the apiHandler. BuildHandlerChainFunc func(apiHandler http.Handler, c *genericapiserver.Config) (secure http.Handler) - - // TODO consider either moving into an apiextensions-specific struct, or maybe reuse apiextensions-apiserver/pkg/cmd/options? - APIExtensionsNewClientFunc func(config *rest.Config) (apiextensionsclient.Interface, error) - APIExtensionsNewSharedInformerFactoryFunc func(client apiextensionsclient.Interface, resyncPeriod time.Duration) apiextensionsinformers.SharedInformerFactory } // NewServerRunOptions creates a new ServerRunOptions object with default parameters diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 2864e37fec2b1..59c0b157a52dc 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -74,71 +74,61 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro // To help debugging, immediately log version klog.Infof("Version: %+v", version.Get()) - serverChain, err := CreateServerChain(completeOptions, stopCh) + config, serviceResolver, pluginInitializer, err := CreateKubeAPIServerConfig(completeOptions) if err != nil { return err } - server := serverChain.MiniAggregator.GenericAPIServer - - prepared := server.PrepareRun() - return prepared.Run(stopCh) -} - -type ServerChain struct { - CustomResourceDefinitions *apiextensionsapiserver.CustomResourceDefinitions - GenericControlPlane *apis.GenericControlPlane - MiniAggregator *aggregator.MiniAggregatorServer -} - -// CreateServerChain creates the apiservers connected via delegation. -func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan struct{}) (*ServerChain, error) { - kubeAPIServerConfig, serviceResolver, pluginInitializer, err := CreateKubeAPIServerConfig(completedOptions) - if err != nil { - return nil, err - } // If additional API servers are added, they should be gated. - apiExtensionsConfig, err := createAPIExtensionsConfig( - *kubeAPIServerConfig.GenericConfig, - kubeAPIServerConfig.ExtraConfig.VersionedInformers, + apiExtensionsConfig, err := CreateAPIExtensionsConfig( + *config.GenericConfig, + config.ExtraConfig.VersionedInformers, pluginInitializer, - completedOptions.ServerRunOptions, + completeOptions.ServerRunOptions, serviceResolver, webhook.NewDefaultAuthenticationInfoResolverWrapper( nil, - kubeAPIServerConfig.GenericConfig.EgressSelector, - kubeAPIServerConfig.GenericConfig.LoopbackClientConfig, - kubeAPIServerConfig.GenericConfig.TracerProvider, + config.GenericConfig.EgressSelector, + config.GenericConfig.LoopbackClientConfig, + config.GenericConfig.TracerProvider, ), ) if err != nil { - return nil, fmt.Errorf("configure api extensions: %v", err) + return fmt.Errorf("configure api extensions: %v", err) } - notFoundHandler := notfoundhandler.New(kubeAPIServerConfig.GenericConfig.Serializer, genericapifilters.NoMuxAndDiscoveryIncompleteKey) - apiExtensionsServer, err := createAPIExtensionsServer(apiExtensionsConfig, genericapiserver.NewEmptyDelegateWithCustomHandler(notFoundHandler)) + + serverChain, err := CreateServerChain(config.Complete(), apiExtensionsConfig.Complete()) + if err != nil { + return err + } + + return serverChain.MiniAggregator.GenericAPIServer.PrepareRun().Run(stopCh) +} + +type ServerChain struct { + CustomResourceDefinitions *apiextensionsapiserver.CustomResourceDefinitions + GenericControlPlane *apis.GenericControlPlane + MiniAggregator *aggregator.MiniAggregatorServer +} + +// CreateServerChain creates the apiservers connected via delegation. +func CreateServerChain(config apis.CompletedConfig, apiExtensionConfig apiextensionsapiserver.CompletedConfig) (*ServerChain, error) { + notFoundHandler := notfoundhandler.New(config.GenericConfig.Serializer, genericapifilters.NoMuxAndDiscoveryIncompleteKey) + apiExtensionsServer, err := apiExtensionConfig.New(genericapiserver.NewEmptyDelegateWithCustomHandler(notFoundHandler)) if err != nil { return nil, fmt.Errorf("create api extensions: %v", err) } - kubeAPIServer, err := CreateKubeAPIServer(kubeAPIServerConfig, apiExtensionsServer.GenericAPIServer) + kubeAPIServer, err := config.New(apiExtensionsServer.GenericAPIServer) if err != nil { return nil, err } miniAggregatorConfig := &aggregator.MiniAggregatorConfig{ - GenericConfig: kubeAPIServerConfig.GenericConfig, - } - - if err := completedOptions.ServerRunOptions.Admission.ApplyTo( - kubeAPIServerConfig.GenericConfig, - kubeAPIServerConfig.ExtraConfig.VersionedInformers, - kubeAPIServerConfig.GenericConfig.LoopbackClientConfig, - feature.DefaultFeatureGate, - pluginInitializer...); err != nil { - return nil, err + GenericConfig: config.GenericConfig.Config, } - miniAggregatorServer, err := miniAggregatorConfig.Complete(kubeAPIServerConfig.ExtraConfig.VersionedInformers).New(kubeAPIServer.GenericAPIServer, kubeAPIServer, apiExtensionsServer) + miniAggregatorServer, err := miniAggregatorConfig.Complete(config.ExtraConfig.VersionedInformers).New(kubeAPIServer.GenericAPIServer, kubeAPIServer, apiExtensionsServer) if err != nil { return nil, err } @@ -150,16 +140,6 @@ func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan }, nil } -// CreateKubeAPIServer creates and wires a workable kube-apiserver -func CreateKubeAPIServer(kubeAPIServerConfig *apis.Config, delegateAPIServer genericapiserver.DelegationTarget) (*apis.GenericControlPlane, error) { - kubeAPIServer, err := kubeAPIServerConfig.Complete().New(delegateAPIServer) - if err != nil { - return nil, err - } - - return kubeAPIServer, nil -} - // CreateKubeAPIServerConfig creates all the resources for running the API server, but runs none of them func CreateKubeAPIServerConfig(s completedServerRunOptions) ( *apis.Config, @@ -221,6 +201,15 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( config.ExtraConfig.ClusterAuthenticationInfo.RequestHeaderUsernameHeaders = requestHeaderConfig.UsernameHeaders } + if err := s.ServerRunOptions.Admission.ApplyTo( + config.GenericConfig, + config.ExtraConfig.VersionedInformers, + config.GenericConfig.LoopbackClientConfig, + feature.DefaultFeatureGate, + pluginInitializers...); err != nil { + return nil, nil, nil, err + } + // if err := config.GenericConfig.AddPostStartHook("start-kube-apiserver-admission-initializer", admissionPostStartHook); err != nil { // return nil, nil, nil, err // } From efe4e654039f024768b346ddcb68e35b4e837ac8 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Fri, 28 Jan 2022 14:29:25 -0500 Subject: [PATCH 78/87] Revert "HACK: let user set cert, key, token for loopback" This reverts commit f374c6c7f6147a88a1c25cdabc4192d502c26be8. --- .../server/options/serving_with_loopback.go | 100 ++---------------- 1 file changed, 7 insertions(+), 93 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go b/staging/src/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go index ce11473c773a3..2317be82d26f5 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go @@ -17,10 +17,7 @@ limitations under the License. package options import ( - "errors" "fmt" - "net" - "strconv" "github.com/google/uuid" @@ -32,30 +29,10 @@ import ( type SecureServingOptionsWithLoopback struct { *SecureServingOptions - - // LoopbackOptions contains authentication and authorization options for the loopback client - // configuration. - LoopbackOptions *LoopbackOptions -} - -// LoopbackOptions contains authentication and authorization options for the loopback client -// configuration. -type LoopbackOptions struct { - // Cert is the self-signed certificate. If unset, will be generated when ApplyTo is - // called. - Cert []byte - // Key is the private key for the self-signed certificate. If unset, will be - // generated when ApplyTo is called. - Key []byte - // Token is the bearer token the loopback client uses to communicate with the server. if - // unset, will be generated when ApplyTo is called. - Token string } func (o *SecureServingOptions) WithLoopback() *SecureServingOptionsWithLoopback { - return &SecureServingOptionsWithLoopback{ - SecureServingOptions: o, - } + return &SecureServingOptionsWithLoopback{o} } // ApplyTo fills up serving information in the server configuration. @@ -72,37 +49,12 @@ func (s *SecureServingOptionsWithLoopback) ApplyTo(secureServingInfo **server.Se return nil } - var ( - certPem, keyPem []byte - loopbackToken string - err error - ) - - if s.LoopbackOptions != nil { - if len(s.LoopbackOptions.Cert) == 0 { - return errors.New("when specifying SecureServingOptionsWithLoopback.LoopbackOptions, Cert is required") - } - if len(s.LoopbackOptions.Key) == 0 { - return errors.New("when specifying SecureServingOptionsWithLoopback.LoopbackOptions, Key is required") - } - if s.LoopbackOptions.Token == "" { - return errors.New("when specifying SecureServingOptionsWithLoopback.LoopbackOptions, Token is required") - } - - certPem = s.LoopbackOptions.Cert - keyPem = s.LoopbackOptions.Key - loopbackToken = s.LoopbackOptions.Token - } else { - // create self-signed cert+key with the fake server.LoopbackClientServerNameOverride and - // let the server return it when the loopback client connects. - certPem, keyPem, err = s.NewLoopbackClientCert() - if err != nil { - return fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) - } - - loopbackToken = uuid.New().String() + // create self-signed cert+key with the fake server.LoopbackClientServerNameOverride and + // let the server return it when the loopback client connects. + certPem, keyPem, err := certutil.GenerateSelfSignedCertKey(server.LoopbackClientServerNameOverride, nil, nil) + if err != nil { + return fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) } - certProvider, err := dynamiccertificates.NewStaticSNICertKeyContent("self-signed loopback", certPem, keyPem, server.LoopbackClientServerNameOverride) if err != nil { return fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) @@ -111,7 +63,7 @@ func (s *SecureServingOptionsWithLoopback) ApplyTo(secureServingInfo **server.Se // Write to the front of SNICerts so that this overrides any other certs with the same name (*secureServingInfo).SNICerts = append([]dynamiccertificates.SNICertKeyContentProvider{certProvider}, (*secureServingInfo).SNICerts...) - secureLoopbackClientConfig, err := (*secureServingInfo).NewLoopbackClientConfig(loopbackToken, certPem) + secureLoopbackClientConfig, err := (*secureServingInfo).NewLoopbackClientConfig(uuid.New().String(), certPem) switch { // if we failed and there's no fallback loopback client config, we need to fail case err != nil && *loopbackClientConfig == nil: @@ -127,41 +79,3 @@ func (s *SecureServingOptionsWithLoopback) ApplyTo(secureServingInfo **server.Se return nil } - -// NewLoopbackClientCert creates a self-signed certificate and key for the loopback client. -func (s *SecureServingOptionsWithLoopback) NewLoopbackClientCert() ([]byte, []byte, error) { - certPem, keyPem, err := certutil.GenerateSelfSignedCertKey(server.LoopbackClientServerNameOverride, nil, nil) - if err != nil { - return nil, nil, fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) - } - return certPem, keyPem, nil -} - -// NewLoopbackClientConfig creates a loopback client *rest.Config for the given token and -// certificate. API server composers can use this to create a loopback client configuration before -// the server has started. It is slightly different from SecureServingInfo.NewLoopbackClientConfig -// in that this method does not support a BindPort of 0, and it returns an error in that case. -func (s *SecureServingOptionsWithLoopback) NewLoopbackClientConfig(token string, cert []byte) (*rest.Config, error) { - if s.BindPort == 0 { - return nil, errors.New("BindPort must be > 0") - } - - hostAndPort := s.BindAddress.String() + ":" + strconv.Itoa(s.BindPort) - host, port, err := server.LoopbackHostPort(hostAndPort) - if err != nil { - return nil, err - } - - c := &rest.Config{ - // Do not limit loopback client QPS. - QPS: -1, - Host: "https://" + net.JoinHostPort(host, port), - TLSClientConfig: rest.TLSClientConfig{ - CAData: cert, - ServerName: server.LoopbackClientServerNameOverride, - }, - BearerToken: token, - } - - return c, nil -} From 42bb0f5d02c9578381c6eb56d5a3ed4e6244fb1c Mon Sep 17 00:00:00 2001 From: Sergiusz Urbaniak Date: Wed, 2 Feb 2022 15:17:14 +0100 Subject: [PATCH 79/87] enable multicluster for rbac resources (cherry picked from commit 515bb638d62dcfeab4b723d581b3fdc6228dddad) --- pkg/genericcontrolplane/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 59c0b157a52dc..36ba9c14e54f5 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -313,7 +313,7 @@ func BuildGenericConfig( kubeClientConfig := genericConfig.LoopbackClientConfig - clientutils.EnableMultiCluster(genericConfig.LoopbackClientConfig, genericConfig, true, "namespaces", "apiservices", "customresourcedefinitions") + clientutils.EnableMultiCluster(genericConfig.LoopbackClientConfig, genericConfig, true, "namespaces", "apiservices", "customresourcedefinitions", "clusterroles", "clusterrolebindings", "roles", "rolebindings") clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) if err != nil { From 0bfd2663c46bf858019382c031d23a2be2a6e355 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Thu, 3 Feb 2022 16:59:12 -0500 Subject: [PATCH 80/87] add patch to multiclusterconfig (cherry picked from commit 9b29aab80ae622450721255a4a4366bd5b28ceab) Signed-off-by: Andy Goldstein --- pkg/genericcontrolplane/clientutils/multiclusterconfig.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go index 7592a62ba7438..88376c66c85da 100644 --- a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go +++ b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go @@ -42,8 +42,8 @@ import ( type multiClusterClientConfigRoundTripper struct { rt http.RoundTripper requestInfoResolver func() genericapirequest.RequestInfoResolver - enabledOn sets.String - disableSharding bool + enabledOn sets.String + disableSharding bool } // EnableMultiCluster allows uses a rountripper to hack the rest.Config used by @@ -104,7 +104,7 @@ func (mcrt *multiClusterClientConfigRoundTripper) RoundTrip(req *http.Request) ( } else { headerCluster = "*" } - case "create", "update": + case "create", "update", "patch": err := func() error { // We dn't try to mutate the object here. Just guessing the ClusterName field from the body, // in order to set the header accordingly From 46effbf32a2be01730bcf5be1607bec67dc82ced Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Thu, 3 Feb 2022 17:01:27 -0500 Subject: [PATCH 81/87] mccrt: match 1.22 change Signed-off-by: Andy Goldstein --- pkg/genericcontrolplane/clientutils/multiclusterconfig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go index 88376c66c85da..870ef0ad6b40d 100644 --- a/pkg/genericcontrolplane/clientutils/multiclusterconfig.go +++ b/pkg/genericcontrolplane/clientutils/multiclusterconfig.go @@ -137,7 +137,7 @@ func (mcrt *multiClusterClientConfigRoundTripper) RoundTrip(req *http.Request) ( fallthrough default: if resourceClusterName != "" { - if contextCluster != nil && contextCluster.Name != resourceClusterName { + if contextCluster != nil && contextCluster.Name != "" && contextCluster.Name != resourceClusterName { return nil, errors.New("Resource cluster name " + resourceClusterName + " incompatible with context cluster name " + contextCluster.Name) } headerCluster = resourceClusterName From b96afb9258b10222acc2f5bbef04c3511e0d1bc7 Mon Sep 17 00:00:00 2001 From: David Festal Date: Wed, 2 Feb 2022 14:20:36 +0100 Subject: [PATCH 82/87] Add the clusterName to the PATCH object Signed-off-by: David Festal (cherry picked from commit d7e9ea136dc9ebded3d658d5800a39683783e89f) --- .../clusterroleaggregation_controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go b/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go index e979eb3a72f7d..dd3ba23a2dd46 100644 --- a/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go +++ b/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go @@ -126,7 +126,7 @@ func (c *ClusterRoleAggregationController) syncClusterRole(ctx context.Context, } if utilfeature.DefaultFeatureGate.Enabled(features.ServerSideApply) { - err = c.applyClusterRoles(ctx, sharedClusterRole.Name, newPolicyRules) + err = c.applyClusterRoles(ctx, sharedClusterRole, newPolicyRules) if errors.IsUnsupportedMediaType(err) { // TODO: Remove this fallback at least one release after ServerSideApply GA // When Server Side Apply is not enabled, fallback to Update. This is required when running // 1.21 since api-server can be 1.20 during the upgrade/downgrade. @@ -140,8 +140,8 @@ func (c *ClusterRoleAggregationController) syncClusterRole(ctx context.Context, return err } -func (c *ClusterRoleAggregationController) applyClusterRoles(ctx context.Context, name string, newPolicyRules []rbacv1.PolicyRule) error { - clusterRoleApply := rbacv1ac.ClusterRole(name). +func (c *ClusterRoleAggregationController) applyClusterRoles(ctx context.Context, sharedClusterRole *rbacv1.ClusterRole, newPolicyRules []rbacv1.PolicyRule) error { + clusterRoleApply := rbacv1ac.ClusterRole(sharedClusterRole.Name).WithClusterName(sharedClusterRole.ClusterName). WithRules(toApplyPolicyRules(newPolicyRules)...) opts := metav1.ApplyOptions{FieldManager: "clusterrole-aggregation-controller", Force: true} From 319da74b78ca526524bea211810bc573345bdf09 Mon Sep 17 00:00:00 2001 From: David Festal Date: Wed, 2 Feb 2022 14:21:30 +0100 Subject: [PATCH 83/87] Now use cluster-aware clientset interface Signed-off-by: David Festal (cherry picked from commit 29fcab69fca66c0d66fb2b8ad44a7db09d07fffc) --- pkg/registry/rbac/rest/storage_rbac.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/registry/rbac/rest/storage_rbac.go b/pkg/registry/rbac/rest/storage_rbac.go index 177633f71803e..e973943abbab0 100644 --- a/pkg/registry/rbac/rest/storage_rbac.go +++ b/pkg/registry/rbac/rest/storage_rbac.go @@ -37,7 +37,6 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" clientset "k8s.io/client-go/kubernetes" rbacv1client "k8s.io/client-go/kubernetes/typed/rbac/v1" - clientgorest "k8s.io/client-go/rest" "k8s.io/client-go/util/retry" "k8s.io/component-helpers/auth/rbac/reconciliation" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -159,13 +158,12 @@ func (p *PolicyData) EnsureRBACPolicy() genericapiserver.PostStartHookFunc { // initializing roles is really important. On some e2e runs, we've seen cases where etcd is down when the server // starts, the roles don't initialize, and nothing works. err := wait.Poll(1*time.Second, 30*time.Second, func() (done bool, err error) { - adminLogicalClusterConfig := clientgorest.CopyConfig(hookContext.LoopbackClientConfig) - adminLogicalClusterConfig.Host += "/clusters/admin" - client, err := clientset.NewForConfig(adminLogicalClusterConfig) + clientClusterGetter, err := clientset.NewClusterForConfig(hookContext.LoopbackClientConfig) if err != nil { utilruntime.HandleError(fmt.Errorf("unable to initialize client set: %v", err)) return false, nil } + client := clientClusterGetter.Cluster("admin") return ensureRBACPolicy(p, client) }) // if we're never able to make it through initialization, kill the API server From 4662eb5ac693316328f2e11b828d742d9ead90b8 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Tue, 1 Feb 2022 13:40:39 +0100 Subject: [PATCH 84/87] genericcontroleplane: split generic from kube-apiserver config --- .../admission/initializer.go | 7 -- pkg/genericcontrolplane/server.go | 87 ++++++++++--------- 2 files changed, 48 insertions(+), 46 deletions(-) diff --git a/pkg/genericcontrolplane/admission/initializer.go b/pkg/genericcontrolplane/admission/initializer.go index 921e392d39e44..15a94a2b1da96 100644 --- a/pkg/genericcontrolplane/admission/initializer.go +++ b/pkg/genericcontrolplane/admission/initializer.go @@ -23,13 +23,6 @@ import ( quota "k8s.io/apiserver/pkg/quota/v1" ) -// TODO add a `WantsToRun` which takes a stopCh. Might make it generic. - -// WantsCloudConfig defines a function which sets CloudConfig for admission plugins that need it. -type WantsCloudConfig interface { - SetCloudConfig([]byte) -} - // WantsRESTMapper defines a function which sets RESTMapper for admission plugins that need it. type WantsRESTMapper interface { SetRESTMapper(meta.RESTMapper) diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 36ba9c14e54f5..6b7d87a439aa5 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -20,7 +20,9 @@ limitations under the License. package genericcontrolplane import ( + "errors" "fmt" + "net/url" "os" "strings" "time" @@ -44,11 +46,12 @@ import ( "k8s.io/apiserver/pkg/util/openapi" "k8s.io/apiserver/pkg/util/webhook" clientgoinformers "k8s.io/client-go/informers" + kubeexternalinformers "k8s.io/client-go/informers" clientgoclientset "k8s.io/client-go/kubernetes" - _ "k8s.io/component-base/metrics/prometheus/workqueue" // for workqueue metric registration + _ "k8s.io/component-base/metrics/prometheus/workqueue" "k8s.io/component-base/version" "k8s.io/klog/v2" - aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" + "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" "k8s.io/kubernetes/pkg/api/legacyscheme" generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" @@ -70,11 +73,22 @@ const ( ) // Run runs the specified APIServer. This should never exit. -func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) error { +func Run(completedOptions completedServerRunOptions, stopCh <-chan struct{}) error { // To help debugging, immediately log version klog.Infof("Version: %+v", version.Get()) - config, serviceResolver, pluginInitializer, err := CreateKubeAPIServerConfig(completeOptions) + genericConfig, storageFactory, err := BuildGenericConfig(completedOptions.ServerRunOptions) + if err != nil { + return err + } + + client, err := clientgoclientset.NewForConfig(genericConfig.LoopbackClientConfig) + if err != nil { + return fmt.Errorf("failed to create loopback client: %v", err) + } + versionedInformers := clientgoinformers.NewSharedInformerFactory(client, 10*time.Minute) + + config, err := CreateKubeAPIServerConfig(genericConfig, completedOptions, versionedInformers, nil, storageFactory) if err != nil { return err } @@ -83,9 +97,9 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro apiExtensionsConfig, err := CreateAPIExtensionsConfig( *config.GenericConfig, config.ExtraConfig.VersionedInformers, - pluginInitializer, - completeOptions.ServerRunOptions, - serviceResolver, + nil, + completedOptions.ServerRunOptions, + &unimplementedServiceResolver{}, webhook.NewDefaultAuthenticationInfoResolverWrapper( nil, config.GenericConfig.EgressSelector, @@ -94,7 +108,7 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro ), ) if err != nil { - return fmt.Errorf("configure api extensions: %v", err) + return fmt.Errorf("failed to create apiextensions-apiserver config: %v", err) } serverChain, err := CreateServerChain(config.Complete(), apiExtensionsConfig.Complete()) @@ -141,31 +155,23 @@ func CreateServerChain(config apis.CompletedConfig, apiExtensionConfig apiextens } // CreateKubeAPIServerConfig creates all the resources for running the API server, but runs none of them -func CreateKubeAPIServerConfig(s completedServerRunOptions) ( +func CreateKubeAPIServerConfig( + genericConfig *genericapiserver.Config, + s completedServerRunOptions, + versionedInformers kubeexternalinformers.SharedInformerFactory, + additionalPluginInitializers []admission.PluginInitializer, + storageFactory *serverstorage.DefaultStorageFactory, +) ( *apis.Config, - aggregatorapiserver.ServiceResolver, - []admission.PluginInitializer, error, ) { - genericConfig, serviceResolver, pluginInitializers, storageFactory, err := BuildGenericConfig(s.ServerRunOptions) - if err != nil { - return nil, nil, nil, err - } - s.Metrics.Apply() serviceaccount.RegisterMetrics() - kubeClientConfig := genericConfig.LoopbackClientConfig - clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) - if err != nil { - return nil, nil, nil, fmt.Errorf("failed to create real external clientset: %v", err) - } - versionedInformers := clientgoinformers.NewSharedInformerFactory(clientgoExternalClient, 10*time.Minute) - // TODO(ncdc,1.23) upstream has this in the Cobra RunE method and it's called as early as // possible. Do we want to consider doing something similar? if err := s.Logs.ValidateAndApply(); err != nil { - return nil, nil, nil, err + return nil, err } config := &apis.Config{ @@ -185,13 +191,13 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( clientCAProvider, err := s.Authentication.ClientCert.GetClientCAContentProvider() if err != nil { - return nil, nil, nil, err + return nil, err } config.ExtraConfig.ClusterAuthenticationInfo.ClientCA = clientCAProvider requestHeaderConfig, err := s.Authentication.RequestHeader.ToAuthenticationRequestHeaderConfig() if err != nil { - return nil, nil, nil, err + return nil, err } if requestHeaderConfig != nil { config.ExtraConfig.ClusterAuthenticationInfo.RequestHeaderCA = requestHeaderConfig.CAContentProvider @@ -206,15 +212,11 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( config.ExtraConfig.VersionedInformers, config.GenericConfig.LoopbackClientConfig, feature.DefaultFeatureGate, - pluginInitializers...); err != nil { - return nil, nil, nil, err + additionalPluginInitializers...); err != nil { + return nil, err } - // if err := config.GenericConfig.AddPostStartHook("start-kube-apiserver-admission-initializer", admissionPostStartHook); err != nil { - // return nil, nil, nil, err - // } - - // // Load the public keys. + // // Load the public keys.g // var pubKeys []interface{} // for _, f := range s.Authentication.ServiceAccounts.KeyFiles { // keys, err := keyutil.PublicKeysFromFile(f) @@ -228,7 +230,7 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( // config.ExtraConfig.ServiceAccountJWKSURI = s.Authentication.ServiceAccounts.JWKSURI // config.ExtraConfig.ServiceAccountPublicKeys = pubKeys - return config, serviceResolver, pluginInitializers, nil + return config, nil } // BuildGenericConfig takes the master server options and produces the genericapiserver.Config associated with it @@ -236,9 +238,6 @@ func BuildGenericConfig( s *options.ServerRunOptions, ) ( genericConfig *genericapiserver.Config, - serviceResolver aggregatorapiserver.ServiceResolver, - pluginInitializers []admission.PluginInitializer, - // admissionPostStartHook genericapiserver.PostStartHookFunc, storageFactory *serverstorage.DefaultStorageFactory, lastErr error, ) { @@ -312,9 +311,7 @@ func BuildGenericConfig( genericConfig.LoopbackClientConfig.DisableCompression = true kubeClientConfig := genericConfig.LoopbackClientConfig - clientutils.EnableMultiCluster(genericConfig.LoopbackClientConfig, genericConfig, true, "namespaces", "apiservices", "customresourcedefinitions", "clusterroles", "clusterrolebindings", "roles", "rolebindings") - clientgoExternalClient, err := clientgoclientset.NewForConfig(kubeClientConfig) if err != nil { lastErr = fmt.Errorf("failed to create real external clientset: %v", err) @@ -333,6 +330,10 @@ func BuildGenericConfig( return } + //if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && s.GenericServerRunOptions.EnablePriorityAndFairness { + // genericConfig.FlowControl, lastErr = BuildPriorityAndFairness(s, clientgoExternalClient, versionedInformers) + //} + return } @@ -413,3 +414,11 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { options.ServerRunOptions = s return options, nil } + +// unimplementedServiceResolver is a webhook.ServiceResolver that always returns an error. +type unimplementedServiceResolver struct{} + +// ResolveEndpoint always returns an error that this is not yet supported. +func (r *unimplementedServiceResolver) ResolveEndpoint(namespace string, name string, port int32) (*url.URL, error) { + return nil, errors.New("webhook admission and conversions are not yet supported in kcp") +} From b96caf9aa16de853d732285c992b0140314fab40 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Fri, 4 Feb 2022 13:23:48 +0100 Subject: [PATCH 85/87] genericcontrolplane: add CompletedServerRunOptions to make it composable --- pkg/genericcontrolplane/apiextensions.go | 6 +- pkg/genericcontrolplane/options/options.go | 55 +++++++++++ pkg/genericcontrolplane/server.go | 102 ++++++--------------- 3 files changed, 84 insertions(+), 79 deletions(-) diff --git a/pkg/genericcontrolplane/apiextensions.go b/pkg/genericcontrolplane/apiextensions.go index 7e91fe6e24575..335a4bb867576 100644 --- a/pkg/genericcontrolplane/apiextensions.go +++ b/pkg/genericcontrolplane/apiextensions.go @@ -14,9 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package app does all of the work necessary to create a Kubernetes -// APIServer by binding together the API, master and APIServer infrastructure. -// It can be configured and called directly or via the hyperkube framework. package genericcontrolplane import ( @@ -34,6 +31,7 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/util/webhook" kubeexternalinformers "k8s.io/client-go/informers" + "k8s.io/kubernetes/pkg/genericcontrolplane/options" ) @@ -41,7 +39,7 @@ func CreateAPIExtensionsConfig( kubeAPIServerConfig genericapiserver.Config, externalInformers kubeexternalinformers.SharedInformerFactory, pluginInitializers []admission.PluginInitializer, - commandOptions *options.ServerRunOptions, + commandOptions options.CompletedServerRunOptions, serviceResolver webhook.ServiceResolver, authResolverWrapper webhook.AuthenticationInfoResolverWrapper, ) (*apiextensionsapiserver.Config, error) { diff --git a/pkg/genericcontrolplane/options/options.go b/pkg/genericcontrolplane/options/options.go index 8b1a3d1b101d4..7e6ce5a66bf2a 100644 --- a/pkg/genericcontrolplane/options/options.go +++ b/pkg/genericcontrolplane/options/options.go @@ -17,7 +17,10 @@ limitations under the License. package options import ( + "fmt" "net/http" + "os" + "strings" "time" "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating" @@ -27,6 +30,7 @@ import ( "k8s.io/apiserver/pkg/storage/storagebackend" "k8s.io/component-base/logs" "k8s.io/component-base/metrics" + "k8s.io/klog/v2" kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" "k8s.io/kubernetes/pkg/serviceaccount" @@ -73,6 +77,16 @@ type ServerRunOptions struct { BuildHandlerChainFunc func(apiHandler http.Handler, c *genericapiserver.Config) (secure http.Handler) } +// completedServerRunOptions is a private wrapper that enforces a call of Complete() before Run can be invoked. +type completedServerRunOptions struct { + ServerRunOptions +} + +type CompletedServerRunOptions struct { + // Embed a private pointer that cannot be instantiated outside of this package. + *completedServerRunOptions +} + // NewServerRunOptions creates a new ServerRunOptions object with default parameters func NewServerRunOptions() *ServerRunOptions { s := ServerRunOptions{ @@ -107,3 +121,44 @@ func NewServerRunOptions() *ServerRunOptions { return &s } + +// Complete defaults missing field values. It mutates the receiver. +func (o *ServerRunOptions) Complete() (CompletedServerRunOptions, error) { + if err := o.GenericServerRunOptions.DefaultAdvertiseAddress(o.SecureServing.SecureServingOptions); err != nil { + return CompletedServerRunOptions{}, err + } + + if err := o.SecureServing.MaybeDefaultWithSelfSignedCerts(o.GenericServerRunOptions.AdvertiseAddress.String(), nil, nil); err != nil { + return CompletedServerRunOptions{}, fmt.Errorf("error creating self-signed certificates: %v", err) + } + + if len(o.GenericServerRunOptions.ExternalHost) == 0 { + if len(o.GenericServerRunOptions.AdvertiseAddress) > 0 { + o.GenericServerRunOptions.ExternalHost = o.GenericServerRunOptions.AdvertiseAddress.String() + } else { + if hostname, err := os.Hostname(); err == nil { + o.GenericServerRunOptions.ExternalHost = hostname + } else { + return CompletedServerRunOptions{}, fmt.Errorf("error finding host name: %v", err) + } + } + klog.Infof("external host was not specified, using %v", o.GenericServerRunOptions.ExternalHost) + } + + for key, value := range o.APIEnablement.RuntimeConfig { + if key == "v1" || strings.HasPrefix(key, "v1/") || + key == "api/v1" || strings.HasPrefix(key, "api/v1/") { + delete(o.APIEnablement.RuntimeConfig, key) + o.APIEnablement.RuntimeConfig["/v1"] = value + } + if key == "api/legacy" { + delete(o.APIEnablement.RuntimeConfig, key) + } + } + + return CompletedServerRunOptions{ + &completedServerRunOptions{ + ServerRunOptions: *o, + }, + }, nil +} diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index 6b7d87a439aa5..a44fe3b00d055 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -23,8 +23,6 @@ import ( "errors" "fmt" "net/url" - "os" - "strings" "time" apiextensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" @@ -73,11 +71,11 @@ const ( ) // Run runs the specified APIServer. This should never exit. -func Run(completedOptions completedServerRunOptions, stopCh <-chan struct{}) error { +func Run(options options.CompletedServerRunOptions, stopCh <-chan struct{}) error { // To help debugging, immediately log version klog.Infof("Version: %+v", version.Get()) - genericConfig, storageFactory, err := BuildGenericConfig(completedOptions.ServerRunOptions) + genericConfig, storageFactory, err := BuildGenericConfig(options) if err != nil { return err } @@ -88,7 +86,7 @@ func Run(completedOptions completedServerRunOptions, stopCh <-chan struct{}) err } versionedInformers := clientgoinformers.NewSharedInformerFactory(client, 10*time.Minute) - config, err := CreateKubeAPIServerConfig(genericConfig, completedOptions, versionedInformers, nil, storageFactory) + config, err := CreateKubeAPIServerConfig(genericConfig, options, versionedInformers, nil, storageFactory) if err != nil { return err } @@ -98,7 +96,7 @@ func Run(completedOptions completedServerRunOptions, stopCh <-chan struct{}) err *config.GenericConfig, config.ExtraConfig.VersionedInformers, nil, - completedOptions.ServerRunOptions, + options, &unimplementedServiceResolver{}, webhook.NewDefaultAuthenticationInfoResolverWrapper( nil, @@ -157,7 +155,7 @@ func CreateServerChain(config apis.CompletedConfig, apiExtensionConfig apiextens // CreateKubeAPIServerConfig creates all the resources for running the API server, but runs none of them func CreateKubeAPIServerConfig( genericConfig *genericapiserver.Config, - s completedServerRunOptions, + o options.CompletedServerRunOptions, versionedInformers kubeexternalinformers.SharedInformerFactory, additionalPluginInitializers []admission.PluginInitializer, storageFactory *serverstorage.DefaultStorageFactory, @@ -165,12 +163,12 @@ func CreateKubeAPIServerConfig( *apis.Config, error, ) { - s.Metrics.Apply() + o.Metrics.Apply() serviceaccount.RegisterMetrics() // TODO(ncdc,1.23) upstream has this in the Cobra RunE method and it's called as early as // possible. Do we want to consider doing something similar? - if err := s.Logs.ValidateAndApply(); err != nil { + if err := o.Logs.ValidateAndApply(); err != nil { return nil, err } @@ -179,23 +177,23 @@ func CreateKubeAPIServerConfig( ExtraConfig: apis.ExtraConfig{ APIResourceConfigSource: storageFactory.APIResourceConfigSource, StorageFactory: storageFactory, - EventTTL: s.EventTTL, - EnableLogsSupport: s.EnableLogsHandler, + EventTTL: o.EventTTL, + EnableLogsSupport: o.EnableLogsHandler, VersionedInformers: versionedInformers, - IdentityLeaseDurationSeconds: s.IdentityLeaseDurationSeconds, - IdentityLeaseRenewIntervalSeconds: s.IdentityLeaseRenewIntervalSeconds, + IdentityLeaseDurationSeconds: o.IdentityLeaseDurationSeconds, + IdentityLeaseRenewIntervalSeconds: o.IdentityLeaseRenewIntervalSeconds, }, } - clientCAProvider, err := s.Authentication.ClientCert.GetClientCAContentProvider() + clientCAProvider, err := o.Authentication.ClientCert.GetClientCAContentProvider() if err != nil { return nil, err } config.ExtraConfig.ClusterAuthenticationInfo.ClientCA = clientCAProvider - requestHeaderConfig, err := s.Authentication.RequestHeader.ToAuthenticationRequestHeaderConfig() + requestHeaderConfig, err := o.Authentication.RequestHeader.ToAuthenticationRequestHeaderConfig() if err != nil { return nil, err } @@ -207,7 +205,7 @@ func CreateKubeAPIServerConfig( config.ExtraConfig.ClusterAuthenticationInfo.RequestHeaderUsernameHeaders = requestHeaderConfig.UsernameHeaders } - if err := s.ServerRunOptions.Admission.ApplyTo( + if err := o.ServerRunOptions.Admission.ApplyTo( config.GenericConfig, config.ExtraConfig.VersionedInformers, config.GenericConfig.LoopbackClientConfig, @@ -235,35 +233,35 @@ func CreateKubeAPIServerConfig( // BuildGenericConfig takes the master server options and produces the genericapiserver.Config associated with it func BuildGenericConfig( - s *options.ServerRunOptions, + o options.CompletedServerRunOptions, ) ( genericConfig *genericapiserver.Config, storageFactory *serverstorage.DefaultStorageFactory, lastErr error, ) { genericConfig = genericapiserver.NewConfig(genericcontrolplanescheme.Codecs) - if s.BuildHandlerChainFunc != nil { - genericConfig.BuildHandlerChainFunc = s.BuildHandlerChainFunc + if o.BuildHandlerChainFunc != nil { + genericConfig.BuildHandlerChainFunc = o.BuildHandlerChainFunc } - if lastErr = s.GenericServerRunOptions.ApplyTo(genericConfig); lastErr != nil { + if lastErr = o.GenericServerRunOptions.ApplyTo(genericConfig); lastErr != nil { return } - if lastErr = s.SecureServing.ApplyTo(&genericConfig.SecureServing, &genericConfig.LoopbackClientConfig); lastErr != nil { + if lastErr = o.SecureServing.ApplyTo(&genericConfig.SecureServing, &genericConfig.LoopbackClientConfig); lastErr != nil { return } - if lastErr = s.Features.ApplyTo(genericConfig); lastErr != nil { + if lastErr = o.Features.ApplyTo(genericConfig); lastErr != nil { return } - if lastErr = s.APIEnablement.ApplyTo(genericConfig, apis.DefaultAPIResourceConfigSource(), genericcontrolplanescheme.Scheme); lastErr != nil { + if lastErr = o.APIEnablement.ApplyTo(genericConfig, apis.DefaultAPIResourceConfigSource(), genericcontrolplanescheme.Scheme); lastErr != nil { return } - if lastErr = s.EgressSelector.ApplyTo(genericConfig); lastErr != nil { + if lastErr = o.EgressSelector.ApplyTo(genericConfig); lastErr != nil { return } if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIServerTracing) { - if lastErr = s.Traces.ApplyTo(genericConfig.EgressSelector, genericConfig); lastErr != nil { + if lastErr = o.Traces.ApplyTo(genericConfig.EgressSelector, genericConfig); lastErr != nil { return } } @@ -282,7 +280,7 @@ func BuildGenericConfig( storageFactoryConfig := kubeapiserver.NewStorageFactoryConfig(genericcontrolplanescheme.Scheme, genericcontrolplanescheme.Codecs) storageFactoryConfig.APIResourceConfig = genericConfig.MergedResourceConfig - completedStorageFactoryConfig, err := storageFactoryConfig.Complete(s.Etcd) + completedStorageFactoryConfig, err := storageFactoryConfig.Complete(o.Etcd) if err != nil { lastErr = err return @@ -297,7 +295,7 @@ func BuildGenericConfig( if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIServerTracing) && genericConfig.TracerProvider != nil { storageFactory.StorageConfig.Transport.TracerProvider = genericConfig.TracerProvider } - if lastErr = s.Etcd.ApplyWithStorageFactoryTo(storageFactory, genericConfig); lastErr != nil { + if lastErr = o.Etcd.ApplyWithStorageFactoryTo(storageFactory, genericConfig); lastErr != nil { return } @@ -320,11 +318,11 @@ func BuildGenericConfig( versionedInformers := clientgoinformers.NewSharedInformerFactory(clientgoExternalClient, 10*time.Minute) // Authentication.ApplyTo requires already applied OpenAPIConfig and EgressSelector if present - if lastErr = AuthenticationApplyTo(s.Authentication, &genericConfig.Authentication, genericConfig.SecureServing, genericConfig.EgressSelector, genericConfig.OpenAPIConfig); lastErr != nil { + if lastErr = AuthenticationApplyTo(o.Authentication, &genericConfig.Authentication, genericConfig.SecureServing, genericConfig.EgressSelector, genericConfig.OpenAPIConfig); lastErr != nil { return } - genericConfig.Authorization.Authorizer, genericConfig.RuleResolver, err = BuildAuthorizer(s, versionedInformers) + genericConfig.Authorization.Authorizer, genericConfig.RuleResolver, err = BuildAuthorizer(&o.ServerRunOptions, versionedInformers) if err != nil { lastErr = fmt.Errorf("invalid authorization config: %v", err) return @@ -369,52 +367,6 @@ func BuildPriorityAndFairness(s *options.ServerRunOptions, extclient clientgocli ), nil } -// completedServerRunOptions is a private wrapper that enforces a call of Complete() before Run can be invoked. -type completedServerRunOptions struct { - *options.ServerRunOptions -} - -// Complete set default ServerRunOptions. -// Should be called after kube-apiserver flags parsed. -func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { - var options completedServerRunOptions - // set defaults - if err := s.GenericServerRunOptions.DefaultAdvertiseAddress(s.SecureServing.SecureServingOptions); err != nil { - return options, err - } - - if err := s.SecureServing.MaybeDefaultWithSelfSignedCerts(s.GenericServerRunOptions.AdvertiseAddress.String(), nil, nil); err != nil { - return options, fmt.Errorf("error creating self-signed certificates: %v", err) - } - - if len(s.GenericServerRunOptions.ExternalHost) == 0 { - if len(s.GenericServerRunOptions.AdvertiseAddress) > 0 { - s.GenericServerRunOptions.ExternalHost = s.GenericServerRunOptions.AdvertiseAddress.String() - } else { - if hostname, err := os.Hostname(); err == nil { - s.GenericServerRunOptions.ExternalHost = hostname - } else { - return options, fmt.Errorf("error finding host name: %v", err) - } - } - klog.Infof("external host was not specified, using %v", s.GenericServerRunOptions.ExternalHost) - } - - for key, value := range s.APIEnablement.RuntimeConfig { - if key == "v1" || strings.HasPrefix(key, "v1/") || - key == "api/v1" || strings.HasPrefix(key, "api/v1/") { - delete(s.APIEnablement.RuntimeConfig, key) - s.APIEnablement.RuntimeConfig["/v1"] = value - } - if key == "api/legacy" { - delete(s.APIEnablement.RuntimeConfig, key) - } - } - - options.ServerRunOptions = s - return options, nil -} - // unimplementedServiceResolver is a webhook.ServiceResolver that always returns an error. type unimplementedServiceResolver struct{} From 39d9dace1187edc9a4e1f09d86621b33a350ba19 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Fri, 4 Feb 2022 13:50:20 +0100 Subject: [PATCH 86/87] genericcontrolplane: restore flags and validation --- pkg/genericcontrolplane/options/flags.go | 72 +++++++++++++++++++ pkg/genericcontrolplane/options/validation.go | 51 +++++++++++++ pkg/genericcontrolplane/server.go | 11 +-- 3 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 pkg/genericcontrolplane/options/flags.go create mode 100644 pkg/genericcontrolplane/options/validation.go diff --git a/pkg/genericcontrolplane/options/flags.go b/pkg/genericcontrolplane/options/flags.go new file mode 100644 index 0000000000000..2db0078a5d4f4 --- /dev/null +++ b/pkg/genericcontrolplane/options/flags.go @@ -0,0 +1,72 @@ +/* +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 options + +import ( + cliflag "k8s.io/component-base/cli/flag" +) + +// Flags returns flags for a specific APIServer by section name +func (s *ServerRunOptions) Flags() (fss cliflag.NamedFlagSets) { + s.GenericServerRunOptions.AddUniversalFlags(fss.FlagSet("generic")) + s.Etcd.AddFlags(fss.FlagSet("etcd")) + s.SecureServing.AddFlags(fss.FlagSet("secure serving")) + s.Audit.AddFlags(fss.FlagSet("auditing")) + s.Features.AddFlags(fss.FlagSet("features")) + s.Authentication.AddFlags(fss.FlagSet("authentication")) + + s.APIEnablement.AddFlags(fss.FlagSet("API enablement")) + s.EgressSelector.AddFlags(fss.FlagSet("egress selector")) + s.Admission.AddFlags(fss.FlagSet("admission")) + + s.Metrics.AddFlags(fss.FlagSet("metrics")) + s.Logs.AddFlags(fss.FlagSet("logs")) + s.Traces.AddFlags(fss.FlagSet("traces")) + + fs := fss.FlagSet("misc") + fs.DurationVar(&s.EventTTL, "event-ttl", s.EventTTL, + "Amount of time to retain events.") + + fs.BoolVar(&s.EnableLogsHandler, "enable-logs-handler", s.EnableLogsHandler, + "If true, install a /logs handler for the apiserver logs.") + fs.MarkDeprecated("enable-logs-handler", "This flag will be removed in v1.19") //nolint:golint,errcheck + + fs.Int64Var(&s.MaxConnectionBytesPerSec, "max-connection-bytes-per-sec", s.MaxConnectionBytesPerSec, ""+ + "If non-zero, throttle each user connection to this number of bytes/sec. "+ + "Currently only applies to long-running requests.") + + fs.IntVar(&s.IdentityLeaseDurationSeconds, "identity-lease-duration-seconds", s.IdentityLeaseDurationSeconds, + "The duration of kube-apiserver lease in seconds, must be a positive number. (In use when the APIServerIdentity feature gate is enabled.)") + + fs.IntVar(&s.IdentityLeaseRenewIntervalSeconds, "identity-lease-renew-interval-seconds", s.IdentityLeaseRenewIntervalSeconds, + "The interval of kube-apiserver renewing its lease in seconds, must be a positive number. (In use when the APIServerIdentity feature gate is enabled.)") + + fs.StringVar(&s.ProxyClientCertFile, "proxy-client-cert-file", s.ProxyClientCertFile, ""+ + "Client certificate used to prove the identity of the aggregator or kube-apiserver "+ + "when it must call out during a request. This includes proxying requests to a user "+ + "api-server and calling out to webhook admission plugins. It is expected that this "+ + "cert includes a signature from the CA in the --requestheader-client-ca-file flag. "+ + "That CA is published in the 'extension-apiserver-authentication' configmap in "+ + "the kube-system namespace. Components receiving calls from kube-aggregator should "+ + "use that CA to perform their half of the mutual TLS verification.") + fs.StringVar(&s.ProxyClientKeyFile, "proxy-client-key-file", s.ProxyClientKeyFile, ""+ + "Private key for the client certificate used to prove the identity of the aggregator or kube-apiserver "+ + "when it must call out during a request. This includes proxying requests to a user "+ + "api-server and calling out to webhook admission plugins.") + + return fss +} diff --git a/pkg/genericcontrolplane/options/validation.go b/pkg/genericcontrolplane/options/validation.go new file mode 100644 index 0000000000000..fc1d48eb4a68e --- /dev/null +++ b/pkg/genericcontrolplane/options/validation.go @@ -0,0 +1,51 @@ +/* +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 options + +import ( + "fmt" + + apiextensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" + + "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" +) + +func validateAPIServerIdentity(options *CompletedServerRunOptions) []error { + var errs []error + if options.IdentityLeaseDurationSeconds <= 0 { + errs = append(errs, fmt.Errorf("--identity-lease-duration-seconds should be a positive number, but value '%d' provided", options.IdentityLeaseDurationSeconds)) + } + if options.IdentityLeaseRenewIntervalSeconds <= 0 { + errs = append(errs, fmt.Errorf("--identity-lease-renew-interval-seconds should be a positive number, but value '%d' provided", options.IdentityLeaseRenewIntervalSeconds)) + } + return errs +} + +// Validate checks Options and return a slice of found errs. +func (s *CompletedServerRunOptions) Validate() []error { + var errs []error + errs = append(errs, s.Etcd.Validate()...) + errs = append(errs, s.SecureServing.Validate()...) + errs = append(errs, s.Authentication.Validate()...) + errs = append(errs, s.Audit.Validate()...) + errs = append(errs, s.Admission.Validate()...) + errs = append(errs, s.APIEnablement.Validate(genericcontrolplanescheme.Scheme, apiextensionsapiserver.Scheme)...) + errs = append(errs, s.Metrics.Validate()...) + errs = append(errs, validateAPIServerIdentity(s)...) + + return errs +} diff --git a/pkg/genericcontrolplane/server.go b/pkg/genericcontrolplane/server.go index a44fe3b00d055..415273469c02f 100644 --- a/pkg/genericcontrolplane/server.go +++ b/pkg/genericcontrolplane/server.go @@ -95,7 +95,7 @@ func Run(options options.CompletedServerRunOptions, stopCh <-chan struct{}) erro apiExtensionsConfig, err := CreateAPIExtensionsConfig( *config.GenericConfig, config.ExtraConfig.VersionedInformers, - nil, + nil, // pluginInitializer options, &unimplementedServiceResolver{}, webhook.NewDefaultAuthenticationInfoResolverWrapper( @@ -214,7 +214,7 @@ func CreateKubeAPIServerConfig( return nil, err } - // // Load the public keys.g + // // Load the public keys. // var pubKeys []interface{} // for _, f := range s.Authentication.ServiceAccounts.KeyFiles { // keys, err := keyutil.PublicKeysFromFile(f) @@ -328,9 +328,10 @@ func BuildGenericConfig( return } - //if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && s.GenericServerRunOptions.EnablePriorityAndFairness { - // genericConfig.FlowControl, lastErr = BuildPriorityAndFairness(s, clientgoExternalClient, versionedInformers) - //} + if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && o.GenericServerRunOptions.EnablePriorityAndFairness { + // TODO(sttts): make BuildPriorityAndFairness take the completed options + genericConfig.FlowControl, lastErr = BuildPriorityAndFairness(&o.ServerRunOptions, clientgoExternalClient, versionedInformers) + } return } From 64d2e2dd0dd3d4ec33dc6ee7be85edc8163e9762 Mon Sep 17 00:00:00 2001 From: Sergiusz Urbaniak Date: Thu, 17 Feb 2022 16:48:33 +0100 Subject: [PATCH 87/87] authorizer/webhook: make webhook authorizer cluster aware --- pkg/kubeapiserver/authorizer/config.go | 1 + .../authorizerfactory/delegating.go | 4 +++ .../plugin/pkg/authorizer/webhook/webhook.go | 34 +++++++++++-------- .../pkg/authorizer/webhook/webhook_v1_test.go | 8 ++--- .../webhook/webhook_v1beta1_test.go | 8 ++--- 5 files changed, 33 insertions(+), 22 deletions(-) diff --git a/pkg/kubeapiserver/authorizer/config.go b/pkg/kubeapiserver/authorizer/config.go index ed3cf6decc1b7..f8f9a06ae33e2 100644 --- a/pkg/kubeapiserver/authorizer/config.go +++ b/pkg/kubeapiserver/authorizer/config.go @@ -116,6 +116,7 @@ func (config Config) New() (authorizer.Authorizer, authorizer.RuleResolver, erro } webhookAuthorizer, err := webhook.New(config.WebhookConfigFile, config.WebhookVersion, + "", config.WebhookCacheAuthorizedTTL, config.WebhookCacheUnauthorizedTTL, *config.WebhookRetryBackoff, diff --git a/staging/src/k8s.io/apiserver/pkg/authorization/authorizerfactory/delegating.go b/staging/src/k8s.io/apiserver/pkg/authorization/authorizerfactory/delegating.go index d1ead25dbb245..0a721fb8d46ad 100644 --- a/staging/src/k8s.io/apiserver/pkg/authorization/authorizerfactory/delegating.go +++ b/staging/src/k8s.io/apiserver/pkg/authorization/authorizerfactory/delegating.go @@ -42,6 +42,9 @@ type DelegatingAuthorizerConfig struct { // This allows us to configure the sleep time at each iteration and the maximum number of retries allowed // before we fail the webhook call in order to limit the fan out that ensues when the system is degraded. WebhookRetryBackoff *wait.Backoff + + // The cluster to execute authorization decisions against (optional). + Cluster string } func (c DelegatingAuthorizerConfig) New() (authorizer.Authorizer, error) { @@ -58,5 +61,6 @@ func (c DelegatingAuthorizerConfig) New() (authorizer.Authorizer, error) { RecordRequestTotal: RecordRequestTotal, RecordRequestLatency: RecordRequestLatency, }, + c.Cluster, ) } diff --git a/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go b/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go index b7970139306c7..9ee9af33f38cd 100644 --- a/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go +++ b/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go @@ -67,11 +67,12 @@ type WebhookAuthorizer struct { retryBackoff wait.Backoff decisionOnError authorizer.Decision metrics AuthorizerMetrics + cluster string } // NewFromInterface creates a WebhookAuthorizer using the given subjectAccessReview client -func NewFromInterface(subjectAccessReview authorizationv1client.AuthorizationV1Interface, authorizedTTL, unauthorizedTTL time.Duration, retryBackoff wait.Backoff, metrics AuthorizerMetrics) (*WebhookAuthorizer, error) { - return newWithBackoff(&subjectAccessReviewV1Client{subjectAccessReview.RESTClient()}, authorizedTTL, unauthorizedTTL, retryBackoff, metrics) +func NewFromInterface(subjectAccessReview authorizationv1client.AuthorizationV1Interface, authorizedTTL, unauthorizedTTL time.Duration, retryBackoff wait.Backoff, metrics AuthorizerMetrics, cluster string) (*WebhookAuthorizer, error) { + return newWithBackoff(&subjectAccessReviewV1Client{subjectAccessReview.RESTClient(), cluster}, authorizedTTL, unauthorizedTTL, retryBackoff, metrics, cluster) } // New creates a new WebhookAuthorizer from the provided kubeconfig file. @@ -93,19 +94,19 @@ func NewFromInterface(subjectAccessReview authorizationv1client.AuthorizationV1I // // For additional HTTP configuration, refer to the kubeconfig documentation // https://kubernetes.io/docs/user-guide/kubeconfig-file/. -func New(kubeConfigFile string, version string, authorizedTTL, unauthorizedTTL time.Duration, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (*WebhookAuthorizer, error) { - subjectAccessReview, err := subjectAccessReviewInterfaceFromKubeconfig(kubeConfigFile, version, retryBackoff, customDial) +func New(kubeConfigFile, version, cluster string, authorizedTTL, unauthorizedTTL time.Duration, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (*WebhookAuthorizer, error) { + subjectAccessReview, err := subjectAccessReviewInterfaceFromKubeconfig(kubeConfigFile, version, cluster, retryBackoff, customDial) if err != nil { return nil, err } return newWithBackoff(subjectAccessReview, authorizedTTL, unauthorizedTTL, retryBackoff, AuthorizerMetrics{ RecordRequestTotal: noopMetrics{}.RecordRequestTotal, RecordRequestLatency: noopMetrics{}.RecordRequestLatency, - }) + }, cluster) } // newWithBackoff allows tests to skip the sleep. -func newWithBackoff(subjectAccessReview subjectAccessReviewer, authorizedTTL, unauthorizedTTL time.Duration, retryBackoff wait.Backoff, metrics AuthorizerMetrics) (*WebhookAuthorizer, error) { +func newWithBackoff(subjectAccessReview subjectAccessReviewer, authorizedTTL, unauthorizedTTL time.Duration, retryBackoff wait.Backoff, metrics AuthorizerMetrics, cluster string) (*WebhookAuthorizer, error) { return &WebhookAuthorizer{ subjectAccessReview: subjectAccessReview, responseCache: cache.NewLRUExpireCache(8192), @@ -114,6 +115,7 @@ func newWithBackoff(subjectAccessReview subjectAccessReviewer, authorizedTTL, un retryBackoff: retryBackoff, decisionOnError: authorizer.DecisionNoOpinion, metrics: metrics, + cluster: cluster, }, nil } @@ -272,7 +274,7 @@ func convertToSARExtra(extra map[string][]string) map[string]authorizationv1.Ext // subjectAccessReviewInterfaceFromKubeconfig builds a client from the specified kubeconfig file, // and returns a SubjectAccessReviewInterface that uses that client. Note that the client submits SubjectAccessReview // requests to the exact path specified in the kubeconfig file, so arbitrary non-API servers can be targeted. -func subjectAccessReviewInterfaceFromKubeconfig(kubeConfigFile string, version string, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (subjectAccessReviewer, error) { +func subjectAccessReviewInterfaceFromKubeconfig(kubeConfigFile, version, cluster string, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (subjectAccessReviewer, error) { localScheme := runtime.NewScheme() if err := scheme.AddToScheme(localScheme); err != nil { return nil, err @@ -288,7 +290,7 @@ func subjectAccessReviewInterfaceFromKubeconfig(kubeConfigFile string, version s if err != nil { return nil, err } - return &subjectAccessReviewV1ClientGW{gw.RestClient}, nil + return &subjectAccessReviewV1ClientGW{gw.RestClient, cluster}, nil case authorizationv1beta1.SchemeGroupVersion.Version: groupVersions := []schema.GroupVersion{authorizationv1beta1.SchemeGroupVersion} @@ -299,7 +301,7 @@ func subjectAccessReviewInterfaceFromKubeconfig(kubeConfigFile string, version s if err != nil { return nil, err } - return &subjectAccessReviewV1beta1ClientGW{gw.RestClient}, nil + return &subjectAccessReviewV1beta1ClientGW{gw.RestClient, cluster}, nil default: return nil, fmt.Errorf( @@ -312,13 +314,15 @@ func subjectAccessReviewInterfaceFromKubeconfig(kubeConfigFile string, version s } type subjectAccessReviewV1Client struct { - client rest.Interface + client rest.Interface + cluster string } func (t *subjectAccessReviewV1Client) Create(ctx context.Context, subjectAccessReview *authorizationv1.SubjectAccessReview, opts metav1.CreateOptions) (result *authorizationv1.SubjectAccessReview, statusCode int, err error) { result = &authorizationv1.SubjectAccessReview{} restResult := t.client.Post(). + Cluster(t.cluster). Resource("subjectaccessreviews"). VersionedParams(&opts, scheme.ParameterCodec). Body(subjectAccessReview). @@ -331,14 +335,15 @@ func (t *subjectAccessReviewV1Client) Create(ctx context.Context, subjectAccessR // subjectAccessReviewV1ClientGW used by the generic webhook, doesn't specify GVR. type subjectAccessReviewV1ClientGW struct { - client rest.Interface + client rest.Interface + cluster string } func (t *subjectAccessReviewV1ClientGW) Create(ctx context.Context, subjectAccessReview *authorizationv1.SubjectAccessReview, _ metav1.CreateOptions) (*authorizationv1.SubjectAccessReview, int, error) { var statusCode int result := &authorizationv1.SubjectAccessReview{} - restResult := t.client.Post().Body(subjectAccessReview).Do(ctx) + restResult := t.client.Post().Cluster(t.cluster).Body(subjectAccessReview).Do(ctx) restResult.StatusCode(&statusCode) err := restResult.Into(result) @@ -348,7 +353,8 @@ func (t *subjectAccessReviewV1ClientGW) Create(ctx context.Context, subjectAcces // subjectAccessReviewV1beta1ClientGW used by the generic webhook, doesn't specify GVR. type subjectAccessReviewV1beta1ClientGW struct { - client rest.Interface + client rest.Interface + cluster string } func (t *subjectAccessReviewV1beta1ClientGW) Create(ctx context.Context, subjectAccessReview *authorizationv1.SubjectAccessReview, _ metav1.CreateOptions) (*authorizationv1.SubjectAccessReview, int, error) { @@ -356,7 +362,7 @@ func (t *subjectAccessReviewV1beta1ClientGW) Create(ctx context.Context, subject v1beta1Review := &authorizationv1beta1.SubjectAccessReview{Spec: v1SpecToV1beta1Spec(&subjectAccessReview.Spec)} v1beta1Result := &authorizationv1beta1.SubjectAccessReview{} - restResult := t.client.Post().Body(v1beta1Review).Do(ctx) + restResult := t.client.Post().Cluster(t.cluster).Body(v1beta1Review).Do(ctx) restResult.StatusCode(&statusCode) err := restResult.Into(v1beta1Result) diff --git a/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go b/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go index 6617bcea967bd..8f39587e9810f 100644 --- a/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go +++ b/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go @@ -194,11 +194,11 @@ current-context: default return fmt.Errorf("failed to execute test template: %v", err) } // Create a new authorizer - sarClient, err := subjectAccessReviewInterfaceFromKubeconfig(p, "v1", testRetryBackoff, nil) + sarClient, err := subjectAccessReviewInterfaceFromKubeconfig(p, "v1", "", testRetryBackoff, nil) if err != nil { return fmt.Errorf("error building sar client: %v", err) } - _, err = newWithBackoff(sarClient, 0, 0, testRetryBackoff, noopAuthorizerMetrics()) + _, err = newWithBackoff(sarClient, 0, 0, testRetryBackoff, noopAuthorizerMetrics(), "") return err }() if err != nil && !tt.wantErr { @@ -333,11 +333,11 @@ func newV1Authorizer(callbackURL string, clientCert, clientKey, ca []byte, cache if err := json.NewEncoder(tempfile).Encode(config); err != nil { return nil, err } - sarClient, err := subjectAccessReviewInterfaceFromKubeconfig(p, "v1", testRetryBackoff, nil) + sarClient, err := subjectAccessReviewInterfaceFromKubeconfig(p, "v1", "", testRetryBackoff, nil) if err != nil { return nil, fmt.Errorf("error building sar client: %v", err) } - return newWithBackoff(sarClient, cacheTime, cacheTime, testRetryBackoff, metrics) + return newWithBackoff(sarClient, cacheTime, cacheTime, testRetryBackoff, metrics, "") } func TestV1TLSConfig(t *testing.T) { diff --git a/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1beta1_test.go b/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1beta1_test.go index 77f90f3e831e9..582c3d12b2bc0 100644 --- a/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1beta1_test.go +++ b/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1beta1_test.go @@ -186,11 +186,11 @@ current-context: default return fmt.Errorf("failed to execute test template: %v", err) } // Create a new authorizer - sarClient, err := subjectAccessReviewInterfaceFromKubeconfig(p, "v1beta1", testRetryBackoff, nil) + sarClient, err := subjectAccessReviewInterfaceFromKubeconfig(p, "v1beta1", "", testRetryBackoff, nil) if err != nil { return fmt.Errorf("error building sar client: %v", err) } - _, err = newWithBackoff(sarClient, 0, 0, testRetryBackoff, noopAuthorizerMetrics()) + _, err = newWithBackoff(sarClient, 0, 0, testRetryBackoff, noopAuthorizerMetrics(), "") return err }() if err != nil && !tt.wantErr { @@ -325,11 +325,11 @@ func newV1beta1Authorizer(callbackURL string, clientCert, clientKey, ca []byte, if err := json.NewEncoder(tempfile).Encode(config); err != nil { return nil, err } - sarClient, err := subjectAccessReviewInterfaceFromKubeconfig(p, "v1beta1", testRetryBackoff, nil) + sarClient, err := subjectAccessReviewInterfaceFromKubeconfig(p, "v1beta1", "", testRetryBackoff, nil) if err != nil { return nil, fmt.Errorf("error building sar client: %v", err) } - return newWithBackoff(sarClient, cacheTime, cacheTime, testRetryBackoff, noopAuthorizerMetrics()) + return newWithBackoff(sarClient, cacheTime, cacheTime, testRetryBackoff, noopAuthorizerMetrics(), "") } func TestV1beta1TLSConfig(t *testing.T) {