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
是标准对象的元数据。更多信息: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 和 100),默认为 0。其他级别可以从该级别借用的席位数(称为该级别的 LendableConcurrencyLimit (LendableCL))定义如下。LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
exempt.nominalConcurrencyShares (int32)
nominalConcurrencyShares
(NCS) 有助于计算该级别的 NominalConcurrencyLimit (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
(如果存在)配置了该优先级级别可以从其他优先级级别借用的席位数上限。该上限称为该级别的 BorrowingConcurrencyLimit (BorrowingCL),是该级别在任何给定时间可以借用的总席位数上限。此字段存储该上限与该级别名义并发限制之比。当此字段非 nil 时,它必须持有一个非负整数,并且该上限计算如下。BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )
此字段的值可以大于 100,这意味着该优先级级别可以借用的席位数多于其自身的名义并发限制 (NominalCL)。当此字段为
nil
时,该上限实际上是无限的。limited.lendablePercent (int32)
lendablePercent
规定了该级别 NominalCL 中可被其他优先级级别借用的比例。此字段的值必须在 0 到 100 之间(包含 0 和 100),默认为 0。其他级别可以从该级别借用的席位数(称为该级别的 LendableConcurrencyLimit (LendableCL))定义如下。LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
limited.limitResponse (LimitResponse)
limitResponse
指示如何处理当前无法执行的请求*LimitResponse 定义了如何处理当前无法执行的请求。
limited.limitResponse.type (string),必需
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 会有效阻止混洗分片,从而使得关联的流模式 (flow schemas) 的区分器方法无效。此字段的默认值为 64。
limited.nominalConcurrencyShares (int32)
nominalConcurrencyShares
(NCS) 有助于计算该级别的 NominalConcurrencyLimit (NominalCL)。这是该优先级级别可用的执行席位数。这既用于从此优先级级别分派的请求,也用于从其他级别借用席位而从此级别分派的请求。服务器的并发限制 (ServerCL) 按受限优先级级别的 NCS 值比例分配。NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)
数值越大意味着名义并发限制越大,但会牺牲其他优先级级别的容量。
如果未指定,此字段默认为 30。
将此字段设置为零支持构建该优先级级别的“监狱”,用于容纳某些请求。
type (string),必需
type
指示此优先级级别是否受请求执行限制。值为"Exempt"
表示此优先级级别的请求不受限制(因此永不排队),并且不影响提供给其他优先级级别的容量。值为"Limited"
表示 (a) 此优先级级别的请求 受 限制,并且 (b) 服务器的有限容量一部分专门提供给此优先级级别。必需。
PriorityLevelConfigurationStatus
PriorityLevelConfigurationStatus 表示“请求优先级”的当前状态。
conditions ([]PriorityLevelConfigurationCondition)
Patch 策略:在键
type
上合并Map:在合并期间将保留键 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
是标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataitems ([]PriorityLevelConfiguration),必需
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,必需
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,必需
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,必需
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): Accepted
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 项目的其他地方进行。