PriorityLevelConfiguration
apiVersion: flowcontrol.apiserver.k8s.io/v1
import "k8s.io/api/flowcontrol/v1"
PriorityLevelConfiguration
PriorityLevelConfiguration 代表一个优先级级别的配置。
apiVersion: flowcontrol.apiserver.k8s.io/v1
kind: PriorityLevelConfiguration
metadata (ObjectMeta)
metadata
是标准的 object 元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (PriorityLevelConfigurationSpec)
spec
是“请求优先级”的期望行为的规范。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusstatus (PriorityLevelConfigurationStatus)
status
是“请求优先级”的当前状态。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
PriorityLevelConfigurationSpec
PriorityLevelConfigurationSpec 指定优先级级别的配置。
exempt (ExemptPriorityLevelConfiguration)
exempt
指定如何处理豁免优先级级别的请求。如果type
为"Limited"
,则此字段必须为空。如果type
为"Exempt"
,则此字段可以非空。如果为空且type
为"Exempt"
,则应用ExemptPriorityLevelConfiguration
的默认值。ExemptPriorityLevelConfiguration 描述了豁免请求处理的可配置方面。在强制性的豁免配置对象中,该字段的值可以被授权用户修改,这一点与
spec
的其余部分不同。exempt.lendablePercent (int32)
lendablePercent
规定了该级别名义并发限制 (NominalCL) 中可供其他优先级级别借用的比例。此字段的值必须在 0 到 100 之间(包含),默认为 0。其他级别可以从该级别借用的座位数,称为该级别的可借用并发限制 (LendableCL),定义如下。LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
exempt.nominalConcurrencyShares (int32)
nominalConcurrencyShares
(NCS) 有助于计算该级别的名义并发限制 (NominalCL)。这是为该优先级级别名义上预留的执行座位数。这并不会限制从该优先级级别分派,但会通过借用机制影响其他优先级级别。服务器的并发限制 (ServerCL) 根据其 NCS 值与所有优先级级别进行分配。NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)
数字越大意味着名义并发限制越大,但会牺牲其他所有优先级级别的容量。此字段的默认值为零。
limited (LimitedPriorityLevelConfiguration)
limited
指定如何处理受限制的优先级级别的请求。如果且仅当type
为"Limited"
时,此字段必须非空。*LimitedPriorityLevelConfiguration 指定如何处理受限制的请求。它解决了两个问题:
如何限制此优先级级别的请求?
如何处理超出限制的请求?*
limited.borrowingLimitPercent (int32)
如果存在,
borrowingLimitPercent
配置了该优先级级别可以从其他优先级级别借用多少座位的限制。该限制称为该级别的借用并发限制 (BorrowingCL),并且是该级别在任何时候可能借用的总座位数的限制。此字段持有该限制与该级别名义并发限制的比率。当此字段为非 nil 时,它必须包含一个非负整数,并且限制按以下方式计算。BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )
此字段的值可以大于 100,这意味着该优先级级别可以借用的座位数可能大于其自身的名义并发限制 (NominalCL)。当此字段留空 (nil) 时,限制实际上是无限的。
limited.lendablePercent (int32)
lendablePercent
规定了该级别名义并发限制 (NominalCL) 中可供其他优先级级别借用的比例。此字段的值必须在 0 到 100 之间(包含),默认为 0。其他级别可以从该级别借用的座位数,称为该级别的可借用并发限制 (LendableCL),定义如下。LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
limited.limitResponse (LimitResponse)
limitResponse
指示当请求无法立即执行时该如何处理。LimitResponse 定义了当请求无法立即执行时该如何处理。
limited.limitResponse.type (string), required
type
为 "Queue" 或 "Reject"。 "Queue" 表示无法在到达时执行的请求将被放入队列中,直到可以执行或达到队列限制为止。"Reject" 表示无法在到达时执行的请求将被拒绝。必填。limited.limitResponse.queuing (QueuingConfiguration)
queuing
包含队列的配置参数。此字段仅在type
为"Queue"
时才可非空。QueuingConfiguration 包含队列的配置参数
limited.limitResponse.queuing.handSize (int32)
handSize
是一个小的正数,用于配置请求到队列的 shuffle sharding。当将请求加入此优先级级别的队列时,请求的流标识符(一对字符串)将被哈希,哈希值用于打乱队列列表并分发指定大小的一手牌。请求将被放入该手中最短的队列之一。handSize
必须不大于queues
,并且应该显著小于queues
(以避免少数重流饱和大多数队列)。请参阅面向用户的文档以获取更详尽的关于设置此字段的指导。此字段的默认值为 8。limited.limitResponse.queuing.queueLengthLimit (int32)
queueLengthLimit
是在此优先级级别的给定队列中允许等待的请求的最大数量;多余的请求将被拒绝。此值必须为正数。如果未指定,则默认为 50。limited.limitResponse.queuing.queues (int32)
queues
是此优先级级别的队列数。这些队列独立存在于每个 apiserver 中。该值必须为正数。将其设置为 1 实际上会排除 shuffle sharding,从而使相关流模式的 distinguisher 方法无关紧要。此字段的默认值为 64。
limited.nominalConcurrencyShares (int32)
nominalConcurrencyShares
(NCS) 有助于计算该级别的名义并发限制 (NominalCL)。这是此优先级级别可用的执行座位数。它既用于从该优先级级别分派的请求,也用于从其他优先级级别借用该级别座位的请求。服务器的并发限制 (ServerCL) 根据其 NCS 值在所有 Limited 优先级级别之间进行分配。NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)
数字越大意味着名义并发限制越大,但会牺牲其他所有优先级级别的容量。
如果未指定,此字段默认为 30。
将此字段设置为零支持为该优先级级别构建一个“监狱”,用于容纳某些请求。
type (string), required
type
指示此优先级级别是否受请求执行限制。值为"Exempt"
表示此优先级级别的请求不受限制(因此永远不会排队),也不会消耗为其他优先级级别提供的容量。值为"Limited"
表示 (a) 此优先级级别的请求受限制,并且 (b) 服务器的有限容量的一部分专供此优先级级别使用。必填。
PriorityLevelConfigurationStatus
PriorityLevelConfigurationStatus 代表“请求优先级”的当前状态。
conditions ([]PriorityLevelConfigurationCondition)
补丁策略:按键
type
合并映射:合并时将保留键类型上的唯一值
conditions
是“请求优先级”的当前状态。PriorityLevelConfigurationCondition 定义了优先级级别的状态。
conditions.lastTransitionTime (Time)
lastTransitionTime
是条件从一个状态转换到另一个状态的最后时间。Time 是 time.Time 的一个包装器,支持正确地编组到 YAML 和 JSON。提供了 time 包提供的许多工厂方法的包装器。
conditions.message (string)
message
是一个人类可读的消息,指示最后一次转换的详细信息。conditions.reason (string)
reason
是条件最后一次转换的唯一、单词、CamelCase 原因。conditions.status (string)
status
是条件的状体。可以是 True、False、Unknown。必填。conditions.type (string)
type
是条件的类型。必填。
PriorityLevelConfigurationList
PriorityLevelConfigurationList 是 PriorityLevelConfiguration 对象的列表。
apiVersion: flowcontrol.apiserver.k8s.io/v1
kind: PriorityLevelConfigurationList
metadata (ListMeta)
metadata
是标准的 object 元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataitems ([]PriorityLevelConfiguration), required
items
是请求优先级列表。
操作
get
读取指定的 PriorityLevelConfiguration
HTTP 请求
GET /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}
参数
name (在路径中): string,必填
PriorityLevelConfiguration 的名称
pretty (在查询中): string
响应
200 (PriorityLevelConfiguration): OK
401: 未授权
get
读取指定的 PriorityLevelConfiguration 的状态
HTTP 请求
GET /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status
参数
name (在路径中): string,必填
PriorityLevelConfiguration 的名称
pretty (在查询中): string
响应
200 (PriorityLevelConfiguration): OK
401: 未授权
list
列出或监视 PriorityLevelConfiguration 类型的对象
HTTP 请求
GET /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (PriorityLevelConfigurationList): OK
401: 未授权
create
创建一个 PriorityLevelConfiguration
HTTP 请求
POST /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations
参数
body: PriorityLevelConfiguration, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (PriorityLevelConfiguration): OK
201 (PriorityLevelConfiguration): Created
202 (PriorityLevelConfiguration): Accepted
401: 未授权
update
替换指定的 PriorityLevelConfiguration
HTTP 请求
PUT /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}
参数
name (在路径中): string,必填
PriorityLevelConfiguration 的名称
body: PriorityLevelConfiguration, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (PriorityLevelConfiguration): OK
201 (PriorityLevelConfiguration): Created
401: 未授权
update
替换指定的 PriorityLevelConfiguration 的状态
HTTP 请求
PUT /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status
参数
name (在路径中): string,必填
PriorityLevelConfiguration 的名称
body: PriorityLevelConfiguration, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (PriorityLevelConfiguration): OK
201 (PriorityLevelConfiguration): Created
401: 未授权
patch
部分更新指定的 PriorityLevelConfiguration
HTTP 请求
PATCH /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}
参数
name (在路径中): string,必填
PriorityLevelConfiguration 的名称
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (PriorityLevelConfiguration): OK
201 (PriorityLevelConfiguration): Created
401: 未授权
patch
部分更新指定的 PriorityLevelConfiguration 的状态
HTTP 请求
PATCH /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status
参数
name (在路径中): string,必填
PriorityLevelConfiguration 的名称
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (PriorityLevelConfiguration): OK
201 (PriorityLevelConfiguration): Created
401: 未授权
delete
删除一个 PriorityLevelConfiguration
HTTP 请求
DELETE /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}
参数
name (在路径中): string,必填
PriorityLevelConfiguration 的名称
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): 已接受
401: 未授权
deletecollection
删除 PriorityLevelConfiguration 集合
HTTP 请求
DELETE /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations
参数
body: DeleteOptions
continue (在查询中): string
dryRun (在查询中): string
fieldSelector (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): OK
401: 未授权
本页面是自动生成的。
如果你打算报告此页面存在的问题,请在问题描述中提及此页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。