-
Notifications
You must be signed in to change notification settings - Fork 157
K8SPSMDB-1072: add retention
section to backup tasks
#1928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
type BackupTaskSpecRetentionType string | ||
|
||
const ( | ||
BackupTaskSpecRetentionTypeCount = "count" | ||
) | ||
|
||
type BackupTaskSpecRetention struct { | ||
Count int `json:"count,omitempty"` | ||
// +kubebuilder:validation:Enum={count} | ||
Type string `json:"type,omitempty"` | ||
DeleteFromStorage *bool `json:"deleteFromStorage,omitempty"` | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that we could have a 1-1 mapping from keep
to retention
without using keep at all in our codebase in a similar way we implemented it in PXC. This way, when we will officially deprecate the keep
option, we will not have to change the actual logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/apis/psmdb/v1/psmdb_types.go
Outdated
type BackupTaskSpec struct { | ||
Name string `json:"name"` | ||
Enabled bool `json:"enabled"` | ||
Keep int `json:"keep,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mark keep
as deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit: 4ba045e |
We should also create a pr for adding these new options to our helm chart. |
https://perconadev.atlassian.net/browse/K8SPSMDB-1072
DESCRIPTION
This PR adds the following section to the
.spec.backup.tasks[]
:If both
.keep
and.retention.count
are specified, the second will be used.CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability