Keep backups strategy

This commit is contained in:
Jean-Marc ANDRE 2020-12-13 20:54:16 +01:00
parent a9f29e851b
commit ad76d70933
2 changed files with 20 additions and 5 deletions

View File

@ -36,11 +36,11 @@ type Target struct {
} }
type Keep struct { type Keep struct {
Last int32 `json:"last,omitempty"` Last int32 `json:"last,omitempty"`
Daily int32 `json:"daily,omitempty"` Daily int32 `json:"daily,omitempty"`
Weekly int32 `json:"weekly,omitempty"` Weekly int32 `json:"weekly,omitempty"`
Monthly int32 `json:"monthly,omitempty"` Monthly int32 `json:"monthly,omitempty"`
Yearly int32 `json:"yearly,omitempty"` Yearly int32 `json:"yearly,omitempty"`
} }
// BackupConfigurationSpec defines the desired state of BackupConfiguration // BackupConfigurationSpec defines the desired state of BackupConfiguration
@ -68,7 +68,6 @@ type BackupConfigurationStatus struct {
Suspended bool `json:"suspended"` Suspended bool `json:"suspended"`
ActiveCronJob bool `json:"activeCronJob"` ActiveCronJob bool `json:"activeCronJob"`
ActiveSidecar bool `json:"activeSidecar"` ActiveSidecar bool `json:"activeSidecar"`
NumberOfBackup int32 `json:"numberOfBackup"`
} }
// BackupConfiguration is the Schema for the backupconfigurations API // BackupConfiguration is the Schema for the backupconfigurations API

View File

@ -118,6 +118,7 @@ func (in *BackupConfigurationSpec) DeepCopyInto(out *BackupConfigurationSpec) {
*out = make([]string, len(*in)) *out = make([]string, len(*in))
copy(*out, *in) copy(*out, *in)
} }
out.Keep = in.Keep
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupConfigurationSpec. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupConfigurationSpec.
@ -306,6 +307,21 @@ func (in *FunctionList) DeepCopyObject() runtime.Object {
return nil return nil
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Keep) DeepCopyInto(out *Keep) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Keep.
func (in *Keep) DeepCopy() *Keep {
if in == nil {
return nil
}
out := new(Keep)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Param) DeepCopyInto(out *Param) { func (in *Param) DeepCopyInto(out *Param) {
*out = *in *out = *in