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 專案的其他地方進行。