From c1055ca471048735d980c88041932515a766cbc7 Mon Sep 17 00:00:00 2001 From: liuzhilin Date: Tue, 21 Jun 2022 20:36:31 +0800 Subject: [PATCH] Translate docs/reference/kubernetes-api/cluster-resources/lease-v1 --- .../cluster-resources/lease-v1.md | 1074 +++++++++++++++++ 1 file changed, 1074 insertions(+) create mode 100644 content/zh-cn/docs/reference/kubernetes-api/cluster-resources/lease-v1.md diff --git a/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/lease-v1.md b/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/lease-v1.md new file mode 100644 index 0000000000..8aa5453f44 --- /dev/null +++ b/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/lease-v1.md @@ -0,0 +1,1074 @@ +--- +api_metadata: + apiVersion: "coordination.k8s.io/v1" + import: "k8s.io/api/coordination/v1" + kind: "Lease" +content_type: "api_reference" +description: "Lease defines a lease concept." +title: "Lease" +weight: 5 +auto_generated: true +--- + + + +`apiVersion: coordination.k8s.io/v1` + +`import "k8s.io/api/coordination/v1"` + + +## Lease {#Lease} + +Lease 定义了lease 的概念。 +
+ +- **apiVersion**: coordination.k8s.io/v1 + + +- **kind**: Lease + + +- **metadata** (}}">ObjectMeta) + + + 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +- **spec** (}}">LeaseSpec) + + + 租赁规范。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + + + + +## LeaseSpec {#LeaseSpec} + + +LeaseSpec 是一个 Lease 的规范。 + +
+ + +- **acquireTime** (MicroTime) + + acquireTime 是当前租赁被获取的时间。 + + + *MicroTime 是微妙级精确时间的版本。* + +- **holderIdentity** (string) + + holderIdentity 包含当前租约持有人的身份。 + +- **leaseDurationSeconds** (int32) + + leaseDurationSeconds 是租约候选人需要等待强制获取租约的持续时间。这是相对于上次观察到的更新时间的度量。 + +- **leaseTransitions** (int32) + + LeasetTransitions 是租约持有人之间的转换次数。 + +- **renewTime** (MicroTime) + + renewTime是当前租约持有人上次更新租约的时间。 + + + *MicroTime是具有微秒级精度的时间版本。* + + + + +## LeaseList {#LeaseList} + + +LeaseList是租赁对象的列表。 + +
+ +- **apiVersion**: coordination.k8s.io/v1 + + +- **kind**: LeaseList + + +- **metadata** (}}">ListMeta) + + + 标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +- **items** ([]}}">Lease), required + + + Items 是架构对象的列表。 + + + + +## 操作 {#operations} + + +
+ + + + + + +### `get` 读取指定的租约 + +#### HTTP 请求 + +GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} + +#### 参数 + + +- **name** (*路径参数*): string, 必需 + + 租约名称 + +- **namespace** (*路径参数*): string, 必需 + + }}">namespace + +- **pretty** (*查询参数*): string + + }}">pretty + + +#### 响应 + +200 (}}">Lease): OK + +401: Unauthorized + + +### `list` 列出或监视租赁类对象 + +#### HTTP 请求 + +GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases + + +#### 参数 + + +- **namespace** (*路径参数*): string, 必需 + + }}">namespace + + +- **allowWatchBookmarks** (*查询参数*): boolean + + }}">allowWatchBookmarks + + +- **continue** (*查询参数*): string + + }}">continue + + +- **fieldSelector** (*查询参数*): string + + }}">fieldSelector + + +- **labelSelector** (*查询参数*): string + + }}">labelSelector + + +- **limit** (*查询参数*): integer + + }}">limit + + +- **pretty** (*查询参数*): string + + }}">pretty + + +- **resourceVersion** (*查询参数*): string + + }}">resourceVersion + +- **resourceVersionMatch** (*查询参数*): string + + }}">resourceVersionMatch + + +- **timeoutSeconds** (*查询参数*): integer + + }}">timeoutSeconds + + +- **watch** (*查询参数*): boolean + + }}">watch + + +#### 响应 + +200 (}}">LeaseList): OK + +401: Unauthorized + + +### `list` 列出或监视租赁类对象 + +#### HTTP 请求 + +GET /apis/coordination.k8s.io/v1/leases + + +#### 参数 + + +- **allowWatchBookmarks** (*查询参数*): boolean + + }}">allowWatchBookmarks + + +- **continue** (*查询参数*): string + + }}">continue + + +- **fieldSelector** (*查询参数*): string + + }}">fieldSelector + + +- **labelSelector** (*查询参数*): string + + }}">labelSelector + + +- **limit** (*查询参数*): integer + + }}">limit + + +- **pretty** (*查询参数*): string + + }}">pretty + +- **resourceVersion** (*查询参数*): string + + }}">resourceVersion + +- **resourceVersionMatch** (*查询参数*): string + + }}">resourceVersionMatch + + +- **timeoutSeconds** (*查询参数*): integer + + }}">timeoutSeconds + + +- **watch** (*查询参数*): boolean + + }}">watch + + +#### 响应 + + +200 (}}">LeaseList): OK + +401: Unauthorized + + +### `create` 创建租约 + +#### HTTP 请求 + +POST /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases + + +#### 参数 + + +- **namespace** (*路径参数*): string, 必需 + + }}">namespace + + +- **body**: }}">Lease, 必需 + + + + +- **dryRun** (*查询参数*): string + + }}">dryRun + + +- **fieldManager** (*查询参数*): string + + }}">fieldManager + + +- **fieldValidation** (*查询参数*): string + + }}">fieldValidation + + +- **pretty** (*查询参数*): string + + }}">pretty + + +#### 响应 + + +200 (}}">Lease): OK + +201 (}}">Lease): Created + +202 (}}">Lease): Accepted + +401: Unauthorized + + +### `update` 替换指定的租约 + +#### HTTP 请求 + +PUT /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} + +#### 参数 + + +- **name** (*路径参数*): string, 必需 + + 租约名称 + + +- **namespace** (*路径参数*): string, 必需 + + }}">namespace + + +- **body**: }}">Lease, 必需 + + + + +- **dryRun** (*查询参数*): string + + }}">dryRun + + +- **fieldManager** (*查询参数*): string + + }}">fieldManager + + +- **fieldValidation** (*查询参数*): string + + }}">fieldValidation + +- **pretty** (*查询参数*): string + + }}">pretty + + +#### 响应 + + +200 (}}">Lease): OK + +201 (}}">Lease): Created + +401: Unauthorized + + +### `patch` 部分更新指定的租约 + +#### HTTP 请求 + +PATCH /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} + +#### 参数 + + +- **name** (*路径参数*): string, 必需 + + 租约名称 + + +- **namespace** (*路径参数*): string, 必需 + + }}">namespace + + +- **body**: }}">Patch, 必需 + + + + +- **dryRun** (*查询参数*): string + + }}">dryRun + + +- **fieldManager** (*查询参数*): string + + }}">fieldManager + + +- **fieldValidation** (*查询参数*): string + + }}">fieldValidation + + +- **force** (*查询参数*): boolean + + }}">force + + +- **pretty** (*查询参数*): string + + }}">pretty + + +#### 响应 + + +200 (}}">Lease): OK + +201 (}}">Lease): Created + +401: Unauthorized + + +### `delete` 删除一个租约 + +#### HTTP 请求 + +DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} + +#### 参数 + + +- **name** (*路径参数*): string, 必需 + + 租约的名称 + + +- **namespace** (*路径参数*): string, 必需 + + }}">namespace + + +- **body**: }}">DeleteOptions + + + + +- **dryRun** (*查询参数*): string + + }}">dryRun + + +- **gracePeriodSeconds** (*查询参数*): integer + + }}">gracePeriodSeconds + + +- **pretty** (*查询参数*): string + + }}">pretty + + +- **propagationPolicy** (*查询参数*): string + + }}">propagationPolicy + + +#### 响应 + + +200 (}}">Status): OK + +202 (}}">Status): Accepted + +401: Unauthorized + + +### `deletecollection` 删除租赁收款 + +#### HTTP 请求 + +DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases + +#### 参数 + + +- **namespace** (*路径参数*): string, 必需 + + }}">namespace + + +- **body**: }}">DeleteOptions + + + + +- **continue** (*查询参数*): string + + }}">continue + + +- **dryRun** (*查询参数*): string + + }}">dryRun + + +- **fieldSelector** (*查询参数*): string + + }}">fieldSelector + + +- **gracePeriodSeconds** (*查询参数*): integer + + }}">gracePeriodSeconds + + +- **labelSelector** (*查询参数*): string + + }}">labelSelector + + +- **limit** (*查询参数*): integer + + }}">limit + + +- **pretty** (*查询参数*): string + + }}">pretty + + +- **propagationPolicy** (*查询参数*): string + + }}">propagationPolicy + + +- **resourceVersion** (*查询参数*): string + + }}">resourceVersion + + +- **resourceVersionMatch** (*查询参数*): string + + }}">resourceVersionMatch + + +- **timeoutSeconds** (*查询参数*): integer + + }}">timeoutSeconds + + +#### 响应 + + +200 (}}">Status): OK + +401: Unauthorized +