×

GET /v1/deployments/{id}

GetDeployment 根据 ID 返回部署信息。

描述 (Description)

参数 (Parameters)

路径参数 (Path Parameters)

名称 (Name) 描述 (Description) 必填 (Required) 默认值 (Default) 模式 (Pattern)

id

是 (X)

空 (null)

返回类型 (Return Type)

内容类型 (Content Type)

  • application/json

响应 (Responses)

表 1. HTTP 响应代码 (Table 1. HTTP Response Codes)
代码 (Code) 消息 (Message) 数据类型 (Datatype)

200

成功的响应。(A successful response.)

StorageDeployment

0

意外的错误响应。(An unexpected error response.)

GooglerpcStatus

示例 (Samples)

公共对象引用 (Common object reference)

ContainerConfigEnvironmentConfig

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

key

字符串 (String)

value

字符串 (String)

envVarSource

EnvironmentConfigEnvVarSource

UNSET, RAW, SECRET_KEY, CONFIG_MAP_KEY, FIELD, RESOURCE_FIELD, UNKNOWN,

EnvironmentConfigEnvVarSource

For any update to EnvVarSource, please also update 'ui/src/messages/common.js'
枚举值 (Enum Values)

UNSET

RAW

SECRET_KEY

配置映射键

字段

资源字段

未知

GooglerpcStatus

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

代码

整数

int32

消息

字符串 (String)

详情

ProtobufAny 列表

PortConfigExposureInfo

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

级别

PortConfigExposureLevel

未设置,外部,节点,内部,主机,路由

服务名称

字符串 (String)

服务ID

字符串 (String)

服务集群IP

字符串 (String)

服务端口

整数

int32

节点端口

整数

int32

外部IP

string 列表

外部主机名

string 列表

PortConfigExposureLevel

枚举值 (Enum Values)

UNSET

外部

节点

内部

主机

路由

ProtobufAny

Any 包含任意序列化的协议缓冲区消息以及描述序列化消息类型的 URL。

Protobuf 库提供支持,以实用程序函数或 Any 类型的附加生成方法的形式打包/解包 Any 值。

示例 1:在 C++ 中打包和解包消息。

Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
  ...
}

示例 2:在 Java 中打包和解包消息。

Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
  foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
  foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
  any.Unpack(foo)
  ...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
  ...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
  ...
}

Protobuf 库提供的打包方法默认使用“type.googleapis.com/full.type.name”作为类型 URL,解包方法仅使用类型 URL 中最后一个“/”后的完全限定类型名称,例如“foo.bar.com/x/y.z”将产生类型名称“y.z”。

JSON 表示

Any 值的 JSON 表示使用反序列化的嵌入式消息的常规表示,并添加一个包含类型 URL 的附加字段@type。示例

package google.profile;
message Person {
  string first_name = 1;
  string last_name = 2;
}
{
  "@type": "type.googleapis.com/google.profile.Person",
  "firstName": <string>,
  "lastName": <string>
}

如果嵌入式消息类型是众所周知的并且具有自定义 JSON 表示,则该表示将被嵌入,并添加一个字段value,该字段除了@type字段外还包含自定义 JSON。示例(对于消息 [google.protobuf.Duration][])

{
  "@type": "type.googleapis.com/google.protobuf.Duration",
  "value": "1.212s"
}
字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

@type

字符串 (String)

唯一标识序列化协议缓冲区消息类型的 URL/资源名称。此字符串必须包含至少一个“/”字符。URL 路径的最后一部分必须表示类型的完全限定名称(如path/google.protobuf.Duration)。名称应采用规范形式(例如,不接受前导“.”)。在实践中,团队通常会预编译他们期望在 Any 上下文中使用的所有类型到二进制文件中。但是,对于使用方案httphttps或无方案的 URL,可以选择设置一个类型服务器,该服务器将类型 URL 映射到消息定义,如下所示:* 如果没有提供方案,则假定为https。* 对 URL 的 HTTP GET 必须以二进制格式产生 [google.protobuf.Type][] 值,或产生错误。* 应用程序允许根据 URL 缓存查找结果,或将其预编译到二进制文件中以避免任何查找。因此,需要在更改类型时保留二进制兼容性。(使用版本化的类型名称来管理重大更改。)注意:此功能目前在官方 protobuf 版本中不可用,并且不用于以 type.googleapis.com 开头的类型 URL。截至 2023 年 5 月,没有广泛使用的类型服务器实现,也没有计划实现一个。除httphttps(或空方案)之外的其他方案可能会与实现特定的语义一起使用。

SeccompProfileProfileType

枚举值 (Enum Values)

不受限制

运行时默认

本地主机

SecurityContextSELinux

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

用户

字符串 (String)

角色

字符串 (String)

类型

字符串 (String)

级别

字符串 (String)

SecurityContextSeccompProfile

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

类型

SeccompProfileProfileType

不受限制,运行时默认,本地主机

本地主机配置文件

字符串 (String)

StorageContainer

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

id

字符串 (String)

配置

StorageContainerConfig

镜像

StorageContainerImage

安全上下文

StorageSecurityContext

StorageVolume 列表

端口

StoragePortConfig 列表

密钥

StorageEmbeddedSecret 列表

资源

StorageResources

名称

字符串 (String)

存活性探针

StorageLivenessProbe

就绪性探针

StorageReadinessProbe

StorageContainerConfig

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

环境变量

ContainerConfigEnvironmentConfig 列表

