apiVersion: flowcontrol.apiserver.k8s.io/v1
import "k8s.io/api/flowcontrol/v1"
FlowSchema 定义了一组流的模式。请注意,流由一组具有相似属性的入站 API 请求组成,并由一对字符串标识:FlowSchema 的名称和“流区分符”(flow distinguisher)。
apiVersion: flowcontrol.apiserver.k8s.io/v1
kind: FlowSchema
metadata (ObjectMeta)
metadata 是标准的对象元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (FlowSchemaSpec)
spec 是 FlowSchema 期望行为的规范。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status (FlowSchemaStatus)
status 是 FlowSchema 的当前状态。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
FlowSchemaSpec 描述了 FlowSchema 规范的样子。
distinguisherMethod (FlowDistinguisherMethod)
distinguisherMethod 定义了如何为匹配此模式的请求计算流区分符。nil 表示禁用区分符,因此它始终为空字符串。
FlowDistinguisherMethod 指定了流区分符的方法。
distinguisherMethod.type (string), 必填
type 是流区分符方法的类型。支持的类型有 "ByUser" 和 "ByNamespace"。必填。
matchingPrecedence (int32)
matchingPrecedence 用于在匹配给定请求的 FlowSchema 中进行选择。所选的 FlowSchema 是那些匹配优先级(MatchingPrecedence)数值最低(我们认为逻辑上最高)的模式之一。每个 MatchingPrecedence 值必须在 [1,10000] 范围内。请注意,如果未指定优先级,则默认为 1000。
priorityLevelConfiguration (PriorityLevelConfigurationReference), 必填
priorityLevelConfiguration 应引用集群中的 PriorityLevelConfiguration。如果无法解析该引用,FlowSchema 将被忽略,并在其状态中标记为无效。必填。
PriorityLevelConfigurationReference 包含指向所使用的“请求优先级”的信息。
priorityLevelConfiguration.name (string), 必填
name 是被引用的优先级级别配置的名称。必填。
rules ([]PolicyRulesWithSubjects)
原子:将在合并期间被替换
rules 描述了哪些请求将匹配此流模式。如果且仅当 rules 中至少有一个成员匹配请求时,此 FlowSchema 才匹配该请求。如果它是空切片,则不会有请求匹配该 FlowSchema。
PolicyRulesWithSubjects 规定了应用于 API 服务器请求的测试。该测试考虑了发起请求的主体、请求的动词以及要操作的资源。如果且仅当 (a) 至少有一个主体成员匹配请求,并且 (b) 至少有一个资源规则或非资源规则成员匹配请求时,此 PolicyRulesWithSubjects 才会匹配请求。
rules.subjects ([]Subject), 必填
原子:将在合并期间被替换
subjects 是此规则关注的普通用户、服务帐户(ServiceAccount)或组的列表。此切片中必须至少有一个成员。包含 system:authenticated 和 system:unauthenticated 用户组的切片匹配每个请求。必填。
Subject 匹配请求的发起者,由请求身份验证系统标识。有三种匹配发起者的方式:按用户、按组或按服务帐户。
rules.subjects.kind (string), 必填
kind 指示其他字段中哪一个是非空的。必填。
rules.subjects.group (GroupSubject)
group 基于用户组名称进行匹配。
rules.subjects.group.name (string), 必填
name 是匹配的用户组,或者使用 "*" 匹配所有用户组。参见 https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go 获取一些众所周知的组名。必填。
rules.subjects.serviceAccount (ServiceAccountSubject)
serviceAccount 匹配 ServiceAccounts。
ServiceAccountSubject 保存了服务帐户类型主体的详细信息。
rules.subjects.serviceAccount.name (string), 必填
name 是匹配的 ServiceAccount 对象的名称,或者使用 "*" 匹配所有名称。必填。
rules.subjects.serviceAccount.namespace (string), 必填
namespace 是匹配的 ServiceAccount 对象的命名空间。必填。
rules.subjects.user (UserSubject)
user 基于用户名进行匹配。
rules.subjects.user.name (string), 必填
name 是匹配的用户名,或者使用 "*" 匹配所有用户名。必填。
rules.nonResourceRules ([]NonResourcePolicyRule)
原子:将在合并期间被替换
nonResourceRules 是 NonResourcePolicyRules 的列表,这些规则根据其动词和目标非资源 URL 来识别匹配的请求。
NonResourcePolicyRule 是一个谓词,根据其动词和目标非资源 URL 匹配非资源请求。如果且仅当 (a) 至少有一个动词成员匹配请求,并且 (b) 至少有一个非资源 URL 成员匹配请求时,NonResourcePolicyRule 才会匹配请求。
rules.nonResourceRules.nonResourceURLs ([]string), 必填
集合:合并期间将保留唯一值
nonResourceURLs 是用户应该有权访问的 URL 前缀集合,且不能为空。例如:
rules.nonResourceRules.verbs ([]string), 必填
集合:合并期间将保留唯一值
verbs 是匹配动词的列表,且不能为空。"*" 匹配所有动词。如果存在,它必须是唯一的条目。必填。
rules.resourceRules ([]ResourcePolicyRule)
原子:将在合并期间被替换
resourceRules 是 ResourcePolicyRules 的切片,根据其动词和目标资源来识别匹配的请求。resourceRules 和 nonResourceRules 中至少有一个不能为空。
ResourcePolicyRule 是一个谓词,匹配某些资源请求,测试请求的动词和目标资源。如果满足以下条件,ResourcePolicyRule 匹配资源请求:(a) 至少有一个动词成员匹配请求,(b) 至少有一个 API 组成员匹配请求,(c) 至少有一个资源成员匹配请求,以及 (d) 或者是 (d1) 请求未指定命名空间(即 `Namespace==""`)且 clusterScope 为 true,或者是 (d2) 请求指定了命名空间且至少有一个命名空间成员匹配请求的命名空间。
rules.resourceRules.apiGroups ([]string), 必填
集合:合并期间将保留唯一值
apiGroups 是匹配的 API 组列表,且不能为空。"*" 匹配所有 API 组,如果存在,则必须是唯一的条目。必填。
rules.resourceRules.resources ([]string), 必填
集合:合并期间将保留唯一值
resources 是匹配资源的列表(即小写复数形式),如果需要,还可以包含子资源。例如 [ "services", "nodes/status" ]。此列表不能为空。"*" 匹配所有资源,如果存在,则必须是唯一的条目。必填。
rules.resourceRules.verbs ([]string), 必填
集合:合并期间将保留唯一值
verbs 是匹配动词的列表,且不能为空。"*" 匹配所有动词,如果存在,则必须是唯一的条目。必填。
rules.resourceRules.clusterScope (boolean)
clusterScope 指示是否匹配未指定命名空间的请求(之所以发生这种情况,是因为资源本身没有命名空间,或者请求针对所有命名空间)。如果省略此字段或为 false,则 namespaces 字段必须包含一个非空列表。
rules.resourceRules.namespaces ([]string)
集合:合并期间将保留唯一值
namespaces 是限制匹配的目标命名空间列表。仅当 (a) 此列表包含该目标命名空间,或 (b) 此列表包含 "*" 时,指定了目标命名空间的请求才会匹配。请注意,"*" 匹配任何指定的命名空间,但不匹配 *未指定* 命名空间的请求(请参阅 clusterScope 字段)。此列表可以为空,但前提是 clusterScope 为 true。
FlowSchemaStatus 表示 FlowSchema 的当前状态。
conditions ([]FlowSchemaCondition)
Patch 策略:在键 type 上合并
映射:在合并期间将保留键类型上的唯一值
conditions 是 FlowSchema 当前状态的列表。
FlowSchemaCondition 描述了 FlowSchema 的条件。
conditions.lastTransitionTime (Time)
lastTransitionTime 是条件从一种状态转换到另一种状态的最后时间。
Time 是 time.Time 的包装器,支持正确地编组到 YAML 和 JSON。为时间包提供的许多工厂方法提供包装器。
conditions.message (string)
message 是一个人类可读的消息,指示有关最后转换的详细信息。
conditions.reason (string)
reason 是条件最后一次转换的唯一、单字、CamelCase 原因。
conditions.status (string)
status 是条件的状态。可以是 True, False, Unknown。必填。
conditions.type (string)
type 是条件的类型。必填。
FlowSchemaList 是 FlowSchema 对象的列表。
apiVersion: flowcontrol.apiserver.k8s.io/v1
kind: FlowSchemaList
metadata (ListMeta)
metadata 是标准的列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]FlowSchema), 必填
items 是 FlowSchema 的列表。
get 读取指定的 FlowSchemaGET /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}
name (在路径中): string, 必需
FlowSchema 的名称
pretty (在查询中): string
200 (FlowSchema): 成功
401: 未授权
get 读取指定 FlowSchema 的状态GET /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status
name (在路径中): string, 必需
FlowSchema 的名称
pretty (在查询中): string
200 (FlowSchema): 成功
401: 未授权
list 列出或监视 FlowSchema 类型的对象GET /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas
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 (FlowSchemaList): 成功
401: 未授权
create 创建一个 FlowSchemaPOST /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas
body: FlowSchema, 必填
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
200 (FlowSchema): 成功
201 (FlowSchema): 已创建
202 (FlowSchema): 已接受
401: 未授权
update 替换指定的 FlowSchemaPUT /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}
name (在路径中): string, 必需
FlowSchema 的名称
body: FlowSchema, 必填
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
200 (FlowSchema): 成功
201 (FlowSchema): 已创建
401: 未授权
update 替换指定 FlowSchema 的状态PUT /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status
name (在路径中): string, 必需
FlowSchema 的名称
body: FlowSchema, 必填
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
200 (FlowSchema): 成功
201 (FlowSchema): 已创建
401: 未授权
patch 部分更新指定的 FlowSchemaPATCH /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}
name (在路径中): string, 必需
FlowSchema 的名称
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
200 (FlowSchema): 成功
201 (FlowSchema): 已创建
401: 未授权
patch 部分更新指定 FlowSchema 的状态PATCH /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status
name (在路径中): string, 必需
FlowSchema 的名称
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
200 (FlowSchema): 成功
201 (FlowSchema): 已创建
401: 未授权
delete 删除一个 FlowSchemaDELETE /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}
name (在路径中): string, 必需
FlowSchema 的名称
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (in query): integer
ignoreStoreReadErrorWithClusterBreakingPotential (in query): boolean
pretty (在查询中): string
propagationPolicy (in query): string
200 (Status): 确定
202 (Status): 已接受
401: 未授权
deletecollection 删除 FlowSchema 集合DELETE /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas
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 项目的其他地方进行。