From 4a9d80a012794bb33bc93be8ae685788195f25de Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Sat, 27 Apr 2024 01:57:51 -0700 Subject: [PATCH] Prepare for release v0.7.0 (#29) ProductLine: KubeStash Release: v2024.4.27 Release-tracker: https://github.com/kubestash/CHANGELOG/pull/13 Signed-off-by: 1gtm <1gtm@appscode.com> --- go.mod | 11 +- go.sum | 10 +- .../offshoot-api/api/v1/openapi_generated.go | 44 +++++ .../kmodules.xyz/offshoot-api/api/v1/types.go | 19 +++ .../api/v1/zz_generated.deepcopy.go | 16 ++ .../apis/addons/v1alpha1/addon_types.go | 18 +- .../apis/addons/v1alpha1/function_types.go | 6 + .../addons/v1alpha1/zz_generated.deepcopy.go | 13 +- .../config/v1alpha1/zz_generated.deepcopy.go | 1 - .../apimachinery/apis/constant.go | 2 +- .../apis/core/v1alpha1/backupbatch_types.go | 8 +- .../v1alpha1/backupconfiguration_types.go | 29 ++-- .../apis/core/v1alpha1/backupsession_types.go | 4 +- .../apis/core/v1alpha1/hooktemplate_types.go | 6 +- .../core/v1alpha1/restoresession_types.go | 6 +- .../apimachinery/apis/core/v1alpha1/types.go | 14 +- .../core/v1alpha1/zz_generated.deepcopy.go | 8 - .../apis/storage/v1alpha1/repository_types.go | 4 +- .../storage/v1alpha1/retentionpolicy_types.go | 4 +- .../apis/storage/v1alpha1/snapshot_types.go | 4 +- .../storage/v1alpha1/zz_generated.deepcopy.go | 1 - .../apis/zz_generated.deepcopy.go | 1 - .../crds/addons.kubestash.com_addons.yaml | 138 +++------------ .../crds/addons.kubestash.com_functions.yaml | 7 + .../core.kubestash.com_backupbatches.yaml | 159 +++++------------- .../core.kubestash.com_backupblueprints.yaml | 145 ++++------------ ...re.kubestash.com_backupconfigurations.yaml | 153 ++++------------- .../core.kubestash.com_backupsessions.yaml | 6 +- .../core.kubestash.com_hooktemplates.yaml | 10 +- .../core.kubestash.com_restoresessions.yaml | 46 ++--- .../storage.kubestash.com_repositories.yaml | 6 +- ...orage.kubestash.com_retentionpolicies.yaml | 14 +- .../crds/storage.kubestash.com_snapshots.yaml | 6 +- .../kubestash.dev/apimachinery/pkg/utils.go | 7 +- .../kubestash.dev/apimachinery/pkg/version.go | 100 +++++++++++ vendor/modules.txt | 16 +- 36 files changed, 433 insertions(+), 609 deletions(-) create mode 100644 vendor/kubestash.dev/apimachinery/pkg/version.go diff --git a/go.mod b/go.mod index 87d4fadb..7c981bd1 100644 --- a/go.mod +++ b/go.mod @@ -22,17 +22,11 @@ require ( k8s.io/kubectl v0.29.0 k8s.io/utils v0.0.0-20240102154912-e7106e64919e kmodules.xyz/client-go v0.29.13 - kmodules.xyz/offshoot-api v0.29.0 - kubestash.dev/apimachinery v0.7.0 + kmodules.xyz/offshoot-api v0.29.2 + kubestash.dev/apimachinery v0.8.0 sigs.k8s.io/controller-runtime v0.17.2 ) -require ( - github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect -) - require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect @@ -86,7 +80,6 @@ require ( github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - github.com/nxadm/tail v1.4.11 // indirect github.com/onsi/gomega v1.31.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect diff --git a/go.sum b/go.sum index 0a792cef..034cb7a3 100644 --- a/go.sum +++ b/go.sum @@ -81,7 +81,6 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -478,7 +477,6 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -643,12 +641,12 @@ kmodules.xyz/client-go v0.29.13 h1:BnSVgcTQgiuTCASgL7Hr8i6mrelAy0PhhtaTUYEyUdc= kmodules.xyz/client-go v0.29.13/go.mod h1:yfJSSwYYBX/60165BsRx8RiQsYu2NzvBC+zRwviAICQ= kmodules.xyz/objectstore-api v0.29.1 h1:uUsjf8KU0w4LYowSEOnl0AbHT3hsHIu1wNLHqGe1o6s= kmodules.xyz/objectstore-api v0.29.1/go.mod h1:xG+5awH1SXYKxwN/+k1FEQvzixd5tgNqEN/1LEiB2FE= -kmodules.xyz/offshoot-api v0.29.0 h1:GHLhxxT9jU1N8+FvOCCeJNyU5g0duYS46UGrs6AHNLY= -kmodules.xyz/offshoot-api v0.29.0/go.mod h1:5NxhBblXoDHWStx9HCDJR2KFTwYjEZ7i1Id3jelIunw= +kmodules.xyz/offshoot-api v0.29.2 h1:akXmvkNqFz1n9p1STVs9iP7ODYET0S7BhcYCMXEjK4A= +kmodules.xyz/offshoot-api v0.29.2/go.mod h1:Wv7Xo8wbvznI+8bhaylRFHFjkt30xRDOUOnqV8kOAxM= kmodules.xyz/prober v0.29.0 h1:Ex7m4F9rH7uWNNJlLgP63ROOM+nUATJkC2L5OQ7nwMg= kmodules.xyz/prober v0.29.0/go.mod h1:UtK+HKyI1lFLEKX+HFLyOCVju6TO93zv3kwGpzqmKOo= -kubestash.dev/apimachinery v0.7.0 h1:j0SbDAIAUmxDHEuEt81sPqVf6mbTnozhkvYCvP7VjIs= -kubestash.dev/apimachinery v0.7.0/go.mod h1:ydCufCUC0IRLNKnnQZyvB7/afo3mwaHXL3Hbt4Plw9k= +kubestash.dev/apimachinery v0.8.0 h1:2W1TlX8hXiWD93DQGvJjirq2QYSKED9uYjquzsuhMJ4= +kubestash.dev/apimachinery v0.8.0/go.mod h1:lZ6Y//9BY4rmx+Qwvawxo1NjKgaiAG/v9RfPXHWgIa4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go b/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go index 4581bead..868c844e 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go @@ -32,6 +32,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA return map[string]common.OpenAPIDefinition{ "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), @@ -162,6 +163,49 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayPort contains information on Gateway service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the gateway service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by the gateway service.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backendServicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of the port to access the backend service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this gateway service is exposed when type is NodePort or LoadBalancer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/types.go b/vendor/kmodules.xyz/offshoot-api/api/v1/types.go index cfa29a3b..ab0da634 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/types.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/types.go @@ -392,6 +392,25 @@ type ServicePort struct { NodePort int32 `json:"nodePort,omitempty"` } +// GatewayPort contains information on Gateway service's port. +type GatewayPort struct { + // The name of this port within the gateway service. + // +optional + Name string `json:"name,omitempty"` + + // The port that will be exposed by the gateway service. + Port int32 `json:"port"` + + // Number of the port to access the backend service. + // +optional + BackendServicePort int32 `json:"backendServicePort,omitempty"` + + // The port on each node on which this gateway service is exposed when type is + // NodePort or LoadBalancer. + // +optional + NodePort int32 `json:"nodePort,omitempty"` +} + // Beware of MergeServicePorts // ref: https://github.com/kmodules/client-go/blob/03dac1aea5084354127990a10d0b0e7529460dd5/core/v1/service.go#L103-L136 func PatchServicePorts(cur []core.ServicePort, desired []ServicePort) []core.ServicePort { diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go index 2dc937aa..52b9367f 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go @@ -108,6 +108,22 @@ func (in *EphemeralVolumeSource) DeepCopy() *EphemeralVolumeSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GatewayPort) DeepCopyInto(out *GatewayPort) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayPort. +func (in *GatewayPort) DeepCopy() *GatewayPort { + if in == nil { + return nil + } + out := new(GatewayPort) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IONiceSettings) DeepCopyInto(out *IONiceSettings) { *out = *in diff --git a/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/addon_types.go b/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/addon_types.go index 123a0f92..4815b0ed 100644 --- a/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/addon_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/addon_types.go @@ -34,10 +34,10 @@ const ( // +kubebuilder:resource:path=addons,singular=addon,scope=Cluster,categories={kubestash,appscode,all} // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -// Addon specifies the backup and restore capabilities for a particular resource. +// Addon specifies the backup and restore capabilities for a specific type of target. // 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. +// An Addon CR defines these capabilities as tasks for backup and restore. type Addon struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -76,10 +76,10 @@ type Task struct { // 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. + // - "Job": KubeStash will create a Job to execute the backup/restore task. + // - "Sidecar": KubeStash will inject a sidecar container into the application to execute the backup/restore task. + // - "EphemeralContainer": KubeStash will attach an ephemeral container to the respective Pods to execute the backup/restore task. + // - "MultiLevelJob": KubeStash 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. @@ -96,8 +96,8 @@ type Task struct { 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. + // These volumes will be mounted directly on the Job/Container created/injected by KubeStash operator. + // If the volume type is VolumeClaimTemplate, then KubeStash operator is responsible for creating the volume. // +optional VolumeMounts []core.VolumeMount `json:"volumeMounts,omitempty"` @@ -107,7 +107,7 @@ type Task struct { // 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"` + // PassThroughMounts []core.VolumeMount `json:"passThroughMounts,omitempty"` } // TaskExecutor defines the type of the executor that will execute the backup/restore task. diff --git a/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/function_types.go b/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/function_types.go index 9945a96a..aaf8481c 100644 --- a/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/function_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/function_types.go @@ -100,6 +100,12 @@ type FunctionSpec struct { // RuntimeSettings allow to specify Resources, LivenessProbe, ReadinessProbe, Lifecycle, SecurityContext etc. // +optional RuntimeSettings *ofst.ContainerRuntimeSettings `json:"runtimeSettings,omitempty"` + + // AvailableVersions is the list of available addon versions + // This is needed for the KubeStash resolver, if Image has some variables in it. + // For example, `image: ghcr.io/kubedb/mongodb-restic-plugin:v0.7.0_${DB_VERSION}` + // +optional + AvailableVersions []string `json:"availableVersions,omitempty"` } //+kubebuilder:object:root=true diff --git a/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/zz_generated.deepcopy.go b/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/zz_generated.deepcopy.go index 970e34a2..e1da3996 100644 --- a/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubestash.dev/apimachinery/apis/addons/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright AppsCode Inc. and Contributors @@ -208,6 +207,11 @@ func (in *FunctionSpec) DeepCopyInto(out *FunctionSpec) { *out = new(apiv1.ContainerRuntimeSettings) (*in).DeepCopyInto(*out) } + if in.AvailableVersions != nil { + in, out := &in.AvailableVersions, &out.AvailableVersions + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionSpec. @@ -242,13 +246,6 @@ func (in *Task) DeepCopyInto(out *Task) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.PassThroughMounts != nil { - in, out := &in.PassThroughMounts, &out.PassThroughMounts - *out = make([]v1.VolumeMount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task. diff --git a/vendor/kubestash.dev/apimachinery/apis/config/v1alpha1/zz_generated.deepcopy.go b/vendor/kubestash.dev/apimachinery/apis/config/v1alpha1/zz_generated.deepcopy.go index cb7105df..3ef4a956 100644 --- a/vendor/kubestash.dev/apimachinery/apis/config/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubestash.dev/apimachinery/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright AppsCode Inc. and Contributors diff --git a/vendor/kubestash.dev/apimachinery/apis/constant.go b/vendor/kubestash.dev/apimachinery/apis/constant.go index 2715201b..4ad0e53d 100644 --- a/vendor/kubestash.dev/apimachinery/apis/constant.go +++ b/vendor/kubestash.dev/apimachinery/apis/constant.go @@ -93,7 +93,7 @@ const ( KeyBlueprintName = BackupBlueprintKey + "/name" KeyBlueprintNamespace = BackupBlueprintKey + "/namespace" - KeyBlueprintSessions = BackupBlueprintKey + "/sessions" + KeyBlueprintSessions = BackupBlueprintKey + "/session-names" ) // RBAC related diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupbatch_types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupbatch_types.go index 9f2ad011..6d532050 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupbatch_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupbatch_types.go @@ -49,8 +49,8 @@ type BackupBatchSpec struct { // The respective BackupStorages can be in a different namespace than the BackupBatch. // However, it must be allowed by the `usagePolicy` of the BackupStorage to refer from this namespace. // - // This field is optional, if you don't provide any backend here, Stash will use the default BackupStorage for the namespace. - // If a default BackupStorage does not exist in the same namespace, then Stash will look for a default BackupStorage + // This field is optional, if you don't provide any backend here, KubeStash will use the default BackupStorage for the namespace. + // If a default BackupStorage does not exist in the same namespace, then KubeStash will look for a default BackupStorage // in other namespaces that allows using it from the BackupBatch namespace. // +optional Backends []BackendReference `json:"backends,omitempty"` @@ -62,7 +62,7 @@ type BackupBatchSpec struct { Sessions []BatchSession `json:"sessions,omitempty"` // Paused indicates that the BackupBatch has been paused from taking backup. Default value is 'false'. - // If you set `paused` field to `true`, Stash will suspend the respective backup triggering CronJob and + // If you set `paused` field to `true`, KubeStash will suspend the respective backup triggering CronJob and // skip processing any further events for this BackupBatch. // +optional Paused bool `json:"paused,omitempty"` @@ -95,7 +95,7 @@ type TargetBackupSpec struct { Addon *AddonInfo `json:"addon,omitempty"` // Repositories specifies a list of repository information where the backed up data will be stored. - // Stash will create the respective Repository CRs using this information. + // KubeStash will create the respective Repository CRs using this information. Repositories []RepositoryInfo `json:"repositories,omitempty"` } diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go index b14319a2..1719e00d 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go @@ -59,8 +59,8 @@ type BackupConfigurationSpec struct { // The respective BackupStorages can be in a different namespace than the BackupConfiguration. // However, it must be allowed by the `usagePolicy` of the BackupStorage to refer from this namespace. // - // This field is optional, if you don't provide any backend here, Stash will use the default BackupStorage for the namespace. - // If a default BackupStorage does not exist in the same namespace, then Stash will look for a default BackupStorage + // This field is optional, if you don't provide any backend here, KubeStash will use the default BackupStorage for the namespace. + // If a default BackupStorage does not exist in the same namespace, then KubeStash will look for a default BackupStorage // in other namespaces that allows using it from the BackupConfiguration namespace. // +optional Backends []BackendReference `json:"backends,omitempty"` @@ -69,7 +69,7 @@ type BackupConfigurationSpec struct { Sessions []Session `json:"sessions,omitempty"` // Paused indicates that the BackupConfiguration has been paused from taking backup. Default value is 'false'. - // If you set `paused` field to `true`, Stash will suspend the respective backup triggering CronJob and + // If you set `paused` field to `true`, KubeStash will suspend the respective backup triggering CronJob and // skip processing any further events for this BackupConfiguration. // +optional Paused bool `json:"paused,omitempty"` @@ -86,8 +86,8 @@ type BackendReference struct { StorageRef *kmapi.ObjectReference `json:"storageRef,omitempty"` // RetentionPolicy refers to a RetentionPolicy CRs which defines how to cleanup the old Snapshots. - // This field is optional. If you don't provide this field, Stash will use the default RetentionPolicy for - // the namespace. If there is no default RetentionPolicy for the namespace, then Stash will find a + // This field is optional. If you don't provide this field, KubeStash will use the default RetentionPolicy for + // the namespace. If there is no default RetentionPolicy for the namespace, then KubeStash will find a // RetentionPolicy from other namespaces that is allowed to use from the current namespace. // +optional RetentionPolicy *kmapi.ObjectReference `json:"retentionPolicy,omitempty"` @@ -101,7 +101,7 @@ type Session struct { Addon *AddonInfo `json:"addon,omitempty"` // Repositories specifies a list of repository information where the backed up data will be stored. - // Stash will create the respective Repository CRs using this information. + // KubeStash will create the respective Repository CRs using this information. Repositories []RepositoryInfo `json:"repositories,omitempty"` } @@ -115,7 +115,7 @@ type SessionConfig struct { // VerificationStrategies specifies a list of backup verification configurations // +optional - VerificationStrategies []VerificationStrategy `json:"verificationStrategies,omitempty"` + // VerificationStrategies []VerificationStrategy `json:"verificationStrategies,omitempty"` // Hooks specifies the backup hooks that should be executed before and/or after the backup. // +optional @@ -123,22 +123,21 @@ type SessionConfig struct { // FailurePolicy specifies what to do if the backup fail. // Valid values are: - // - "Fail": Stash should mark the backup as failed if any component fail to complete its backup. This is the default behavior. - // - "Retry": Stash will retry to backup the failed component according to the `retryConfig`. - // +kubebuilder:default=Fail + // - "Fail": KubeStash should mark the backup as failed if any component fail to complete its backup. This is the default behavior. + // - "Retry": KubeStash will retry to backup the failed component according to the `retryConfig`. // +optional - FailurePolicy FailurePolicy `json:"failurePolicy,omitempty"` + // FailurePolicy FailurePolicy `json:"failurePolicy,omitempty"` // RetryConfig specifies the behavior of retry in case of a backup failure. // +optional RetryConfig *RetryConfig `json:"retryConfig,omitempty"` // Timeout specifies the maximum duration of backup. BackupSession will be considered Failed - // if backup does not complete within this time limit. By default, Stash don't set any timeout for backup. + // if backup does not complete within this time limit. By default, KubeStash don't set any timeout for backup. // +optional Timeout *metav1.Duration `json:"timeout,omitempty"` - // SessionHistoryLimit specifies how many backup Jobs and associate resources Stash should keep for debugging purpose. + // SessionHistoryLimit specifies how many backup Jobs and associate resources KubeStash should keep for debugging purpose. // The default value is 1. // +kubebuilder:default=1 // +optional @@ -266,7 +265,7 @@ type JobTemplate struct { } // RepositoryInfo specifies information about the repository where the backed up data will be stored. -// Stash will create the respective Repository CR from this information. +// KubeStash will create the respective Repository CR from this information. type RepositoryInfo struct { // Name specifies the name of the Repository Name string `json:"name,omitempty"` @@ -282,7 +281,7 @@ type RepositoryInfo struct { // EncryptionSecret refers to the Secret containing the encryption key which will be used to encode/decode the backed up dta. // You can refer to a Secret of a different namespace. - // If you don't provide the namespace field, Stash will look for the Secret in the same namespace as the BackupConfiguration / BackupBatch. + // If you don't provide the namespace field, KubeStash will look for the Secret in the same namespace as the BackupConfiguration / BackupBatch. EncryptionSecret *kmapi.ObjectReference `json:"encryptionSecret,omitempty"` // DeletionPolicy specifies what to do when you delete a Repository CR. diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupsession_types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupsession_types.go index d5d972d2..9e2e7dbe 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupsession_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupsession_types.go @@ -60,7 +60,7 @@ type BackupSessionSpec struct { Session string `json:"session,omitempty"` // RetryLeft specifies number of retry attempts left for the session. - // If this set to non-zero, Stash will create a new BackupSession if the current one fails. + // If this set to non-zero, KubeStash will create a new BackupSession if the current one fails. // +optional RetryLeft int32 `json:"retryLeft,omitempty"` } @@ -101,7 +101,7 @@ type BackupSessionStatus struct { // +optional Retried *bool `json:"retried,omitempty"` - // NextRetry specifies the time when Stash should retry the current failed backup. + // NextRetry specifies the time when KubeStash should retry the current failed backup. // This field will exist only if the `retryConfig` has been set in the respective backup invoker. // +optional NextRetry *metav1.Time `json:"nextRetry,omitempty"` diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/hooktemplate_types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/hooktemplate_types.go index 7025899e..c5489a02 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/hooktemplate_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/hooktemplate_types.go @@ -79,9 +79,9 @@ type HookTemplateSpec struct { type HookExecutor struct { // Type indicate the types of entity that will execute the hook. // Valid values are: - // - "Function": Stash will create a job with the provided information in `function` section. The job will execute the hook. - // - "Pod": Stash will select the pod that matches the selector provided in `pod` section. This pod(s) will execute the hook. - // - "Operator": Stash operator itself will execute the hook. + // - "Function": KubeStash will create a job with the provided information in `function` section. The job will execute the hook. + // - "Pod": KubeStash will select the pod that matches the selector provided in `pod` section. This pod(s) will execute the hook. + // - "Operator": KubeStash operator itself will execute the hook. Type HookExecutorType `json:"type,omitempty"` // Function specifies the function information which will be used to create the hook executor job. diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go index 635be51f..6ff9324c 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go @@ -139,7 +139,7 @@ type RestoreDataSource struct { Snapshot string `json:"snapshot,omitempty"` // PITR stands for Point-In-Time Recovery. You can provide a target time instead of specifying a particular Snapshot. - // Stash will automatically find the latest Snapshot that satisfies the targeted time and restore it. + // KubeStash will automatically find the latest Snapshot that satisfies the targeted time and restore it. // +optional PITR *PITR `json:"pitr,omitempty"` @@ -150,7 +150,7 @@ type RestoreDataSource struct { // EncryptionSecret refers to the Secret containing the encryption key which will be used to encode/decode the backed up data. // You can refer to a Secret of a different namespace. - // If you don't provide the namespace field, Stash will look for the Secret in the same namespace as the RestoreSession. + // If you don't provide the namespace field, KubeStash will look for the Secret in the same namespace as the RestoreSession. // +optional EncryptionSecret *kmapi.ObjectReference `json:"encryptionSecret,omitempty"` } @@ -161,7 +161,7 @@ type PITR struct { TargetTime *metav1.Time `json:"targetTime,omitempty"` // Exclusive specifies whether to exclude the Snapshot that falls in the exact time specified - // in the `targetTime` field. By default, Stash will select the Snapshot that fall in the exact time. + // in the `targetTime` field. By default, KubeStash will select the Snapshot that fall in the exact time. // +optional Exclusive bool `json:"exclusive,omitempty"` } diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/types.go index f1189fd4..96dbb652 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/types.go @@ -104,7 +104,7 @@ type HookInfo struct { // +optional Params *runtime.RawExtension `json:"params,omitempty"` - // MaxRetry specifies how many times Stash should retry the hook execution in case of failure. + // MaxRetry specifies how many times KubeStash should retry the hook execution in case of failure. // The default value of this field is 0 which means no retry. // +kubebuilder:validation:Minimum=0 // +optional @@ -118,9 +118,9 @@ type HookInfo struct { // ExecutionPolicy specifies when to execute the hook. // Valid values are: - // - "Always": Stash will execute this hook no matter the backup/restore failed. This is the default execution policy. - // - "OnSuccess": Stash will execute this hook only if the backup/restore has succeeded. - // - "OnFailure": Stash will execute this hook only if the backup/restore has failed. + // - "Always": KubeStash will execute this hook no matter the backup/restore failed. This is the default execution policy. + // - "OnSuccess": KubeStash will execute this hook only if the backup/restore has succeeded. + // - "OnFailure": KubeStash will execute this hook only if the backup/restore has failed. // +kubebuilder:default=Always // +optional ExecutionPolicy HookExecutionPolicy `json:"executionPolicy,omitempty"` @@ -204,13 +204,13 @@ const ( // RetryConfig specifies the behavior of retry type RetryConfig struct { - // MaxRetry specifies the maximum number of times Stash should retry the backup/restore process. - // By default, Stash will retry only 1 time. + // MaxRetry specifies the maximum number of times KubeStash should retry the backup/restore process. + // By default, KubeStash will retry only 1 time. // +kubebuilder:default=1 // +kubebuilder:validation:Minimum=1 MaxRetry int32 `json:"maxRetry,omitempty"` - // The amount of time to wait before next retry. If you don't specify this field, Stash will retry immediately. + // The amount of time to wait before next retry. If you don't specify this field, KubeStash will retry immediately. // Format: 30s, 2m, 1h etc. // +optional Delay metav1.Duration `json:"delay,omitempty"` diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go index 979cada8..b4b12231 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright AppsCode Inc. and Contributors @@ -1535,13 +1534,6 @@ func (in *SessionConfig) DeepCopyInto(out *SessionConfig) { *out = new(SchedulerSpec) (*in).DeepCopyInto(*out) } - if in.VerificationStrategies != nil { - in, out := &in.VerificationStrategies, &out.VerificationStrategies - *out = make([]VerificationStrategy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } if in.Hooks != nil { in, out := &in.Hooks, &out.Hooks *out = new(BackupHooks) diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/repository_types.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/repository_types.go index ad2bf9b6..51c6654c 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/repository_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/repository_types.go @@ -75,11 +75,11 @@ type RepositorySpec struct { // EncryptionSecret refers to the Secret containing the encryption key which will be used to encode/decode the backed up data. // You can refer to a Secret of a different namespace. - // If you don't provide the namespace field, Stash will look for the Secret in the same namespace as the BackupConfiguration / BackupBatch. + // If you don't provide the namespace field, KubeStash will look for the Secret in the same namespace as the BackupConfiguration / BackupBatch. EncryptionSecret *kmapi.ObjectReference `json:"encryptionSecret,omitempty"` // Paused specifies whether the Repository is paused or not. If the Repository is paused, - // Stash will not process any further event for the Repository. + // KubeStash will not process any further event for the Repository. // +optional Paused bool `json:"paused,omitempty"` } diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/retentionpolicy_types.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/retentionpolicy_types.go index edd247c6..0662adf5 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/retentionpolicy_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/retentionpolicy_types.go @@ -48,7 +48,7 @@ type RetentionPolicy struct { // RetentionPolicySpec defines the policy of cleaning old Snapshots type RetentionPolicySpec struct { // MaxRetentionPeriod specifies a duration up to which the old Snapshots should be kept. - // Stash will remove all the Snapshots that are older than the MaxRetentionPeriod. + // KubeStash will remove all the Snapshots that are older than the MaxRetentionPeriod. // For example, MaxRetentionPeriod of `30d` will keep only the Snapshots of last 30 days. // Sample duration format: // - years: 2y @@ -115,7 +115,7 @@ type SuccessfulSnapshotsKeepPolicy struct { // FailedSnapshotsKeepPolicy specifies the policy for keeping failed Snapshots type FailedSnapshotsKeepPolicy struct { // Last specifies how many last failed Snapshots should be kept. - // By default, Stash will keep only the last 1 failed Snapshot. + // By default, KubeStash will keep only the last 1 failed Snapshot. // +kubebuilder:default=1 // +optional Last *int32 `json:"last,omitempty"` diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go index d3eb0ca2..6eeb431b 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go @@ -48,7 +48,7 @@ const ( // Snapshot represents the state of a backup run to a particular Repository. // Multiple components of the same target may be backed up in the same Snapshot. // This is a namespaced CRD. It should be in the same namespace as the respective Repository. -// Stash operator is responsible for creating Snapshot CR. +// KubeStash operator is responsible for creating Snapshot CR. // Snapshot is not supposed to be created/edited by the end user. type Snapshot struct { metav1.TypeMeta `json:",inline"` @@ -95,7 +95,7 @@ type SnapshotSpec struct { DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"` // Paused specifies whether the Snapshot is paused or not. If the Snapshot is paused, - // Stash will not process any further event for the Snapshot. + // KubeStash will not process any further event for the Snapshot. // +optional Paused bool `json:"paused,omitempty"` } diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go index 4e97b1c9..37597074 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright AppsCode Inc. and Contributors diff --git a/vendor/kubestash.dev/apimachinery/apis/zz_generated.deepcopy.go b/vendor/kubestash.dev/apimachinery/apis/zz_generated.deepcopy.go index 6ee74efd..40d4e350 100644 --- a/vendor/kubestash.dev/apimachinery/apis/zz_generated.deepcopy.go +++ b/vendor/kubestash.dev/apimachinery/apis/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright AppsCode Inc. and Contributors diff --git a/vendor/kubestash.dev/apimachinery/crds/addons.kubestash.com_addons.yaml b/vendor/kubestash.dev/apimachinery/crds/addons.kubestash.com_addons.yaml index bd899cfb..739dec43 100644 --- a/vendor/kubestash.dev/apimachinery/crds/addons.kubestash.com_addons.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/addons.kubestash.com_addons.yaml @@ -25,11 +25,11 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: 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. + description: Addon specifies the backup and restore capabilities for a specific + type of target. 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 these + capabilities as tasks for backup and restore. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -74,13 +74,13 @@ spec: 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.' + are: - "Job": KubeStash will create a Job to execute the backup/restore + task. - "Sidecar": KubeStash will inject a sidecar container + into the application to execute the backup/restore task. - + "EphemeralContainer": KubeStash will attach an ephemeral container + to the respective Pods to execute the backup/restore task. + - "MultiLevelJob": KubeStash will create a Job that will create + additional Jobs/Pods to execute the backup/restore task.' enum: - Job - Sidecar @@ -121,52 +121,6 @@ spec: type: string type: object type: array - passThroughMounts: - description: 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. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other - way around. When not set, MountPropagationNone is used. - This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. Behaves similarly - to SubPath but environment variable references $(VAR_NAME) - are expanded using the container's environment. Defaults - to "" (volume's root). SubPathExpr and SubPath are mutually - exclusive. - type: string - required: - - mountPath - - name - type: object - type: array singleton: description: Singleton specifies whether this task will be executed on a single job or across multiple jobs. @@ -175,8 +129,8 @@ spec: description: 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. + by KubeStash operator. If the volume type is VolumeClaimTemplate, + then KubeStash operator is responsible for creating the volume. items: description: VolumeMount describes a mounting of a Volume within a container. @@ -2591,13 +2545,13 @@ spec: 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.' + are: - "Job": KubeStash will create a Job to execute the backup/restore + task. - "Sidecar": KubeStash will inject a sidecar container + into the application to execute the backup/restore task. - + "EphemeralContainer": KubeStash will attach an ephemeral container + to the respective Pods to execute the backup/restore task. + - "MultiLevelJob": KubeStash will create a Job that will create + additional Jobs/Pods to execute the backup/restore task.' enum: - Job - Sidecar @@ -2638,52 +2592,6 @@ spec: type: string type: object type: array - passThroughMounts: - description: 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. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other - way around. When not set, MountPropagationNone is used. - This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. Behaves similarly - to SubPath but environment variable references $(VAR_NAME) - are expanded using the container's environment. Defaults - to "" (volume's root). SubPathExpr and SubPath are mutually - exclusive. - type: string - required: - - mountPath - - name - type: object - type: array singleton: description: Singleton specifies whether this task will be executed on a single job or across multiple jobs. @@ -2692,8 +2600,8 @@ spec: description: 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. + by KubeStash operator. If the volume type is VolumeClaimTemplate, + then KubeStash operator is responsible for creating the volume. items: description: VolumeMount describes a mounting of a Volume within a container. diff --git a/vendor/kubestash.dev/apimachinery/crds/addons.kubestash.com_functions.yaml b/vendor/kubestash.dev/apimachinery/crds/addons.kubestash.com_functions.yaml index 1237371a..85857605 100644 --- a/vendor/kubestash.dev/apimachinery/crds/addons.kubestash.com_functions.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/addons.kubestash.com_functions.yaml @@ -55,6 +55,13 @@ spec: items: type: string type: array + availableVersions: + description: 'AvailableVersions is the list of available addon versions + This is needed for the KubeStash resolver, if Image has some variables + in it. For example, `image: ghcr.io/kubedb/mongodb-restic-plugin:v0.7.0_${DB_VERSION}`' + items: + type: string + type: array command: description: 'Entrypoint array. Not executed within a shell. The docker image''s ENTRYPOINT is used if this is not provided. Variable references diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml index 3d6063dc..9be7d63f 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml @@ -51,10 +51,10 @@ spec: can be in a different namespace than the BackupBatch. However, it must be allowed by the `usagePolicy` of the BackupStorage to refer from this namespace. \n This field is optional, if you don't provide - any backend here, Stash will use the default BackupStorage for the - namespace. If a default BackupStorage does not exist in the same - namespace, then Stash will look for a default BackupStorage in other - namespaces that allows using it from the BackupBatch namespace." + any backend here, KubeStash will use the default BackupStorage for + the namespace. If a default BackupStorage does not exist in the + same namespace, then KubeStash will look for a default BackupStorage + in other namespaces that allows using it from the BackupBatch namespace." items: description: BackendReference specifies reference to a storage where the backed up data will be stored. @@ -65,11 +65,11 @@ spec: retentionPolicy: description: RetentionPolicy refers to a RetentionPolicy CRs which defines how to cleanup the old Snapshots. This field - is optional. If you don't provide this field, Stash will use - the default RetentionPolicy for the namespace. If there is - no default RetentionPolicy for the namespace, then Stash will - find a RetentionPolicy from other namespaces that is allowed - to use from the current namespace. + is optional. If you don't provide this field, KubeStash will + use the default RetentionPolicy for the namespace. If there + is no default RetentionPolicy for the namespace, then KubeStash + will find a RetentionPolicy from other namespaces that is + allowed to use from the current namespace. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' @@ -100,7 +100,7 @@ spec: paused: description: Paused indicates that the BackupBatch has been paused from taking backup. Default value is 'false'. If you set `paused` - field to `true`, Stash will suspend the respective backup triggering + field to `true`, KubeStash will suspend the respective backup triggering CronJob and skip processing any further events for this BackupBatch. type: boolean sessions: @@ -110,17 +110,6 @@ spec: description: BatchSession specifies the session configuration for the targets. properties: - failurePolicy: - default: Fail - description: 'FailurePolicy specifies what to do if the backup - fail. Valid values are: - "Fail": Stash should mark the backup - as failed if any component fail to complete its backup. This - is the default behavior. - "Retry": Stash will retry to backup - the failed component according to the `retryConfig`.' - enum: - - Fail - - Retry - type: string hooks: description: Hooks specifies the backup hooks that should be executed before and/or after the backup. @@ -135,12 +124,13 @@ spec: executionPolicy: default: Always description: 'ExecutionPolicy specifies when to execute - the hook. Valid values are: - "Always": Stash will - execute this hook no matter the backup/restore failed. - This is the default execution policy. - "OnSuccess": - Stash will execute this hook only if the backup/restore - has succeeded. - "OnFailure": Stash will execute - this hook only if the backup/restore has failed.' + the hook. Valid values are: - "Always": KubeStash + will execute this hook no matter the backup/restore + failed. This is the default execution policy. - + "OnSuccess": KubeStash will execute this hook only + if the backup/restore has succeeded. - "OnFailure": + KubeStash will execute this hook only if the backup/restore + has failed.' enum: - Always - OnSuccess @@ -165,7 +155,7 @@ spec: - name type: object maxRetry: - description: MaxRetry specifies how many times Stash + description: MaxRetry specifies how many times KubeStash should retry the hook execution in case of failure. The default value of this field is 0 which means no retry. @@ -5787,12 +5777,13 @@ spec: executionPolicy: default: Always description: 'ExecutionPolicy specifies when to execute - the hook. Valid values are: - "Always": Stash will - execute this hook no matter the backup/restore failed. - This is the default execution policy. - "OnSuccess": - Stash will execute this hook only if the backup/restore - has succeeded. - "OnFailure": Stash will execute - this hook only if the backup/restore has failed.' + the hook. Valid values are: - "Always": KubeStash + will execute this hook no matter the backup/restore + failed. This is the default execution policy. - + "OnSuccess": KubeStash will execute this hook only + if the backup/restore has succeeded. - "OnFailure": + KubeStash will execute this hook only if the backup/restore + has failed.' enum: - Always - OnSuccess @@ -5817,7 +5808,7 @@ spec: - name type: object maxRetry: - description: MaxRetry specifies how many times Stash + description: MaxRetry specifies how many times KubeStash should retry the hook execution in case of failure. The default value of this field is 0 which means no retry. @@ -11439,14 +11430,14 @@ spec: properties: delay: description: 'The amount of time to wait before next retry. - If you don''t specify this field, Stash will retry immediately. - Format: 30s, 2m, 1h etc.' + If you don''t specify this field, KubeStash will retry + immediately. Format: 30s, 2m, 1h etc.' type: string maxRetry: default: 1 description: MaxRetry specifies the maximum number of times - Stash should retry the backup/restore process. By default, - Stash will retry only 1 time. + KubeStash should retry the backup/restore process. By + default, KubeStash will retry only 1 time. format: int32 minimum: 1 type: integer @@ -18904,8 +18895,8 @@ spec: sessionHistoryLimit: default: 1 description: SessionHistoryLimit specifies how many backup Jobs - and associate resources Stash should keep for debugging purpose. - The default value is 1. + and associate resources KubeStash should keep for debugging + purpose. The default value is 1. format: int32 type: integer targets: @@ -34336,13 +34327,13 @@ spec: repositories: description: Repositories specifies a list of repository information where the backed up data will be stored. - Stash will create the respective Repository CRs using - this information. + KubeStash will create the respective Repository CRs + using this information. items: description: RepositoryInfo specifies information about the repository where the backed up data will be stored. - Stash will create the respective Repository CR from - this information. + KubeStash will create the respective Repository CR + from this information. properties: backend: description: Backend specifies the name of the backend @@ -34367,8 +34358,8 @@ spec: containing the encryption key which will be used to encode/decode the backed up dta. You can refer to a Secret of a different namespace. If you don't - provide the namespace field, Stash will look for - the Secret in the same namespace as the BackupConfiguration + provide the namespace field, KubeStash will look + for the Secret in the same namespace as the BackupConfiguration / BackupBatch. properties: name: @@ -34392,79 +34383,9 @@ spec: timeout: description: Timeout specifies the maximum duration of backup. BackupSession will be considered Failed if backup does not - complete within this time limit. By default, Stash don't set - any timeout for backup. + complete within this time limit. By default, KubeStash don't + set any timeout for backup. type: string - verificationStrategies: - description: VerificationStrategies specifies a list of backup - verification configurations - items: - description: VerificationStrategy specifies a strategy to - verify the backed up data. - properties: - name: - description: Name indicate the name of this strategy - type: string - onFailure: - description: OnFailure specifies what to do if the verification - fail. - enum: - - Fail - - Retry - type: string - params: - description: Params specifies the parameters that will - be used by the verifier - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: Repository specifies the name of the repository - which data will be verified - type: string - retryConfig: - description: RetryConfig specifies the behavior of the - retry mechanism in case of a verification failure - properties: - delay: - description: 'The amount of time to wait before next - retry. If you don''t specify this field, Stash will - retry immediately. Format: 30s, 2m, 1h etc.' - type: string - maxRetry: - default: 1 - description: MaxRetry specifies the maximum number - of times Stash should retry the backup/restore process. - By default, Stash will retry only 1 time. - format: int32 - minimum: 1 - type: integer - type: object - verifier: - description: Verifier refers to the BackupVerification - CR that defines how to verify this particular data - properties: - apiGroup: - type: string - kind: - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - verifyEvery: - description: VerifyEvery specifies the frequency of backup - verification - format: int32 - minimum: 1 - type: integer - type: object - type: array type: object type: array targets: diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml index a84eff91..7e1f8be3 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml @@ -70,11 +70,11 @@ spec: retentionPolicy: description: RetentionPolicy refers to a RetentionPolicy CRs which defines how to cleanup the old Snapshots. This - field is optional. If you don't provide this field, Stash + field is optional. If you don't provide this field, KubeStash will use the default RetentionPolicy for the namespace. If there is no default RetentionPolicy for the namespace, - then Stash will find a RetentionPolicy from other namespaces - that is allowed to use from the current namespace. + then KubeStash will find a RetentionPolicy from other + namespaces that is allowed to use from the current namespace. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' @@ -14920,18 +14920,6 @@ spec: type: object type: array type: object - failurePolicy: - default: Fail - description: 'FailurePolicy specifies what to do if the - backup fail. Valid values are: - "Fail": Stash should - mark the backup as failed if any component fail to complete - its backup. This is the default behavior. - "Retry": Stash - will retry to backup the failed component according to - the `retryConfig`.' - enum: - - Fail - - Retry - type: string hooks: description: Hooks specifies the backup hooks that should be executed before and/or after the backup. @@ -14947,12 +14935,12 @@ spec: default: Always description: 'ExecutionPolicy specifies when to execute the hook. Valid values are: - "Always": - Stash will execute this hook no matter the backup/restore - failed. This is the default execution policy. - - "OnSuccess": Stash will execute this hook - only if the backup/restore has succeeded. - - "OnFailure": Stash will execute this hook only - if the backup/restore has failed.' + KubeStash will execute this hook no matter the + backup/restore failed. This is the default execution + policy. - "OnSuccess": KubeStash will execute + this hook only if the backup/restore has succeeded. + - "OnFailure": KubeStash will execute this hook + only if the backup/restore has failed.' enum: - Always - OnSuccess @@ -14978,8 +14966,8 @@ spec: type: object maxRetry: description: MaxRetry specifies how many times - Stash should retry the hook execution in case - of failure. The default value of this field + KubeStash should retry the hook execution in + case of failure. The default value of this field is 0 which means no retry. format: int32 minimum: 0 @@ -21078,12 +21066,12 @@ spec: default: Always description: 'ExecutionPolicy specifies when to execute the hook. Valid values are: - "Always": - Stash will execute this hook no matter the backup/restore - failed. This is the default execution policy. - - "OnSuccess": Stash will execute this hook - only if the backup/restore has succeeded. - - "OnFailure": Stash will execute this hook only - if the backup/restore has failed.' + KubeStash will execute this hook no matter the + backup/restore failed. This is the default execution + policy. - "OnSuccess": KubeStash will execute + this hook only if the backup/restore has succeeded. + - "OnFailure": KubeStash will execute this hook + only if the backup/restore has failed.' enum: - Always - OnSuccess @@ -21109,8 +21097,8 @@ spec: type: object maxRetry: description: MaxRetry specifies how many times - Stash should retry the hook execution in case - of failure. The default value of this field + KubeStash should retry the hook execution in + case of failure. The default value of this field is 0 which means no retry. format: int32 minimum: 0 @@ -27204,12 +27192,12 @@ spec: type: string repositories: description: Repositories specifies a list of repository - information where the backed up data will be stored. Stash + information where the backed up data will be stored. KubeStash will create the respective Repository CRs using this information. items: description: RepositoryInfo specifies information about the repository where the backed up data will be stored. - Stash will create the respective Repository CR from + KubeStash will create the respective Repository CR from this information. properties: backend: @@ -27235,8 +27223,8 @@ spec: containing the encryption key which will be used to encode/decode the backed up dta. You can refer to a Secret of a different namespace. If you don't - provide the namespace field, Stash will look for - the Secret in the same namespace as the BackupConfiguration + provide the namespace field, KubeStash will look + for the Secret in the same namespace as the BackupConfiguration / BackupBatch. properties: name: @@ -27261,14 +27249,14 @@ spec: properties: delay: description: 'The amount of time to wait before next - retry. If you don''t specify this field, Stash will - retry immediately. Format: 30s, 2m, 1h etc.' + retry. If you don''t specify this field, KubeStash + will retry immediately. Format: 30s, 2m, 1h etc.' type: string maxRetry: default: 1 description: MaxRetry specifies the maximum number of - times Stash should retry the backup/restore process. - By default, Stash will retry only 1 time. + times KubeStash should retry the backup/restore process. + By default, KubeStash will retry only 1 time. format: int32 minimum: 1 type: integer @@ -35364,89 +35352,16 @@ spec: sessionHistoryLimit: default: 1 description: SessionHistoryLimit specifies how many backup - Jobs and associate resources Stash should keep for debugging - purpose. The default value is 1. + Jobs and associate resources KubeStash should keep for + debugging purpose. The default value is 1. format: int32 type: integer timeout: description: Timeout specifies the maximum duration of backup. BackupSession will be considered Failed if backup does - not complete within this time limit. By default, Stash + not complete within this time limit. By default, KubeStash don't set any timeout for backup. type: string - verificationStrategies: - description: VerificationStrategies specifies a list of - backup verification configurations - items: - description: VerificationStrategy specifies a strategy - to verify the backed up data. - properties: - name: - description: Name indicate the name of this strategy - type: string - onFailure: - description: OnFailure specifies what to do if the - verification fail. - enum: - - Fail - - Retry - type: string - params: - description: Params specifies the parameters that - will be used by the verifier - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: Repository specifies the name of the - repository which data will be verified - type: string - retryConfig: - description: RetryConfig specifies the behavior of - the retry mechanism in case of a verification failure - properties: - delay: - description: 'The amount of time to wait before - next retry. If you don''t specify this field, - Stash will retry immediately. Format: 30s, 2m, - 1h etc.' - type: string - maxRetry: - default: 1 - description: MaxRetry specifies the maximum number - of times Stash should retry the backup/restore - process. By default, Stash will retry only 1 - time. - format: int32 - minimum: 1 - type: integer - type: object - verifier: - description: Verifier refers to the BackupVerification - CR that defines how to verify this particular data - properties: - apiGroup: - type: string - kind: - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - verifyEvery: - description: VerifyEvery specifies the frequency of - backup verification - format: int32 - minimum: 1 - type: integer - type: object - type: array type: object type: array type: object diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml index ab929db6..f9e2f8be 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml @@ -59,9 +59,9 @@ spec: can be in a different namespace than the BackupConfiguration. However, it must be allowed by the `usagePolicy` of the BackupStorage to refer from this namespace. \n This field is optional, if you don't - provide any backend here, Stash will use the default BackupStorage + provide any backend here, KubeStash will use the default BackupStorage for the namespace. If a default BackupStorage does not exist in - the same namespace, then Stash will look for a default BackupStorage + the same namespace, then KubeStash will look for a default BackupStorage in other namespaces that allows using it from the BackupConfiguration namespace." items: @@ -74,11 +74,11 @@ spec: retentionPolicy: description: RetentionPolicy refers to a RetentionPolicy CRs which defines how to cleanup the old Snapshots. This field - is optional. If you don't provide this field, Stash will use - the default RetentionPolicy for the namespace. If there is - no default RetentionPolicy for the namespace, then Stash will - find a RetentionPolicy from other namespaces that is allowed - to use from the current namespace. + is optional. If you don't provide this field, KubeStash will + use the default RetentionPolicy for the namespace. If there + is no default RetentionPolicy for the namespace, then KubeStash + will find a RetentionPolicy from other namespaces that is + allowed to use from the current namespace. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' @@ -109,9 +109,9 @@ spec: paused: description: Paused indicates that the BackupConfiguration has been paused from taking backup. Default value is 'false'. If you set - `paused` field to `true`, Stash will suspend the respective backup - triggering CronJob and skip processing any further events for this - BackupConfiguration. + `paused` field to `true`, KubeStash will suspend the respective + backup triggering CronJob and skip processing any further events + for this BackupConfiguration. type: boolean sessions: description: Sessions defines a list of session configuration that @@ -13817,17 +13817,6 @@ spec: type: object type: array type: object - failurePolicy: - default: Fail - description: 'FailurePolicy specifies what to do if the backup - fail. Valid values are: - "Fail": Stash should mark the backup - as failed if any component fail to complete its backup. This - is the default behavior. - "Retry": Stash will retry to backup - the failed component according to the `retryConfig`.' - enum: - - Fail - - Retry - type: string hooks: description: Hooks specifies the backup hooks that should be executed before and/or after the backup. @@ -13842,12 +13831,13 @@ spec: executionPolicy: default: Always description: 'ExecutionPolicy specifies when to execute - the hook. Valid values are: - "Always": Stash will - execute this hook no matter the backup/restore failed. - This is the default execution policy. - "OnSuccess": - Stash will execute this hook only if the backup/restore - has succeeded. - "OnFailure": Stash will execute - this hook only if the backup/restore has failed.' + the hook. Valid values are: - "Always": KubeStash + will execute this hook no matter the backup/restore + failed. This is the default execution policy. - + "OnSuccess": KubeStash will execute this hook only + if the backup/restore has succeeded. - "OnFailure": + KubeStash will execute this hook only if the backup/restore + has failed.' enum: - Always - OnSuccess @@ -13872,7 +13862,7 @@ spec: - name type: object maxRetry: - description: MaxRetry specifies how many times Stash + description: MaxRetry specifies how many times KubeStash should retry the hook execution in case of failure. The default value of this field is 0 which means no retry. @@ -19494,12 +19484,13 @@ spec: executionPolicy: default: Always description: 'ExecutionPolicy specifies when to execute - the hook. Valid values are: - "Always": Stash will - execute this hook no matter the backup/restore failed. - This is the default execution policy. - "OnSuccess": - Stash will execute this hook only if the backup/restore - has succeeded. - "OnFailure": Stash will execute - this hook only if the backup/restore has failed.' + the hook. Valid values are: - "Always": KubeStash + will execute this hook no matter the backup/restore + failed. This is the default execution policy. - + "OnSuccess": KubeStash will execute this hook only + if the backup/restore has succeeded. - "OnFailure": + KubeStash will execute this hook only if the backup/restore + has failed.' enum: - Always - OnSuccess @@ -19524,7 +19515,7 @@ spec: - name type: object maxRetry: - description: MaxRetry specifies how many times Stash + description: MaxRetry specifies how many times KubeStash should retry the hook execution in case of failure. The default value of this field is 0 which means no retry. @@ -25142,11 +25133,11 @@ spec: type: string repositories: description: Repositories specifies a list of repository information - where the backed up data will be stored. Stash will create + where the backed up data will be stored. KubeStash will create the respective Repository CRs using this information. items: description: RepositoryInfo specifies information about the - repository where the backed up data will be stored. Stash + repository where the backed up data will be stored. KubeStash will create the respective Repository CR from this information. properties: backend: @@ -25172,7 +25163,7 @@ spec: the encryption key which will be used to encode/decode the backed up dta. You can refer to a Secret of a different namespace. If you don't provide the namespace field, - Stash will look for the Secret in the same namespace + KubeStash will look for the Secret in the same namespace as the BackupConfiguration / BackupBatch. properties: name: @@ -25196,14 +25187,14 @@ spec: properties: delay: description: 'The amount of time to wait before next retry. - If you don''t specify this field, Stash will retry immediately. - Format: 30s, 2m, 1h etc.' + If you don''t specify this field, KubeStash will retry + immediately. Format: 30s, 2m, 1h etc.' type: string maxRetry: default: 1 description: MaxRetry specifies the maximum number of times - Stash should retry the backup/restore process. By default, - Stash will retry only 1 time. + KubeStash should retry the backup/restore process. By + default, KubeStash will retry only 1 time. format: int32 minimum: 1 type: integer @@ -32661,86 +32652,16 @@ spec: sessionHistoryLimit: default: 1 description: SessionHistoryLimit specifies how many backup Jobs - and associate resources Stash should keep for debugging purpose. - The default value is 1. + and associate resources KubeStash should keep for debugging + purpose. The default value is 1. format: int32 type: integer timeout: description: Timeout specifies the maximum duration of backup. BackupSession will be considered Failed if backup does not - complete within this time limit. By default, Stash don't set - any timeout for backup. + complete within this time limit. By default, KubeStash don't + set any timeout for backup. type: string - verificationStrategies: - description: VerificationStrategies specifies a list of backup - verification configurations - items: - description: VerificationStrategy specifies a strategy to - verify the backed up data. - properties: - name: - description: Name indicate the name of this strategy - type: string - onFailure: - description: OnFailure specifies what to do if the verification - fail. - enum: - - Fail - - Retry - type: string - params: - description: Params specifies the parameters that will - be used by the verifier - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: Repository specifies the name of the repository - which data will be verified - type: string - retryConfig: - description: RetryConfig specifies the behavior of the - retry mechanism in case of a verification failure - properties: - delay: - description: 'The amount of time to wait before next - retry. If you don''t specify this field, Stash will - retry immediately. Format: 30s, 2m, 1h etc.' - type: string - maxRetry: - default: 1 - description: MaxRetry specifies the maximum number - of times Stash should retry the backup/restore process. - By default, Stash will retry only 1 time. - format: int32 - minimum: 1 - type: integer - type: object - verifier: - description: Verifier refers to the BackupVerification - CR that defines how to verify this particular data - properties: - apiGroup: - type: string - kind: - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - verifyEvery: - description: VerifyEvery specifies the frequency of backup - verification - format: int32 - minimum: 1 - type: integer - type: object - type: array type: object type: array target: diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupsessions.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupsessions.yaml index c1991e2d..d2ff2a6f 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupsessions.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupsessions.yaml @@ -79,8 +79,8 @@ spec: x-kubernetes-map-type: atomic retryLeft: description: RetryLeft specifies number of retry attempts left for - the session. If this set to non-zero, Stash will create a new BackupSession - if the current one fails. + the session. If this set to non-zero, KubeStash will create a new + BackupSession if the current one fails. format: int32 type: integer session: @@ -192,7 +192,7 @@ spec: type: array type: object nextRetry: - description: NextRetry specifies the time when Stash should retry + description: NextRetry specifies the time when KubeStash should retry the current failed backup. This field will exist only if the `retryConfig` has been set in the respective backup invoker. format: date-time diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_hooktemplates.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_hooktemplates.yaml index f8142770..7f64d29d 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_hooktemplates.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_hooktemplates.yaml @@ -2344,12 +2344,12 @@ spec: type: object type: description: 'Type indicate the types of entity that will execute - the hook. Valid values are: - "Function": Stash will create + the hook. Valid values are: - "Function": KubeStash will create a job with the provided information in `function` section. The - job will execute the hook. - "Pod": Stash will select the pod - that matches the selector provided in `pod` section. This pod(s) - will execute the hook. - "Operator": Stash operator itself will - execute the hook.' + job will execute the hook. - "Pod": KubeStash will select the + pod that matches the selector provided in `pod` section. This + pod(s) will execute the hook. - "Operator": KubeStash operator + itself will execute the hook.' enum: - Function - Pod diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml index c84f076b..85e63248 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml @@ -12573,8 +12573,8 @@ spec: description: EncryptionSecret refers to the Secret containing the encryption key which will be used to encode/decode the backed up data. You can refer to a Secret of a different namespace. - If you don't provide the namespace field, Stash will look for - the Secret in the same namespace as the RestoreSession. + If you don't provide the namespace field, KubeStash will look + for the Secret in the same namespace as the RestoreSession. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' @@ -12591,15 +12591,15 @@ spec: type: string pitr: description: PITR stands for Point-In-Time Recovery. You can provide - a target time instead of specifying a particular Snapshot. Stash + a target time instead of specifying a particular Snapshot. KubeStash will automatically find the latest Snapshot that satisfies the targeted time and restore it. properties: exclusive: description: Exclusive specifies whether to exclude the Snapshot that falls in the exact time specified in the `targetTime` - field. By default, Stash will select the Snapshot that fall - in the exact time. + field. By default, KubeStash will select the Snapshot that + fall in the exact time. type: boolean targetTime: description: TargetTime specifies the desired date and time @@ -12631,12 +12631,12 @@ spec: executionPolicy: default: Always description: 'ExecutionPolicy specifies when to execute - the hook. Valid values are: - "Always": Stash will execute - this hook no matter the backup/restore failed. This is - the default execution policy. - "OnSuccess": Stash will - execute this hook only if the backup/restore has succeeded. - - "OnFailure": Stash will execute this hook only if the - backup/restore has failed.' + the hook. Valid values are: - "Always": KubeStash will + execute this hook no matter the backup/restore failed. + This is the default execution policy. - "OnSuccess": KubeStash + will execute this hook only if the backup/restore has + succeeded. - "OnFailure": KubeStash will execute this + hook only if the backup/restore has failed.' enum: - Always - OnSuccess @@ -12659,9 +12659,9 @@ spec: - name type: object maxRetry: - description: MaxRetry specifies how many times Stash should - retry the hook execution in case of failure. The default - value of this field is 0 which means no retry. + description: MaxRetry specifies how many times KubeStash + should retry the hook execution in case of failure. The + default value of this field is 0 which means no retry. format: int32 minimum: 0 type: integer @@ -17772,12 +17772,12 @@ spec: executionPolicy: default: Always description: 'ExecutionPolicy specifies when to execute - the hook. Valid values are: - "Always": Stash will execute - this hook no matter the backup/restore failed. This is - the default execution policy. - "OnSuccess": Stash will - execute this hook only if the backup/restore has succeeded. - - "OnFailure": Stash will execute this hook only if the - backup/restore has failed.' + the hook. Valid values are: - "Always": KubeStash will + execute this hook no matter the backup/restore failed. + This is the default execution policy. - "OnSuccess": KubeStash + will execute this hook only if the backup/restore has + succeeded. - "OnFailure": KubeStash will execute this + hook only if the backup/restore has failed.' enum: - Always - OnSuccess @@ -17800,9 +17800,9 @@ spec: - name type: object maxRetry: - description: MaxRetry specifies how many times Stash should - retry the hook execution in case of failure. The default - value of this field is 0 which means no retry. + description: MaxRetry specifies how many times KubeStash + should retry the hook execution in case of failure. The + default value of this field is 0 which means no retry. format: int32 minimum: 0 type: integer diff --git a/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_repositories.yaml b/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_repositories.yaml index fdfb85a4..8948e089 100644 --- a/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_repositories.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_repositories.yaml @@ -99,7 +99,7 @@ spec: description: EncryptionSecret refers to the Secret containing the encryption key which will be used to encode/decode the backed up data. You can refer to a Secret of a different namespace. If you - don't provide the namespace field, Stash will look for the Secret + don't provide the namespace field, KubeStash will look for the Secret in the same namespace as the BackupConfiguration / BackupBatch. properties: name: @@ -118,8 +118,8 @@ spec: type: string paused: description: Paused specifies whether the Repository is paused or - not. If the Repository is paused, Stash will not process any further - event for the Repository. + not. If the Repository is paused, KubeStash will not process any + further event for the Repository. type: boolean storageRef: description: StorageRef refers to the BackupStorage CR which contain diff --git a/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_retentionpolicies.yaml b/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_retentionpolicies.yaml index 02a161ce..945a8631 100644 --- a/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_retentionpolicies.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_retentionpolicies.yaml @@ -62,19 +62,19 @@ spec: last: default: 1 description: Last specifies how many last failed Snapshots should - be kept. By default, Stash will keep only the last 1 failed + be kept. By default, KubeStash will keep only the last 1 failed Snapshot. format: int32 type: integer type: object maxRetentionPeriod: description: "MaxRetentionPeriod specifies a duration up to which - the old Snapshots should be kept. Stash will remove all the Snapshots - that are older than the MaxRetentionPeriod. For example, MaxRetentionPeriod - of `30d` will keep only the Snapshots of last 30 days. Sample duration - format: - years: \t2y - months: \t6mo - days: \t\t30d - hours: \t12h - - minutes: \t30m You can also combine the above durations. For example: - 30d12h30m" + the old Snapshots should be kept. KubeStash will remove all the + Snapshots that are older than the MaxRetentionPeriod. For example, + MaxRetentionPeriod of `30d` will keep only the Snapshots of last + 30 days. Sample duration format: - years: \t2y - months: \t6mo - + days: \t\t30d - hours: \t12h - minutes: \t30m You can also combine + the above durations. For example: 30d12h30m" type: string successfulSnapshots: description: SuccessfulSnapshots specifies how many successful Snapshots diff --git a/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_snapshots.yaml b/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_snapshots.yaml index e3733810..c4a10c67 100644 --- a/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_snapshots.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_snapshots.yaml @@ -42,7 +42,7 @@ spec: description: Snapshot represents the state of a backup run to a particular Repository. Multiple components of the same target may be backed up in the same Snapshot. This is a namespaced CRD. It should be in the same namespace - as the respective Repository. Stash operator is responsible for creating + as the respective Repository. KubeStash operator is responsible for creating Snapshot CR. Snapshot is not supposed to be created/edited by the end user. properties: apiVersion: @@ -98,8 +98,8 @@ spec: type: string paused: description: Paused specifies whether the Snapshot is paused or not. - If the Snapshot is paused, Stash will not process any further event - for the Snapshot. + If the Snapshot is paused, KubeStash will not process any further + event for the Snapshot. type: boolean repository: description: Repository specifies the name of the Repository where diff --git a/vendor/kubestash.dev/apimachinery/pkg/utils.go b/vendor/kubestash.dev/apimachinery/pkg/utils.go index ad47bcb6..3290a775 100644 --- a/vendor/kubestash.dev/apimachinery/pkg/utils.go +++ b/vendor/kubestash.dev/apimachinery/pkg/utils.go @@ -17,15 +17,14 @@ limitations under the License. package pkg import ( + "encoding/json" "fmt" + vsapi "github.com/kubernetes-csi/external-snapshotter/client/v7/apis/volumesnapshot/v1" "gomodules.xyz/envsubst" core "k8s.io/api/core/v1" - "kubestash.dev/apimachinery/apis" - - "encoding/json" - vsapi "github.com/kubernetes-csi/external-snapshotter/client/v7/apis/volumesnapshot/v1" clientsetscheme "k8s.io/client-go/kubernetes/scheme" cu "kmodules.xyz/client-go/client" + "kubestash.dev/apimachinery/apis" addonapi "kubestash.dev/apimachinery/apis/addons/v1alpha1" coreapi "kubestash.dev/apimachinery/apis/core/v1alpha1" storageapi "kubestash.dev/apimachinery/apis/storage/v1alpha1" diff --git a/vendor/kubestash.dev/apimachinery/pkg/version.go b/vendor/kubestash.dev/apimachinery/pkg/version.go new file mode 100644 index 00000000..77ade108 --- /dev/null +++ b/vendor/kubestash.dev/apimachinery/pkg/version.go @@ -0,0 +1,100 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package pkg + +import ( + "fmt" + "github.com/Masterminds/semver/v3" + "sort" + "strings" +) + +func trimPrefixAndSuffix(str string) string { + index := strings.Index(str, "-") + if index != -1 { + str = str[index+1:] + } + index = strings.LastIndex(str, "-") + if index != -1 { + str = str[:index] + } + return str +} + +// For algorithm design & real addon mapping : https://github.com/kubestash/project/issues/140 + +func FindAppropriateAddonVersion(addonVersions []string, dbVersion string) (string, error) { + if len(addonVersions) == 0 { + return "", fmt.Errorf("available list of addon-versions can't be empty") + } + + dbVersion = trimPrefixAndSuffix(dbVersion) + semverDBVersion, err := semver.NewVersion(dbVersion) + if err != nil { + return "", err + } + + type distance struct { + minor, patch uint64 + isDB int + actualAddon string + } + distances := make([]distance, 0) + for _, av := range addonVersions { + tav := trimPrefixAndSuffix(av) + sav, err := semver.NewVersion(tav) + if err != nil { + return "", err + } + if sav.Major() != semverDBVersion.Major() { // major has to be matched. + continue + } + distances = append(distances, distance{ + minor: sav.Minor(), + patch: sav.Patch(), + actualAddon: av, + }) + } + if len(distances) == 0 { + return "", fmt.Errorf("no addon version found with major=%v for db version %s", semverDBVersion.Major(), dbVersion) + } + distances = append(distances, distance{ + minor: semverDBVersion.Minor(), + patch: semverDBVersion.Patch(), + isDB: 1, + }) + sort.Slice(distances, func(i, j int) bool { + if distances[i].minor != distances[j].minor { + return distances[i].minor < distances[j].minor + } + if distances[i].patch != distances[j].patch { + return distances[i].patch < distances[j].patch + } + return distances[i].isDB < distances[j].isDB + }) + + for i, d := range distances { + if d.isDB == 1 { + if i > 0 { + return distances[i-1].actualAddon, nil + } else if i < len(distances)-1 { + return distances[i+1].actualAddon, nil + } + } + } + return "", fmt.Errorf("no addon version found for db version %s", dbVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 9130bb81..7b24a37b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -109,8 +109,6 @@ github.com/google/go-containerregistry/pkg/name ## explicit; go 1.12 github.com/google/gofuzz github.com/google/gofuzz/bytesource -# github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 -## explicit; go 1.18 # github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 ## explicit; go 1.13 github.com/google/shlex @@ -184,8 +182,6 @@ github.com/munnerz/goautoneg # github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f ## explicit github.com/mxk/go-flowrate/flowrate -# github.com/nxadm/tail v1.4.11 -## explicit; go 1.13 # github.com/olekukonko/tablewriter v0.0.6-0.20230925090304-df64c4bbad77 => github.com/gomodules/tablewriter v0.0.6-0.20230422125635-f6b4e4ae60d8 ## explicit; go 1.12 github.com/olekukonko/tablewriter @@ -210,8 +206,6 @@ github.com/peterbourgon/diskv # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors -# github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 -## explicit # github.com/prometheus/client_golang v1.18.0 ## explicit; go 1.19 github.com/prometheus/client_golang/prometheus @@ -234,8 +228,6 @@ github.com/prometheus/procfs/internal/util # github.com/rivo/uniseg v0.1.0 ## explicit; go 1.12 github.com/rivo/uniseg -# github.com/rogpeppe/go-internal v1.11.0 -## explicit; go 1.19 # github.com/russross/blackfriday/v2 v2.1.0 ## explicit github.com/russross/blackfriday/v2 @@ -829,14 +821,14 @@ kmodules.xyz/client-go/meta # kmodules.xyz/objectstore-api v0.29.1 ## explicit; go 1.21 kmodules.xyz/objectstore-api/api/v1 -# kmodules.xyz/offshoot-api v0.29.0 -## explicit; go 1.21.5 +# kmodules.xyz/offshoot-api v0.29.2 +## explicit; go 1.22.0 kmodules.xyz/offshoot-api/api/v1 # kmodules.xyz/prober v0.29.0 ## explicit; go 1.21.5 kmodules.xyz/prober/api/v1 -# kubestash.dev/apimachinery v0.7.0 -## explicit; go 1.21.5 +# kubestash.dev/apimachinery v0.8.0 +## explicit; go 1.22.0 kubestash.dev/apimachinery/apis kubestash.dev/apimachinery/apis/addons/v1alpha1 kubestash.dev/apimachinery/apis/config/v1alpha1