diff --git a/staging/src/k8s.io/api/flowcontrol/v1alpha1/BUILD b/staging/src/k8s.io/api/flowcontrol/v1alpha1/BUILD index c07946fc92f..770d896e95e 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1alpha1/BUILD +++ b/staging/src/k8s.io/api/flowcontrol/v1alpha1/BUILD @@ -7,6 +7,7 @@ go_library( "generated.pb.go", "register.go", "types.go", + "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1alpha1", diff --git a/staging/src/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go new file mode 100644 index 00000000000..ae743eae8d0 --- /dev/null +++ b/staging/src/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go @@ -0,0 +1,194 @@ +/* +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. +*/ + +package v1alpha1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_FlowDistinguisherMethod = map[string]string{ + "": "FlowDistinguisherMethod specifies the method of a flow distinguisher.", + "type": "`type` is the type of flow distinguisher method", +} + +func (FlowDistinguisherMethod) SwaggerDoc() map[string]string { + return map_FlowDistinguisherMethod +} + +var map_FlowSchema = map[string]string{ + "": "FlowSchema defines the schema of a group of flows. Note that a flow makes 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\".", + "metadata": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "spec": "`spec` is the specification of the desired behavior of a flow-schema. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "status": "`status` is the current status of a flow-schema. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", +} + +func (FlowSchema) SwaggerDoc() map[string]string { + return map_FlowSchema +} + +var map_FlowSchemaCondition = map[string]string{ + "": "FlowSchemaCondition describes conditions for a flow-schema.", + "type": "`type` is the type of the condition.", + "status": "`status` is the status of the condition. Can be True, False, Unknown.", + "lastTransitionTime": "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + "reason": "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", + "message": "`message` is a human-readable message indicating details about last transition.", +} + +func (FlowSchemaCondition) SwaggerDoc() map[string]string { + return map_FlowSchemaCondition +} + +var map_FlowSchemaList = map[string]string{ + "": "FlowSchemaList is a list of FlowSchema objects.", + "metadata": "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "items": "`items` is a list of flow-schemas.", +} + +func (FlowSchemaList) SwaggerDoc() map[string]string { + return map_FlowSchemaList +} + +var map_FlowSchemaSpec = map[string]string{ + "": "FlowSchemaSpec describes how the flow-schema's specification looks like.", + "priorityLevelConfiguration": "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the flow-schema will ignored and marked as invalid in its status. Required.", + "matchingPrecedence": "`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 non-negative.", + "distinguisherMethod": "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the computation always yields the empty string.", + "rules": "`rules` describes which requests will match this flow schema.", +} + +func (FlowSchemaSpec) SwaggerDoc() map[string]string { + return map_FlowSchemaSpec +} + +var map_FlowSchemaStatus = map[string]string{ + "": "FlowSchemaStatus represents the current state of a flow-schema.", + "conditions": "Current state of flow-schema.", +} + +func (FlowSchemaStatus) SwaggerDoc() map[string]string { + return map_FlowSchemaStatus +} + +var map_PolicyRule = map[string]string{ + "": "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.", + "verbs": "`verbs` is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "apiGroups": "`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. APIGroupAll represents all api groups.", + "resources": "`resources` is a list of resources this rule applies to. ResourceAll represents all resources.", + "nonResourceURLs": "`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. NonResourceAll represents all non-resource urls.", +} + +func (PolicyRule) SwaggerDoc() map[string]string { + return map_PolicyRule +} + +var map_PolicyRuleWithSubjects = map[string]string{ + "": "PolicyRuleWithSubjects 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.", + "subjects": "`subjects` is the list of normal user, serviceaccount, or group that this rule cares about.", + "rule": "`rule` is the target verb, resource or the subresource the rule cares about. APIGroups, Resources, etc. Required.", +} + +func (PolicyRuleWithSubjects) SwaggerDoc() map[string]string { + return map_PolicyRuleWithSubjects +} + +var map_PriorityLevelConfiguration = map[string]string{ + "": "PriorityLevelConfiguration represents the configuration of a priority level.", + "metadata": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "spec": "`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", + "status": "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", +} + +func (PriorityLevelConfiguration) SwaggerDoc() map[string]string { + return map_PriorityLevelConfiguration +} + +var map_PriorityLevelConfigurationCondition = map[string]string{ + "": "PriorityLevelConfigurationCondition defines the condition of priority level.", + "type": "`type` is the type of the condition.", + "status": "`status` is the status of the condition. Can be True, False, Unknown.", + "lastTransitionTime": "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + "reason": "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", + "message": "`message` is a human-readable message indicating details about last transition.", +} + +func (PriorityLevelConfigurationCondition) SwaggerDoc() map[string]string { + return map_PriorityLevelConfigurationCondition +} + +var map_PriorityLevelConfigurationList = map[string]string{ + "": "PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.", + "metadata": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "items": "`items` is a list of request-priorities.", +} + +func (PriorityLevelConfigurationList) SwaggerDoc() map[string]string { + return map_PriorityLevelConfigurationList +} + +var map_PriorityLevelConfigurationReference = map[string]string{ + "": "PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.", + "name": "`name` is the name of resource being referenced", +} + +func (PriorityLevelConfigurationReference) SwaggerDoc() map[string]string { + return map_PriorityLevelConfigurationReference +} + +var map_PriorityLevelConfigurationSpec = map[string]string{ + "": "PriorityLevelConfigurationSpec is specification of a priority level", + "globalDefault": "`globalDefault` specifies whether this priority level should be considered as the default priority for requests that do not have any priority level. Only one PriorityClass should be marked as `globalDefault`.", + "exempt": "`exempt` defines whether the priority level is exempted or not. There should be at most one exempt priority level. Being exempt means that requests of that priority are not subject to concurrency limits (and thus are never queued) and do not detract from the concurrency available for non-exempt requests. In a more sophisticated system, the exempt priority level would be the highest priority level. The field is default to false and only those system preset priority level can be exempt.", + "assuredConcurrencyShares": "`assuredConcurrencyShares` is a positive number for a non-exempt priority level, representing the weight by which the priority level shares the concurrency from the global limit. The concurrency limit of an apiserver is divided among the non-exempt priority levels in proportion to their assured concurrency shares. Basically this produces the assured concurrency value (ACV) for each priority level:\n\n ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )", + "queues": "`queues` is a number of queues that belong to a non-exempt PriorityLevelConfiguration object. The queues exist independently at each apiserver. The value must be positive for a non-exempt priority level and setting it to 1 disables shufflesharding and makes the distinguisher method irrelevant.", + "handSize": "`handSize` is a small positive number for applying shuffle sharding. When a request arrives at an apiserver the request flow identifier’s string pair is hashed and the hash value is used to shuffle the queue indices and deal a hand of the size specified here. If empty, the hand size will the be set to 1.", + "queueLengthLimit": "`queueLengthLimit` is a length limit applied to each queue belongs to the priority. The value must be positive for a non-exempt priority level.", +} + +func (PriorityLevelConfigurationSpec) SwaggerDoc() map[string]string { + return map_PriorityLevelConfigurationSpec +} + +var map_PriorityLevelConfigurationStatus = map[string]string{ + "": "PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".", + "conditions": "`conditions` is the current state of \"request-priority\".", +} + +func (PriorityLevelConfigurationStatus) SwaggerDoc() map[string]string { + return map_PriorityLevelConfigurationStatus +} + +var map_Subject = map[string]string{ + "": "Subject matches a set of users. Syntactically, Subject is a general API object reference. Authorization produces a username and a set of groups, and we imagine special kinds of non-namespaced objects, User and Group in API group \"rbac.authorization.k8s.io\", to represent such a username or group. The only kind of true object reference that currently will match any users is ServiceAccount.", + "kind": "`kind` of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the kind value is not recognized, the flow-control layer in api-server should report an error.", + "apiGroup": "`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.", + "name": "`name` of the object being referenced.", + "namespace": "`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.", +} + +func (Subject) SwaggerDoc() map[string]string { + return map_Subject +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go index cdef522c260..88594b64c8c 100644 --- a/staging/src/k8s.io/client-go/informers/generic.go +++ b/staging/src/k8s.io/client-go/informers/generic.go @@ -226,7 +226,7 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case extensionsv1beta1.SchemeGroupVersion.WithResource("replicasets"): return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil - // Group=flowcontrol, Version=v1alpha1 + // Group=flowcontrol.apiserver.k8s.io, Version=v1alpha1 case flowcontrolv1alpha1.SchemeGroupVersion.WithResource("flowschemas"): return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1alpha1().FlowSchemas().Informer()}, nil case flowcontrolv1alpha1.SchemeGroupVersion.WithResource("prioritylevelconfigurations"): diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go index f61e2dfa11c..d27f802e1b2 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go @@ -33,9 +33,9 @@ type FakeFlowSchemas struct { Fake *FakeFlowcontrolV1alpha1 } -var flowschemasResource = schema.GroupVersionResource{Group: "flowcontrol", Version: "v1alpha1", Resource: "flowschemas"} +var flowschemasResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Resource: "flowschemas"} -var flowschemasKind = schema.GroupVersionKind{Group: "flowcontrol", Version: "v1alpha1", Kind: "FlowSchema"} +var flowschemasKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Kind: "FlowSchema"} // Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any. func (c *FakeFlowSchemas) Get(name string, options v1.GetOptions) (result *v1alpha1.FlowSchema, err error) { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go index 7989d39d40d..960481c2863 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go @@ -33,9 +33,9 @@ type FakePriorityLevelConfigurations struct { Fake *FakeFlowcontrolV1alpha1 } -var prioritylevelconfigurationsResource = schema.GroupVersionResource{Group: "flowcontrol", Version: "v1alpha1", Resource: "prioritylevelconfigurations"} +var prioritylevelconfigurationsResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Resource: "prioritylevelconfigurations"} -var prioritylevelconfigurationsKind = schema.GroupVersionKind{Group: "flowcontrol", Version: "v1alpha1", Kind: "PriorityLevelConfiguration"} +var prioritylevelconfigurationsKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Kind: "PriorityLevelConfiguration"} // Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any. func (c *FakePriorityLevelConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { 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 bb600de0b17..37a1ff2d7b3 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 @@ -30,7 +30,7 @@ type FlowcontrolV1alpha1Interface interface { PriorityLevelConfigurationsGetter } -// FlowcontrolV1alpha1Client is used to interact with features provided by the flowcontrol group. +// FlowcontrolV1alpha1Client is used to interact with features provided by the flowcontrol.apiserver.k8s.io group. type FlowcontrolV1alpha1Client struct { restClient rest.Interface }