v1alpha1

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1alpha1 +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/riotkit-org/backup-maker-controller +k8s:defaulter-gen=TypeMeta +groupName=riotkit.org

Index

Constants

View Source
const LabelTrackingId = "riotkit.org/job-tracking-id"

Variables

View Source
var (
	// SchemeBuilder collects functions that add things to a scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme applies all the stored functions to the scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "riotkit.org", Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func AddOwnedObject

func AddOwnedObject(ref *ChildrenReferences, doc *unstructured.Unstructured)

AddOwnedObject is adding object to the list of children references, so the parent object could have a complete list of all its children

func AppendJobIdTo

func AppendJobIdTo(doc *unstructured.Unstructured)

AppendJobIdTo is setting a label that marks a resource with a unique id

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type BackupRefSpec

type BackupRefSpec struct {
	Name string `json:"name"`
}

func (*BackupRefSpec) DeepCopy

func (in *BackupRefSpec) DeepCopy() *BackupRefSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupRefSpec.

func (*BackupRefSpec) DeepCopyInto

func (in *BackupRefSpec) DeepCopyInto(out *BackupRefSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChildReference

type ChildReference struct {
	// API version of the referent.
	APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"`
	// Kind of the referent.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
	Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
	// We cannot use name and UID, because those are unknown, when a resource is using "generateName"
	// Instead we will be using a label and a unique ID
	// TrackingId is the execution id. Every created object is getting its unique id
	TrackingId string `json:"trackingId" protobuf:"bytes,4,opt,name=trackingId"`
}

func (*ChildReference) DeepCopy

func (in *ChildReference) DeepCopy() *ChildReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChildReference.

func (*ChildReference) DeepCopyInto

func (in *ChildReference) DeepCopyInto(out *ChildReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChildReference) GetGVK

func (cr *ChildReference) GetGVK() schema.GroupVersionKind

type ChildrenReferences

type ChildrenReferences []ChildReference

func (ChildrenReferences) DeepCopy

func (in ChildrenReferences) DeepCopy() ChildrenReferences

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChildrenReferences.

func (ChildrenReferences) DeepCopyInto

func (in ChildrenReferences) DeepCopyInto(out *ChildrenReferences)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterBackupProcedureTemplate

type ClusterBackupProcedureTemplate struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ClusterBackupProcedureTemplateSpec   `json:"spec,omitempty"`
	Status ClusterBackupProcedureTemplateStatus `json:"status,omitempty"`
}

ClusterBackupProcedureTemplate is the Schema for the clusterbackupproceduretemplates API

func (*ClusterBackupProcedureTemplate) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterBackupProcedureTemplate.

func (*ClusterBackupProcedureTemplate) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterBackupProcedureTemplate) DeepCopyObject

func (in *ClusterBackupProcedureTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ClusterBackupProcedureTemplate) GetBackupScript

func (cbpt *ClusterBackupProcedureTemplate) GetBackupScript() string

func (*ClusterBackupProcedureTemplate) GetImage

func (cbpt *ClusterBackupProcedureTemplate) GetImage() string

func (*ClusterBackupProcedureTemplate) GetName

func (cbpt *ClusterBackupProcedureTemplate) GetName() string

func (*ClusterBackupProcedureTemplate) GetRestoreScript

func (cbpt *ClusterBackupProcedureTemplate) GetRestoreScript() string

func (*ClusterBackupProcedureTemplate) ProvidesScript

func (cbpt *ClusterBackupProcedureTemplate) ProvidesScript() bool

type ClusterBackupProcedureTemplateList

type ClusterBackupProcedureTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterBackupProcedureTemplate `json:"items"`
}

ClusterBackupProcedureTemplateList contains a list of ClusterBackupProcedureTemplate

