26.4. PodSecurityPolicyReview [security.openshift.io/v1]


描述
PodSecurityPolicyReview 检查哪个服务帐户(而非用户,因为在集群范围内)可以创建 PodTemplateSpec
类型
对象
必填
  • spec

26.4.1. 规格

Expand
属性类型描述

apiVersion

字符串

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

kind

字符串

kind 是一个字符串值,代表此对象所代表的 REST 资源。服务器可以从客户端向其提交请求的端点推断。无法更新。采用驼峰拼写法 (CamelCase)。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

spec

对象

PodSecurityPolicyReviewSpec 定义 PodSecurityPolicyReview 的规格

status

对象

PodSecurityPolicyReviewStatus 代表 PodSecurityPolicyReview 的状态。

26.4.1.1. .spec

描述
PodSecurityPolicyReviewSpec 定义 PodSecurityPolicyReview 的规格
类型
对象
必填
  • 模板
Expand
属性类型描述

serviceAccountNames

数组(字符串)

ServiceAccountNames 是一组可选 ServiceAccounts,用于运行检查。如果 serviceAccountNames 为空,则使用 template.spec.serviceAccountName,除非为空,否则会使用 "default"。如果指定了 serviceAccountNames,则忽略 template.spec.serviceAccountName。

模板

PodTemplateSpec

template 是要检查的 PodTemplateSpec。如果 serviceAccountNames 为空,则使用 template.spec.serviceAccountName 字段,除非 template.spec.serviceAccountName 为空,否则会使用 "default"。如果指定了 serviceAccountNames,则忽略 template.spec.serviceAccountName。

26.4.1.2. .status

描述
PodSecurityPolicyReviewStatus 代表 PodSecurityPolicyReview 的状态。
类型
对象
必填
  • allowedServiceAccounts
Expand
属性类型描述

allowedServiceAccounts

数组

allowedServiceAccounts 返回此 命名空间中的服务帐户列表,该帐户具有创建 PodTemplateSpec 的权限。

allowedServiceAccounts[]

对象

ServiceAccountPodSecurityPolicyReviewStatus 代表 ServiceAccount 名称和相关查看状态

26.4.1.3. .status.allowedServiceAccounts

描述
allowedServiceAccounts 返回此 命名空间中的服务帐户列表,该帐户具有创建 PodTemplateSpec 的权限。
类型
数组

26.4.1.4. .status.allowedServiceAccounts[]

描述
ServiceAccountPodSecurityPolicyReviewStatus 代表 ServiceAccount 名称和相关查看状态
类型
对象
必填
  • name
Expand
属性类型描述

allowedBy

ObjectReference_v2

allowedBy 是允许 PodTemplateSpec 的规则的引用。规则可以是 SecurityContextConstraint 或 PodSecurityPolicy A nil,表示它被拒绝。

name

字符串

name 包含允许和被拒绝的 ServiceAccount 名称

reason

字符串

有关此操作处于"Failure"状态的机器可读描述。如果这个值为空,则没有可用的信息。

模板

PodTemplateSpec

模板是在应用默认后的 PodTemplateSpec。

26.4.2. API 端点

可用的 API 端点如下:

  • /apis/security.openshift.io/v1/namespaces/{namespace}/podsecuritypolicyreviews

    • POST :创建一个 PodSecurityPolicyReview
Expand
表 26.79. 全局路径参数
参数类型描述

namespace

字符串

对象名称和身份验证范围,如团队和项目

Expand
表 26.80. 全局查询参数
参数类型描述

dryRun

字符串

出现时,表示不应保留修改。无效的或未被识别的 dryRun 指令将导致错误响应,且请求不会被进一步处理。有效值为: - All: 所有预演阶段都将被处理

fieldManager

字符串

fieldmanager 是与进行这些更改的参与者或实体相关联的名称。该值必须小于或是 128 个字符长,且仅包含可打印的字符,如 https://golang.org/pkg/unicode/#IsPrint 所定义的那样。

pretty

字符串

如果 'true',则输出被用户友善。

HTTP 方法
POST
描述
创建 PodSecurityPolicyReview
Expand
表 26.81. 主体参数
参数类型描述

正文(body)

PodSecurityPolicyReview schema

 
Expand
表 26.82. HTTP 响应
HTTP 代码响应正文

200 - OK

PodSecurityPolicyReview schema

201 - Created

PodSecurityPolicyReview schema

202 - Accepted

PodSecurityPolicyReview schema

401 - Unauthorized

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat