BackupPlan v1.4.0 自訂資源定義

選取說明文件版本:

規格結構定義

BackupPlanSpec 會定義 BackupPlan 的所需狀態。

backupLocation:
  gcsOptions:
    bucket: string
    key: string
    secretRef:
      name: string
      namespace: string
  s3Options:
    bucket: string
    caBundle: []string
    endpoint: string
    key: string
    region: 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)。 使用者必須確保從運算子內可正確寫入儲存空間值區。
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.s3Options
object
選填
s3Options 是指 Cloud Storage 相關選項。
backupLocation.s3Options.bucket
string
必填
Bucket 為必填欄位 (例如 dbs-dump-bucket)。 使用者必須確保從運算子內可正確寫入儲存空間值區。
backupLocation.s3Options.caBundle
string
選填
CABundle 是 PEM 編碼的 CA 憑證集區,用於驗證 storageGrid 的伺服器憑證。
backupLocation.s3Options.endpoint
string
選填
端點是 S3 端點。
backupLocation.s3Options.key
string
必填
傾印檔案的物件金鑰。例如 ods-dump/scottschema.dmp
backupLocation.s3Options.secretRef
object
選填
SecretRef 是 Kubernetes Secret 的參照,用於儲存存取 Cloud Storage 值區的憑證。
backupLocation.s3Options.secretRef.name
string
選填
名稱在命名空間中不得重複,用於參照密鑰資源。
backupLocation.s3Options.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
選填
位置
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
選填
結束時間。