LeaseCandidate v1alpha1
apiVersion: coordination.k8s.io/v1alpha1
import "k8s.io/api/coordination/v1alpha1"
LeaseCandidate
LeaseCandidate 定义 Lease 对象的候选者。创建候选者是为了让协调的领导者选举从候选者列表中选择最佳领导者。
apiVersion: coordination.k8s.io/v1alpha1
kind: LeaseCandidate
metadata (ObjectMeta)
更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (LeaseCandidateSpec)
spec 包含 Lease 的规范。 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
LeaseCandidateSpec
LeaseCandidateSpec 是 Lease 的规范。
leaseName (string), 必需
LeaseName 是此候选者争夺的 Lease 的名称。此字段是不可变的。
preferredStrategies ([]string), 必需
原子性:将在合并期间被替换
PreferredStrategies 指示用于选择协调领导者选举的领导者的策略列表。列表是有序的,第一个策略取代所有其他策略。协调领导者选举使用此列表来决定最终的选举策略。遵循以下原则 - 如果所有客户端都将策略 X 作为此列表中的第一个元素,则将使用策略 X。- 如果一个候选者具有策略 [X],而另一个候选者具有策略 [Y, X],则 Y 将取代 X,并且将使用策略 Y。
- 如果一个候选者具有策略 [X, Y],而另一个候选者具有策略 [Y, X],则这是用户错误,并且在解决之前,领导者选举将不会操作 Lease。(Alpha) 使用此字段需要启用 CoordinatedLeaderElection 功能门控。
binaryVersion (string)
BinaryVersion 是二进制版本。它必须是无前导
v的 semver 格式。当策略为 "OldestEmulationVersion" 时,此字段是必需的emulationVersion (string)
EmulationVersion 是模拟版本。它必须是无前导
v的 semver 格式。EmulationVersion 必须小于或等于 BinaryVersion。当策略为 "OldestEmulationVersion" 时,此字段是必需的pingTime (MicroTime)
PingTime 是服务器上次请求 LeaseCandidate 更新的时间。仅在领导者选举期间执行此操作,以检查是否有任何 LeaseCandidate 不符合资格。当 PingTime 更新时,LeaseCandidate 将通过更新 RenewTime 来响应。
renewTime (MicroTime)
RenewTime 是 LeaseCandidate 上次更新的时间。任何需要进行领导者选举的 Lease,都会更新 PingTime 字段,以向 LeaseCandidate 发出他们应该更新 RenewTime 的信号。如果自上次更新以来已经过了数小时,则旧的 LeaseCandidate 对象也会被垃圾回收。PingTime 字段会定期更新,以防止仍然处于活动状态的 LeaseCandidate 进行垃圾回收。
LeaseCandidateList
LeaseCandidateList 是 Lease 对象的列表。
apiVersion: coordination.k8s.io/v1alpha1
kind: LeaseCandidateList
metadata (ListMeta)
标准列表元数据。 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]LeaseCandidate), 必需
items 是模式对象的列表。
操作
get 读取指定的 LeaseCandidate
HTTP 请求
GET /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}
参数
响应
200 (LeaseCandidate): 确定
401: 未授权
list 列出或监视 LeaseCandidate 类型的对象
HTTP 请求
GET /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates
参数
namespace (在路径中): string, 必需
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (LeaseCandidateList): 确定
401: 未授权
list 列出或监视 LeaseCandidate 类型的对象
HTTP 请求
GET /apis/coordination.k8s.io/v1alpha1/leasecandidates
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (LeaseCandidateList): 确定
401: 未授权
create 创建 LeaseCandidate
HTTP 请求
POST /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates
参数
namespace (在路径中): string, 必需
body: LeaseCandidate, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (LeaseCandidate): 确定
201 (LeaseCandidate): 已创建
202 (LeaseCandidate): 已接受
401: 未授权
update 替换指定的 LeaseCandidate
HTTP 请求
PUT /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}
参数
name (在路径中): string, 必需
LeaseCandidate 的名称
namespace (在路径中): string, 必需
body: LeaseCandidate, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (LeaseCandidate): 确定
201 (LeaseCandidate): 已创建
401: 未授权
patch 部分更新指定的 LeaseCandidate
HTTP 请求
PATCH /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}
参数
name (在路径中): string, 必需
LeaseCandidate 的名称
namespace (在路径中): string, 必需
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (LeaseCandidate): 确定
201 (LeaseCandidate): 已创建
401: 未授权
delete 删除 LeaseCandidate
HTTP 请求
DELETE /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}
参数
name (在路径中): string, 必需
LeaseCandidate 的名称
namespace (在路径中): string, 必需
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): 确定
202 (Status): 已接受
401: 未授权
deletecollection 删除 LeaseCandidate 的集合
HTTP 请求
DELETE /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates
参数
namespace (在路径中): string, 必需
body: DeleteOptions
continue (在查询中): string
dryRun (在查询中): string
fieldSelector (在查询中): string
gracePeriodSeconds (在查询中): integer
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): 确定
401: 未授权
此页面是自动生成的。
如果您计划报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目中的其他位置进行。