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 属于那些匹配优先级在数值上最低(我们认为在逻辑上最高)的 FlowSchema。每个匹配优先级值必须介于 [1,10000] 之间。请注意,如果未指定优先级,则默认情况下将设置为 1000。rules ([]PolicyRulesWithSubjects)
Atomic: 在合并期间将被替换
rules
描述了哪些请求将与该流模式匹配。如果且仅当 rules 的至少一个成员与请求匹配时,此 FlowSchema 才会与请求匹配。如果它是空切片,则将没有请求与 FlowSchema 匹配。PolicyRulesWithSubjects 指定应用于对 apiserver 的请求的测试。该测试考虑发出请求的主体、请求的动词以及要对其进行操作的资源。如果且仅当 (a) subjects 的至少一个成员与请求匹配,并且 (b) resourceRules 或 nonResourceRules 的至少一个成员与请求匹配时,此 PolicyRulesWithSubjects 才会与请求匹配。
rules.subjects ([]Subject), required
Atomic: 在合并期间将被替换
subjects 是此规则关心的普通用户、服务帐户或组的列表。此切片中必须至少有一个成员。包含 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
匹配服务帐户。ServiceAccountSubject 包含有关服务帐户类型主体的详细信息。
rules.subjects.serviceAccount.name (string), required
name
是匹配的服务帐户对象的名称,或“*”以匹配与名称无关的对象。必需。rules.subjects.serviceAccount.namespace (string), required
namespace
是匹配的服务帐户对象的命名空间。必需。
rules.subjects.user (UserSubject)
user
根据用户名进行匹配。rules.subjects.user.name (string), required
name
是匹配的用户名,或“*”以匹配所有用户名。必需。
rules.nonResourceRules ([]NonResourcePolicyRule)
Atomic: 在合并期间将被替换
nonResourceRules
是 NonResourcePolicyRule 的列表,它们根据其动词和目标非资源 URL 标识匹配的请求。NonResourcePolicyRule 是一个谓词,它根据其动词和目标非资源 URL 匹配非资源请求。如果且仅当 (a) verbs 的至少一个成员与请求匹配,并且 (b) nonResourceURLs 的至少一个成员与请求匹配时,NonResourcePolicyRule 才会与请求匹配。
rules.nonResourceRules.nonResourceURLs ([]string), required
Set: 在合并期间将保留唯一值
nonResourceURLs
是用户应该可以访问的 URL 前缀集,并且不能为空。例如- "/healthz" 是合法的
- "/hea*" 是非法的
- "/hea" 是合法的,但没有匹配项
- "/hea/*" 也没有匹配项
- "/healthz/" 匹配所有每组件健康检查。 "" 匹配所有非资源 URL。如果存在,它必须是唯一的条目。必需。
rules.nonResourceRules.verbs ([]string), required
Set: 在合并期间将保留唯一值
verbs
是匹配动词的列表,并且不能为空。"*" 匹配所有动词。如果存在,它必须是唯一的条目。必需。
rules.resourceRules ([]ResourcePolicyRule)
Atomic: 在合并期间将被替换
resourceRules
是 ResourcePolicyRule 的切片,它们根据其动词和目标资源标识匹配的请求。resourceRules
和nonResourceRules
中至少有一个必须是非空的。ResourcePolicyRule 是一个谓词,它匹配一些资源请求,测试请求的动词和目标资源。如果且仅当 (a) verbs 的至少一个成员与请求匹配,(b) apiGroups 的至少一个成员与请求匹配,(c) resources 的至少一个成员与请求匹配,并且 (d) 满足以下条件之一时,ResourcePolicyRule 才会与资源请求匹配:(d1) 请求未指定命名空间(即
Namespace==""
)并且 clusterScope 为 true,或 (d2) 请求指定了命名空间,并且 namespaces 的至少一个成员与请求的命名空间匹配。rules.resourceRules.apiGroups ([]string), required
Set: 在合并期间将保留唯一值
apiGroups
是匹配的 API 组的列表,并且不能为空。"*" 匹配所有 API 组,如果存在,它必须是唯一的条目。必需。rules.resourceRules.resources ([]string), required
Set: 在合并期间将保留唯一值
resources
是匹配的资源(即小写和复数)的列表,如果需要,还可以包含子资源。例如,[ "services", "nodes/status" ]。此列表不能为空。"*" 匹配所有资源,如果存在,它必须是唯一的条目。必需。rules.resourceRules.verbs ([]string), required
Set: 在合并期间将保留唯一值
verbs
是匹配动词的列表,并且不能为空。"*" 匹配所有动词,如果存在,它必须是唯一的条目。必需。rules.resourceRules.clusterScope (boolean)
clusterScope
指示是否匹配未指定命名空间的请求(这种情况要么是因为资源没有命名空间,要么是因为请求针对所有命名空间)。如果此字段被省略或为 false,则namespaces
字段必须包含一个非空列表。rules.resourceRules.namespaces ([]string)
Set: 在合并期间将保留唯一值
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 (string)
message
是一个可读的文本消息,指示有关最后转换的详细信息。conditions.reason (string)
reason
是条件最后转换的唯一、单字、驼峰式原因。conditions.status (string)
status
是条件的状态。可以是 True、False、Unknown。必需。conditions.type (string)
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), required
items
是 FlowSchema 的列表。
操作
get
读取指定的 FlowSchema
HTTP 请求
GET /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}
参数
name (在路径中): string, required
FlowSchema 的名称
pretty (在查询中): string
响应
200 (FlowSchema): OK
401: Unauthorized
get
读取指定 FlowSchema 的状态
HTTP 请求
GET /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status
参数
name (在路径中): string, required
FlowSchema 的名称
pretty (在查询中): string
响应
200 (FlowSchema): OK
401: Unauthorized
list
列出或观察 FlowSchema 类型的对象
HTTP 请求
GET /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (FlowSchemaList): OK
401: Unauthorized
create
创建一个 FlowSchema
HTTP 请求
POST /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas
参数
body: FlowSchema, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (FlowSchema): OK
201 (FlowSchema): Created
202 (FlowSchema): Accepted
401: Unauthorized
update
替换指定的 FlowSchema
HTTP 请求
PUT /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}
参数
name (在路径中): string, required
FlowSchema 的名称
body: FlowSchema, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (FlowSchema): OK
201 (FlowSchema): Created
401: Unauthorized
update
替换指定 FlowSchema 的状态
HTTP 请求
PUT /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status
参数
name (在路径中): string, required
FlowSchema 的名称
body: FlowSchema, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (FlowSchema): OK
201 (FlowSchema): Created
401: Unauthorized
patch
部分更新指定的 FlowSchema
HTTP 请求
PATCH /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}
参数
name (在路径中): string, required
FlowSchema 的名称
body: Patch, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (FlowSchema): OK
201 (FlowSchema): Created
401: Unauthorized
patch
部分更新指定 FlowSchema 的状态
HTTP 请求
PATCH /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status
参数
name (在路径中): string, required
FlowSchema 的名称
body: Patch, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (FlowSchema): OK
201 (FlowSchema): Created
401: Unauthorized
delete
删除一个 FlowSchema
HTTP 请求
DELETE /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}
参数
name (在路径中): string, required
FlowSchema 的名称
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
删除 FlowSchema 的集合
HTTP 请求
DELETE /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas
参数
body: DeleteOptions
continue (在查询中): string
dryRun (在查询中): string
fieldSelector (在查询中): string
gracePeriodSeconds (在查询中): integer
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): OK
401: Unauthorized
此页面是自动生成的。
如果您打算报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。