×
描述

AppliedClusterResourceQuota 在项目范围内镜像 ClusterResourceQuota,用于投影到项目中。它允许项目管理员了解哪些 ClusterResourceQuota 应用于其项目及其相关的使用情况。

兼容性级别 1:在一个主要版本中稳定至少 12 个月或 3 个次要版本(以较长者为准)。

类型

对象

必需
  • 元数据

  • spec

规格

属性 类型 描述

apiVersion

字符串

APIVersion 定义此对象表示的版本化模式。服务器应将识别的模式转换为最新的内部值,并可能拒绝无法识别的值。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

字符串

Kind 是一个字符串值,表示此对象表示的 REST 资源。服务器可以从客户端提交请求的端点推断出这一点。无法更新。采用驼峰式命名法。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

元数据

ObjectMeta_v2

metadata 是标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

对象

ClusterResourceQuotaSpec 定义所需的配额限制

status

对象

ClusterResourceQuotaStatus 定义实际强制执行的配额及其当前使用情况

.spec

描述

ClusterResourceQuotaSpec 定义所需的配额限制

类型

对象

必需
  • selector

  • quota

属性 类型 描述

quota

ResourceQuotaSpec_v2

Quota 定义所需的配额

selector

对象

ClusterResourceQuotaSelector 用于选择项目。必须至少存在一个 LabelSelector 或 AnnotationSelector。如果只存在一个,则它是唯一的选择条件。如果两者都指定,则项目必须匹配这两个限制。

.spec.selector

描述

ClusterResourceQuotaSelector 用于选择项目。必须至少存在一个 LabelSelector 或 AnnotationSelector。如果只存在一个,则它是唯一的选择条件。如果两者都指定,则项目必须匹配这两个限制。

类型

对象

属性 类型 描述

annotations

对象(字符串)

AnnotationSelector 用于通过注释选择项目。

labels

LabelSelector_v4

LabelSelector 用于通过标签选择项目。

.status

描述

ClusterResourceQuotaStatus 定义实际强制执行的配额及其当前使用情况

类型

对象

必需
  • total

属性 类型 描述

namespaces

数组

Namespaces 按项目切片使用情况。此划分允许快速解决单个项目内的删除协调,而无需在所有项目中重新计算。这可以用于提取给定项目的增量。

namespaces[]

对象

ResourceQuotaStatusByNamespace 提供特定项目的狀態。

total

ResourceQuotaStatus

Total 定义所有项目中实际强制执行的配额及其当前使用情况

.status.namespaces

描述

Namespaces 按项目切片使用情况。此划分允许快速解决单个项目内的删除协调,而无需在所有项目中重新计算。这可以用于提取给定项目的增量。

类型

数组

.status.namespaces[]

描述

ResourceQuotaStatusByNamespace 提供特定项目的狀態。

类型

对象

必需
  • namespace

  • status

属性 类型 描述

namespace

字符串

此状态适用的项目命名空间

status

ResourceQuotaStatus

Status 指示此项目已消耗多少资源

API 端点

提供以下 API 端点

  • /apis/quota.openshift.io/v1/appliedclusterresourcequotas

    • GET:列出 AppliedClusterResourceQuota 类型的对象

  • /apis/quota.openshift.io/v1/namespaces/{namespace}/appliedclusterresourcequotas

    • GET:列出 AppliedClusterResourceQuota 类型的对象

  • /apis/quota.openshift.io/v1/namespaces/{namespace}/appliedclusterresourcequotas/{name}

    • GET:读取指定的 AppliedClusterResourceQuota

/apis/quota.openshift.io/v1/appliedclusterresourcequotas

HTTP 方法

GET

描述

列出 AppliedClusterResourceQuota 类型的对象

表 1. HTTP 响应
HTTP 代码 响应体

200 - OK

AppliedClusterResourceQuotaList 模式

401 - 未授权

/apis/quota.openshift.io/v1/namespaces/{namespace}/appliedclusterresourcequotas

HTTP 方法

GET

描述

列出 AppliedClusterResourceQuota 类型的对象

表 2. HTTP 响应
HTTP 代码 响应体

200 - OK

AppliedClusterResourceQuotaList 模式

401 - 未授权

/apis/quota.openshift.io/v1/namespaces/{namespace}/appliedclusterresourcequotas/{name}

表 3. 全局路径参数
参数 类型 描述

name

字符串

AppliedClusterResourceQuota 的名称

HTTP 方法

GET

描述

读取指定的 AppliedClusterResourceQuota

表 4. HTTP 响应
HTTP 代码 响应体

200 - OK

AppliedClusterResourceQuota 模式

401 - 未授权