-
Notifications
You must be signed in to change notification settings - Fork 87
/
types.go
61 lines (55 loc) 路 2.22 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package v1beta1
import (
core "k8s.io/api/core/v1"
)
// Param declares a value to use for the Param called Name.
type Param struct {
Name string `json:"name"`
Value string `json:"value"`
}
type TaskRef struct {
Name string `json:"name,omitempty"`
// +optional
Params []Param `json:"params,omitempty"`
}
type BackupTarget struct {
// Ref refers to the backup target
Ref TargetRef `json:"ref,omitempty"`
// Directories specify the directories to backup
// +optional
Directories []string `json:"directories,omitempty"`
// VolumeMounts specifies the volumes to mount inside stash sidecar/init container
// Specify the volumes that contains the target directories
// +optional
VolumeMounts []core.VolumeMount `json:"volumeMounts,omitempty"`
//replicas are the desired number of replicas whose data should be backed up.
// If unspecified, defaults to 1.
// +optional
Replicas *int32 `json:"replicas,omitempty"`
// Name of the VolumeSnapshotClass used by the VolumeSnapshot. If not specified, a default snapshot class will be used if it is available.
// Use this field only if the "driver" field is set to "volumeSnapshotter".
// +optional
VolumeSnapshotClassName string `json:"snapshotClassName,omitempty"`
}
type RestoreTarget struct {
// Ref refers to the restore,target
Ref TargetRef `json:"ref,omitempty"`
// VolumeMounts specifies the volumes to mount inside stash sidecar/init container
// Specify the volumes that contains the target directories
// +optional
VolumeMounts []core.VolumeMount `json:"volumeMounts,omitempty"`
// replicas is the desired number of replicas of the given Template.
// These are replicas in the sense that they are instantiations of the
// same Template, but individual replicas also have a consistent identity.
// If unspecified, defaults to 1.
// +optional
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
// volumeClaimTemplates is a list of claims that will be created while restore from VolumeSnapshot
// +optional
VolumeClaimTemplates []core.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
}
type TargetRef struct {
APIVersion string `json:"apiVersion,omitempty"`
Kind string `json:"kind,omitempty"`
Name string `json:"name,omitempty"`
}