DeviceTaintRule v1alpha3
apiVersion: resource.k8s.io/v1alpha3
import "k8s.io/api/resource/v1alpha3"
DeviceTaintRule
DeviceTaintRule 为匹配选择器的所有设备添加一个污点。这与污点直接在 ResourceSlice 中由 DRA 驱动程序指定的效果相同。
apiVersion: resource.k8s.io/v1alpha3
kind: DeviceTaintRule
metadata (ObjectMeta)
标准对象元数据
spec (DeviceTaintRuleSpec), required
Spec 指定选择器和一个污点。
更改 spec 会自动递增 metadata.generation 数字。
status (DeviceTaintRuleStatus)
Status 提供有关 spec 中请求的内容的信息。
DeviceTaintRuleSpec
DeviceTaintRuleSpec 指定选择器和一个污点。
taint (DeviceTaint), required
应用于匹配设备的污点。
附加到此设备的污点对不容忍该污点的任何声明以及通过声明使用该声明的 Pod 具有“效果”。
taint.effect (string), required
不容忍污点的声明以及使用这些声明的 Pod 上的污点效果。
有效效果为 None、NoSchedule 和 NoExecute。此处不接受与节点一起使用的 PreferNoSchedule。将来可能会添加更多效果。消费者必须将未知的效果视为 None。
可能的枚举值
"NoExecute"驱逐任何未容忍设备污点的正在运行的 Pod。"NoSchedule"不允许调度使用被污染的设备的新的 Pod,除非它们容忍该污点,但允许所有提交到 Kubelet 而不经过调度器的 Pod 启动,并允许所有已经运行的 Pod 继续运行。"None"无效果,污点纯粹是信息性的。
taint.key (string), required
应用于设备的污点键。必须是标签名称。
taint.timeAdded (Time)
TimeAdded 表示添加污点的时间。如果在创建或更新时未设置,则自动添加。
Time 是 time.Time 的包装器,支持正确地编组到 YAML 和 JSON。为时间包提供的许多工厂方法提供包装器。
taint.value (string)
与污点键对应的污点值。必须是标签值。
deviceSelector (DeviceTaintSelector)
DeviceSelector 定义将污点应用于哪个设备。所有选择器条件都必须满足才能匹配设备。空选择器匹配所有设备。如果没有选择器,则不匹配任何设备。
DeviceTaintSelector 定义 DeviceTaintRule 适用于哪个设备。空选择器匹配所有设备。如果没有选择器,则不匹配任何设备。
deviceSelector.device (string)
如果设置了 device,则仅选择具有该名称的设备。此字段对应于 slice.spec.devices[].name。
设置驱动程序和池可能需要避免歧义,但不是必需的。
deviceSelector.driver (string)
如果设置了驱动程序,则仅选择来自该驱动程序的设备。此字段对应于 slice.spec.driver。
deviceSelector.pool (string)
如果设置了池,则仅选择该池中的设备。
设置驱动程序名称也可能有助于避免歧义,但这不是必需的,因为从不同的驱动程序中选择池也可能很有用,例如,使用节点本地设备的驱动程序将其节点名称用作其池名称。
DeviceTaintRuleStatus
DeviceTaintRuleStatus 提供有关正在进行中的 Pod 驱逐的信息。
conditions ([]Condition)
Patch 策略:在键
type上合并映射:在合并期间将保留键类型上的唯一值
Conditions 以机器可读和人类可读的格式提供有关 DeviceTaintRule 和集群在某个时间点的状态的信息。
当前,此 API 中定义了以下条件,可能会添加更多:- 类型:EvictionInProgress - 状态:如果当前有需要驱逐的 Pod,则为 True,否则为 False(包括不导致驱逐的效果)。
- 原因:未指定,可能会更改 - 消息:包括有关待处理 Pod 数量和已驱逐 Pod 数量的人类可读信息,定期更新,可能会更改
对于
effect: None,上述条件为 spec 的每次更改设置一次,消息包含有关如果效果为NoExecute会发生什么的信息。可以使用此反馈来确定将效果更改为NoExecute是否会按预期工作。它仅设置一次以避免必须不断更新状态。最多可以有 8 个条目。
Condition 包含此 API 资源当前状态的一个方面的详细信息。
conditions.lastTransitionTime (Time), required
lastTransitionTime 是条件从一个状态过渡到另一个状态的最后时间。这应该是在底层条件发生变化时的时间。如果不知道,则使用 API 字段发生变化的时间是可以接受的。
Time 是 time.Time 的包装器,支持正确地编组到 YAML 和 JSON。为时间包提供的许多工厂方法提供包装器。
conditions.message (string), required
message 是一个人类可读的消息,指示过渡的详细信息。这可能是一个空字符串。
conditions.reason (string), required
reason 包含一个编程标识符,指示条件上次转换的原因。特定条件类型的生产者可以定义此字段的预期值和含义,以及这些值是否被视为受保证的 API。该值应为 CamelCase 字符串。此字段不能为空。
conditions.status (string), required
条件的 status,可以是 True、False 或 Unknown。
conditions.type (string), required
条件的类型,采用 CamelCase 格式或 foo.example.com/CamelCase 格式。
conditions.observedGeneration (int64)
observedGeneration 表示条件基于的 .metadata.generation。例如,如果 .metadata.generation 当前为 12,但 .status.conditions[x].observedGeneration 为 9,则条件相对于实例的当前状态已过时。
DeviceTaintRuleList
DeviceTaintRuleList 是 DeviceTaintRules 的集合。
apiVersion: resource.k8s.io/v1alpha3
kind: DeviceTaintRuleList
metadata (ListMeta)
标准列表元数据
items ([]DeviceTaintRule), required
Items 是 DeviceTaintRules 的列表。
操作
get 读取指定的 DeviceTaintRule
HTTP 请求
GET /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}
Parameters
name (在路径中): string, 必需
DeviceTaintRule 的名称
pretty (在查询中): string
响应
200 (DeviceTaintRule): 确定
401: 未授权
get 读取指定 DeviceTaintRule 的状态
HTTP 请求
GET /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status
Parameters
name (在路径中): string, 必需
DeviceTaintRule 的名称
pretty (在查询中): string
响应
200 (DeviceTaintRule): 确定
401: 未授权
list 列出或监视 DeviceTaintRule 类型的对象
HTTP 请求
GET /apis/resource.k8s.io/v1alpha3/devicetaintrules
Parameters
allowWatchBookmarks (in query): boolean
continue (in query): string
fieldSelector (in query): string
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
响应
200 (DeviceTaintRuleList): 确定
401: 未授权
create 创建 DeviceTaintRule
HTTP 请求
POST /apis/resource.k8s.io/v1alpha3/devicetaintrules
Parameters
body: DeviceTaintRule, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (DeviceTaintRule): 确定
201 (DeviceTaintRule): 已创建
202 (DeviceTaintRule): 已接受
401: 未授权
update 替换指定的 DeviceTaintRule
HTTP 请求
PUT /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}
Parameters
name (在路径中): string, 必需
DeviceTaintRule 的名称
body: DeviceTaintRule, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (DeviceTaintRule): 确定
201 (DeviceTaintRule): 已创建
401: 未授权
update 替换指定 DeviceTaintRule 的状态
HTTP 请求
PUT /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status
Parameters
name (在路径中): string, 必需
DeviceTaintRule 的名称
body: DeviceTaintRule, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (DeviceTaintRule): 确定
201 (DeviceTaintRule): 已创建
401: 未授权
patch 部分更新指定的 DeviceTaintRule
HTTP 请求
PATCH /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}
Parameters
name (在路径中): string, 必需
DeviceTaintRule 的名称
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
响应
200 (DeviceTaintRule): 确定
201 (DeviceTaintRule): 已创建
401: 未授权
patch 部分更新指定 DeviceTaintRule 的状态
HTTP 请求
PATCH /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status
Parameters
name (在路径中): string, 必需
DeviceTaintRule 的名称
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
响应
200 (DeviceTaintRule): 确定
201 (DeviceTaintRule): 已创建
401: 未授权
delete 删除 DeviceTaintRule
HTTP 请求
DELETE /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}
Parameters
name (在路径中): string, 必需
DeviceTaintRule 的名称
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (in query): integer
ignoreStoreReadErrorWithClusterBreakingPotential (in query): boolean
pretty (在查询中): string
propagationPolicy (in query): string
响应
200 (DeviceTaintRule): 确定
202 (DeviceTaintRule): 已接受
401: 未授权
deletecollection 删除 DeviceTaintRule 集合
HTTP 请求
DELETE /apis/resource.k8s.io/v1alpha3/devicetaintrules
Parameters
body: DeleteOptions
continue (in query): string
dryRun (在查询中): string
fieldSelector (in query): string
gracePeriodSeconds (in query): integer
ignoreStoreReadErrorWithClusterBreakingPotential (in query): boolean
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
propagationPolicy (in query): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
响应
200 (Status): 确定
401: 未授权
本页面是自动生成的。
如果您打算报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。