diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 97190463e79..d70098dd2b1 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -13831,7 +13831,7 @@ "type": "object" }, "io.k8s.api.flowcontrol.v1alpha1.FlowSchema": { - "description": "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\".", + "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\".", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", @@ -13929,7 +13929,7 @@ "properties": { "distinguisherMethod": { "$ref": "#/definitions/io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod", - "description": "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the computation always yields the empty string." + "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." }, "matchingPrecedence": { "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 non-negative.", @@ -13941,7 +13941,7 @@ "description": "`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." }, "rules": { - "description": "`rules` describes which requests will match this flow schema.", + "description": "`rules` describes which requests will match this flow schema. The flow-schema applies if any rule matches.", "items": { "$ref": "#/definitions/io.k8s.api.flowcontrol.v1alpha1.PolicyRuleWithSubjects" }, @@ -13970,7 +13970,7 @@ "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.", "properties": { "apiGroups": { - "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. APIGroupAll represents all api groups.", + "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. '*' represents all api groups.", "items": { "type": "string" }, @@ -13991,7 +13991,7 @@ "type": "array" }, "verbs": { - "description": "`verbs` is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "description": "`verbs` is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all verbs.", "items": { "type": "string" }, @@ -14134,16 +14134,16 @@ "description": "PriorityLevelConfigurationSpec is specification of a priority level", "properties": { "assuredConcurrencyShares": { - "description": "`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) ) )", + "description": "`assuredConcurrencyShares` is a positive number for a non-exempt priority level. 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) ) )", "format": "int32", "type": "integer" }, "exempt": { - "description": "`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.", + "description": "`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. The field is default to false and only those system preset priority level can be exempt.", "type": "boolean" }, "handSize": { - "description": "`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.", + "description": "`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. NOTE: To figure out a better value for your cluster, please refer to (#76846)[https://github.com/kubernetes/kubernetes/issues/76846#issuecomment-523700960]", "format": "int32", "type": "integer" }, diff --git a/cmd/kube-apiserver/app/BUILD b/cmd/kube-apiserver/app/BUILD index ad715f3a3b5..338f0d75271 100644 --- a/cmd/kube-apiserver/app/BUILD +++ b/cmd/kube-apiserver/app/BUILD @@ -57,7 +57,6 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/storage/etcd3/preflight:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/term:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index 6b07e3e6f97..dc31719fec6 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -52,7 +52,6 @@ import ( "k8s.io/apiserver/pkg/storage/etcd3/preflight" utilfeature "k8s.io/apiserver/pkg/util/feature" utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" - "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing" "k8s.io/apiserver/pkg/util/term" "k8s.io/apiserver/pkg/util/webhook" clientgoinformers "k8s.io/client-go/informers" @@ -525,7 +524,7 @@ func buildGenericConfig( } if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.RequestManagement) { - genericConfig.RequestManagement = BuildRequestManagement(s, clientgoExternalClient, versionedInformers) + genericConfig.RequestManagement = BuildRequestManager(s, clientgoExternalClient, versionedInformers) } return @@ -555,15 +554,14 @@ func BuildAuthorizer(s *options.ServerRunOptions, versionedInformers clientgoinf return authorizationConfig.New() } -// BuildRequestManagement constructs the authenticator -func BuildRequestManagement(s *options.ServerRunOptions, extclient clientgoclientset.Interface, versionedInformer clientgoinformers.SharedInformerFactory) utilflowcontrol.Interface { - return utilflowcontrol.NewRequestManagementSystemWithPreservation( +// BuildRequestManagement constructs the request manager +func BuildRequestManager(s *options.ServerRunOptions, extclient clientgoclientset.Interface, versionedInformer clientgoinformers.SharedInformerFactory) utilflowcontrol.Interface { + return utilflowcontrol.NewRequestManagerWithPreservation( versionedInformer, extclient.FlowcontrolV1alpha1(), fairqueuing.NewNoRestraintFactory( /* TODO: switch to real implementation */ ), s.GenericServerRunOptions.MaxRequestsInFlight+s.GenericServerRunOptions.MaxMutatingRequestsInFlight, s.GenericServerRunOptions.RequestTimeout/4, - nil, flowcontrolbootstrap.PreservingFlowSchemas, flowcontrolbootstrap.PreservingPriorityLevelConfigurations, ) diff --git a/pkg/apis/flowcontrol/types.go b/pkg/apis/flowcontrol/types.go index f59f520bbfa..2d053d04215 100644 --- a/pkg/apis/flowcontrol/types.go +++ b/pkg/apis/flowcontrol/types.go @@ -23,13 +23,11 @@ import ( // These are valid flow-dingtinguisher methods. const ( - // FlowDistinguisherMethodByUser specifies that the flow distinguisher is the username works in the request context + // FlowDistinguisherMethodByUserType specifies that the flow distinguisher is the username works in the request context // so that the requests from the same user will enqueued into the same set of queues for processing. FlowDistinguisherMethodByUserType FlowDistinguisherMethodType = "ByUser" - // FlowDistinguisherMethodByNamespace works by computing flow distinguisher with the user requested namespace. Any - // user requesting the namespace will be put into the same queue for processing. - // FlowDistinguisherMethodByNamespaceType specifies that the flow distinguisher is the namespace of the object + // FlowDistinguisherMethodByNamespaceType specifies that the flow distinguisher is the object's requested namespace // that the request accesses. If the object is not namespaced or the request is a non-resource request then // the flow distinguisher is the empty string. FlowDistinguisherMethodByNamespaceType FlowDistinguisherMethodType = "ByNamespace" @@ -69,7 +67,7 @@ const ( // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// FlowSchema defines the schema of a group of flows. Note that a flow makes up of a set of inbound API requests with +// 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 FlowSchema struct { metav1.TypeMeta @@ -112,9 +110,9 @@ type FlowSchemaSpec struct { // MatchingPrecedence. Each MatchingPrecedence value must be non-negative. MatchingPrecedence int32 // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. - // `nil` specifies that the computation always yields the empty string. + // `nil` specifies that the distinguisher is disabled and thus will always be the empty string. DistinguisherMethod *FlowDistinguisherMethod - // `rules` describes which requests will match this flow schema. + // `rules` describes which requests will match this flow schema. The flow-schema applies if any rule matches. Rules []PolicyRuleWithSubjects } @@ -144,6 +142,27 @@ type PolicyRuleWithSubjects struct { Rule PolicyRule } +// 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 PolicyRule struct { + // `verbs` is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. + // VerbAll represents all verbs. + Verbs []string + // `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. '*' represents all api groups. + // +optional + APIGroups []string + // `resources` is a list of resources this rule applies to. ResourceAll represents all resources. + // +optional + Resources []string + // `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. + // +optional + NonResourceURLs []string +} + // FlowSchemaStatus represents the current state of a flow-schema. type FlowSchemaStatus struct { // Current state of flow-schema. @@ -204,16 +223,8 @@ type PriorityLevelConfigurationList struct { // PriorityLevelConfigurationSpec is specification of a priority level type PriorityLevelConfigurationSpec struct { - // `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. - // +optional - Exempt bool - // `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 + // `assuredConcurrencyShares` is a positive number for a non-exempt priority level. 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: // // ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) ) @@ -223,17 +234,25 @@ type PriorityLevelConfigurationSpec struct { // `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. + // TODO: sugguest a default or a way of deciding on a value. // +optional Queues int32 // `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. + // NOTE: To figure out a better value for your cluster, please refer to (#76846)[https://github.com/kubernetes/kubernetes/issues/76846#issuecomment-523700960] // +optional HandSize int32 // `queueLengthLimit` is a length limit applied to each queue belongs to the priority. The value must be positive // for a non-exempt priority level. // +optional QueueLengthLimit int32 + // `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. The field is default to false and only those system + // preset priority level can be exempt. + // +optional + Exempt bool } // PriorityLevelConfigurationConditionType is a valid value for PriorityLevelConfigurationStatusCondition.Type @@ -282,24 +301,3 @@ type Subject struct { // +optional Namespace 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. -type PolicyRule struct { - // `verbs` is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. - // VerbAll represents all kinds. - Verbs []string - // `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. - // +optional - APIGroups []string - // `resources` is a list of resources this rule applies to. ResourceAll represents all resources. - // +optional - Resources []string - // `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. - // +optional - NonResourceURLs []string -} diff --git a/pkg/apis/flowcontrol/v1alpha1/defaults.go b/pkg/apis/flowcontrol/v1alpha1/defaults.go index 488d5f538b2..945a7c846f0 100644 --- a/pkg/apis/flowcontrol/v1alpha1/defaults.go +++ b/pkg/apis/flowcontrol/v1alpha1/defaults.go @@ -18,13 +18,22 @@ package v1alpha1 import ( "k8s.io/api/flowcontrol/v1alpha1" - "k8s.io/kubernetes/pkg/apis/flowcontrol" +) + +// Default settings for flow-schema +const ( + FlowSchemaDefaultMatchingPrecedence int32 = 1000 +) + +// Default settings for priority-level-configuration +const ( + PriorityLevelConfigurationDefaultHandSize int32 = 1 ) // SetDefaults_FlowSchema sets default values for flow schema func SetDefaults_FlowSchema(obj *v1alpha1.FlowSchema) { if obj.Spec.MatchingPrecedence == 0 { - obj.Spec.MatchingPrecedence = flowcontrol.FlowSchemaDefaultMatchingPrecedence + obj.Spec.MatchingPrecedence = FlowSchemaDefaultMatchingPrecedence } } @@ -32,7 +41,7 @@ func SetDefaults_FlowSchema(obj *v1alpha1.FlowSchema) { func SetDefaults_PriorityLevelConfiguration(obj *v1alpha1.PriorityLevelConfiguration) { if !obj.Spec.Exempt { if obj.Spec.HandSize == 0 { - obj.Spec.HandSize = flowcontrol.PriorityLevelConfigurationDefaultHandSize + obj.Spec.HandSize = PriorityLevelConfigurationDefaultHandSize } } } diff --git a/pkg/apis/flowcontrol/v1alpha1/zz_generated.conversion.go b/pkg/apis/flowcontrol/v1alpha1/zz_generated.conversion.go index c1ef4e7a738..dc46bad3547 100644 --- a/pkg/apis/flowcontrol/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/flowcontrol/v1alpha1/zz_generated.conversion.go @@ -497,11 +497,11 @@ func Convert_flowcontrol_PriorityLevelConfigurationReference_To_v1alpha1_Priorit } func autoConvert_v1alpha1_PriorityLevelConfigurationSpec_To_flowcontrol_PriorityLevelConfigurationSpec(in *v1alpha1.PriorityLevelConfigurationSpec, out *flowcontrol.PriorityLevelConfigurationSpec, s conversion.Scope) error { - out.Exempt = in.Exempt out.AssuredConcurrencyShares = in.AssuredConcurrencyShares out.Queues = in.Queues out.HandSize = in.HandSize out.QueueLengthLimit = in.QueueLengthLimit + out.Exempt = in.Exempt return nil } @@ -511,11 +511,11 @@ func Convert_v1alpha1_PriorityLevelConfigurationSpec_To_flowcontrol_PriorityLeve } func autoConvert_flowcontrol_PriorityLevelConfigurationSpec_To_v1alpha1_PriorityLevelConfigurationSpec(in *flowcontrol.PriorityLevelConfigurationSpec, out *v1alpha1.PriorityLevelConfigurationSpec, s conversion.Scope) error { - out.Exempt = in.Exempt out.AssuredConcurrencyShares = in.AssuredConcurrencyShares out.Queues = in.Queues out.HandSize = in.HandSize out.QueueLengthLimit = in.QueueLengthLimit + out.Exempt = in.Exempt return nil } diff --git a/pkg/kubeapiserver/server/insecure_handler.go b/pkg/kubeapiserver/server/insecure_handler.go index 45f0b8a0464..70b03301629 100644 --- a/pkg/kubeapiserver/server/insecure_handler.go +++ b/pkg/kubeapiserver/server/insecure_handler.go @@ -29,12 +29,12 @@ import ( // BuildInsecureHandlerChain sets up the server to listen to http. Should be removed. func BuildInsecureHandlerChain(apiHandler http.Handler, c *server.Config) http.Handler { handler := apiHandler + handler = genericapifilters.WithAudit(handler, c.AuditBackend, c.AuditPolicyChecker, c.LongRunningFunc) if feature.DefaultFeatureGate.Enabled(features.RequestManagement) { handler = genericfilters.WithRequestManagement(handler, c.LongRunningFunc, c.RequestManagement) } else { handler = genericfilters.WithMaxInFlightLimit(handler, c.MaxRequestsInFlight, c.MaxMutatingRequestsInFlight, c.LongRunningFunc) } - handler = genericapifilters.WithAudit(handler, c.AuditBackend, c.AuditPolicyChecker, c.LongRunningFunc) handler = genericapifilters.WithAuthentication(handler, server.InsecureSuperuser{}, nil, nil) handler = genericfilters.WithCORS(handler, c.CorsAllowedOriginList, nil, nil, nil, "true") handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, c.LongRunningFunc, c.RequestTimeout) diff --git a/staging/src/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go index 8b700137769..26be1823323 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go @@ -655,24 +655,24 @@ func (m *PriorityLevelConfigurationSpec) MarshalTo(dAtA []byte) (int, error) { _ = l dAtA[i] = 0x8 i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.AssuredConcurrencyShares)) + dAtA[i] = 0x10 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Queues)) + dAtA[i] = 0x18 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.HandSize)) + dAtA[i] = 0x20 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.QueueLengthLimit)) + dAtA[i] = 0x28 + i++ if m.Exempt { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ - dAtA[i] = 0x10 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.AssuredConcurrencyShares)) - dAtA[i] = 0x18 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Queues)) - dAtA[i] = 0x20 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.HandSize)) - dAtA[i] = 0x28 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.QueueLengthLimit)) return i, nil } @@ -927,11 +927,11 @@ func (m *PriorityLevelConfigurationReference) Size() (n int) { func (m *PriorityLevelConfigurationSpec) Size() (n int) { var l int _ = l - n += 2 n += 1 + sovGenerated(uint64(m.AssuredConcurrencyShares)) n += 1 + sovGenerated(uint64(m.Queues)) n += 1 + sovGenerated(uint64(m.HandSize)) n += 1 + sovGenerated(uint64(m.QueueLengthLimit)) + n += 2 return n } @@ -1120,11 +1120,11 @@ func (this *PriorityLevelConfigurationSpec) String() string { return "nil" } s := strings.Join([]string{`&PriorityLevelConfigurationSpec{`, - `Exempt:` + fmt.Sprintf("%v", this.Exempt) + `,`, `AssuredConcurrencyShares:` + fmt.Sprintf("%v", this.AssuredConcurrencyShares) + `,`, `Queues:` + fmt.Sprintf("%v", this.Queues) + `,`, `HandSize:` + fmt.Sprintf("%v", this.HandSize) + `,`, `QueueLengthLimit:` + fmt.Sprintf("%v", this.QueueLengthLimit) + `,`, + `Exempt:` + fmt.Sprintf("%v", this.Exempt) + `,`, `}`, }, "") return s @@ -2763,26 +2763,6 @@ func (m *PriorityLevelConfigurationSpec) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exempt", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Exempt = bool(v != 0) - case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AssuredConcurrencyShares", wireType) } @@ -2801,7 +2781,7 @@ func (m *PriorityLevelConfigurationSpec) Unmarshal(dAtA []byte) error { break } } - case 3: + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Queues", wireType) } @@ -2820,7 +2800,7 @@ func (m *PriorityLevelConfigurationSpec) Unmarshal(dAtA []byte) error { break } } - case 4: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field HandSize", wireType) } @@ -2839,7 +2819,7 @@ func (m *PriorityLevelConfigurationSpec) Unmarshal(dAtA []byte) error { break } } - case 5: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field QueueLengthLimit", wireType) } @@ -2858,6 +2838,26 @@ func (m *PriorityLevelConfigurationSpec) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exempt", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Exempt = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3236,82 +3236,82 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1222 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x6e, 0x14, 0x47, - 0x17, 0x75, 0xdb, 0x33, 0xc6, 0x53, 0x7c, 0x80, 0xbf, 0xb2, 0x14, 0x46, 0x8e, 0x34, 0x63, 0x75, - 0x24, 0x20, 0x71, 0xd2, 0x1d, 0x23, 0x14, 0x90, 0x50, 0x84, 0x68, 0x48, 0x80, 0x30, 0x26, 0xa6, - 0x4c, 0x88,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 0x79, 0x45, 0xae, 0xb0, 0xb9, 0x49, 0x0a, 0xc3, 0x2e, 0xaa, 0xa8, - 0xbf, 0x22, 0xa6, 0x3e, 0x98, 0x3b, 0xfe, 0x7f, 0x53, 0x56, 0xb9, 0x93, 0x25, 0x48, 0x51, 0xe3, - 0x39, 0xcf, 0x5e, 0xd5, 0x66, 0x9e, 0xbf, 0xaa, 0xcd, 0xbc, 0x78, 0x55, 0x9b, 0xf9, 0xb1, 0x5f, - 0xb3, 0x9e, 0xf5, 0x6b, 0xd6, 0xf3, 0x7e, 0xcd, 0x7a, 0xd1, 0xaf, 0x59, 0x2f, 0xfb, 0x35, 0xeb, - 0x97, 0x7f, 0x6a, 0x33, 0x0f, 0x16, 0xb2, 0x11, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x2a, - 0x2b, 0xf6, 0xcc, 0x0f, 0x00, 0x00, + // 1219 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0x3a, 0x76, 0x6a, 0x4f, 0x69, 0x1b, 0x26, 0x12, 0xb5, 0x8c, 0x64, 0x47, 0x8b, 0x44, + 0x0b, 0x81, 0x5d, 0x52, 0x55, 0xb4, 0x52, 0x85, 0xaa, 0x6e, 0x03, 0x6d, 0xa9, 0x13, 0x92, 0x49, + 0x29, 0xa2, 0xca, 0xa1, 0x93, 0xf5, 0xc4, 0x1e, 0xe2, 0xfd, 0x60, 0x66, 0xd6, 0xad, 0x11, 0x07, + 0x24, 0x8e, 0x5c, 0xf8, 0x01, 0xfd, 0x01, 0x1c, 0xf8, 0x0f, 0x20, 0x0e, 0x28, 0x07, 0x0e, 0x3d, + 0xf6, 0x64, 0x35, 0xe6, 0xd8, 0x7f, 0xd0, 0x13, 0x9a, 0xd9, 0xd9, 0xdd, 0xf8, 0x3b, 0x51, 0xa4, + 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 0x6a, 0xbc, 0xec, 0x57, 0x8d, 0x5f, 0xff, 0xad, + 0xce, 0x3d, 0x2a, 0x26, 0x23, 0xfa, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xe0, 0xe0, 0x7e, 0xb1, 0xcc, + 0x0f, 0x00, 0x00, } diff --git a/staging/src/k8s.io/api/flowcontrol/v1alpha1/generated.proto b/staging/src/k8s.io/api/flowcontrol/v1alpha1/generated.proto index a99c6d12fc9..9333d530905 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1alpha1/generated.proto +++ b/staging/src/k8s.io/api/flowcontrol/v1alpha1/generated.proto @@ -35,7 +35,7 @@ message FlowDistinguisherMethod { optional string type = 1; } -// FlowSchema defines the schema of a group of flows. Note that a flow makes up of a set of inbound API requests with +// 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". message FlowSchema { // `metadata` is the standard object's metadata. @@ -97,10 +97,10 @@ message FlowSchemaSpec { optional int32 matchingPrecedence = 2; // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. - // `nil` specifies that the computation always yields the empty string. + // `nil` specifies that the distinguisher is disabled and thus will always be the empty string. optional FlowDistinguisherMethod distinguisherMethod = 3; - // `rules` describes which requests will match this flow schema. + // `rules` describes which requests will match this flow schema. The flow-schema applies if any rule matches. repeated PolicyRuleWithSubjects rules = 4; } @@ -114,11 +114,11 @@ message FlowSchemaStatus { // about who the rule applies to or which namespace the rule applies to. message PolicyRule { // `verbs` is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. - // VerbAll represents all kinds. + // VerbAll represents all verbs. repeated string verbs = 1; // `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. + // the enumerated resources in any API group will be allowed. '*' represents all api groups. // +optional repeated string apiGroups = 2; @@ -202,40 +202,40 @@ message PriorityLevelConfigurationReference { // PriorityLevelConfigurationSpec is specification of a priority level message PriorityLevelConfigurationSpec { - // `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. - // +optional - optional bool exempt = 1; - - // `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 + // `assuredConcurrencyShares` is a positive number for a non-exempt priority level. 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: // // ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) ) // // +optional - optional int32 assuredConcurrencyShares = 2; + optional int32 assuredConcurrencyShares = 1; // `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. + // TODO: sugguest a default or a way of deciding on a value. // +optional - optional int32 queues = 3; + optional int32 queues = 2; // `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. + // NOTE: To figure out a better value for your cluster, please refer to (#76846)[https://github.com/kubernetes/kubernetes/issues/76846#issuecomment-523700960] // +optional - optional int32 handSize = 4; + optional int32 handSize = 3; // `queueLengthLimit` is a length limit applied to each queue belongs to the priority. The value must be positive // for a non-exempt priority level. // +optional - optional int32 queueLengthLimit = 5; + optional int32 queueLengthLimit = 4; + + // `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. The field is default to false and only those system + // preset priority level can be exempt. + // +optional + optional bool exempt = 5; } // PriorityLevelConfigurationStatus represents the current state of a "request-priority". diff --git a/staging/src/k8s.io/api/flowcontrol/v1alpha1/types.go b/staging/src/k8s.io/api/flowcontrol/v1alpha1/types.go index df4c9c06046..56f18176523 100644 --- a/staging/src/k8s.io/api/flowcontrol/v1alpha1/types.go +++ b/staging/src/k8s.io/api/flowcontrol/v1alpha1/types.go @@ -23,13 +23,11 @@ import ( // These are valid flow-dingtinguisher methods. const ( - // FlowDistinguisherMethodByUser specifies that the flow distinguisher is the username works in the request context + // FlowDistinguisherMethodByUserType specifies that the flow distinguisher is the username works in the request context // so that the requests from the same user will enqueued into the same set of queues for processing. FlowDistinguisherMethodByUserType FlowDistinguisherMethodType = "ByUser" - // FlowDistinguisherMethodByNamespace works by computing flow distinguisher with the user requested namespace. Any - // user requesting the namespace will be put into the same queue for processing. - // FlowDistinguisherMethodByNamespaceType specifies that the flow distinguisher is the namespace of the object + // FlowDistinguisherMethodByNamespaceType specifies that the flow distinguisher is the object's requested namespace // that the request accesses. If the object is not namespaced or the request is a non-resource request then // the flow distinguisher is the empty string. FlowDistinguisherMethodByNamespaceType FlowDistinguisherMethodType = "ByNamespace" @@ -61,7 +59,7 @@ const ( // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// FlowSchema defines the schema of a group of flows. Note that a flow makes up of a set of inbound API requests with +// 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 FlowSchema struct { metav1.TypeMeta `json:",inline"` @@ -104,9 +102,9 @@ type FlowSchemaSpec struct { // MatchingPrecedence. Each MatchingPrecedence value must be non-negative. MatchingPrecedence int32 `json:"matchingPrecedence" protobuf:"varint,2,opt,name=matchingPrecedence"` // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. - // `nil` specifies that the computation always yields the empty string. + // `nil` specifies that the distinguisher is disabled and thus will always be the empty string. DistinguisherMethod *FlowDistinguisherMethod `json:"distinguisherMethod,omitempty" protobuf:"bytes,3,opt,name=distinguisherMethod"` - // `rules` describes which requests will match this flow schema. + // `rules` describes which requests will match this flow schema. The flow-schema applies if any rule matches. Rules []PolicyRuleWithSubjects `json:"rules,omitempty" protobuf:"bytes,4,rep,name=rules"` } @@ -136,6 +134,27 @@ type PolicyRuleWithSubjects struct { Rule PolicyRule `json:"rule" protobuf:"bytes,2,opt,name=rule"` } +// 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 PolicyRule struct { + // `verbs` is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. + // VerbAll represents all verbs. + Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` + // `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. '*' represents all api groups. + // +optional + APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"` + // `resources` is a list of resources this rule applies to. ResourceAll represents all resources. + // +optional + Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"` + // `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. + // +optional + NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"` +} + // FlowSchemaStatus represents the current state of a flow-schema. type FlowSchemaStatus struct { // Current state of flow-schema. @@ -196,36 +215,36 @@ type PriorityLevelConfigurationList struct { // PriorityLevelConfigurationSpec is specification of a priority level type PriorityLevelConfigurationSpec struct { - // `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. - // +optional - Exempt bool `json:"exempt,omitempty" protobuf:"varint,1,opt,name=exempt"` - // `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 + // `assuredConcurrencyShares` is a positive number for a non-exempt priority level. 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: // // ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) ) // // +optional - AssuredConcurrencyShares int32 `json:"assuredConcurrencyShares,omitempty" protobuf:"varint,2,opt,name=assuredConcurrencyShares"` + AssuredConcurrencyShares int32 `json:"assuredConcurrencyShares,omitempty" protobuf:"varint,1,opt,name=assuredConcurrencyShares"` // `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. + // TODO: sugguest a default or a way of deciding on a value. // +optional - Queues int32 `json:"queues,omitempty" protobuf:"varint,3,opt,name=queues"` + Queues int32 `json:"queues,omitempty" protobuf:"varint,2,opt,name=queues"` // `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. + // NOTE: To figure out a better value for your cluster, please refer to (#76846)[https://github.com/kubernetes/kubernetes/issues/76846#issuecomment-523700960] // +optional - HandSize int32 `json:"handSize,omitempty" protobuf:"varint,4,opt,name=handSize"` + HandSize int32 `json:"handSize,omitempty" protobuf:"varint,3,opt,name=handSize"` // `queueLengthLimit` is a length limit applied to each queue belongs to the priority. The value must be positive // for a non-exempt priority level. // +optional - QueueLengthLimit int32 `json:"queueLengthLimit,omitempty" protobuf:"varint,5,opt,name=queueLengthLimit"` + QueueLengthLimit int32 `json:"queueLengthLimit,omitempty" protobuf:"varint,4,opt,name=queueLengthLimit"` + // `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. The field is default to false and only those system + // preset priority level can be exempt. + // +optional + Exempt bool `json:"exempt,omitempty" protobuf:"varint,5,opt,name=exempt"` } // PriorityLevelConfigurationConditionType is a valid value for PriorityLevelConfigurationStatusCondition.Type @@ -274,24 +293,3 @@ type Subject struct { // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"` } - -// 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 PolicyRule struct { - // `verbs` is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. - // VerbAll represents all kinds. - Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` - // `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. - // +optional - APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"` - // `resources` is a list of resources this rule applies to. ResourceAll represents all resources. - // +optional - Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"` - // `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. - // +optional - NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"` -} 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 index 1fb7f184b40..5a6d8ba6408 100644 --- 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 @@ -37,7 +37,7 @@ func (FlowDistinguisherMethod) SwaggerDoc() map[string]string { } 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\".", + "": "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\".", "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", @@ -74,8 +74,8 @@ 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.", + "distinguisherMethod": "`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.", + "rules": "`rules` describes which requests will match this flow schema. The flow-schema applies if any rule matches.", } func (FlowSchemaSpec) SwaggerDoc() map[string]string { @@ -93,8 +93,8 @@ func (FlowSchemaStatus) SwaggerDoc() map[string]string { 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.", + "verbs": "`verbs` is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all verbs.", + "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. '*' 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.", } @@ -158,11 +158,11 @@ func (PriorityLevelConfigurationReference) SwaggerDoc() map[string]string { var map_PriorityLevelConfigurationSpec = map[string]string{ "": "PriorityLevelConfigurationSpec is specification of a priority level", - "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) ) )", + "assuredConcurrencyShares": "`assuredConcurrencyShares` is a positive number for a non-exempt priority level. 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.", + "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. NOTE: To figure out a better value for your cluster, please refer to (#76846)[https://github.com/kubernetes/kubernetes/issues/76846#issuecomment-523700960]", "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.", + "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. The field is default to false and only those system preset priority level can be exempt.", } func (PriorityLevelConfigurationSpec) SwaggerDoc() map[string]string { diff --git a/staging/src/k8s.io/apimachinery/pkg/util/waitgroup/BUILD b/staging/src/k8s.io/apimachinery/pkg/util/waitgroup/BUILD index a17ac933a42..1489f527bbc 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/waitgroup/BUILD +++ b/staging/src/k8s.io/apimachinery/pkg/util/waitgroup/BUILD @@ -4,6 +4,7 @@ go_library( name = "go_default_library", srcs = [ "doc.go", + "optionalwaitgroup.go", "waitgroup.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/waitgroup", diff --git a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/optionalwaitgroup.go b/staging/src/k8s.io/apimachinery/pkg/util/waitgroup/optionalwaitgroup.go similarity index 98% rename from staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/optionalwaitgroup.go rename to staging/src/k8s.io/apimachinery/pkg/util/waitgroup/optionalwaitgroup.go index b5def73ad63..9e21d657d52 100644 --- a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/optionalwaitgroup.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/waitgroup/optionalwaitgroup.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package fairqueuing +package waitgroup import ( "sync" diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/BUILD b/staging/src/k8s.io/apiserver/pkg/server/options/BUILD index 555cc37b308..eb2a08b84e3 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/server/options/BUILD @@ -67,7 +67,6 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/audit/buffered:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/audit/dynamic:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/recommended.go b/staging/src/k8s.io/apiserver/pkg/server/options/recommended.go index 256022cd6ea..ea3f6c54309 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/recommended.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/recommended.go @@ -27,7 +27,6 @@ import ( "k8s.io/apiserver/pkg/storage/storagebackend" "k8s.io/apiserver/pkg/util/feature" utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" - "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing" ) // RecommendedOptions contains the recommended options for running an API server. @@ -123,13 +122,11 @@ func (o *RecommendedOptions) ApplyTo(config *server.RecommendedConfig) error { return err } if feature.DefaultFeatureGate.Enabled(features.RequestManagement) { - config.RequestManagement = utilflowcontrol.NewRequestManagementSystem( + config.RequestManagement = utilflowcontrol.NewRequestManager( config.SharedInformerFactory, kubernetes.NewForConfigOrDie(config.ClientConfig).FlowcontrolV1alpha1(), - fairqueuing.NewNoRestraintFactory( /* TODO: switch to real implementation */ ), config.MaxRequestsInFlight+config.MaxMutatingRequestsInFlight, - config.RequestTimeout/4, - nil) + config.RequestTimeout/4) } return nil diff --git a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/BUILD b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/BUILD index 21c5ec862d7..ee72178b649 100644 --- a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/BUILD @@ -15,8 +15,10 @@ go_library( "//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/waitgroup:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/BUILD b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/BUILD index 2e8cc8a14fb..d2d6ac8ff3a 100644 --- a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/BUILD @@ -8,13 +8,13 @@ go_library( "integrator.go", "interface.go", "no-restraint.go", - "optionalwaitgroup.go", "types.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing", importpath = "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing", visibility = ["//visibility:public"], deps = [ + "//staging/src/k8s.io/apimachinery/pkg/util/waitgroup:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/shufflesharding:go_default_library", "//vendor/k8s.io/klog:go_default_library", @@ -28,7 +28,11 @@ go_test( "fq_test.go", ], embed = [":go_default_library"], - deps = ["//staging/src/k8s.io/apiserver/pkg/util/clock:go_default_library"], + deps = [ + "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/waitgroup:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/clock:go_default_library", + ], ) filegroup( diff --git a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/fairqueuing.go b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/fairqueuing.go index 3207d960e7f..6ba320f8972 100644 --- a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/fairqueuing.go +++ b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/fairqueuing.go @@ -21,6 +21,7 @@ import ( "sync" "time" + "k8s.io/apimachinery/pkg/util/waitgroup" "k8s.io/apiserver/pkg/util/clock" "k8s.io/apiserver/pkg/util/shufflesharding" "k8s.io/klog" @@ -31,13 +32,13 @@ import ( // This filter makes a QueueSetSystem for each priority level. type queueSetFactoryImpl struct { // wg can be nil and is ignored in that case - wg OptionalWaitGroup + wg waitgroup.OptionalWaitGroup clk clock.PassiveClock } // NewQueueSetFactory creates a new NewQueueSetFactory object -func NewQueueSetFactory(clk clock.PassiveClock, wg OptionalWaitGroup) QueueSetFactory { +func NewQueueSetFactory(clk clock.PassiveClock, wg waitgroup.OptionalWaitGroup) QueueSetFactory { return &queueSetFactoryImpl{ wg: wg, clk: clk, @@ -60,7 +61,8 @@ func (qsf queueSetFactoryImpl) NewQueueSet(concurrencyLimit, desiredNumQueues, q // https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190228-priority-and-fairness.md type queueSetImpl struct { lock sync.Mutex - wg OptionalWaitGroup + name string + wg waitgroup.OptionalWaitGroup queues []*Queue clk clock.PassiveClock vt float64 @@ -90,8 +92,8 @@ func initQueues(numQueues int) []*Queue { } // newQueueSetImpl creates a new queueSetImpl from passed in parameters and -func newQueueSetImpl(concurrencyLimit, desiredNumQueues, queueLengthLimit int, - requestWaitLimit time.Duration, clk clock.PassiveClock, wg OptionalWaitGroup) *queueSetImpl { +func newQueueSetImpl(name string, concurrencyLimit, desiredNumQueues, queueLengthLimit int, + requestWaitLimit time.Duration, clk clock.PassiveClock, wg waitgroup.OptionalWaitGroup) *queueSetImpl { fq := &queueSetImpl{ wg: wg, queues: initQueues(desiredNumQueues), diff --git a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/fairqueuing_test.go b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/fairqueuing_test.go index 25fc688b09f..cdbdf0538df 100644 --- a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/fairqueuing_test.go +++ b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/fairqueuing_test.go @@ -24,7 +24,8 @@ import ( "testing" "time" - "k8s.io/apiserver/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/waitgroup" ) // adapted from https://github.com/tadglines/wfq/blob/master/wfq_test.go @@ -167,7 +168,7 @@ func flowStdDevTest(t *testing.T, flows []flowDesc, expectedStdDev float64) { // for i := range queues { // fqqueues[i] = queues[i] // } - fq := newQueueSetImpl(20000, len(flows), 20000, 5*time.Second, fc, NoWaitGroup()) + fq := newQueueSetImpl("", 20000, len(flows), 20000, 5*time.Second, fc, waitgroup.NoWaitGroup()) for n := 0; n < len(flows); n++ { genFlow(fq, &flows[n], n) } diff --git a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/reqmgmt.go b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/reqmgmt.go index 0d0b8678028..9a9c6b14e22 100644 --- a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/reqmgmt.go +++ b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/reqmgmt.go @@ -18,7 +18,6 @@ package flowcontrol import ( "hash/crc64" - "sync" "sync/atomic" "time" @@ -30,7 +29,9 @@ import ( // "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/waitgroup" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/endpoints/request" fq "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing" @@ -92,7 +93,7 @@ type priorityLevelState struct { // this filter type requestManagementSystem struct { // wg is kept informed of when goroutines start or stop or begin or end waiting - wg fq.OptionalWaitGroup + wg waitgroup.OptionalWaitGroup queueSetFactory fq.QueueSetFactory @@ -129,43 +130,37 @@ type requestManagementSystem struct { curState atomic.Value } -// NewRequestManagementSystem creates a new instance of request-management system -func NewRequestManagementSystem( +// NewRequestManager creates a new instance of request-management system +func NewRequestManager( informerFactory kubeinformers.SharedInformerFactory, flowcontrolClient rmclientv1alpha1.FlowcontrolV1alpha1Interface, - queueSetFactory fq.QueueSetFactory, serverConcurrencyLimit int, requestWaitLimit time.Duration, - waitGroup *sync.WaitGroup, ) Interface { - return NewRequestManagementSystemWithPreservation( + return NewRequestManagerWithPreservation( informerFactory, flowcontrolClient, - queueSetFactory, serverConcurrencyLimit, requestWaitLimit, - waitGroup, nil, nil) } -// NewRequestManagementSystemWithPreservation creates a new instance +// NewRequestManagerWithPreservation creates a new instance // of request-management system with preservation. The WaitGroup is // optional and, if supplied, is kept informed of whenever a goroutine // is started or stopped or begins or finishes waiting --- except that // the configuration controller is not fully plumbed yet. -func NewRequestManagementSystemWithPreservation( +func NewRequestManagerWithPreservation( informerFactory kubeinformers.SharedInformerFactory, flowcontrolClient rmclientv1alpha1.FlowcontrolV1alpha1Interface, - queueSetFactory fq.QueueSetFactory, serverConcurrencyLimit int, requestWaitLimit time.Duration, - waitGroup *sync.WaitGroup, preservingFlowSchemas []*rmtypesv1alpha1.FlowSchema, preservingPriorityLevels []*rmtypesv1alpha1.PriorityLevelConfiguration, ) Interface { reqMgmt := &requestManagementSystem{ - wg: fq.WrapWaitGroupPointer(waitGroup), - queueSetFactory: queueSetFactory, + wg: waitgroup.NoWaitGroup(), + queueSetFactory: fq.NewQueueSetFactory(&clock.RealClock{}, waitgroup.NoWaitGroup()), serverConcurrencyLimit: serverConcurrencyLimit, requestWaitLimit: requestWaitLimit, flowcontrolClient: flowcontrolClient, diff --git a/vendor/modules.txt b/vendor/modules.txt index 74da54da29f..6786b4cd99e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1367,7 +1367,6 @@ k8s.io/apiserver/pkg/storage/value/encrypt/envelope k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1 k8s.io/apiserver/pkg/storage/value/encrypt/identity k8s.io/apiserver/pkg/storage/value/encrypt/secretbox -k8s.io/apiserver/pkg/util/clock k8s.io/apiserver/pkg/util/dryrun k8s.io/apiserver/pkg/util/feature k8s.io/apiserver/pkg/util/flowcontrol