Files
Qiming Teng c52818c03d Switch language name 'zh' to 'zh-cn'
This is the first step to rename 'zh' to 'zh-cn'. There are several reasons why we rename the language name.

- The upstream docsy theme changed the language name, leading to many warnings during site build;
  The side-effect is that the i18n strings are no longer working.
- We believe renaming the language is the right thing to do, because this move can make room for other variants of Chinese language, such as 'zh-tw', 'zh-sg' etc.

There would be several follow-ups to this PR, such as fixing the intra-site links, adding redirects etc.

We will lock up changes to zh/zh-cn pages for the moment, until this one gets in.

This PR is based on commit cdad0a7342.
2022-06-10 22:33:41 +08:00

22 KiB
Raw Permalink Blame History

api_metadata, content_type, description, title, weight, auto_generated
api_metadata content_type description title weight auto_generated
apiVersion import kind
scheduling.k8s.io/v1 k8s.io/api/scheduling/v1 PriorityClass
api_reference PriorityClass 定义了从优先级类名到优先级数值的映射。 PriorityClass 14 false

apiVersion: scheduling.k8s.io/v1

import "k8s.io/api/scheduling/v1"

PriorityClass

PriorityClass 定义了从优先级类名到优先级数值的映射。 该值可以是任何有效的整数。


  • apiVersion: scheduling.k8s.io/v1
  • kind: PriorityClass
  • value int32),必需

    此优先级的值。这是 Pod 在其 Pod 规约中有此类名称时收到的实际优先级。

  • description (string)

    description 是一个任意字符串,通常提供有关何时应使用此优先级的指南。

  • globalDefault (boolean)

    globalDefault 指定是否应将此 PriorityClass 视为没有任何优先级类的 pod 的默认优先级。 只有一个 PriorityClass 可以标记为 globalDefault。 但是,如果存在多个 PriorityClasses 且其 globalDefault 字段设置为 true, 则将使用此类全局默认 PriorityClasses 的最小值作为默认优先级。

  • preemptionPolicy (string)

    PreemptionPolicy 是抢占优先级较低的 Pod 的策略。 可选值:Never、PreemptLowerPriority。 如果未设置,则默认为 PreemptLowerPriority。

PriorityClassList

PriorityClassList 是优先级类的集合。


  • apiVersion: scheduling.k8s.io/v1
  • kind: PriorityClassList
  • items ([]<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass),必需

    items 是 PriorityClasses 的列表

操作


get 读取特定的 PriorityClass

HTTP 请求

GET /apis/scheduling.k8s.io/v1/priorityclasses/{name}

参数

  • name 路径参数: string,必需

    PriorityClass 名称

  • pretty 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

响应

200 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): OK

401: Unauthorized

list 列出或观察 PriorityClass类的对象

HTTP 请求

GET /apis/scheduling.k8s.io/v1/priorityclasses

参数

  • allowWatchBookmarks 查询参数):boolean

    <a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks

  • continue 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue

  • fieldSelector 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector

  • labelSelector 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector

  • limit 查询参数):integer

    <a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit

  • pretty 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

  • resourceVersion 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion

  • resourceVersionMatch 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch

  • timeoutSeconds 查询参数):integer

    <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds

  • watch 查询参数):boolean

    <a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch

响应

200 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClassList" >}}">PriorityClassList): OK

401: Unauthorized

create 创建一个 PriorityClass

HTTP 请求

POST /apis/scheduling.k8s.io/v1/priorityclasses

参数

  • body: <a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass,必需
  • dryRun 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun

  • fieldManager 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager

  • fieldValidation 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation

  • pretty 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

响应

200 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): OK

201 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): Created

202 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): Accepted

401: Unauthorized

update 替换指定的 PriorityClass

HTTP 请求

PUT /apis/scheduling.k8s.io/v1/priorityclasses/{name}

参数

  • name 路径参数: string,必需

    PriorityClass 名称

  • body: <a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass,必需
  • dryRun 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun

  • fieldManager 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager

  • fieldValidation 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation

  • pretty 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

响应

200 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): OK

201 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): Created

401: Unauthorized

patch 部分更新特定的 PriorityClass

HTTP 请求

PATCH /apis/scheduling.k8s.io/v1/priorityclasses/{name}

参数

  • name 路径参数: string,必须

    PriorityClass 名称

  • body: <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch,必需
  • dryRun 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun

  • fieldManager 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager

  • fieldValidation 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation

  • force 查询参数):boolean

    <a href="{{< ref "../common-parameters/common-parameters#force" >}}">force

  • pretty 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

响应

200 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): OK

201 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): Created

401: Unauthorized

delete 删除一个 PriorityClass

HTTP 请求

DELETE /apis/scheduling.k8s.io/v1/priorityclasses/{name}

参数

  • name 路径参数: string,必需

    PriorityClass 名称。

  • body: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions
  • dryRun 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun

  • gracePeriodSeconds 查询参数):integer

    <a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds

  • pretty 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

  • propagationPolicy 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy

响应

200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): OK

202 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): Accepted

401: Unauthorized

deletecollection 删除 PriorityClass 集合

HTTP 请求

DELETE /apis/scheduling.k8s.io/v1/priorityclasses

参数

  • body: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions
  • continue 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue

  • dryRun 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun

  • fieldSelector 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector

  • gracePeriodSeconds 查询参数):integer

    <a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds

  • labelSelector 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector

  • limit 查询参数):integer

    <a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit

  • pretty 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

  • propagationPolicy 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy

  • resourceVersion 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion

  • resourceVersionMatch 查询参数):string

    <a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch

  • timeoutSeconds 查询参数):integer

    <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds

响应

200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): OK

401: Unauthorized