容錯移轉自訂資源定義

規格結構定義

FailoverSpec 會定義 Failover 的選取狀態。

dbclusterRef: string
newPrimary: string

欄位

類型
必要或選填

 

說明
dbclusterRef
string
必填
dbclusterRef 是要啟動容錯移轉的 DBCluster 名稱。在與參照的 DBCluster 相同的命名空間中,建立 Failover 物件。
newPrimary
string
選填
newPrimary 是要升級為新主要執行個體的待命執行個體。如果將這個欄位留空,系統會自動選擇最佳執行個體進行容錯移轉。

狀態結構定義

FailoverStatus 定義了觀察到的 Failover 狀態。

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
必填
包含程式化 ID,指出條件上次轉換的原因。特定條件類型的產生者可以定義這個欄位的預期值和意義,以及這些值是否視為有保障的 API。值必須是 CamelCase 字串。這個欄位不得留空。
conditions[].status
string
必填
條件的狀態。有效值為 True、False 和 Unknown。
conditions[].type
string
必填
駝峰式大小寫或 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
必填
回報事件的資料庫服務子系統內部 ID。
criticalIncidents[].resource.location
object
選填
位置。
criticalIncidents[].resource.location.cluster
string
選填
受影響的 Cluster Manager 資源叢集名稱。
criticalIncidents[].resource.location.group
string
選填
叢集管理員資源的群組名稱。
criticalIncidents[].resource.location.kind
string
選填
Cluster Manager 資源的類型。
criticalIncidents[].resource.location.name
string
選填
受影響的叢集管理員資源名稱。
criticalIncidents[].resource.location.namespace
string
選填
受影響叢集管理員資源的命名空間。
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。