Skip to content

Commit

Permalink
Add seperate DeletionPolicy struct for backupConfig (#150)
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <arnob@appscode.com>
  • Loading branch information
ArnobKumarSaha authored Jan 28, 2025
1 parent 20ea92f commit 4fcba88
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 6 deletions.
1 change: 0 additions & 1 deletion apis/addons/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/config/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/core/v1alpha1/backupconfiguration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ type RepositoryInfo struct {

// DeletionPolicy specifies what to do when you delete a Repository CR.
// +optional
DeletionPolicy v1alpha1.DeletionPolicy `json:"deletionPolicy,omitempty"`
DeletionPolicy v1alpha1.BackupConfigDeletionPolicy `json:"deletionPolicy,omitempty"`
}

// BackupHooks specifies the hooks that will be executed before and/or after backup
Expand Down
1 change: 0 additions & 1 deletion apis/core/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions apis/storage/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ const (
DeletionPolicyWipeOut DeletionPolicy = "WipeOut"
)

// +kubebuilder:validation:Enum=Delete;WipeOut;Retain
type BackupConfigDeletionPolicy string

const (
BackupConfigDeletionPolicyDelete BackupConfigDeletionPolicy = "Delete"
BackupConfigDeletionPolicyWipeOut BackupConfigDeletionPolicy = "WipeOut"
BackupConfigDeletionPolicyRetain BackupConfigDeletionPolicy = "Retain"
)

type StorageProvider string

const (
Expand Down
1 change: 0 additions & 1 deletion apis/storage/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crds/core.kubestash.com_backupbatches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12046,6 +12046,7 @@ spec:
enum:
- Delete
- WipeOut
- Retain
type: string
directory:
type: string
Expand Down
1 change: 1 addition & 0 deletions crds/core.kubestash.com_backupblueprints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9358,6 +9358,7 @@ spec:
enum:
- Delete
- WipeOut
- Retain
type: string
directory:
type: string
Expand Down
1 change: 1 addition & 0 deletions crds/core.kubestash.com_backupconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9360,6 +9360,7 @@ spec:
enum:
- Delete
- WipeOut
- Retain
type: string
directory:
type: string
Expand Down

0 comments on commit 4fcba88

Please sign in to comment.