Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }
POST /v1/clusters
代码 (Code) | 消息 (Message) | 数据类型 (Datatype) |
---|---|---|
200 |
成功的响应。(A successful response.) |
|
0 |
意外的错误响应。(An unexpected error response.) |
UNAVAILABLE: 只有采集器才能具有不可用状态 (UNAVAILABLE: Only collector can have unavailable status)
枚举值 (Enum Values) |
---|
UNINITIALIZED |
UNAVAILABLE |
UNHEALTHY |
DEGRADED |
HEALTHY |
SENSOR_VERSION_HIGHER: 当我们检测到传感器运行的版本高于此中心时,会发生 SENSOR_VERSION_HIGHER。这很意外,但根据客户执行的补丁程序,可能会发生这种情况。在这种情况下,我们不会自动“升级”传感器,因为这将是降级,即使自动升级设置已开启。用户将被允许手动触发升级,但强烈建议他们在先升级中心之前不要这样做,因为这是一种不受支持的配置。(SENSOR_VERSION_HIGHER: SENSOR_VERSION_HIGHER occurs when we detect that the sensor is running a newer version than this Central. This is unexpected, but can occur depending on the patches a customer does. In this case, we will NOT automatically "upgrade" the sensor, since that would be a downgrade, even if the autoupgrade setting is on. The user will be allowed to manually trigger the upgrade, but they are strongly discouraged from doing so without upgrading Central first, since this is an unsupported configuration.)
枚举值 (Enum Values) |
---|
UNSET |
UP_TO_DATE |
MANUAL_UPGRADE_REQUIRED |
AUTO_UPGRADE_POSSIBLE |
SENSOR_VERSION_HIGHER |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
active |
布尔值 (Boolean) |
||||
id |
字符串 (String) |
||||
targetVersion |
字符串 (String) |
||||
upgraderImage |
字符串 (String) |
||||
initiatedAt |
日期 (Date) |
日期时间 (date-time) |
|||
progress |
|||||
type |
UPGRADE, CERT_ROTATION, |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
code |
整数 (Integer) |
int32 |
|||
message |
字符串 (String) |
||||
details |
ProtobufAny 列表 |
Any
包含任意序列化的 Protocol Buffer 消息以及描述序列化消息类型的 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”。
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) |
唯一标识序列化 Protocol Buffer 消息类型的 URL/资源名称。此字符串必须包含至少一个“/”字符。URL 路径的最后一个段必须表示类型的完全限定名称(如 |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
accountId |
字符串 (String) |
AdmissionControlHealthInfo 承载有关准入控制部署的数据,但不包括从此数据派生的准入控制健康状态。不包含聚合的准入控制健康状态,因为它是在中心派生的,而不是在首先报告 AdmissionControlHealthInfo(传感器)的组件中派生的。
以下字段被设置为可选/可为空,因为尝试获取它们时可能会出现错误,并且 0 的默认值可能会与实际值 0 混淆。如果尝试获取某个字段时发生错误,则该字段将不存在(而不是具有默认值)。
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
totalDesiredPods |
整数 (Integer) |
int32 |
|||
totalReadyPods |
整数 (Integer) |
int32 |
|||
statusErrors |
|
尝试获取准入控制健康信息时发生的错误集合。 |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
enabled |
布尔值 (Boolean) |
||||
timeoutSeconds |
整数 (Integer) |
int32 |
|||
scanInline |
布尔值 (Boolean) |
||||
disableBypass |
布尔值 (Boolean) |
||||
enforceOnUpdates |
布尔值 (Boolean) |
AuditLogFileState tracks the last audit log event timestamp and ID that was collected by Compliance For internal use only
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
collectLogsSince |
日期 (Date) |
日期时间 (date-time) |
|||
lastAuditId |
字符串 (String) |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
subscriptionId |
字符串 (String) |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
id |
字符串 (String) |
||||
name |
字符串 (String) |
||||
type |
GENERIC_CLUSTER, KUBERNETES_CLUSTER, OPENSHIFT_CLUSTER, OPENSHIFT4_CLUSTER, |
||||
labels |
|
||||
mainImage |
字符串 (String) |
||||
collectorImage |
字符串 (String) |
||||
centralApiEndpoint |
字符串 (String) |
||||
runtimeSupport |
布尔值 (Boolean) |
||||
collectionMethod |
UNSET_COLLECTION, NO_COLLECTION, KERNEL_MODULE, EBPF, CORE_BPF, |
||||
admissionController |
布尔值 (Boolean) |
||||
admissionControllerUpdates |
布尔值 (Boolean) |
||||
admissionControllerEvents |
布尔值 (Boolean) |
||||
status |
|||||
dynamicConfig |
|||||
tolerationsConfig |
|||||
priority |
字符串 (String) |
int64 |
|||
healthStatus |
|||||
slimCollector |
布尔值 (Boolean) |
||||
helmConfig |
|||||
mostRecentSensorId |
|||||
auditLogState |
仅供内部使用。 |
||||
initBundleId |
字符串 (String) |
||||
managedBy |
MANAGER_TYPE_UNKNOWN, MANAGER_TYPE_MANUAL, MANAGER_TYPE_HELM_CHART, MANAGER_TYPE_KUBERNETES_OPERATOR, |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
sensorCertExpiry |
日期 (Date) |
日期时间 (date-time) |
|||
sensorCertNotBefore |
日期 (Date) |
日期时间 (date-time) |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
id |
字符串 (String) |
||||
collectorHealthInfo |
|||||
admissionControlHealthInfo |
|||||
scannerHealthInfo |
|||||
sensorHealthStatus |
UNINITIALIZED, UNAVAILABLE, UNHEALTHY, DEGRADED, HEALTHY, |
||||
collectorHealthStatus |
UNINITIALIZED, UNAVAILABLE, UNHEALTHY, DEGRADED, HEALTHY, |
||||
overallHealthStatus |
UNINITIALIZED, UNAVAILABLE, UNHEALTHY, DEGRADED, HEALTHY, |
||||
admissionControlHealthStatus |
UNINITIALIZED, UNAVAILABLE, UNHEALTHY, DEGRADED, HEALTHY, |
||||
scannerHealthStatus |
UNINITIALIZED, UNAVAILABLE, UNHEALTHY, DEGRADED, HEALTHY, |
||||
lastContact |
日期 (Date) |
日期时间 (date-time) |
|||
healthInfoComplete |
布尔值 (Boolean) |
ClusterMetadata 包含有关集群基础架构的元数据信息。
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
type |
UNSPECIFIED, AKS, ARO, EKS, GKE, OCP, OSD, ROSA, |
||||
name |
字符串 (String) |
Name 表示集群在云提供商处注册的名称。对于自管理的 OpenShift,这是 OpenShift 安装程序选择的名称。 |
|||
id |
字符串 (String) |
Id 表示集群在云提供商处注册的唯一 ID。并非所有集群类型都有 ID。对于所有 OpenShift 集群,这是在 OCM 中注册的 Red Hat |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
sensorVersion |
字符串 (String) |
||||
DEPRECATEDLastContact |
日期 (Date) |
此字段已从 49.0 版本开始弃用。请改用 healthStatus.lastContact。 |
日期时间 (date-time) |
||
providerMetadata |
|||||
orchestratorMetadata |
|||||
upgradeStatus |
|||||
certExpiryStatus |
枚举值 (Enum Values) |
---|
GENERIC_CLUSTER |
KUBERNETES_CLUSTER |
OPENSHIFT_CLUSTER |
OPENSHIFT4_CLUSTER |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
upgradability |
UNSET, UP_TO_DATE, MANUAL_UPGRADE_REQUIRED, AUTO_UPGRADE_POSSIBLE, SENSOR_VERSION_HIGHER, |
||||
upgradabilityStatusReason |
字符串 (String) |
||||
mostRecentProcess |
枚举值 (Enum Values) |
---|
UNSET_COLLECTION |
NO_COLLECTION |
KERNEL_MODULE |
EBPF |
CORE_BPF |
CollectorHealthInfo 承载有关收集器部署的数据,但不包括从此数据派生的收集器健康状态。不包含聚合的收集器健康状态,因为它是在中心派生的,而不是在首先报告 CollectorHealthInfo(传感器)的组件中派生的。
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
version |
字符串 (String) |
||||
totalDesiredPods |
整数 (Integer) |
int32 |
|||
totalReadyPods |
整数 (Integer) |
int32 |
|||
totalRegisteredNodes |
整数 (Integer) |
int32 |
|||
statusErrors |
|
尝试获取收集器健康信息时发生的错误集合。 |
编码完整的集群配置,不包括 ID/名称标识符,包括静态和动态设置。
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
dynamicConfig |
|||||
staticConfig |
|||||
configFingerprint |
字符串 (String) |
||||
clusterLabels |
|
静态和动态集群配置的区别在于,动态值通过中心到传感器的 gRPC 连接发送。这使得无需重启安全集群组件即可“热重载”值,从而带来了好处。
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
admissionControllerConfig |
|||||
registryOverride |
字符串 (String) |
||||
disableAuditLogs |
布尔值 (Boolean) |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
project |
字符串 (String) |
||||
clusterName |
字符串 (String) |
已弃用,推荐使用 providerMetadata.cluster.name。 |
枚举值 (Enum Values) |
---|
MANAGER_TYPE_UNKNOWN |
MANAGER_TYPE_MANUAL |
MANAGER_TYPE_HELM_CHART |
MANAGER_TYPE_KUBERNETES_OPERATOR |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
version |
字符串 (String) |
||||
openshiftVersion |
字符串 (String) |
||||
buildDate |
日期 (Date) |
日期时间 (date-time) |
|||
apiVersions |
|
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
region |
字符串 (String) |
||||
zone |
字符串 (String) |
||||
aws |
|||||
azure |
|||||
verified |
布尔值 (Boolean) |
||||
cluster |
ScannerHealthInfo 代表部署在安全集群(所谓的“本地扫描器”)上的扫描器实例的健康信息。当扫描器部署在中心集群上时,不会使用此消息。ScannerHealthInfo 携带有关扫描器部署的数据,但不包括从此数据派生的扫描器健康状态。不包含聚合的扫描器健康状态,因为它是在中心派生的,而不是在首先报告 ScannerHealthInfo(传感器)的组件中派生的。
以下字段被设置为可选/可为空,因为尝试获取它们时可能会出现错误,并且 0 的默认值可能会与实际值 0 混淆。如果尝试获取某个字段时发生错误,则该字段将不存在(而不是具有默认值)。
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
totalDesiredAnalyzerPods |
整数 (Integer) |
int32 |
|||
totalReadyAnalyzerPods |
整数 (Integer) |
int32 |
|||
totalDesiredDbPods |
整数 (Integer) |
int32 |
|||
totalReadyDbPods |
整数 (Integer) |
int32 |
|||
statusErrors |
|
尝试获取扫描器健康信息时发生的错误集合。 |
StackRoxDeploymentIdentification 旨在唯一标识 StackRox Sensor 部署。它用于确定传感器连接来自已重新启动或重新创建(可能在网络分区之后)的传感器 pod,还是来自不同命名空间或集群中的部署。
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
systemNamespaceId |
字符串 (String) |
||||
defaultNamespaceId |
字符串 (String) |
||||
appNamespace |
字符串 (String) |
||||
appNamespaceId |
字符串 (String) |
||||
appServiceaccountId |
字符串 (String) |
||||
k8sNodeName |
字符串 (String) |
静态和动态集群配置的区别在于,静态值不会通过中心到传感器的 gRPC 连接发送。例如,它们用于生成可用于设置安全集群的 k8s 组件的清单。它们**不会**动态重载。
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
type |
GENERIC_CLUSTER, KUBERNETES_CLUSTER, OPENSHIFT_CLUSTER, OPENSHIFT4_CLUSTER, |
||||
mainImage |
字符串 (String) |
||||
centralApiEndpoint |
字符串 (String) |
||||
collectionMethod |
UNSET_COLLECTION, NO_COLLECTION, KERNEL_MODULE, EBPF, CORE_BPF, |
||||
collectorImage |
字符串 (String) |
||||
admissionController |
布尔值 (Boolean) |
||||
admissionControllerUpdates |
布尔值 (Boolean) |
||||
tolerationsConfig |
|||||
slimCollector |
布尔值 (Boolean) |
||||
admissionControllerEvents |
布尔值 (Boolean) |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
disabled |
布尔值 (Boolean) |
字段名称 (Field Name) | 必填 (Required) | 可为空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
upgradeState |
UPGRADE_INITIALIZING, UPGRADER_LAUNCHING, UPGRADER_LAUNCHED, PRE_FLIGHT_CHECKS_COMPLETE, UPGRADE_OPERATIONS_DONE, UPGRADE_COMPLETE, UPGRADE_INITIALIZATION_ERROR, PRE_FLIGHT_CHECKS_FAILED, UPGRADE_ERROR_ROLLING_BACK, UPGRADE_ERROR_ROLLED_BACK, UPGRADE_ERROR_ROLLBACK_FAILED, UPGRADE_ERROR_UNKNOWN, UPGRADE_TIMED_OUT, |
||||
upgradeStatusDetail |
字符串 (String) |
||||
since |
日期 (Date) |
日期时间 (date-time) |
UPGRADE:UPGRADE 代表传感器版本升级。
CERT_ROTATION:CERT_ROTATION 代表仅轮换集群使用的 TLS 证书的升级过程,而无需更改任何其他内容。
枚举值 (Enum Values) |
---|
UPGRADE |
CERT_ROTATION |
UPGRADER_LAUNCHING:进行中状态。
UPGRADE_COMPLETE:成功状态。请将所有进行中状态编号在此上方,所有错误状态编号在此下方。
UPGRADE_INITIALIZATION_ERROR:错误状态。
枚举值 (Enum Values) |
---|
UPGRADE_INITIALIZING |
UPGRADER_LAUNCHING |
UPGRADER_LAUNCHED |
PRE_FLIGHT_CHECKS_COMPLETE |
UPGRADE_OPERATIONS_DONE |
UPGRADE_COMPLETE |
UPGRADE_INITIALIZATION_ERROR |
PRE_FLIGHT_CHECKS_FAILED |
UPGRADE_ERROR_ROLLING_BACK |
UPGRADE_ERROR_ROLLED_BACK |
UPGRADE_ERROR_ROLLBACK_FAILED |
UPGRADE_ERROR_UNKNOWN |
UPGRADE_TIMED_OUT |