規格結構定義
SwitchoverSpec 會定義 Switchover 的所選狀態。
dbclusterRef: string
newPrimary: string
newPrimaryInstance: string
primaryHost: string
欄位 類型必要或選填  | 
      說明  | 
    
|---|---|
    dbclusterRef
 | |
    string選填  | 
    DBClusterRef 是要啟動切換的 DBCluster 名稱。
    Switchover 物件必須與參照的 DBCluster 建立在相同的命名空間。這是切換作業的必填欄位。
 | 
    newPrimary
 | |
    string選填  | NewPrimary 是待命執行個體,可與目前的主要執行個體切換。 | 
    newPrimaryInstance
 | |
    string選填  | NewPrimaryInstance 是要與目前主要執行個體切換的待命執行個體。已淘汰:請改用 NewPrimary 欄位。 | 
    primaryHost
 | |
    string選填  | PrimaryHost 是 IP,一律指向主要執行個體。 | 
狀態結構定義
SwitchoverStatus 定義 Switchover 的觀察狀態。
conditions:
- lastTransitionTime: string
  message: string
  observedGeneration: integer
  reason: string
  status: string
  type: string
createTime: string
critcalIncidents:
- 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
internal:
  newPrimary: string
  oldPrimary: string
  phase: string
observedGeneration: integer
reconciled: boolean
startTime: string
state: string
欄位 類型必要或選填  | 
      說明  | 
    
|---|---|
    conditions
 | |
    list (object)選填  | 「條件」代表實體目前狀態的最新可用觀察結果。 | 
    conditions[]
 | |
    object選填  | Condition 包含這個 API 資源目前狀態某個層面的詳細資料。--- This struct is intended for direct use as an array at the field path .status.conditions. 舉例來說:\n type FooStatus struct{ // Represents the observations of a\n foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields } | 
    conditions[].lastTransactionTime
 | |
    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。值應為 CamelCase 字串。 這個欄位不得留空。 | 
    conditions[].status
 | |
    string必填  | 
     有效值:  | 
    conditions[].type
 | |
    string必填  | 駝峰式大小寫的條件類型,或 foo.example.com/CamelCase。 --- 許多 .condition.type 值在資源間是一致的,例如 Available,但由於任意條件可能很有用 (請參閱 .node.status.conditions),因此解除衝突的能力很重要。比對的規則運算式為 (dns1123SubdomainFmt/)?(qualifiedNameFmt) | 
    createTime
 | |
    string選填  | CreateTime 是指內部切換工作流程機制建立的時間。 | 
    criticalIncidents
 | |
    list (object)選填  | CriticalIncidents 是所有有效 Critical 事件的平面清單。 | 
    criticalIncidents[]
 | |
    object選填  | CriticalIncident 包含持續發生的重大事件的所有資訊。 | 
    criticalIncidents[].code
 | |
    string必填  | Code 是這項特定錯誤的錯誤代碼。 錯誤代碼為 DBSE+數字字串,例如「DBSE1012」。 | 
    criticalIncidents[].createTime
 | |
    string必填  | CreateTime 是指在來源建立這起事件的時間戳記。 | 
    criticalIncidents[].message
 | |
    string選填  | 訊息會說明發生的事件/錯誤。 | 
    criticalIncidents[].messageTemplateParams
 | |
    object選填  | MessageTemplateParams 包含鍵/值組合,可產生使用者友善的資料驅動型 Message 版本,並顯示在 UI 中。 | 
    criticalIncidents[].resource
 | |
    object必填  | 資源包含回報事件的資料庫服務元件,以及 Kubernetes 資源的相關資訊。 | 
    criticalIncidents[].resource.component
 | |
    string必填  | 元件是回報事件的資料庫服務子系統內部 ID。 | 
    criticalIncidents[].resource.location
 | |
    object選填  | Location | 
    criticalIncidents[].resource.location.cluster
 | |
    string選填  | Cluster 是受影響 Kubernetes 資源的叢集名稱。 | 
    criticalIncidents[].resource.location.group
 | |
    string選填  | Group 是 Kubernetes 資源的群組名稱。 | 
    criticalIncidents[].resource.location.kind
 | |
    string選填  | Kind 是 Kubernetes 資源的種類。 | 
    criticalIncidents[].resource.location.name
 | |
    string選填  | 名稱是受影響的 Kubernetes 資源名稱。 | 
    criticalIncidents[].resource.location.namespace
 | |
    string選填  | 命名空間是受影響 Kubernetes 資源的命名空間。 | 
    criticalIncidents[].resource.location.version
 | |
    TYPE選填  | Group 是 Kubernetes 資源的版本。 | 
    criticalIncidents[].stackTrace
 | |
    list (object)選填  | StackTrace 包含來自堆疊追蹤的非結構化訊息清單。 | 
    criticalIncidents[].stackTrace[]
 | |
    object選填  | CriticalIncidentStackTraceMessage 包含事件的堆疊追蹤資訊。 | 
    criticalIncidents[].stackTrace[].component
 | |
    string選填  | 「元件」是記錄訊息的資料庫服務元件名稱。 | 
    criticalIncidents[].stackTrace[].message
 | |
    string選填  | 記錄的訊息。 | 
    criticalIncidents[].stackTrace[].message
 | |
    string選填  | 如果存在 TransientUntil,表示問題應視為暫時性問題,直到指定時間為止。 | 
    endTime
 | |
    string選填  | EndTime 是指切換作業達到最終狀態的時間。 | 
    internal
 | |
    object選填  | 系統控制器會使用「Internal」。請勿依賴本節中的資訊。 | 
    internal.newPrimary
 | |
    string必填  | NewPrimary 是我們嘗試切換的執行個體。 | 
    internal.oldPrimary
 | |
    string必填  | OldPrimary 是在切換開始時為主要執行個體的執行個體。 | 
    internal.phase
 | |
    string選填  | 
     有效值:  | 
    observedGeneration
 | |
    integer選填  | 內部:控制器觀察到的世代。 | 
    reconciled
 | |
    boolean選填  | 內部:資源是否已由控制器協調。 | 
    startTime
 | |
    string選填  | StartTime 是指切換作業的開始時間。 | 
    state
 | |
    string選填  | 
     有效值: InProgress、Success、Failed_RollbackInProgress、Failed_RollbackSuccess、Failed_RollbackFailed。InProgress 表示切換作業仍在進行中。Success 表示切換作業已完成。Failed_RollbackInProgress 表示運算子無法升級新的主要執行個體,並嘗試重新啟動舊的主要執行個體。Failed_RollbackSuccess 表示運算子無法升級新的主要執行個體,但已成功重新啟動舊的主要執行個體。Failed_RollbackFailed
    表示運算子無法升級新的主要執行個體,
    也無法重新啟動舊的主要執行個體。DBCluster 可能需要手動修復。 |