規格結構定義
BackupPlanSpec 會定義 BackupPlan 的所需狀態。
backupLocation:
  gcsOptions:
    bucket: string
    key: string
    secretRef:
      name: string
      namespace: string
  type: string
backupRetainDays: integer
backupSchedules:
  differential: string
  full: string
  incremental: string
dbclusterRef: string
paused: boolean
| 欄位類型 必要或選填 | 說明 | 
|---|---|
| backupLocation | |
| object選填 | BackupLocation 會指定儲存備份的遠端物件儲存空間位置。例如 Cloud Storage 值區的規格。這是選填欄位。根據預設,備份檔會儲存在備份磁碟中。 | 
| backupLocation.gcsOptions | |
| object選填 | gcsOptions 是指 Cloud Storage 相關選項。 | 
| backupLocation.gcsOptions.bucket | |
| string必填 | Bucket 為必填欄位 (例如:dbs-dump-bucket) 使用者必須確保從 Operator 內可正確寫入儲存空間 Bucket。 | 
| backupLocation.gcsOptions.key | |
| string必填 | 傾印檔案的物件金鑰。(例如:ods-dump/scottschema.dmp)。 | 
| backupLocation.gcsOptions.secretRef | |
| object選填 | SecretRef 是指儲存 GCS 存取資訊的密鑰。 | 
| backupLocation.gcsOptions.secretRef.name | |
| string選填 | 名稱在命名空間中不得重複,用於參照密鑰資源。 | 
| backupLocation.gcsOptions.secretRef.namespace | |
| string選填 | 命名空間會定義密鑰名稱不得重複的空間。 | 
| backupLocation.type | |
| string必填 | 有效值:GCS、S3。存放區類型 (Amazon S3 為 S3,Google Cloud Storage 為GCS),可告知代理程式要使用哪個儲存系統/API。 | 
| backupRetainDays | |
| integer選填 | 預設值:14;最小值:1,最大值:90。服務會在多少天後刪除備份資料。如果指定,根據這個 BackupPlan 建立的備份會在達到 create_time + backup_retain_days 的時間後自動刪除。有效值為 1 到 90 天。如未指定,預設為保留 14 天。 | 
| backupSchedules | |
| object選填 | 定義不同類型備份的排程。 支援完整、差異和增量備份類型:https://pgbackrest.org/user-guide.html#concept/backup 這個欄位為選填。預設為每天午夜執行一次完整備份。 | 
| backupSchedules.differential | |
| string選填 | 定義差異 pgBackRest 備份的 Cron 排程。遵循標準 Cron 排程語法:https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax | 
| backupSchedules.full | |
| string選填 | 定義完整 pgBackRest 備份的 Cron 排程。遵循標準 Cron 排程語法:https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax | 
| backupSchedules.incremental | |
| string選填 | 定義完整 pgBackRest 備份的 Cron 排程。遵循標準 Cron 排程語法:https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax | 
| dbclusterRef | |
| string選填 | 這個備份方案設定的 DBCluster 名稱。這個欄位為必填欄位,且無法變更。 | 
| paused | |
| boolean選填 | 預設值為 false。這個旗標表示是否已暫停根據這個 BackupPlan 建立備份。如果設為 true,服務會暫停排定這項 BackupPlan 的新備份作業。預設值為 False。 | 
狀態結構定義
BackupPlanStatus 會定義觀察到的 BackupPlan 狀態。
conditions:
- lastTransactionTime: string
  message: string
  observedGeneration: integer
  reason: string
  status: string
  type: string
criticalIncidents:
- code: string
  createTime: string
  message: string
  messageTemplateParams: object
  resource:
    component: string
    location:
      cluster: string
      group: string
      kind: string
      name: string
      namespace: string
      version: string
  stackTrace:
  - component: string
    message: string
  transientUntil: string
lastBackupTime: string
nextBackupTime: string
observedGeneration: integer
phase: string
reconciled: boolean
recoveryWindow:
  begin: string
  end: string
| 欄位類型 必要或選填 | 說明 | 
|---|---|
| conditions | |
| list (object)選用性 | 條件代表實體目前狀態的最新可用觀察結果。 | 
| conditions[] | |
| object選用性 | 條件包含目前狀態的其中一個層面詳細資料 | 
| conditions[].lastTransactionTime | |
| string必填 | 條件最近一次從一個狀態轉變為另一個狀態的時間。這應該是基礎條件變更時。如果不知道,可以使用 API 欄位變更的時間。 | 
| conditions[].message | |
| string必填 | 使用者可理解的訊息,指出轉換的詳細資料。這可能是空字串。 | 
| conditions[].observedGeneration | |
| integer選填 | 代表條件設定依據的 .metadata.generation。舉例來說,如果 .metadata.generation 為 12,但 .status.conditions[x].observedGeneration 為 9,則該條件相對於執行個體的目前狀態已過時。 | 
| conditions[].reason | |
| string必填 | 長度上限為 1024 個半形字元,長度下限為 1 個半形字元。包含程式化 ID,指出條件上次轉換的原因。特定條件類型的產生者可能會定義這個欄位的預期值和意義,以及這些值是否視為有保障的 API。值應為 CamelCase 字串。 這個欄位不得留空。 | 
| conditions[].status | |
| string必填 | 條件狀態,可以是 True、False 或 Unknown。 | 
| conditions[].type | |
| string必填 | 長度上限:316 個字元 條件類型,格式為 CamelCase 或 foo.example.com/CamelCase。 | 
| criticalIncidents | |
| object必填 | 所有有效重大事件的平面清單。CriticalIncident 包含所有有關持續重大事件的資訊。 | 
| criticalIncidents[].code | |
| string必填 | 這個特定錯誤的錯誤代碼。 錯誤代碼為 DBSE+數字字串,例如「DBSE1012」。 | 
| criticalIncidents[].createTime | |
| string必填 | 這個事件在來源建立時的時間戳記。 | 
| criticalIncidents[].message | |
| string選填 | 發生的事件/錯誤。 | 
| criticalIncidents[].messageTemplateParams | |
| object選填 | 包含產生使用者介面中易讀資料驅動型「訊息」版本所需的鍵/值組合。 | 
| criticalIncidents[].resource | |
| object必填 | 內含回報事件的資料庫服務元件,以及 Kubernetes 資源的相關資訊。 | 
| criticalIncidents[].resource.component | |
| string必填 | 回報事件的資料庫服務子系統內部 ID。 | 
| criticalIncidents[].resource.location | |
| object選填 | Location | 
| 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,表示問題應視為暫時性問題,直到指定時間為止。 | 
| lastBackupTime | |
| string選填 | 最近一次執行備份作業的時間戳記。 | 
| nextBackupTime | |
| string選填 | 下一次排定備份作業的時間戳記。 | 
| observedGeneration | |
| integer選填 | 內部:控制器觀察到的世代。 | 
| phase | |
| string選填 | BackupPlan 的階段。 | 
| reconciled | |
| boolean選填 | 內部:資源是否已由控制器調解。 | 
| recoveryWindow | |
| object選填 | 目前可用的復原時間範圍。 | 
| recoveryWindow.begin | |
| string選填 | 開始時間。 | 
| recoveryWindow.end | |
| string選填 | 結束時間。 |