切换自定义资源定义

规范架构

SwitchoverSpec 定义切换的所选状态。

dbclusterRef: string
newPrimary: string
字段
类型
必填或可选

 

说明
dbclusterRef
string
必需
dbclusterRef 是启动切换的 DBCluster 的名称。在 Switchover 引用的 DBCluster 所在的命名空间中创建 Switchover 对象。
newPrimary
string
可选
newPrimary 是成为新主实例的备用实例。如需将实例名称映射到主机,请参阅所引用 DBCluster 的状态中的 instanceList 字段。

状态架构

SwitchoverStatus 定义观察到的切换状态。

conditions:
- lastTransitionTime: string
  message: string
  observedGeneration: integer
  reason: string
  status: string
  type: string
createTime: string
criticalIncidents:
- code: string
  createTime: string
  message: string
  messageTemplateParams:
  resource:
    component: string
    location:
      cluster: string
      group: string
      kind: string
      name: string
      namespace: string
      version: string
  stackTrace:
  - component: string
    message: string
  transientUntil: string
endTime: string
observedGeneration: integer
reconciled: boolean
startTime: string
state: string

字段

类型
必需或可选

 

说明
conditions
list (object)
可选
显示切换当前状态的最新可用观察结果。
conditions[]
object
可选
Condition 描述此 API 资源当前状态的一个方面。
conditions[].lastTransitionTime
string
必需
指示条件从一种状态转换到另一种状态的时间。如果此时间未知,请使用 API 字段更改的时间。
conditions[].message
string
必需
人类可读的字符串,用于描述有关转场的详细信息。此字符串可以为空。
conditions[].observedGeneration
integer
可选
表示条件使用的 .metadata.generation。例如,如果 .metadata.generation 为 12,但 .status.conditions[x].observedGeneration 为 9,则表示条件相对于实例的当前状态已过时。
conditions[].reason
string
必需
包含一个程序化标识符,指示条件上次转换的原因。特定条件类型的生成者可以为此字段定义 预期值和含义,以及这些值是否被 视为有保证的 API。值必须是 CamelCase 字符串,且不能为空。
conditions[].status
string
必需
条件的状态。有效值为 TrueFalseUnknown
conditions[].type
string
必需
条件的类型,采用 CamelCase 或 foo.example.com/CamelCase 形式。
createTime
string
可选
内部切换工作流创建资源的时间。
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
TYPE
可选
集群管理器资源的版本。
criticalIncidents[].stackTrace
list (object)
可选
包含来自堆栈轨迹的消息的非结构化列表。
criticalIncidents[].stackTrace[]
object
可选
描述突发事件的堆栈轨迹信息。
criticalIncidents[].stackTrace[].component
string
可选
组件是记录消息的数据库服务组件的名称。
criticalIncidents[].stackTrace[].message
string
可选
记录的消息。
criticalIncidents[].stackTrace[].transientUntil
string
可选
系统将突发事件视为暂时性事件的时间戳。
endTime
string
可选
切换达到最终状态的时间。
observedGeneration
integer
可选
控制器观察到的生成。
reconciled
boolean
可选
控制器是否协调了资源。
startTime
string
可选
切换操作开始的时间。
state
string
可选
描述切换操作的当前状态。有效值为 InProgressSuccessFailed_RollbackInProgressFailed_RollbackSuccessFailed_RollbackFailedInProgress 表示切换仍在进行中。Success 表示切换已完成。Failed_RollbackInProgress 表示操作器无法提升新的主实例,并尝试重启旧的主实例。Failed_RollbackSuccess 表示操作器无法提升新的主实例,并成功重启旧的主实例。Failed_RollbackFailed 表示操作器无法提升新的主实例,也无法重启旧的主实例。可能需要手动修复 DBCluster