Skip to content
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

*: add conversion logic #764

Merged
merged 9 commits into from
Apr 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
*: add nfs backup support
zhl003 committed Apr 18, 2023

Verified

This commit was signed with the committer’s verified signature.
mvdbeek Marius van den Beek
commit af31e3f67a2b01a530af78fe576316c7606b94ab
6 changes: 0 additions & 6 deletions api/v1beta1/backup_types.go
Original file line number Diff line number Diff line change
@@ -26,15 +26,11 @@ import (

// BackupSpec defines the desired state of Backup
type BackupSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
// ClusterName is the name of the cluster to be backed up.
ClusterName string `json:"clusterName,omitempty"`
// BackupMethod represents the type of backup
// +kubebuilder:default:="xtrabackup"
BackupMethod string `json:"method,omitempty"`
zhl003 marked this conversation as resolved.
Show resolved Hide resolved
// Defines details for manual backup Jobs
// +optional
@@ -80,12 +76,10 @@ type BackupSchedule struct {
CronExpression string `json:"cronExpression,omitempty"`
// Backup Retention
// +optional
// +kubebuilder:default:=7
BackupRetention *int32 `json:"backupRetention,omitempty"`
BackupType string `json:"type,omitempty"`
// History Limit of job
// +optional
// +kubebuilder:default:=3
BackupJobHistoryLimit *int32 `json:"jobhistoryLimit,omitempty"`
}

4 changes: 2 additions & 2 deletions controllers/backup/utils.go
Original file line number Diff line number Diff line change
@@ -12,15 +12,15 @@ import (
"k8s.io/apimachinery/pkg/util/rand"
)

// Defile the label of backup.
// Define the label of backup.
const (
labelPrefix = "backups.mysql.radondb.com/"
LabelCluster = labelPrefix + "cluster"
LableCronJob = labelPrefix + "cronjob"
LableManualJob = labelPrefix + "manualjob"
)

// Defile the annotation of backup.
// Define the annotation of backup.
const (
AnnotationPrefix = "backups.mysql.radondb.com/"
)