BackupPlan v1.5.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
backupSourceStrategy: string
dbclusterRef: string
paused: boolean

欄位

類型
必填或選填

 

說明
backupLocation
object
選填
BackupLocation 會指定遠端物件儲存空間位置,用於儲存備份。例如 Cloud Storage bucket 的規格。這是選填欄位。根據預設,備份會儲存在備份磁碟中。
backupLocation.gcsOptions
object
選填
gcsOptions 是 Cloud Storage 依附選項的參照。
backupLocation.gcsOptions.bucket
string
必要
Bucket 為必填欄位 (例如 dbs-dump-bucket)。使用者必須確保在運算子中具備適當的儲存空間 bucket 寫入權限。
backupLocation.gcsOptions.key
string
必填
dump 檔案的物件金鑰。(例如:ods-dump/scottschema.dmp)。
backupLocation.gcsOptions.secretRef
object
選填
SecretRef 是 Secret 的參照,用於儲存 Cloud Storage 存取資訊。
backupLocation.gcsOptions.secretRef.name
string
選填
名稱在命名空間內不得重複,用於參照密鑰資源。
backupLocation.gcsOptions.secretRef.namespace
string
選填
命名空間定義了密鑰名稱不得重複的空間。
backupLocation.s3Options
object
選填
s3Options 是指 Amazon S3 專屬選項的參照。
backupLocation.s3Options.bucket
string
必要
Bucket 是必填欄位 (例如 dbs-dump-bucket)。 使用者必須確保從運算子內對儲存空間 Bucket 具有適當的寫入存取權。
backupLocation.s3Options.caBundle
string
選填
CABundle 是 PEM 編碼 CA 憑證集區,用於驗證 StorageGrid 的伺服器憑證。
backupLocation.s3Options.endpoint
string
選填
端點是 S3 端點。
backupLocation.s3Options.key
string
必要
dump 檔案的物件金鑰。(例如 ods-dump/scottschema.dmp)。
backupLocation.s3Options.secretRef
object
選填
SecretRef 是指 Kubernetes Secret 的參照,用於儲存存取 Amazon S3 儲存貯體的憑證。
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。

服務會在多少天後刪除 Backup。如果指定,在這個 BackupPlan 下建立的 Backup 會在存在時間達到 createTime + backupRetainDays 後自動刪除。有效值為 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
backupSourceStrategy
string
選填

預設值:primary;有效值:primary、standby。

BackupSourceStrategy 定義資料庫執行個體應使用的備份策略。如未指定,則會預設為 primary。
dbclusterRef
string
必要
這個備份方案設定的 DBCluster 名稱。這個欄位為必填欄位,且無法變更。
paused
boolean
選填

預設值為 false。

指出是否暫停依據這項 BackupPlan 建立備份。如果設為 true,服務會暫停排定這個 BackupPlan 的新備份作業。預設值為 false。

狀態結構定義

BackupPlanStatus 定義 BackupPlan 的觀測狀態。

conditions:
- lastTransitionTime: 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[].lastTransitionTime
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 個半形字元。條件類型採用駝峰式大小寫格式,或 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
選填
結束時間。