FlowSchema
apiVersion: flowcontrol.apiserver.k8s.io/v1
import "k8s.io/api/flowcontrol/v1"
FlowSchema
FlowSchema 定义一组流的模式。请注意,流由一组具有相似属性的入站 API 请求组成,并由字符串对标识:FlowSchema 的名称和“流区分符”。
apiVersion: flowcontrol.apiserver.k8s.io/v1
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 的规范看起来的样子。
distinguisherMethod (FlowDistinguisherMethod)
distinguisherMethod定义如何计算与此模式匹配的请求的流区分符。nil指定区分符被禁用,因此始终为空字符串。FlowDistinguisherMethod 指定流区分符的方法。
distinguisherMethod.type (string), required
type是流区分符方法的类型。支持的类型是“ByUser”和“ByNamespace”。必需。
matchingPrecedence (int32)
matchingPrecedence用于选择匹配给定请求的 FlowSchema。选择的 FlowSchema 是那些具有数值最低(我们认为在逻辑上是最高的)MatchingPrecedence 的 FlowSchema 之一。每个 MatchingPrecedence 值必须在 [1,10000] 范围内。请注意,如果未指定优先级,则默认设置为 1000。priorityLevelConfiguration (PriorityLevelConfigurationReference), required
priorityLevelConfiguration应该引用集群中的 PriorityLevelConfiguration。如果无法解析引用,则 FlowSchema 将被忽略并在其状态中标记为无效。必需。PriorityLevelConfigurationReference 包含指向正在使用的“request-priority”的信息。
priorityLevelConfiguration.name (string), required
name是正在引用的优先级级别配置的名称。必需。
rules ([]PolicyRulesWithSubjects)
原子:将在合并期间被替换
rules描述哪些请求将匹配此流模式。如果规则列表中的至少一个成员匹配请求,则此 FlowSchema 匹配请求。如果它是一个空切片,则将没有请求匹配 FlowSchema。PolicyRulesWithSubjects 规定应用于 apiserver 请求的测试。该测试考虑了发出请求的主体、请求的动词以及要操作的资源。如果 (a) 主体中的至少一个成员匹配请求,并且 (b) 资源规则或非资源规则中的至少一个成员匹配请求,则此 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) 动词中的至少一个成员匹配请求,并且 (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) 动词中的至少一个成员匹配请求,(b) apiGroups 中的至少一个成员匹配请求,(c) 资源中的至少一个成员匹配请求,并且 (d) 要么 (d1) 请求未指定命名空间(即
Namespace=="")并且 clusterScope 为 true,或者 (d2) 请求指定了命名空间并且命名空间中的至少一个成员匹配请求的命名空间,则 ResourcePolicyRule 匹配资源请求。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)
Patch 策略:在键
type上合并映射:在合并期间将保留键类型上的唯一值
conditions是 FlowSchema 当前状态的列表。FlowSchemaCondition 描述 FlowSchema 的条件。
conditions.lastTransitionTime (Time)
lastTransitionTime是条件从一种状态过渡到另一种状态的最后时间。Time 是 time.Time 的包装器,支持正确地编组到 YAML 和 JSON。为时间包提供的许多工厂方法提供包装器。
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/v1
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/v1/flowschemas/{name}
Parameters
name (在路径中): string, 必需
FlowSchema 的名称
pretty (在查询中): string
响应
200 (FlowSchema): OK
401: 未授权
get 读取指定 FlowSchema 的状态
HTTP 请求
GET /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status
Parameters
name (在路径中): string, 必需
FlowSchema 的名称
pretty (在查询中): string
响应
200 (FlowSchema): OK
401: 未授权
list 列出或监视 FlowSchema 类型的对象
HTTP 请求
GET /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas
Parameters
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): OK
401: 未授权
create 创建一个 FlowSchema
HTTP 请求
POST /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas
Parameters
body: FlowSchema, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (FlowSchema): OK
201 (FlowSchema): Created
202 (FlowSchema): Accepted
401: 未授权
update 替换指定的 FlowSchema
HTTP 请求
PUT /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}
Parameters
name (在路径中): string, 必需
FlowSchema 的名称
body: FlowSchema, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (FlowSchema): OK
201 (FlowSchema): Created
401: 未授权
update 替换指定 FlowSchema 的状态
HTTP 请求
PUT /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status
Parameters
name (在路径中): string, 必需
FlowSchema 的名称
body: FlowSchema, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (FlowSchema): OK
201 (FlowSchema): Created
401: 未授权
patch 部分更新指定的 FlowSchema
HTTP 请求
PATCH /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}
Parameters
name (在路径中): string, 必需
FlowSchema 的名称
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
响应
200 (FlowSchema): OK
201 (FlowSchema): Created
401: 未授权
patch 部分更新指定 FlowSchema 的状态
HTTP 请求
PATCH /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status
Parameters
name (在路径中): string, 必需
FlowSchema 的名称
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
响应
200 (FlowSchema): OK
201 (FlowSchema): Created
401: 未授权
delete 删除一个 FlowSchema
HTTP 请求
DELETE /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}
Parameters
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 集合
HTTP 请求
DELETE /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas
Parameters
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 项目的其他地方进行。