Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the k8s v1 API group +kubebuilder:object:generate=true +groupName=k8s.cloudogu.com
Index ¶
- Constants
- Variables
- type Backup
- type BackupList
- type BackupSchedule
- func (bs *BackupSchedule) CronJobName() string
- func (bs *BackupSchedule) CronJobPodTemplate(image string) corev1.PodTemplateSpec
- func (in *BackupSchedule) DeepCopy() *BackupSchedule
- func (in *BackupSchedule) DeepCopyInto(out *BackupSchedule)
- func (in *BackupSchedule) DeepCopyObject() runtime.Object
- func (bs *BackupSchedule) GetStatus() RequeueableStatus
- type BackupScheduleList
- type BackupScheduleSpec
- type BackupScheduleStatus
- type BackupSpec
- type BackupStatus
- type Provider
- type RequeuableObject
- type RequeueableStatus
- type Restore
- type RestoreList
- type RestoreSpec
- type RestoreStatus
Constants ¶
const ( BackupStatusNew = "" BackupStatusInProgress = "in progress" BackupStatusCompleted = "completed" BackupStatusDeleting = "deleting" BackupStatusFailed = "failed" )
const ( CreateEventReason = "Creation" DeleteEventReason = "Delete" UpdateEventReason = "Update" SyncStatusEventReason = "SyncStatus" ErrorOnCreateEventReason = "ErrCreation" )
const ( ProviderSelectEventReason = "Provider selection" ProviderDeleteEventReason = "Provider delete" ErrorOnProviderDeleteEventReason = "Error provider delete" )
const ( BackupScheduleStatusNew = "" BackupScheduleStatusFailed = "failed" BackupScheduleStatusDeleting = "deleting" BackupScheduleStatusUpdating = "updating" BackupScheduleStatusCreating = "creating" BackupScheduleStatusCreated = "created" )
const ( RestoreStatusNew = "" RestoreStatusInProgress = "in progress" RestoreStatusFailed = "failed" RestoreStatusCompleted = "completed" RestoreStatusDeleting = "deleting" )
const BackupFinalizer = "cloudogu-backup-finalizer"
const BackupScheduleFinalizer = "cloudogu-backup-schedule-finalizer"
const ProviderEnvVar = "PROVIDER"
const (
ProviderVelero = "velero"
)
const RestoreFinalizer = "cloudogu-restore-finalizer"
Variables ¶
var ( // GroupVersion is the group version used to register these objects GroupVersion = schema.GroupVersion{Group: "k8s.cloudogu.com", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Backup ¶
type Backup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of Backup Spec BackupSpec `json:"spec,omitempty"` // Status defines the observed state of Backup Status BackupStatus `json:"status,omitempty"` }
Backup is the Schema for the backups API
func (*Backup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backup.
func (*Backup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Backup) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Backup) GetFieldSelectorWithName ¶ added in v0.3.0
GetFieldSelectorWithName returns the field selector with the metadata.name property.
func (*Backup) GetStatus ¶ added in v0.4.0
func (b *Backup) GetStatus() RequeueableStatus
GetStatus return the requeueable status.
type BackupList ¶
type BackupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Backup `json:"items"` }
BackupList contains a list of Backup
func (*BackupList) DeepCopy ¶
func (in *BackupList) DeepCopy() *BackupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupList.
func (*BackupList) DeepCopyInto ¶
func (in *BackupList) DeepCopyInto(out *BackupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupList) DeepCopyObject ¶
func (in *BackupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupSchedule ¶ added in v0.5.0
type BackupSchedule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BackupScheduleSpec `json:"spec,omitempty"` Status BackupScheduleStatus `json:"status,omitempty"` }
BackupSchedule is the Schema for the backupschedules API
func (*BackupSchedule) CronJobName ¶ added in v0.5.0
func (bs *BackupSchedule) CronJobName() string
func (*BackupSchedule) CronJobPodTemplate ¶ added in v0.5.0
func (bs *BackupSchedule) CronJobPodTemplate(image string) corev1.PodTemplateSpec
func (*BackupSchedule) DeepCopy ¶ added in v0.5.0
func (in *BackupSchedule) DeepCopy() *BackupSchedule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSchedule.
func (*BackupSchedule) DeepCopyInto ¶ added in v0.5.0
func (in *BackupSchedule) DeepCopyInto(out *BackupSchedule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupSchedule) DeepCopyObject ¶ added in v0.5.0
func (in *BackupSchedule) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*BackupSchedule) GetStatus ¶ added in v0.5.0
func (bs *BackupSchedule) GetStatus() RequeueableStatus
GetStatus return the requeueable status.
type BackupScheduleList ¶ added in v0.5.0
type BackupScheduleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []BackupSchedule `json:"items"` }
BackupScheduleList contains a list of BackupSchedule
func (*BackupScheduleList) DeepCopy ¶ added in v0.5.0
func (in *BackupScheduleList) DeepCopy() *BackupScheduleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupScheduleList.
func (*BackupScheduleList) DeepCopyInto ¶ added in v0.5.0
func (in *BackupScheduleList) DeepCopyInto(out *BackupScheduleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupScheduleList) DeepCopyObject ¶ added in v0.5.0
func (in *BackupScheduleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupScheduleSpec ¶ added in v0.5.0
type BackupScheduleSpec struct { // Schedule is a cron expression defining when to run the backup. Schedule string `json:"schedule,omitempty"` // Provider defines the backup provider which should be used for the scheduled backups. Provider Provider `json:"provider,omitempty"` }
BackupScheduleSpec defines the desired state of BackupSchedule
func (*BackupScheduleSpec) DeepCopy ¶ added in v0.5.0
func (in *BackupScheduleSpec) DeepCopy() *BackupScheduleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupScheduleSpec.
func (*BackupScheduleSpec) DeepCopyInto ¶ added in v0.5.0
func (in *BackupScheduleSpec) DeepCopyInto(out *BackupScheduleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupScheduleStatus ¶ added in v0.5.0
type BackupScheduleStatus struct { // Status represents the state of the backup. Status string `json:"status,omitempty"` // RequeueTimeNanos contains the time in nanoseconds to wait until the next requeue. RequeueTimeNanos time.Duration `json:"requeueTimeNanos,omitempty"` // CurrentCronJobImage is the image currently used to create scheduled backups. CurrentCronJobImage string `json:"currentCronJobImage,omitempty"` }
BackupScheduleStatus defines the observed state of BackupSchedule +kubebuilder:object:generate=false
func (BackupScheduleStatus) GetRequeueTimeNanos ¶ added in v0.5.0
func (bss BackupScheduleStatus) GetRequeueTimeNanos() time.Duration
GetRequeueTimeNanos returns the requeue time in nano seconds.
func (BackupScheduleStatus) GetStatus ¶ added in v0.5.0
func (bss BackupScheduleStatus) GetStatus() string
GetStatus return the status from the object.
type BackupSpec ¶
type BackupSpec struct { // Provider defines the backup provider which should be used for the backup. Provider Provider `json:"provider,omitempty"` // SyncedFromProvider defines that this backup already exists in the provider and its status should be synced. // This is necessary because we cannot set the status of a backup on creation, see: // https://stackoverflow.com/questions/73574615/how-to-create-kubernetes-objects-with-status-fields SyncedFromProvider bool `json:"syncedFromProvider,omitempty"` }
BackupSpec defines the desired state of Backup
func (*BackupSpec) DeepCopy ¶
func (in *BackupSpec) DeepCopy() *BackupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSpec.
func (*BackupSpec) DeepCopyInto ¶
func (in *BackupSpec) DeepCopyInto(out *BackupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStatus ¶
type BackupStatus struct { // Status represents the state of the backup. Status string `json:"status,omitempty"` // RequeueTimeNanos contains the time in nanoseconds to wait until the next requeue. RequeueTimeNanos time.Duration `json:"requeueTimeNanos,omitempty"` // StartTimestamp marks the date/time when the backup started being processed. StartTimestamp metav1.Time `json:"startTimestamp,omitempty"` // CompletionTimestamp marks the date/time when the backup finished being processed, regardless of any errors. CompletionTimestamp metav1.Time `json:"completionTimestamp,omitempty"` }
BackupStatus defines the observed state of Backup
func (*BackupStatus) DeepCopy ¶
func (in *BackupStatus) DeepCopy() *BackupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStatus.
func (*BackupStatus) DeepCopyInto ¶
func (in *BackupStatus) DeepCopyInto(out *BackupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (BackupStatus) GetRequeueTimeNanos ¶ added in v0.4.0
func (bs BackupStatus) GetRequeueTimeNanos() time.Duration
GetRequeueTimeNanos returns the requeue time in nano seconds.
func (BackupStatus) GetStatus ¶ added in v0.4.0
func (bs BackupStatus) GetStatus() string
GetStatus return the status from the status object.
type RequeuableObject ¶ added in v0.4.0
type RequeuableObject interface { runtime.Object // GetStatus returns the status from the object. GetStatus() RequeueableStatus // GetName returns the name from the object. GetName() string }
RequeuableObject provides provides functionalities used for an abstract requeueHandler +kubebuilder:object:generate=false
type RequeueableStatus ¶ added in v0.4.0
type RequeueableStatus interface { // GetRequeueTimeNanos returns the requeue time in nano seconds. GetRequeueTimeNanos() time.Duration // GetStatus return the status from the object. GetStatus() string }
RequeueableStatus provides functionalities used for an abstract requeueHandler +kubebuilder:object:generate=false
type Restore ¶
type Restore struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of Restore Spec RestoreSpec `json:"spec,omitempty"` // Status defines the observed state of Restore Status RestoreStatus `json:"status,omitempty"` }
Restore is the Schema for the restores API
func (*Restore) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Restore.
func (*Restore) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Restore) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Restore) GetFieldSelectorWithName ¶ added in v0.4.0
GetFieldSelectorWithName return the field selector with the metadata.name field.
func (*Restore) GetStatus ¶ added in v0.4.0
func (r *Restore) GetStatus() RequeueableStatus
GetStatus return the requeueable status.
type RestoreList ¶
type RestoreList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Restore `json:"items"` }
RestoreList contains a list of Restore
func (*RestoreList) DeepCopy ¶
func (in *RestoreList) DeepCopy() *RestoreList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreList.
func (*RestoreList) DeepCopyInto ¶
func (in *RestoreList) DeepCopyInto(out *RestoreList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RestoreList) DeepCopyObject ¶
func (in *RestoreList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RestoreSpec ¶
type RestoreSpec struct { // BackupName references the backup that should be restored. BackupName string `json:"backupName,omitempty"` // Provider defines the backup provider which should be used for the restore. Provider Provider `json:"provider,omitempty"` }
RestoreSpec defines the desired state of Restore
func (*RestoreSpec) DeepCopy ¶
func (in *RestoreSpec) DeepCopy() *RestoreSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreSpec.
func (*RestoreSpec) DeepCopyInto ¶
func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestoreStatus ¶
type RestoreStatus struct { // Status represents the state of the backup. Status string `json:"status,omitempty"` // RequeueTimeNanos contains the time in nanoseconds to wait until the next requeue. RequeueTimeNanos time.Duration `json:"requeueTimeNanos,omitempty"` }
RestoreStatus defines the observed state of Restore +kubebuilder:object:generate=false
func (RestoreStatus) GetRequeueTimeNanos ¶ added in v0.4.0
func (rs RestoreStatus) GetRequeueTimeNanos() time.Duration
GetRequeueTimeNanos returns the requeue time in nano seconds.
func (RestoreStatus) GetStatus ¶ added in v0.4.0
func (rs RestoreStatus) GetStatus() string
GetStatus return the status from the status object.