Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
530 changes: 530 additions & 0 deletions api/crds/v1beta1/backupblueprint.yaml

Large diffs are not rendered by default.

530 changes: 530 additions & 0 deletions api/crds/v1beta1/backupconfiguration.yaml

Large diffs are not rendered by default.

524 changes: 524 additions & 0 deletions api/crds/v1beta1/restoresession.yaml

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions apis/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const (

Hostname = "HOSTNAME"
SourceHostname = "SOURCE_HOSTNAME"
InterimDataDir = "INTERIM_DATA_DIR"

TargetName = "TARGET_NAME"
TargetAPIVersion = "TARGET_API_VERSION"
Expand Down Expand Up @@ -57,6 +58,9 @@ const (
PushgatewayURL = "PROMETHEUS_PUSHGATEWAY_URL"
PrometheusJobName = "PROMETHEUS_JOB_NAME"

StashDefaultVolume = "stash-volume"
StashDefaultMountPath = "/stash-data"
StashDefaultVolume = "stash-volume"
StashDefaultMountPath = "/stash-data"
StashInterimVolume = "stash-interim-volume"
StashInterimVolumeMountPath = "/stash-interim-volume"
StashInterimDataDir = "/stash-interim-volume/data"
)
11 changes: 11 additions & 0 deletions apis/stash/v1beta1/backup_blueprint_types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package v1beta1

import (
core "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
ofst "kmodules.xyz/offshoot-api/api/v1"
"stash.appscode.dev/stash/apis/stash/v1alpha1"
Expand Down Expand Up @@ -39,6 +40,16 @@ type BackupBlueprintSpec struct {
// An `EmptyDir` will always be mounted at /tmp with this settings
// +optional
TempDir EmptyDirSettings `json:"tempDir,omitempty"`
// InterimVolumeTemplate specifies a template for a volume to hold targeted data temporarily
// before uploading to backend or inserting into target. It is only usable for job model.
// Don't specify it in sidecar model.
// +optional
InterimVolumeTemplate *core.PersistentVolumeClaim `json:"interimVolumeTemplate,omitempty"`
// BackupHistoryLimit specifies the number of BackupSession and it's associate resources to keep.
// This is helpful for debugging purpose.
// Default: 1
// +optional
BackupHistoryLimit *int32 `json:"backupHistoryLimit,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
12 changes: 11 additions & 1 deletion apis/stash/v1beta1/backup_configuration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,18 @@ type BackupConfigurationSpec struct {
RuntimeSettings ofst.RuntimeSettings `json:"runtimeSettings,omitempty"`
// Temp directory configuration for functions/sidecar
// An `EmptyDir` will always be mounted at /tmp with this settings
//+optional
// +optional
TempDir EmptyDirSettings `json:"tempDir,omitempty"`
// InterimVolumeTemplate specifies a template for a volume to hold targeted data temporarily
// before uploading to backend or inserting into target. It is only usable for job model.
// Don't specify it in sidecar model.
// +optional
InterimVolumeTemplate *core.PersistentVolumeClaim `json:"interimVolumeTemplate,omitempty"`
// BackupHistoryLimit specifies the number of BackupSession and it's associate resources to keep.
// This is helpful for debugging purpose.
// Default: 1
// +optional
BackupHistoryLimit *int32 `json:"backupHistoryLimit,omitempty"`
}

type EmptyDirSettings struct {
Expand Down
38 changes: 35 additions & 3 deletions apis/stash/v1beta1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions apis/stash/v1beta1/restore_session_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ type RestoreSessionSpec struct {
// An `EmptyDir` will always be mounted at /tmp with this settings
//+optional
TempDir EmptyDirSettings `json:"tempDir,omitempty"`
// InterimVolumeTemplate specifies a template for a volume to hold targeted data temporarily
// before uploading to backend or inserting into target. It is only usable for job model.
// Don't specify it in sidecar model.
// +optional
InterimVolumeTemplate *core.PersistentVolumeClaim `json:"interimVolumeTemplate,omitempty"`
}

type Rule struct {
Expand Down
25 changes: 25 additions & 0 deletions apis/stash/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ require (
github.com/evanphx/json-patch v4.5.0+incompatible
github.com/go-openapi/spec v0.19.0
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible // indirect
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/json-iterator/go v1.1.6
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
Expand Down
Loading