ResourceQuota

ResourceQuota 设置每个命名空间强制执行的聚合配额限制。

apiVersion: v1

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

ResourceQuota

ResourceQuota 设置每个命名空间强制执行的聚合配额限制


ResourceQuotaSpec

ResourceQuotaSpec 定义了为配额强制执行的所需硬性限制。


  • **hard** (map[string]Quantity)

    hard 是每个命名资源的所需硬性限制集。更多信息:https://kubernetes.ac.cn/docs/concepts/policy/resource-quotas/

  • **scopeSelector** (ScopeSelector)

    scopeSelector 也是一系列过滤器(例如范围),这些过滤器必须与配额跟踪的每个对象匹配,但使用 ScopeSelectorOperator 与可能的值结合使用。要使资源匹配,必须同时匹配范围和 scopeSelector(如果在 spec 中指定)。

    范围选择器表示由范围资源选择器要求表示的选择器的 AND。

    • **scopeSelector.matchExpressions** ([]ScopedResourceSelectorRequirement)

      根据资源的范围,范围选择器要求的列表。

      范围资源选择器要求是包含值、范围名称和将范围名称和值相关联的操作符的选择器。

      • **scopeSelector.matchExpressions.operator** (string), required

        表示范围与一组值的关系。有效操作符为 In、NotIn、Exists、DoesNotExist。

      • **scopeSelector.matchExpressions.scopeName** (string), required

        选择器适用的范围的名称。

      • **scopeSelector.matchExpressions.values** ([]string)

        字符串值的数组。如果操作符为 In 或 NotIn,则值数组必须非空。如果操作符为 Exists 或 DoesNotExist,则值数组必须为空。此数组在策略合并补丁期间会被替换。

  • **scopes** ([]string)

    必须匹配配额跟踪的每个对象的过滤器集合。如果未指定,则配额匹配所有对象。

ResourceQuotaStatus

ResourceQuotaStatus 定义了强制执行的硬性限制和观察到的使用情况。


ResourceQuotaList

ResourceQuotaList 是 ResourceQuota 项的列表。


操作


get 读取指定的 ResourceQuota

HTTP 请求

GET /api/v1/namespaces/{namespace}/resourcequotas/{name}

参数

  • **name** (在路径中): string, required

    ResourceQuota 的名称

  • **namespace** (在路径中): string, required

    命名空间

  • **pretty** (在查询中): string

    pretty

响应

200 (ResourceQuota): OK

401: Unauthorized

get 读取指定 ResourceQuota 的状态

HTTP 请求

GET /api/v1/namespaces/{namespace}/resourcequotas/{name}/status

参数

  • **name** (在路径中): string, required

    ResourceQuota 的名称

  • **namespace** (在路径中): string, required

    命名空间

  • **pretty** (在查询中): string

    pretty

响应

200 (ResourceQuota): OK

401: Unauthorized

list 列出或观察 kind 为 ResourceQuota 的对象

HTTP 请求

GET /api/v1/namespaces/{namespace}/resourcequotas

参数

响应

200 (ResourceQuotaList): OK

401: Unauthorized

list 列出或观察 kind 为 ResourceQuota 的对象

HTTP 请求

GET /api/v1/resourcequotas

参数

响应

200 (ResourceQuotaList): OK

401: Unauthorized

create 创建一个 ResourceQuota

HTTP 请求

POST /api/v1/namespaces/{namespace}/resourcequotas

参数

响应

200 (ResourceQuota): OK

201 (ResourceQuota): Created

202 (ResourceQuota): Accepted

401: Unauthorized

update 替换指定的 ResourceQuota

HTTP 请求

PUT /api/v1/namespaces/{namespace}/resourcequotas/{name}

参数

  • **name** (在路径中): string, required

    ResourceQuota 的名称

  • **namespace** (在路径中): string, required

    命名空间

  • **body**: ResourceQuota, required

  • **dryRun** (在查询中): string

    dryRun

  • **fieldManager** (在查询中): string

    fieldManager

  • **fieldValidation** (在查询中): string

    fieldValidation

  • **pretty** (在查询中): string

    pretty

响应

200 (ResourceQuota): OK

201 (ResourceQuota): Created

401: Unauthorized

update 替换指定 ResourceQuota 的状态

HTTP 请求

PUT /api/v1/namespaces/{namespace}/resourcequotas/{name}/status

参数

  • **name** (在路径中): string, required

    ResourceQuota 的名称

  • **namespace** (在路径中): string, required

    命名空间

  • **body**: ResourceQuota, required

  • **dryRun** (在查询中): string

    dryRun

  • **fieldManager** (在查询中): string

    fieldManager

  • **fieldValidation** (在查询中): string

    fieldValidation

  • **pretty** (在查询中): string

    pretty

响应

200 (ResourceQuota): OK

201 (ResourceQuota): Created

401: Unauthorized

patch 部分更新指定的 ResourceQuota

HTTP 请求

PATCH /api/v1/namespaces/{namespace}/resourcequotas/{name}

参数

  • **name** (在路径中): string, required

    ResourceQuota 的名称

  • **namespace** (在路径中): string, required

    命名空间

  • **body**: Patch, required

  • **dryRun** (在查询中): string

    dryRun

  • **fieldManager** (在查询中): string

    fieldManager

  • **fieldValidation** (在查询中): string

    fieldValidation

  • **force** (在查询中): boolean

    force

  • **pretty** (在查询中): string

    pretty

响应

200 (ResourceQuota): OK

201 (ResourceQuota): Created

401: Unauthorized

patch 部分更新指定 ResourceQuota 的状态

HTTP 请求

PATCH /api/v1/namespaces/{namespace}/resourcequotas/{name}/status

参数

  • **name** (在路径中): string, required

    ResourceQuota 的名称

  • **namespace** (在路径中): string, required

    命名空间

  • **body**: Patch, required

  • **dryRun** (在查询中): string

    dryRun

  • **fieldManager** (在查询中): string

    fieldManager

  • **fieldValidation** (在查询中): string

    fieldValidation

  • **force** (在查询中): boolean

    force

  • **pretty** (在查询中): string

    pretty

响应

200 (ResourceQuota): OK

201 (ResourceQuota): Created

401: Unauthorized

delete 删除一个 ResourceQuota

HTTP 请求

DELETE /api/v1/namespaces/{namespace}/resourcequotas/{name}

参数

响应

200 (ResourceQuota): OK

202 (ResourceQuota): Accepted

401: Unauthorized

deletecollection 删除 ResourceQuota 的集合

HTTP 请求

DELETE /api/v1/namespaces/{namespace}/resourcequotas

参数

响应

200 (Status): OK

401: Unauthorized

此页面是自动生成的。

如果您打算报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目中的其他地方进行。

上次修改时间:2023 年 4 月 3 日,太平洋标准时间上午 8:22:API Ref 多页面 v1.27 (7b39e9a9ec)