容錯移轉 v1.5.0 自訂資源定義

規格結構定義

FailoverSpec 代表單一容錯移轉作業的參數。

dbclusterRef: string
newPrimary: string

欄位

類型
必填或選填

 

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

狀態結構定義

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
internal:
  attempt: integer
  lastPhaseChangeTime: string
  newPrimary: string
  newPrimaryZone: string
  oldPrimary: string
  phase: string
observedGeneration: integer
reconciled: boolean
startTime: string
state: string

欄位

類型
必填或選填

 

說明
conditions[]
object
選填
條件代表實體目前狀態的最新可用觀測值。
conditions[].lastTransitionTime
string
必填
lastTransitionTime 是條件上次從某個狀態轉換為另一個狀態的時間,這會在基礎條件變更時發生。如果基礎條件變更的時間不明,請使用 API 欄位變更的時間。
conditions[].message
string
必填
message 是使用者可讀的訊息,指出轉換的詳細資料。這個值可以是空白字串。
conditions[].observedGeneration
integer
選填
observedGeneration 代表設定條件時依據的 .metadata.generation。舉例來說,如果 .metadata.generation 為 12,但 .status.conditions[x].observedGeneration 為 9,則該條件與例項的目前狀態不符。
conditions[].reason
string
必填
reason 包含程式輔助 ID,指出條件上次轉換的原因。特定條件類型的產生者可以定義這個欄位的預期值和意義,以及這些值是否視為保證 API。值必須是駝峰式大小寫字串。 這個欄位不得留空。
conditions[].status
string
必填
條件狀態,可為 True、False 或 Unknown。
conditions[].type
string
必填
條件類型,格式為駝峰式大小寫或 foo.example.com/駝峰式大小寫。許多 .condition.type 值在資源之間保持一致,例如 Available。由於任意條件可能很有用 (例如 .node.status.conditions),因此解除衝突的能力很重要。比對的規則運算式為 (dns1123SubdomainFmt/)?(qualifiedNameFmt)。
createTime
string
選填
CreateTime 是指建立內部容錯移轉工作流程機制的時間。
criticalIncidents[]
object
必填
CriticalIncidents 是所有未解決重大事件的平面清單。
criticalIncidents[].code
string
必填
Code 是這項特定錯誤的錯誤代碼。錯誤代碼為 DBSE+numeric 字串,例如 DBSE1012。
criticalIncidents[].createTime
string
必填
CreateTime 是在來源建立這個事件的時間戳記。
criticalIncidents[].message
string
選填
訊息會說明發生的事件或錯誤。
criticalIncidents[].messageTemplateParams
object
選填
MessageTemplateParams 包含必要鍵/值組合,可在使用者介面中產生容易使用的資料導向訊息版本。
criticalIncidents[].resource
object
必填
資源包含回報事件的資料庫服務元件相關資訊,以及 Kubernetes 資源的相關資訊。
criticalIncidents[].resource.component
string
必填
元件是回報事件的資料庫服務子系統內部 ID。
criticalIncidents[].resource.location
object
選填
位置。
criticalIncidents[].resource.location.cluster
string
選填
受影響 Kubernetes 資源的叢集名稱。
criticalIncidents[].resource.location.group
string
選填
Kubernetes 資源的群組名稱。
criticalIncidents[].resource.location.kind
string
選填
Kubernetes 資源的種類。
criticalIncidents[].resource.location.name
string
選填
受影響 Kubernetes 資源的名稱。
criticalIncidents[].resource.location.namespace
string
選填
受影響 Kubernetes 資源的命名空間。
criticalIncidents[].resource.location.version
string
選填
Kubernetes 資源的版本。
criticalIncidents[].stackTrace[]
object
選填
堆疊追蹤記錄中的非結構化訊息清單。
criticalIncidents[].stackTrace[].component
string
選填
記錄訊息的資料庫服務元件名稱。
criticalIncidents[].stackTrace.message
string
選填
記錄訊息。
criticalIncidents[].transientUntil
string
選填
如果存在 TransientUntil,表示問題必須視為暫時性,直到指定時間為止。
endTime
string
選填
EndTime 是指容錯移轉達到最終狀態的時間。
internal
object
選填
系統控制器會使用「Internal」。請勿依據本節中的資訊操作。
internal.attempt
integer
必填
Attempt 用於重試邏輯。
internal.lastPhaseChangeTime
string
選填
LastPhaseChangeTime 是 L1 容錯移轉上次變更階段的時間。這項設定用於逾時邏輯。
internal.newPrimary
string
必填
NewPrimary 是您要容錯移轉至的執行個體。
internal.newPrimaryZone
string
選填
NewPrimaryZone 是我們嘗試容錯移轉的區域。
internal.oldPrimary
string
必填
OldPrimary 是在容錯移轉開始時做為主要執行個體的執行個體。
internal.phase
string
選填
階段用於追蹤容錯移轉的目前狀態。
observedGeneration
integer
選填
內部:控制器觀察到的世代。
reconciled
boolean
選填
內部:資源是否已由控制器協調。
startTime
string
選填
StartTime 是容錯移轉作業的開始時間。
state
string
選填
State 是容錯移轉作業的目前狀態。值包括 InProgress、Success、Failed_RollbackInProgress、Failed_RollbackSuccess 和 Failed_RollbackFailed。
  • InProgress 表示容錯移轉仍在進行中。
  • 「成功」表示容錯移轉已完成。當新的主要執行個體升級成功,即表示作業完成。
  • Failed_RollbackInProgress 表示運算子無法升級新的主要執行個體,且正在嘗試重新啟動舊的主要執行個體。
  • Failed_RollbackSuccess 表示運算子無法升級新的主要執行個體,且已成功重新啟動舊的主要執行個體。
  • Failed_RollbackFailed 表示運算子無法升級新的主要執行個體,也無法重新啟動舊的主要執行個體。您可能需要手動修復 DBCluster。