命令

string 列表

参数

string 列表

目录

字符串 (String)

用户

字符串 (String)

UID

字符串 (String)

int64

AppArmor 配置文件

字符串 (String)

StorageContainerImage

Next tag: 12
字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

id

字符串 (String)

名称

StorageImageName

不可拉取

布尔值

集群本地

布尔值

StorageDeployment

Next available tag: 36
字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

id

字符串 (String)

名称

字符串 (String)

哈希值

字符串 (String)

uint64

类型

字符串 (String)

命名空间

字符串 (String)

命名空间ID

字符串 (String)

协调器组件

布尔值

副本数

字符串 (String)

int64

标签

string 映射

Pod 标签

string 映射

标签选择器

StorageLabelSelector

创建时间

日期

日期时间

集群ID

字符串 (String)

集群名称

字符串 (String)

容器

StorageContainer 列表

注解

string 映射

优先级

字符串 (String)

int64

非活动

布尔值

镜像拉取密钥

string 列表

服务账号

字符串 (String)

服务账号权限级别

StoragePermissionLevel

未设置,无,默认,命名空间内提升,集群范围提升,集群管理员

自动挂载服务账号令牌

布尔值

主机网络

布尔值

主机PID

布尔值

主机IPC

布尔值

运行时类

字符串 (String)

容忍度

StorageToleration 列表

端口

StoragePortConfig 列表

状态时间戳

字符串 (String)

int64

风险评分

浮点数

float

平台组件

布尔值

StorageEmbeddedSecret

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

名称

字符串 (String)

路径

字符串 (String)

StorageImageName

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

注册表

字符串 (String)

远程

字符串 (String)

标签

字符串 (String)

全名

字符串 (String)

StorageLabelSelector

Label selector components are joined with logical AND, see     http://kubernetes.ac.cn/docs/concepts/overview/working-with-objects/labels/

下一个可用标签:3

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

匹配标签

string 映射

这实际上是一个oneof,但由于向后兼容性限制,我们无法使其成为oneof。

需求

StorageLabelSelectorRequirement 列表

StorageLabelSelectorOperator

枚举值 (Enum Values)

未知

不在

存在

不存在

StorageLabelSelectorRequirement

Next available tag: 4
字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

key

字符串 (String)

操作符

StorageLabelSelectorOperator

未知,在,不在,存在,不存在

string 列表

StorageLivenessProbe

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

已定义

布尔值

StoragePermissionLevel

For any update to PermissionLevel, also update: - pkg/searchbasedpolicies/builders/k8s_rbac.go - ui/src/messages/common.js
枚举值 (Enum Values)

UNSET

默认

命名空间内提升

集群范围提升

集群管理员

StoragePortConfig

Next Available Tag: 6
字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

名称

字符串 (String)

容器端口

整数

int32

协议

字符串 (String)

暴露

PortConfigExposureLevel

未设置,外部,节点,内部,主机,路由

暴露端口

整数

int32

暴露信息

PortConfigExposureInfo 列表

StorageReadinessProbe

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

已定义

布尔值

StorageResources

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

CPU 核心请求

浮点数

float

CPU 核心限制

浮点数

float

内存 MB 请求

浮点数

float

内存 MB 限制

浮点数

float

StorageSecurityContext

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

特权

布尔值

SELinux

SecurityContextSELinux

删除功能

string 列表

添加功能

string 列表

只读根文件系统

布尔值

Seccomp 配置文件

SecurityContextSeccompProfile

允许权限提升

布尔值

StorageTaintEffect

枚举值 (Enum Values)

未知污点效应

禁止调度污点效应

优先禁止调度污点效应

禁止执行污点效应

StorageToleration

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

key

字符串 (String)

操作符

StorageTolerationOperator

容忍操作未知 (TOLERATION_OPERATION_UNKNOWN),存在容忍操作符 (TOLERATION_OPERATOR_EXISTS),相等容忍操作符 (TOLERATION_OPERATOR_EQUAL),

value

字符串 (String)

污点影响 (taintEffect)

存储污点影响 (StorageTaintEffect)

未知污点影响 (UNKNOWN_TAINT_EFFECT),不调度污点影响 (NO_SCHEDULE_TAINT_EFFECT),优先不调度污点影响 (PREFER_NO_SCHEDULE_TAINT_EFFECT),不执行污点影响 (NO_EXECUTE_TAINT_EFFECT),

存储容忍操作符 (StorageTolerationOperator)

枚举值 (Enum Values)

容忍操作未知 (TOLERATION_OPERATION_UNKNOWN)

存在容忍操作符 (TOLERATION_OPERATOR_EXISTS)

相等容忍操作符 (TOLERATION_OPERATOR_EQUAL)

存储卷 (StorageVolume)

字段名称 (Field Name) 必填 (Required) 可空 (Nullable) 类型 (Type) 描述 (Description) 格式 (Format)

名称

字符串 (String)

源 (source)

字符串 (String)

目标 (destination)

字符串 (String)

只读 (readOnly)

布尔值

类型

字符串 (String)

挂载传播 (mountPropagation)

卷挂载传播 (VolumeMountPropagation)

无 (NONE),主机到容器 (HOST_TO_CONTAINER),双向 (BIDIRECTIONAL),

卷挂载传播 (VolumeMountPropagation)

枚举值 (Enum Values)

主机到容器 (HOST_TO_CONTAINER)

双向 (BIDIRECTIONAL)