/
labels_annotations.go
113 lines (82 loc) · 4.47 KB
/
labels_annotations.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
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
/*
Copyright 2018 the Velero 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 v1
const (
// BackupNameLabel is the label key used to identify a backup by name.
BackupNameLabel = "velero.io/backup-name"
// BackupUIDLabel is the label key used to identify a backup by uid.
BackupUIDLabel = "velero.io/backup-uid"
// RestoreNameLabel is the label key used to identify a restore by name.
RestoreNameLabel = "velero.io/restore-name"
// ScheduleNameLabel is the label key used to identify a schedule by name.
ScheduleNameLabel = "velero.io/schedule-name"
// RestoreUIDLabel is the label key used to identify a restore by uid.
RestoreUIDLabel = "velero.io/restore-uid"
// PodUIDLabel is the label key used to identify a pod by uid.
PodUIDLabel = "velero.io/pod-uid"
// PVCUIDLabel is the label key used to identify a PVC by uid.
PVCUIDLabel = "velero.io/pvc-uid"
// PodVolumeOperationTimeoutAnnotation is the annotation key used to apply
// a backup/restore-specific timeout value for pod volume operations (i.e.
// pod volume backups/restores).
PodVolumeOperationTimeoutAnnotation = "velero.io/pod-volume-timeout"
// StorageLocationLabel is the label key used to identify the storage
// location of a backup.
StorageLocationLabel = "velero.io/storage-location"
// VolumeNamespaceLabel is the label key used to identify which
// namespace a repository stores backups for.
VolumeNamespaceLabel = "velero.io/volume-namespace"
// RepositoryTypeLabel is the label key used to identify the type of a repository
RepositoryTypeLabel = "velero.io/repository-type"
// DataUploadLabel is the label key used to identify the dataupload for snapshot backup pod
DataUploadLabel = "velero.io/data-upload"
// DataUploadSnapshotInfoLabel is used to identify the configmap that contains the snapshot info of a data upload
// normally the value of the label should the "true" or "false"
DataUploadSnapshotInfoLabel = "velero.io/data-upload-snapshot-info"
// DataDownloadLabel is the label key used to identify the datadownload for snapshot restore pod
DataDownloadLabel = "velero.io/data-download"
// SourceClusterK8sVersionAnnotation is the label key used to identify the k8s
// git version of the backup , i.e. v1.16.4
SourceClusterK8sGitVersionAnnotation = "velero.io/source-cluster-k8s-gitversion"
// SourceClusterK8sMajorVersionAnnotation is the label key used to identify the k8s
// major version of the backup , i.e. 1
SourceClusterK8sMajorVersionAnnotation = "velero.io/source-cluster-k8s-major-version"
// SourceClusterK8sMajorVersionAnnotation is the label key used to identify the k8s
// minor version of the backup , i.e. 16
SourceClusterK8sMinorVersionAnnotation = "velero.io/source-cluster-k8s-minor-version"
// ResourceTimeoutAnnotation is the annotation key used to carry the global resource
// timeout value for backup to plugins.
ResourceTimeoutAnnotation = "velero.io/resource-timeout"
// AsyncOperationIDLabel is the label key used to identify the async operation ID
AsyncOperationIDLabel = "velero.io/async-operation-id"
// PVCNameLabel is the label key used to identify the PVC's namespace and name.
// The format is <namespace>/<name>.
PVCNamespaceNameLabel = "velero.io/pvc-namespace-name"
// ResourceUsageLabel is the label key to explain the Velero resource usage.
ResourceUsageLabel = "velero.io/resource-usage"
// VolumesToBackupAnnotation is the annotation on a pod whose mounted volumes
// need to be backed up using pod volume backup.
VolumesToBackupAnnotation = "backup.velero.io/backup-volumes"
// VolumesToExcludeAnnotation is the annotation on a pod whose mounted volumes
// should be excluded from pod volume backup.
VolumesToExcludeAnnotation = "backup.velero.io/backup-volumes-excludes"
)
type AsyncOperationIDPrefix string
const (
AsyncOperationIDPrefixDataDownload AsyncOperationIDPrefix = "dd-"
AsyncOperationIDPrefixDataUpload AsyncOperationIDPrefix = "du-"
)
type VeleroResourceUsage string
const (
VeleroResourceUsageDataUploadResult VeleroResourceUsage = "DataUpload"
)