From a30f330bde3b674480a6dcd5e489b9ecddd14519 Mon Sep 17 00:00:00 2001 From: Anisur Rahman Date: Tue, 17 Dec 2024 12:41:22 +0600 Subject: [PATCH] Add WAl backup failed and success history limit field Signed-off-by: Anisur Rahman --- apis/archiver/v1alpha1/openapi_generated.go | 14 ++++++++++++++ apis/archiver/v1alpha1/types.go | 13 +++++++++++++ crds/archiver.kubedb.com_mariadbarchivers.yaml | 8 ++++++++ crds/archiver.kubedb.com_mongodbarchivers.yaml | 8 ++++++++ crds/archiver.kubedb.com_mssqlserverarchivers.yaml | 8 ++++++++ crds/archiver.kubedb.com_mysqlarchivers.yaml | 8 ++++++++ crds/archiver.kubedb.com_postgresarchivers.yaml | 8 ++++++++ 7 files changed, 67 insertions(+) diff --git a/apis/archiver/v1alpha1/openapi_generated.go b/apis/archiver/v1alpha1/openapi_generated.go index cebeb304d9..a44d96bf49 100644 --- a/apis/archiver/v1alpha1/openapi_generated.go +++ b/apis/archiver/v1alpha1/openapi_generated.go @@ -26654,6 +26654,20 @@ func schema_apimachinery_apis_archiver_v1alpha1_WalBackupOptions(ref common.Refe Ref: ref("kubedb.dev/apimachinery/apis/archiver/v1alpha1.GenericSecretReference"), }, }, + "successfulWalHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "SuccessfulWalHistoryLimit defines the number of successful backup WALs that the incremental snapshot will retain for debugging purposes. The default value is 5.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "FailedWalHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "FailedWalHistoryLimit defines the number of failed backup WALs that the incremental snapshot will retain for debugging purposes. The default value is 5.", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, }, }, diff --git a/apis/archiver/v1alpha1/types.go b/apis/archiver/v1alpha1/types.go index e3fc1df90d..fdb38b9a95 100644 --- a/apis/archiver/v1alpha1/types.go +++ b/apis/archiver/v1alpha1/types.go @@ -74,8 +74,21 @@ type ManifestBackupOptions struct { type WalBackupOptions struct { // +optional RuntimeSettings *ofst.RuntimeSettings `json:"runtimeSettings,omitempty"` + // +optional ConfigSecret *GenericSecretReference `json:"configSecret,omitempty"` + + // SuccessfulWalHistoryLimit defines the number of successful backup WALs that the incremental snapshot will retain for debugging purposes. + // The default value is 5. + // +kubebuilder:default=5 + // +optional + SuccessfulWalHistoryLimit int32 `json:"successfulWalHistoryLimit,omitempty"` + + // FailedWalHistoryLimit defines the number of failed backup WALs that the incremental snapshot will retain for debugging purposes. + // The default value is 5. + // +kubebuilder:default=5 + // +optional + FailedWalHistoryLimit int32 `json:"FailedWalHistoryLimit,omitempty"` } type Task struct { diff --git a/crds/archiver.kubedb.com_mariadbarchivers.yaml b/crds/archiver.kubedb.com_mariadbarchivers.yaml index b26a7a2f65..7acc943633 100644 --- a/crds/archiver.kubedb.com_mariadbarchivers.yaml +++ b/crds/archiver.kubedb.com_mariadbarchivers.yaml @@ -11786,6 +11786,10 @@ spec: type: object walBackup: properties: + FailedWalHistoryLimit: + default: 5 + format: int32 + type: integer configSecret: properties: envToSecretKey: @@ -12938,6 +12942,10 @@ spec: x-kubernetes-list-type: map type: object type: object + successfulWalHistoryLimit: + default: 5 + format: int32 + type: integer type: object required: - databases diff --git a/crds/archiver.kubedb.com_mongodbarchivers.yaml b/crds/archiver.kubedb.com_mongodbarchivers.yaml index cc7de90f6c..8148df73d5 100644 --- a/crds/archiver.kubedb.com_mongodbarchivers.yaml +++ b/crds/archiver.kubedb.com_mongodbarchivers.yaml @@ -11786,6 +11786,10 @@ spec: type: object walBackup: properties: + FailedWalHistoryLimit: + default: 5 + format: int32 + type: integer configSecret: properties: envToSecretKey: @@ -12938,6 +12942,10 @@ spec: x-kubernetes-list-type: map type: object type: object + successfulWalHistoryLimit: + default: 5 + format: int32 + type: integer type: object required: - databases diff --git a/crds/archiver.kubedb.com_mssqlserverarchivers.yaml b/crds/archiver.kubedb.com_mssqlserverarchivers.yaml index c13cdee89e..76bdcc4527 100644 --- a/crds/archiver.kubedb.com_mssqlserverarchivers.yaml +++ b/crds/archiver.kubedb.com_mssqlserverarchivers.yaml @@ -11786,6 +11786,10 @@ spec: type: object walBackup: properties: + FailedWalHistoryLimit: + default: 5 + format: int32 + type: integer configSecret: properties: envToSecretKey: @@ -12938,6 +12942,10 @@ spec: x-kubernetes-list-type: map type: object type: object + successfulWalHistoryLimit: + default: 5 + format: int32 + type: integer type: object required: - databases diff --git a/crds/archiver.kubedb.com_mysqlarchivers.yaml b/crds/archiver.kubedb.com_mysqlarchivers.yaml index e623fa0e4e..708edea653 100644 --- a/crds/archiver.kubedb.com_mysqlarchivers.yaml +++ b/crds/archiver.kubedb.com_mysqlarchivers.yaml @@ -11786,6 +11786,10 @@ spec: type: object walBackup: properties: + FailedWalHistoryLimit: + default: 5 + format: int32 + type: integer configSecret: properties: envToSecretKey: @@ -12938,6 +12942,10 @@ spec: x-kubernetes-list-type: map type: object type: object + successfulWalHistoryLimit: + default: 5 + format: int32 + type: integer type: object required: - databases diff --git a/crds/archiver.kubedb.com_postgresarchivers.yaml b/crds/archiver.kubedb.com_postgresarchivers.yaml index ad148a054b..f0171f1fba 100644 --- a/crds/archiver.kubedb.com_postgresarchivers.yaml +++ b/crds/archiver.kubedb.com_postgresarchivers.yaml @@ -11786,6 +11786,10 @@ spec: type: object walBackup: properties: + FailedWalHistoryLimit: + default: 5 + format: int32 + type: integer configSecret: properties: envToSecretKey: @@ -12938,6 +12942,10 @@ spec: x-kubernetes-list-type: map type: object type: object + successfulWalHistoryLimit: + default: 5 + format: int32 + type: integer type: object required: - databases