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