规范架构
FailoverSpec 定义故障切换的所选状态。
dbclusterRef: string
newPrimary: string
字段 类型必需或可选 |
说明 |
|---|---|
dbclusterRef
| |
string必需 |
dbclusterRef 是用于启动故障切换的 DBCluster 名称。在所引用 DBCluster 的同一命名空间中创建 Failover 对象。
|
newPrimary
| |
string可选 |
newPrimary 是要提升为新的主实例的备用实例。如果将此字段留空,系统会自动选择要故障切换到的最佳实例。如需将实例名称映射到主机,请查看所引用 DBCluster 的状态中的 instanceList 字段。 |
状态架构
FailoverStatus 定义了观察到的故障切换状态。
conditions:
- lastTransitionTime: string
message: string
observedGeneration: integer
reason: string
status: string
type: string
createTime: string
criticalIncidents:
- code: string
createTime: string
message: string
messageTemplateParams: object
resource:
component: string
location:
cluster: 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[]
| |
object可选 | 表示故障切换当前状态的最新可用观测结果。 |
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必需 |
条件的状态。有效值为 True、False 和 Unknown。 |
conditions[].type
| |
string必需 |
条件的类型,采用 CamelCase 或 foo.example.com/CamelCase 形式。许多 .condition.type 值(例如 Available)在各个资源中是一致的。由于任意条件都可能会有用(例如 .node.status.conditions),因此能够解决冲突非常重要。它匹配的正则表达式为 (dns1123SubdomainFmt/)?(qualifiedNameFmt)。
|
createTime
| |
string可选 | 系统创建内部故障切换工作流机制的时间。 |
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可选 | Cluster Manager 资源的组名称。 |
criticalIncidents[].resource.location.kind
| |
string可选 | 集群管理器资源的种类。 |
criticalIncidents[].resource.location.name
| |
string可选 | 受影响的 Cluster Manager 资源的名称。 |
criticalIncidents[].resource.location.namespace
| |
string可选 | 受影响的 Cluster Manager 资源的命名空间。 |
criticalIncidents[].resource.location.version
| |
string可选 | Cluster Manager 资源的版本。 |
criticalIncidents[].stackTrace[]
| |
object可选 | 来自堆栈轨迹的消息的非结构化列表。 |
criticalIncidents[].stackTrace[].component
| |
string可选 | 记录消息的数据库服务组件的名称。 |
criticalIncidents[].stackTrace[].message
| |
string可选 | 记录的消息。 |
criticalIncidents[].transientUntil
| |
string可选 | 如果存在,则表示系统必须在指定时间之前将问题视为暂时性问题。 |
endTime
| |
string可选 | 故障切换达到最终状态的时间。 |
observedGeneration
| |
integer可选 | 控制器观察到的生成。 |
reconciled
| |
boolean可选 | 控制器是否协调了资源。 |
startTime
| |
string可选 | 故障切换操作开始的时间。 |
state
| |
string可选 |
描述故障切换操作的当前状态。可能的值包括 InProgress、Success、Failed_RollbackInProgress、Failed_RollbackSuccess 和 Failed_RollbackFailed。InProgress 表示故障切换仍在进行中。Success 表示故障切换已完成。当系统成功提升新的主实例时,此操作即完成。Failed_RollbackInProgress 表示操作器无法提升新的主实例,并且正在尝试重启旧的主实例。Failed_RollbackSuccess 表示操作器无法提升新的主实例,并且已成功重启旧的主实例。
Failed_RollbackFailed 表示操作器无法提升新的主实例,并且无法重启旧的主实例。您可能需要手动修复 DBCluster。
|