/
generated.proto
259 lines (185 loc) · 8.71 KB
/
generated.proto
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
/*
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.
*/
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
syntax = 'proto2';
package stash.appscode.dev.apimachinery.apis.stash.v1alpha1;
import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
import "kmodules.xyz/objectstore-api/api/v1/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "v1alpha1";
message FileGroup {
// Source of the backup volumeName:path
optional string path = 1;
// Tags of a snapshots
repeated string tags = 2;
// retention policy of snapshots
optional string retentionPolicyName = 3;
}
// LocalTypedReference contains enough information to let you inspect or modify the referred object.
message LocalTypedReference {
// Kind of the referent.
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
// +optional
optional string kind = 1;
// Name of the referent.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
// +optional
optional string name = 2;
// API version of the referent.
// +optional
optional string apiVersion = 3;
}
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=recoveries,singular=recovery,shortName=rec,categories={storage,appscode,all}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Repository-NS",type="string",JSONPath=".spec.repository.namespace"
// +kubebuilder:printcolumn:name="Repository-Name",type="string",JSONPath=".spec.repository.name"
// +kubebuilder:printcolumn:name="Snapshot",type="string",JSONPath=".spec.snapshot"
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
message Recovery {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
optional RecoverySpec spec = 2;
optional RecoveryStatus status = 3;
}
message RecoveryList {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
repeated Recovery items = 2;
}
message RecoverySpec {
optional k8s.io.api.core.v1.ObjectReference repository = 1;
// Snapshot to recover. Default is latest snapshot.
// +optional
optional string snapshot = 2;
repeated string paths = 3;
repeated kmodules.xyz.objectstore_api.api.v1.LocalSpec recoveredVolumes = 4;
repeated k8s.io.api.core.v1.LocalObjectReference imagePullSecrets = 5;
// NodeSelector is a selector which must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
map<string, string> nodeSelector = 6;
}
message RecoveryStatus {
// observedGeneration is the most recent generation observed for this resource. It corresponds to the
// resource's generation, which is updated on mutation by the API Server.
// +optional
optional int64 observedGeneration = 1;
optional string phase = 2;
repeated RestoreStats stats = 3;
}
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=repositories,singular=repository,shortName=repo,categories={stash,appscode}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Integrity",type="boolean",JSONPath=".status.integrity"
// +kubebuilder:printcolumn:name="Size",type="string",JSONPath=".status.totalSize"
// +kubebuilder:printcolumn:name="Snapshot-Count",type="integer",JSONPath=".status.snapshotCount"
// +kubebuilder:printcolumn:name="Last-Successful-Backup",type="date",format="date-time",JSONPath=".status.lastBackupTime"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
message Repository {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
optional RepositorySpec spec = 2;
optional RepositoryStatus status = 3;
}
message RepositoryList {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
repeated Repository items = 2;
}
message RepositorySpec {
// Backend specify the storage where backed up snapshot will be stored
optional kmodules.xyz.objectstore_api.api.v1.Backend backend = 1;
// If true, delete respective restic repository
// +optional
optional bool wipeOut = 2;
}
message RepositoryStatus {
// ObservedGeneration is the most recent generation observed for this Repository. It corresponds to the
// Repository's generation, which is updated on mutation by the API Server.
// +optional
optional int64 observedGeneration = 1;
// FirstBackupTime indicates the timestamp when the first backup was taken
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time firstBackupTime = 2;
// LastBackupTime indicates the timestamp when the latest backup was taken
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastBackupTime = 3;
// Integrity shows result of repository integrity check after last backup
optional bool integrity = 4;
// TotalSize show size of repository after last backup
optional string totalSize = 11;
// SnapshotCount shows number of snapshots stored in the repository
optional int64 snapshotCount = 6;
// SnapshotsRemovedOnLastCleanup shows number of old snapshots cleaned up according to retention policy on last backup session
optional int64 snapshotsRemovedOnLastCleanup = 7;
// Deprecated
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastSuccessfulBackupTime = 8;
// Deprecated
optional string lastBackupDuration = 9;
// Deprecated
optional int64 backupCount = 10;
}
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=restics,singular=restic,shortName=rst,categories={stash,appscode,all}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Selector",type="string",JSONPath=".spec.selector"
// +kubebuilder:printcolumn:name="Schedule",type="string",JSONPath=".spec.schedule"
// +kubebuilder:printcolumn:name="Backup-Type",type="string",JSONPath=".spec.type",priority=10
// +kubebuilder:printcolumn:name="Paused",type="boolean",JSONPath=".spec.paused"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
message Restic {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
optional ResticSpec spec = 2;
}
message ResticList {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
repeated Restic items = 2;
}
message ResticSpec {
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
repeated FileGroup fileGroups = 2;
optional kmodules.xyz.objectstore_api.api.v1.Backend backend = 3;
optional string schedule = 4;
// Pod volumes to mount into the sidecar container's filesystem.
repeated k8s.io.api.core.v1.VolumeMount volumeMounts = 5;
// Compute Resources required by the sidecar container.
optional k8s.io.api.core.v1.ResourceRequirements resources = 6;
repeated RetentionPolicy retentionPolicies = 7;
// https://github.com/stashed/stash/issues/225
optional string type = 8;
// Indicates that the Restic is paused from taking backup. Default value is 'false'
// +optional
optional bool paused = 9;
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
// in the case of docker, only DockerConfig type secrets are honored.
// More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
// +optional
repeated k8s.io.api.core.v1.LocalObjectReference imagePullSecrets = 10;
}
message RestoreStats {
optional string path = 1;
optional string phase = 2;
optional string duration = 3;
}
message RetentionPolicy {
optional string name = 1;
optional int64 keepLast = 2;
optional int64 keepHourly = 3;
optional int64 keepDaily = 4;
optional int64 keepWeekly = 5;
optional int64 keepMonthly = 6;
optional int64 keepYearly = 7;
repeated string keepTags = 8;
optional bool prune = 9;
optional bool dryRun = 10;
}