Skip to content

Commit 78b8d8f

Browse files
committed
feat: enhance BackupSpec with RemoteConfig deep copy support
- Add the RemoteConfig struct to BackupSpec with Enabled and StorageName fields. - Update DeepCopy methods to include RemoteConfig and ensure it is deep-copied when present. - Change RestoreSet's DeepCopyInto method to use the DeepCopyInto method for Spec and Status fields for proper copying. - Enhance DeepCopyInto method to handle Apps slice in RestoreSetSpec, ensuring it is properly copied. Signed-off-by: ysicing <[email protected]>
1 parent c382985 commit 78b8d8f

File tree

4 files changed

+88
-16
lines changed

4 files changed

+88
-16
lines changed

client/clientset/versioned/fake/register.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/clientset/versioned/scheme/register.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

qucheng/v1beta1/backup_types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ type BackupSpec struct {
2929
Namespace string `json:"namespace"`
3030
StorageName string `json:"storageName,omitempty"`
3131
Helm *HelmBackup `json:"helm,omitempty"`
32+
33+
// Remote define resticsnapshotdump and dbdump
34+
Remote *RemoteConfig `json:"remote,omitempty"`
3235
}
3336

3437
// BackupStatus defines the observed state of Backup
@@ -61,6 +64,11 @@ type HelmBackup struct {
6164
Content string `json:"content,omitempty"`
6265
}
6366

67+
type RemoteConfig struct {
68+
Enabled bool `json:"enabled,omitempty"`
69+
StorageName string `json:"storageName,omitempty"`
70+
}
71+
6472
//+genclient
6573
//+kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="Backup status such as New/InProgress"
6674
//+kubebuilder:object:root=true

qucheng/v1beta1/zz_generated.deepcopy.go

Lines changed: 66 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)