规范架构
DBInstanceSpec 定义 DBInstance 的选定状态。
DBInstance:
metadata:
name: string
spec:
dbcParent:
name: string
instanceType: string
nodeCount: integer
readPoolPort: integer
resources:
cpu: integer or string
memory: string or integer
disks:
- name: string
path: string
size: string
字段 类型必需或可选 |
说明 |
|---|---|
name
| |
string必需 |
DBInstance 资源的名称。 |
dbcParent
| |
object必需 |
此 DBInstance 从中复制的父级 DBCluster。
|
dbcParent.name
| |
string必需 |
引用对象 DBCluster 的名称。
|
instanceType
| |
string可选 |
指示 DBInstance 的类型。支持 ReadPool 类型。默认值为 ReadPool。
|
nodeCount
| |
integer可选 |
确定为此 DBInstance 创建的 DBNode 数量。支持的值介于 0 到 20 之间。默认值为 1。
|
readPoolPort
| |
integer可选 |
ReadPool DBInstance 的专用 HAProxy 前端端口。
|
resources
| |
object可选 |
指定为属于此 DBInstance 的实例 (DBNode) 使用的计算和存储资源。如果省略,则实例使用与 DBCluster 的主实例相同的资源。
|
resources.cpu
| |
integer or string必需 |
分配给数据库进程的 CPU 数量(例如,2 或 "2")。
|
resources.memory
| |
string or integer必需 |
分配给数据库进程的内存量(例如,"6Gi")。
|
resources.disks
| |
list (object)必需 | 分配给数据库进程的磁盘的规范。 |
resources.disks[].name
| |
string必需 |
磁盘的名称。允许的值包括:DataDisk 和 ObsDisk。
|
resources.disks[].path
| |
string可选 | 磁盘装载在主机文件系统上的路径。 |
resources.disks[].size
| |
string可选 |
磁盘大小(字节数)(例如,"15Gi")。
|
状态架构
DBInstanceStatus 定义观察到的 DBInstance 状态。
conditions:
- lastTransitionTime: string
message: string
observedGeneration: integer
reason: string
status: string
type: string
criticalIncidents:
- code: string
createTime: string
message: string
messageTemplateParams: object
resource:
component: string
location:
cluster: string
group: string
kind: string
name: string
namespace: string
version: string
stackTrace:
- component: string
message: string
transientUntil: string
endpoints:
- name: string
value: string
observedGeneration: integer
reconciled: boolean
字段 类型必需或可选 |
说明 |
|---|---|
conditions
| |
list (object)可选 |
表示 DBInstance 当前状态的最新可用观察结果。
|
conditions[]
| |
object可选 | Condition 描述此 API 资源当前状态的一个方面。 |
conditions[].lastTransitionTime
| |
string必需 | 指示条件从一种状态转换到另一种状态的时间。如果此时间未知,请使用 API 字段更改的时间。 |
conditions[].message
| |
string必需 | 人类可读的字符串,用于描述有关转场的详细信息。此字符串可以为空。 |
conditions[].observedGeneration
| |
integer可选 |
表示设置条件所基于的 .metadata.generation。
|
conditions[].reason
| |
string必需 |
包含一个程序化标识符,指示条件上次转换的原因。该值是 CamelCase 字符串。DBInstance 的预期值包括:
|
conditions[].status
| |
string必需 |
条件的状态。有效值为 True、False 和 Unknown。
|
conditions[].type
| |
string必需 |
CamelCase 形式的条件类型。预期类型包括:
|
criticalIncidents
| |
list (object)可选 | 所有活跃的严重突发事件的列表。 |
criticalIncidents[]
| |
object可选 | 描述正在发生的严重突发事件。 |
criticalIncidents[].code
| |
string必需 |
错误的错误代码。错误代码是 DBSE+数字字符串;例如,DBSE1012。
|
criticalIncidents[].createTime
| |
string必需 | 在源头创建突发事件时的时间戳。 |
criticalIncidents[].message
| |
string可选 | 描述发生的突发事件或错误。 |
criticalIncidents[].messageTemplateParams
| |
object可选 | 包含键值对,用于在界面中生成人性化数据驱动型消息。 |
criticalIncidents[].resource
| |
object必需 | 包含有关报告突发事件的数据库服务组件的信息。 |
criticalIncidents[].resource.component
| |
string必需 | 报告突发事件的数据库服务子系统的内部标识符。 |
criticalIncidents[].resource.location
| |
object可选 | 原始资源的位置。 |
criticalIncidents[].resource.location.cluster
| |
string可选 | 受影响资源的集群名称。 |
criticalIncidents[].resource.location.group
| |
string可选 | 资源的群组名称。 |
criticalIncidents[].resource.location.kind
| |
string可选 | 资源的种类。 |
criticalIncidents[].resource.location.name
| |
string可选 | 受影响资源的名称。 |
criticalIncidents[].resource.location.namespace
| |
string可选 | 受影响资源的命名空间。 |
criticalIncidents[].resource.location.version
| |
string可选 | 资源的版本。 |
criticalIncidents[].stackTrace
| |
list (object)可选 | 来自堆栈轨迹的消息的非结构化列表。 |
criticalIncidents[].stackTrace[].component
| |
string可选 | 记录消息的数据库服务组件的名称。 |
criticalIncidents[].stackTrace[].message
| |
string可选 | 记录的消息。 |
criticalIncidents[].transientUntil
| |
string可选 | 指示问题在指定时间之前被视为暂时性问题。 |
endpoints
| |
list (object)可选 | Endpoints 包含您可以通过其访问此实例的所有端点。 |
endpoints[].name
| |
string必需 |
Name 是端点的名称,例如 Read-Only。
|
endpoints[].value
| |
string必需 | Value 包含用于连接和访问实例的端点信息。 |
observedGeneration
| |
integer可选 | 控制器观察到的生成。 |
reconciled
| |
boolean可选 | 资源是否由控制器进行了协调。 |