func (*ClusterBackupProcedureTemplateList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterBackupProcedureTemplateList.

func (*ClusterBackupProcedureTemplateList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterBackupProcedureTemplateList) DeepCopyObject

func (in *ClusterBackupProcedureTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterBackupProcedureTemplateSpec

type ClusterBackupProcedureTemplateSpec struct {
	Image   string `json:"image"`
	Backup  string `json:"backup"`
	Restore string `json:"restore"`
}

ClusterBackupProcedureTemplateSpec defines the desired state of ClusterBackupProcedureTemplate

func (*ClusterBackupProcedureTemplateSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterBackupProcedureTemplateSpec.

func (*ClusterBackupProcedureTemplateSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterBackupProcedureTemplateStatus

type ClusterBackupProcedureTemplateStatus struct {
}

ClusterBackupProcedureTemplateStatus defines the observed state of ClusterBackupProcedureTemplate

func (*ClusterBackupProcedureTemplateStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterBackupProcedureTemplateStatus.

func (*ClusterBackupProcedureTemplateStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CronJobSpec

type CronJobSpec struct {
	Enabled bool `json:"enabled"`

	// +kubebuilder:default:="00 02 * * *"
	ScheduleEvery string `json:"scheduleEvery,omitempty"`
}

func (*CronJobSpec) DeepCopy

func (in *CronJobSpec) DeepCopy() *CronJobSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobSpec.

func (*CronJobSpec) DeepCopyInto

func (in *CronJobSpec) DeepCopyInto(out *CronJobSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GPGKeySecretSpec

type GPGKeySecretSpec struct {
	SecretName    string `json:"secretName"`
	PublicKey     string `json:"publicKey"`
	PrivateKey    string `json:"privateKey"`
	PassphraseKey string `json:"passphraseKey"`
	Email         string `json:"email"`

	CreateIfNotExists bool `json:"createIfNotExists"`
}

GPGKeySecretSpec represents .spec.gpgKeySecretRef section

func (*GPGKeySecretSpec) DeepCopy

func (in *GPGKeySecretSpec) DeepCopy() *GPGKeySecretSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPGKeySecretSpec.

func (*GPGKeySecretSpec) DeepCopyInto

func (in *GPGKeySecretSpec) DeepCopyInto(out *GPGKeySecretSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GPGKeySecretSpec) GetEmailIndex

func (in *GPGKeySecretSpec) GetEmailIndex() string

func (*GPGKeySecretSpec) GetPassphraseIndex

func (in *GPGKeySecretSpec) GetPassphraseIndex() string

func (*GPGKeySecretSpec) GetPrivateKeyIndex

func (in *GPGKeySecretSpec) GetPrivateKeyIndex() string

func (*GPGKeySecretSpec) GetPublicKeyIndex

func (in *GPGKeySecretSpec) GetPublicKeyIndex() string

type JobHealthStatus

type JobHealthStatus struct {
	ChildReference `json:",inline"`
	Message        string `json:"message"`
	Succeeded      bool   `json:"succeeded"`
	Running        bool   `json:"running"`
	Failed         bool   `json:"failed"`
}

func (*JobHealthStatus) DeepCopy

func (in *JobHealthStatus) DeepCopy() *JobHealthStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobHealthStatus.

func (*JobHealthStatus) DeepCopyInto

func (in *JobHealthStatus) DeepCopyInto(out *JobHealthStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RequestedBackupAction

type RequestedBackupAction struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RequestedBackupActionSpec   `json:"spec,omitempty"`
	Status RequestedBackupActionStatus `json:"status,omitempty"`
}

RequestedBackupAction is the Schema for the requestedbackupactions API

func (*RequestedBackupAction) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestedBackupAction.

func (*RequestedBackupAction) DeepCopyInto

func (in *RequestedBackupAction) DeepCopyInto(out *RequestedBackupAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RequestedBackupAction) DeepCopyObject

func (in *RequestedBackupAction) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*RequestedBackupAction) GetObjectMeta

func (r *RequestedBackupAction) GetObjectMeta() *metav1.ObjectMeta

func (*RequestedBackupAction) GetTypeMeta

func (r *RequestedBackupAction) GetTypeMeta() *metav1.TypeMeta

type RequestedBackupActionList

type RequestedBackupActionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RequestedBackupAction `json:"items"`
}

RequestedBackupActionList contains a list of RequestedBackupAction

func (*RequestedBackupActionList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestedBackupActionList.

func (*RequestedBackupActionList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RequestedBackupActionList) DeepCopyObject

func (in *RequestedBackupActionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RequestedBackupActionSpec

type RequestedBackupActionSpec struct {
	// +kubebuilder:validation:Enum=backup;restore
	Action             string        `json:"action"`
	TargetVersion      string        `json:"targetVersion,omitempty"` // can be empty, when action = "backup"
	ScheduledBackupRef BackupRefSpec `json:"scheduledBackupRef"`

	// +kubebuilder:default:=Job
	KindType string `json:"kindType"`
}

RequestedBackupActionSpec defines the desired state of RequestedBackupAction

func (*RequestedBackupActionSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestedBackupActionSpec.

func (*RequestedBackupActionSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RequestedBackupActionStatus

type RequestedBackupActionStatus struct {
	Processed               bool               `json:"processed"`
	Conditions              []metav1.Condition `json:"conditions,omitempty"`
	OwnedReferences         ChildrenReferences `json:"ownedReferences,omitempty"`
	ChildrenResourcesHealth []JobHealthStatus  `json:"childrenResourcesHealth,omitempty"`
	Healthy                 bool               `json:"healthy,omitempty"`
}

RequestedBackupActionStatus defines the observed state of RequestedBackupAction

func (*RequestedBackupActionStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestedBackupActionStatus.

func (*RequestedBackupActionStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScheduledBackup

type ScheduledBackup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ScheduledBackupSpec   `json:"spec,omitempty"`
	Status ScheduledBackupStatus `json:"status,omitempty"`
}

ScheduledBackup is the Schema for the scheduledbackups API

func (*ScheduledBackup) DeepCopy

func (in *ScheduledBackup) DeepCopy() *ScheduledBackup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledBackup.

func (*ScheduledBackup) DeepCopyInto

func (in *ScheduledBackup) DeepCopyInto(out *ScheduledBackup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ScheduledBackup) DeepCopyObject

func (in *ScheduledBackup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ScheduledBackup) GetObjectMeta

func (in *ScheduledBackup) GetObjectMeta() *metav1.ObjectMeta

func (*ScheduledBackup) GetTypeMeta

func (in *ScheduledBackup) GetTypeMeta() *metav1.TypeMeta

func (*ScheduledBackup) HasSpecChanged

func (in *ScheduledBackup) HasSpecChanged() bool

HasSpecChanged is telling if the current object's spec differs from the already applied object, basing on the status field

func (*ScheduledBackup) IsBeingReconciledAlready

func (in *ScheduledBackup) IsBeingReconciledAlready() bool

type ScheduledBackupList

type ScheduledBackupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ScheduledBackup `json:"items"`
}

ScheduledBackupList contains a list of ScheduledBackup

func (*ScheduledBackupList) DeepCopy

func (in *ScheduledBackupList) DeepCopy() *ScheduledBackupList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledBackupList.

func (*ScheduledBackupList) DeepCopyInto

func (in *ScheduledBackupList) DeepCopyInto(out *ScheduledBackupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ScheduledBackupList) DeepCopyObject

func (in *ScheduledBackupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ScheduledBackupSpec

type ScheduledBackupSpec struct {
	CollectionId    string           `json:"collectionId"`
	TemplateRef     TemplateSpec     `json:"templateRef"`
	GPGKeySecretRef GPGKeySecretSpec `json:"gpgKeySecretRef"`
	TokenSecretRef  TokenSecretSpec  `json:"tokenSecretRef"`
	VarsSecretRef   VarsSecretSpec   `json:"varsSecretRef"`
	Vars            VarsSpec         `json:"vars"`
	CronJob         CronJobSpec      `json:"cronJob"`

	// +kubebuilder:validation:Enum=backup;restore
	Operation string `json:"operation"`
}

ScheduledBackupSpec defines the desired state of ScheduledBackup

func (*ScheduledBackupSpec) CalculateHash

func (in *ScheduledBackupSpec) CalculateHash() string

func (*ScheduledBackupSpec) DeepCopy

func (in *ScheduledBackupSpec) DeepCopy() *ScheduledBackupSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledBackupSpec.

func (*ScheduledBackupSpec) DeepCopyInto

func (in *ScheduledBackupSpec) DeepCopyInto(out *ScheduledBackupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScheduledBackupStatus

type ScheduledBackupStatus struct {
	LastAppliedSpecHash     string             `json:"lastAppliedSpecHash,omitempty"`
	Conditions              []metav1.Condition `json:"conditions,omitempty"`
	OwnedReferences         ChildrenReferences `json:"ownedReferences,omitempty"`
	ChildrenResourcesHealth []JobHealthStatus  `json:"childrenResourcesHealth,omitempty"`
	Healthy                 bool               `json:"healthy,omitempty"`
}

ScheduledBackupStatus defines the observed state of ScheduledBackup

func (*ScheduledBackupStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledBackupStatus.

func (*ScheduledBackupStatus) DeepCopyInto

func (in *ScheduledBackupStatus) DeepCopyInto(out *ScheduledBackupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateSpec

type TemplateSpec struct {
	Name string `json:"name"`
	Kind string `json:"kind"`
}

TemplateSpec represents .spec.templateRef section

func (*TemplateSpec) DeepCopy

func (in *TemplateSpec) DeepCopy() *TemplateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSpec.

func (*TemplateSpec) DeepCopyInto

func (in *TemplateSpec) DeepCopyInto(out *TemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TokenSecretSpec

type TokenSecretSpec struct {
	SecretName string `json:"secretName"`
	TokenKey   string `json:"tokenKey"`
}

TokenSecretSpec represents .spec.tokenSecretRef

func (*TokenSecretSpec) DeepCopy

func (in *TokenSecretSpec) DeepCopy() *TokenSecretSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenSecretSpec.

func (*TokenSecretSpec) DeepCopyInto

func (in *TokenSecretSpec) DeepCopyInto(out *TokenSecretSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VarsSecretSpec

type VarsSecretSpec struct {
	SecretName     string   `json:"secretName,omitempty"`
	ImportOnlyKeys []string `json:"importOnlyKeys,omitempty"`
}

VarsSecretSpec represents .spec.varsSecretRef

func (*VarsSecretSpec) DeepCopy

func (in *VarsSecretSpec) DeepCopy() *VarsSecretSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VarsSecretSpec.

func (*VarsSecretSpec) DeepCopyInto

func (in *VarsSecretSpec) DeepCopyInto(out *VarsSecretSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VarsSpec

type VarsSpec string

VarsSpec represents .spec.vars - a hashmap of values applied to template's backup & restore scripts

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL