You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// BackupCronJobSpec defines the desired state of BackupCronJob
type BackupCronJobSpec struct {
// Important: Run "make" to regenerate code after modifying this file
// InstanceName is the backup target instance name, usually a
// resource object name
// +kubebuilder:validation:MinLength=1
InstanceName string `json:"instanceName"`
// InstanceKind is the backup target kind, i.e., 'StatefulSet' or
// custom resource kind
// +kubebuilder:validation:MinLength=1
InstanceKind string `json:"instanceKind"`
// InstanceAPIGroup is the backup target API group, i.e., 'apps' for
// StatefulSet or custom resource API group
// +optional
InstanceAPIGroup string `json:"instanceAPIGroup,omitempty"`
// InstanceAPIVersion is the backup target API version, i.e., 'apps/v1'
// would be 'v1'
// +kubebuilder:validation:MinLength=1
InstanceAPIVersion string `json:"instanceAPIVersion"`
// Schedule is a Cron expression defining when to run
// the Backup
// +kubebuilder:validation:Pattern=`(@(annually|yearly|monthly|weekly|daily|hourly))|(@every (\d+(m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5})`
Schedule string `json:"schedule"`
// TTL is a time.Duration-parseable string describing how long
// the Backup should be retained for, i.e., 1d0h, minimum TTL is 1h.
// +kubebuilder:validation:Pattern=`(?:\s*\d+\s*[YyMmDdHh])+`
TTL string `json:"ttl"`
// Repos is backup storage repo name
// +optional
// +kubebuilder:validation:Optional
Repo string `json:"repo,omitempty"`
// Hooks represent custom behaviors that should be executed at different phases of the backup.
// +optional
Hooks velerov1.BackupHooks `json:"hooks,omitempty"`
}
// SchedulePhase is a string representation of the lifecycle phase
// of an OPCC backupcronjob
// +kubebuilder:validation:Enum=New;Enabled;FailedValidation
type SchedulePhase string
const (
// SchedulePhaseNew means the schedule has been created but not
// yet processed by the ScheduleController
SchedulePhaseNew SchedulePhase = "New"
// SchedulePhaseEnabled means the schedule has been validated and
// will now be triggering backups according to the schedule spec.
SchedulePhaseEnabled SchedulePhase = "Enabled"
// SchedulePhaseFailedValidation means the schedule has failed
// the controller's validations and therefore will not trigger backups.
SchedulePhaseFailedValidation SchedulePhase = "FailedValidation"
)
The text was updated successfully, but these errors were encountered:
https://book.kubebuilder.io/reference/markers/crd-validation.html
Example:
The text was updated successfully, but these errors were encountered: