Documentation ¶
Overview ¶
+groupName=addons.kubestash.com
Package v1alpha1 contains API Schema definitions for the addons v1alpha1 API group +kubebuilder:object:generate=true +groupName=addons.kubestash.com
Index ¶
Constants ¶
const ( ResourceKindAddon = "Addon" ResourceSingularAddon = "addon" ResourcePluralAddon = "addons" )
const ( ResourceKindFunction = "Function" ResourcePluralFunction = "functions" ResourceSingularFunction = "function" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "addons.kubestash.com", Version: "v1alpha1"} // 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 Addon ¶
type Addon struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AddonSpec `json:"spec,omitempty"` }
Addon specifies the backup and restore capabilities for a particular resource. For example, MySQL addon specifies the backup and restore capabilities of MySQL database where Postgres addon specifies backup and restore capabilities for PostgreSQL database. An Addon CR defines the backup and restore tasks that can be performed by this addon.
func (Addon) CustomResourceDefinition ¶
func (_ Addon) CustomResourceDefinition() *apiextensions.CustomResourceDefinition
func (*Addon) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Addon.
func (*Addon) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Addon) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AddonList ¶
type AddonList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Addon `json:"items"` }
AddonList contains a list of Addon
func (*AddonList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddonList.
func (*AddonList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AddonList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AddonSpec ¶
type AddonSpec struct { // BackupTasks specifies a list of backup tasks that can be performed by the addon. BackupTasks []Task `json:"backupTasks,omitempty"` // RestoreTasks specifies a list of restore tasks that can be performed by the addon. RestoreTasks []Task `json:"restoreTasks,omitempty"` }
AddonSpec defines the specification for backup and restore tasks.
func (*AddonSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddonSpec.
func (*AddonSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Function ¶
type Function struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FunctionSpec `json:"spec,omitempty"` }
Function is the Schema for the functions API
func (Function) CustomResourceDefinition ¶
func (_ Function) CustomResourceDefinition() *apiextensions.CustomResourceDefinition
func (*Function) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Function.
func (*Function) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Function) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FunctionList ¶
type FunctionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Function `json:"items"` }
FunctionList contains a list of Function
func (*FunctionList) DeepCopy ¶
func (in *FunctionList) DeepCopy() *FunctionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionList.
func (*FunctionList) DeepCopyInto ¶
func (in *FunctionList) DeepCopyInto(out *FunctionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FunctionList) DeepCopyObject ¶
func (in *FunctionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FunctionSpec ¶
type FunctionSpec struct { // Image specifies the docker image name. // More info: https://kubernetes.io/docs/concepts/containers/images // This field is optional to allow higher level config management to default or override // container images in workload controllers like Deployments and StatefulSets. // +optional Image string `json:"image,omitempty"` // Entrypoint array. Not executed within a shell. // The docker image's ENTRYPOINT is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, // regardless of whether the variable exists or not. // Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional Command []string `json:"command,omitempty"` // Args specifies the arguments to the entrypoint. // The docker image's CMD is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, // regardless of whether the variable exists or not. // Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional Args []string `json:"args,omitempty"` // WorkDir specifies the container's working directory. // If not specified, the container runtime's default will be used, which // might be configured in the container image. // Cannot be updated. // +optional WorkingDir string `json:"workingDir,omitempty"` // Ports specifies the list of ports to expose from the container. Exposing a port here gives // the system additional information about the network connections a // container uses, but is primarily informational. Not specifying a port here // DOES NOT prevent that port from being exposed. Any port which is // listening on the default "0.0.0.0" address inside a container will be // accessible from the network. // Cannot be updated. // +optional // +patchMergeKey=containerPort // +patchStrategy=merge Ports []core.ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort"` // VolumeMounts specifies the Pod volumes to mount into the container's filesystem. // Cannot be updated. // +optional // +patchMergeKey=mountPath // +patchStrategy=merge VolumeMounts []core.VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath"` // VolumeDevices is the list of block devices to be used by the container. // This is an alpha feature and may change in the future. // +patchMergeKey=devicePath // +patchStrategy=merge // +optional VolumeDevices []core.VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath"` // RuntimeSettings allow to specify Resources, LivenessProbe, ReadinessProbe, Lifecycle, SecurityContext etc. // +optional RuntimeSettings *ofst.ContainerRuntimeSettings `json:"runtimeSettings,omitempty"` }
func (*FunctionSpec) DeepCopy ¶
func (in *FunctionSpec) DeepCopy() *FunctionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionSpec.
func (*FunctionSpec) DeepCopyInto ¶
func (in *FunctionSpec) DeepCopyInto(out *FunctionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Task ¶
type Task struct { // Name specifies the name of the task. The name of a Task should indicate what // this task does. For example, a name LogicalBackup indicate that this task performs // a logical backup of a database. Name string `json:"name,omitempty"` // Function specifies the name of a Function CR that defines a container definition // which will execute the backup/restore logic for a particular application. Function string `json:"function,omitempty"` // Driver specifies the underlying tool that will be used to upload the data to the backend storage. // Valid values are: // - "Restic": The underlying tool is [restic](https://restic.net/). // - "WalG": The underlying tool is [wal-g](https://github.com/wal-g/wal-g). // +kubebuilder:validation:Enum=Restic;WalG;VolumeSnapshotter; Driver apis.Driver `json:"driver,omitempty"` // Executor specifies the type of entity that will execute the task. For example, it can be a Job, // a sidecar container, an ephemeral container, or a Job that creates additional Jobs/Pods // for executing the backup/restore logic. // Valid values are: // - "Job": Stash will create a Job to execute the backup/restore task. // - "Sidecar": Stash will inject a sidecar container into the application to execute the backup/restore task. // - "EphemeralContainer": Stash will attach an ephemeral container to the respective Pods to execute the backup/restore task. // - "MultiLevelJob": Stash will create a Job that will create additional Jobs/Pods to execute the backup/restore task. Executor TaskExecutor `json:"executor,omitempty"` // Singleton specifies whether this task will be executed on a single job or across multiple jobs. Singleton bool `json:"singleton,omitempty"` // Parameters defines a list of parameters that is used by the task to execute its logic. // +optional Parameters []apis.ParameterDefinition `json:"parameters,omitempty"` // VolumeTemplate specifies a list of volume templates that is used by the respective backup/restore // Job to execute its logic. // User can overwrite these volume templates using `addonVolumes` field of BackupConfiguration/BackupBatch. // +optional VolumeTemplate []VolumeTemplate `json:"volumeTemplate,omitempty"` // VolumeMounts specifies the mount path of the volumes specified in the VolumeTemplate section. // These volumes will be mounted directly on the Job/Container created/injected by Stash operator. // If the volume type is VolumeClaimTemplate, then Stash operator is responsible for creating the volume. // +optional VolumeMounts []core.VolumeMount `json:"volumeMounts,omitempty"` // PassThroughMounts specifies a list of volume mount for the VolumeTemplates that should be mounted // on second level Jobs/Pods created by the first level executor Job. // If the volume needs to be mounted on both first level and second level Jobs/Pods, then specify the // mount in both VolumeMounts and PassThroughMounts section. // If the volume type is VolumeClaimTemplate, then the first level job is responsible for creating the volume. // +optional PassThroughMounts []core.VolumeMount `json:"passThroughMounts,omitempty"` }
Task defines the specification of a backup/restore task.
func (*Task) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.
func (*Task) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaskExecutor ¶
type TaskExecutor string
TaskExecutor defines the type of the executor that will execute the backup/restore task. +kubebuilder:validation:Enum=Job;Sidecar;EphemeralContainer;MultiLevelJob
const ( ExecutorJob TaskExecutor = "Job" ExecutorSidecar TaskExecutor = "Sidecar" ExecutorEphemeralContainer TaskExecutor = "EphemeralContainer" ExecutorMultiLevelJob TaskExecutor = "MultiLevelJob" )
type VolumeTemplate ¶
type VolumeTemplate struct { // Name specifies the name of the volume Name string `json:"name,omitempty"` // Usage specifies the usage of the volume. // +optional Usage string `json:"usage,omitempty"` // Source specifies the source of this volume. Source *apis.VolumeSource `json:"source,omitempty"` }
VolumeTemplate specifies the name, usage, and the source of volume that will be used by the addon to execute it's backup/restore task.
func (*VolumeTemplate) DeepCopy ¶
func (in *VolumeTemplate) DeepCopy() *VolumeTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTemplate.
func (*VolumeTemplate) DeepCopyInto ¶
func (in *VolumeTemplate) DeepCopyInto(out *VolumeTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.