Skip to content

Commit

Permalink
Update for release [email protected] (#669)
Browse files Browse the repository at this point in the history
ProductLine: Stash

Release: v2022.07.09
Signed-off-by: 1gtm <[email protected]>
  • Loading branch information
1gtm authored Jul 9, 2022
1 parent 38b1149 commit da3169b
Show file tree
Hide file tree
Showing 13 changed files with 281 additions and 38 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
kmodules.xyz/custom-resources v0.24.0
kmodules.xyz/monitoring-agent-api v0.24.0
kubedb.dev/apimachinery v0.27.1-0.20220604010336-666ce9c7cf9f
stash.appscode.dev/apimachinery v0.21.0
stash.appscode.dev/apimachinery v0.22.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1192,5 +1192,5 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZa
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
stash.appscode.dev/apimachinery v0.21.0 h1:uK4IAuT3+V7b2/sQAWslQ3iT8agN6qgy58gg9W51rhk=
stash.appscode.dev/apimachinery v0.21.0/go.mod h1:mtxrytXCX8271F5xVMKTwVPoERs6XbhLZlhRKJU08uI=
stash.appscode.dev/apimachinery v0.22.0 h1:h3Y9fGlD5oNzvPpX9VmvNjsy6u8jsNZjZ2HRgRlCWkE=
stash.appscode.dev/apimachinery v0.22.0/go.mod h1:uzKMOt8OxE5YpSjRPR6DCkUA+Wn8McXQNPSaVARB0GM=
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
# sigs.k8s.io/yaml v1.3.0
## explicit; go 1.12
sigs.k8s.io/yaml
# stash.appscode.dev/apimachinery v0.21.0
# stash.appscode.dev/apimachinery v0.22.0
## explicit; go 1.18
stash.appscode.dev/apimachinery/apis
stash.appscode.dev/apimachinery/apis/repositories
Expand Down
1 change: 1 addition & 0 deletions vendor/stash.appscode.dev/apimachinery/apis/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const (

ExcludePatterns = "EXCLUDE_PATTERNS"
IncludePatterns = "INCLUDE_PATTERNS"
DriverArgs = "DRIVER_ARGS"

RestorePaths = "RESTORE_PATHS"
RestoreSnapshots = "RESTORE_SNAPSHOTS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,30 @@ type BackupHooks struct {
// +optional
PreBackup *prober.Handler `json:"preBackup,omitempty"`

// PostBackup is called immediately after a backup session is complete.
// PostBackup is called according to executionPolicy after a backup session is complete.
// +optional
PostBackup *prober.Handler `json:"postBackup,omitempty"`
PostBackup PostBackupHook `json:"postBackup,omitempty"`
}

type PostBackupHook struct {
*prober.Handler `json:",inline"`
// ExecutionPolicy specifies when to execute a hook.
// Supported values are "Always", "OnFailure", "OnSuccess".
// Default value: "Always".
// +optional
// +kubebuilder:default=Always
// +kubebuilder:validation:Enum=Always;OnFailure;OnSuccess
ExecutionPolicy HookExecutionPolicy `json:"executionPolicy,omitempty"`
}

type HookExecutionPolicy string

const (
ExecuteAlways HookExecutionPolicy = "Always"
ExecuteOnFailure HookExecutionPolicy = "OnFailure"
ExecuteOnSuccess HookExecutionPolicy = "OnSuccess"
)

type EmptyDirSettings struct {
Medium core.StorageMedium `json:"medium,omitempty"`
SizeLimit *resource.Quantity `json:"sizeLimit,omitempty"`
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,20 @@ type RestoreHooks struct {
// +optional
PreRestore *prober.Handler `json:"preRestore,omitempty"`

// PostRestore is called immediately after a restore session is complete.
// PostRestore is called according to executionPolicy after a restore session is complete.
// +optional
PostRestore *prober.Handler `json:"postRestore,omitempty"`
PostRestore PostRestoreHook `json:"postRestore,omitempty"`
}

type PostRestoreHook struct {
*prober.Handler `json:",inline"`
// ExecutionPolicy specifies when to execute a hook.
// Supported values are "Always", "OnFailure", "OnSuccess".
// Default value is "Always".
// +optional
// +kubebuilder:default=Always
// +kubebuilder:validation:Enum=Always;OnFailure;OnSuccess
ExecutionPolicy HookExecutionPolicy `json:"executionPolicy,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ spec:
sessions. Cannot be updated.
properties:
postBackup:
description: PostBackup is called immediately after a backup session
is complete.
description: PostBackup is called according to executionPolicy
after a backup session is complete.
properties:
containerName:
description: ContainerName specifies the name of the container
Expand All @@ -101,6 +101,16 @@ spec:
type: string
type: array
type: object
executionPolicy:
default: Always
description: 'ExecutionPolicy specifies when to execute a
hook. Supported values are "Always", "OnFailure", "OnSuccess".
Default value: "Always".'
enum:
- Always
- OnFailure
- OnSuccess
type: string
httpGet:
description: HTTPGet specifies the http Get request to perform.
properties:
Expand Down Expand Up @@ -386,8 +396,8 @@ spec:
sessions.
properties:
postBackup:
description: PostBackup is called immediately after a backup
session is complete.
description: PostBackup is called according to executionPolicy
after a backup session is complete.
properties:
containerName:
description: ContainerName specifies the name of the
Expand All @@ -412,6 +422,16 @@ spec:
type: string
type: array
type: object
executionPolicy:
default: Always
description: 'ExecutionPolicy specifies when to execute
a hook. Supported values are "Always", "OnFailure",
"OnSuccess". Default value: "Always".'
enum:
- Always
- OnFailure
- OnSuccess
type: string
httpGet:
description: HTTPGet specifies the http Get request
to perform.
Expand Down
Loading

0 comments on commit da3169b

Please sign in to comment.