forked from open-cluster-management-io/policy-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhdr-app-configmap.txt
153 lines (138 loc) · 4.57 KB
/
hdr-app-configmap.txt
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
#
# This configmap is used by all three policies
# and specifies the configuration required to install velero, backup or restore
#
# This config is set to use snapshotVolumes for backing up PVs; this option works only if
# your backup and restore clusters use the same StorageClass
# and the restore cluster can access the region/location where the volume snapshot are stored
#
apiVersion: v1
kind: ConfigMap
metadata:
name: hdr-app-configmap
data:
###### Configuration for the oadp-hdr-app-install policy ###
########################################################
# backupNS is the ns where velero/oadp is installed on the cluster
backupNS: acm-app-backup
channel: stable-1.1
subscriptionName: redhat-oadp-operator
# define cloud-credential used to connect to the storage location, base64 encoded string
# for example, for an aws storage location, the credential is in this format
#
# [default]
# aws_access_key_id=<id>
# aws_secret_access_key=<key>
#
dpaAwsBackupCloudCredentials: W2RlZmF1bHRdCmF3c19hY2Nlc3Nfa2V5X2lkPTxpZD4KYXdzX3NlY3JldF9hY2Nlc3Nfa2V5PTxrZXk+
## DPA resource configuration
#
#DPA resource name; use the same name for all hubs, the PV cannot be restored if
# the BackupStorageLocation resource doesn't have the same name
# on both backup and restore cluster
dpaName: dpa
dpaBackupCloudCredentialsName: cloud-credentials
#######
# DPA spec
# below is the spec format for an aws storage
# update this with the DPA format for the type of storage you are using
# values specified with brackets <> should be updated before applying this configmap
dpaSpec: "{
\"backupLocations\": [
{
\"velero\": {
\"config\": {
\"profile\": \"default\",
\"region\": \"<us-east-1>\"
},
\"credential\": {
\"key\": \"cloud\",
\"name\": \"<dpaBackupCloudCredentialsName>\"
},
\"default\": true,
\"objectStorage\": {
\"bucket\": \"<bucket-name>\",
\"prefix\": \"<in-bucket-folder-name>\"
},
\"provider\": \"<aws>\"
}
}
],
\"configuration\": {
\"restic\": {
\"enable\": false
},
\"velero\": {
\"defaultPlugins\": [
\"openshift\",
\"aws\"
],
\"podConfig\": {
\"resourceAllocations\": {
\"limits\": {
\"cpu\": \"2\",
\"memory\": \"1Gi\"
},
\"requests\": {
\"cpu\": \"500m\",
\"memory\": \"256Mi\"
}
}
}
}
},
\"snapshotLocations\": [
{
\"velero\": {
\"config\": {
\"profile\": \"default\",
\"region\": \"<use here ClusterClaim region.open-cluster-management.io value>\"
},
\"provider\": \"<aws>\"
}
},
{
\"velero\": {
\"config\": {
\"profile\": \"<east1>\",
\"region\": \"<us-east-1>\"
},
\"provider\": \"<aws>\"
}
},
]
}"
## END DPA ##
###### End Configuration for the oadp-hdr-app-install policy ###
###########################################################
### Configuration for the oadp-hdr-app-backup policy
################################################
# the name prefix for the resource to backup
backupPrefix: acm-pv
backupSnapshotVolumes: "true"
backupDefaultVolumesToRestic: "false"
backupVolumeSnapshotLocation: dpa-1
backupSchedule: 0 */1 * * *
backupTTL: 240h0m0s
# list here all applications namespaces you want to backup
# for example backupNSToBackup: "[\"pacman-ns\", \"helloworld-pv-ns\"]"
backupNSToBackup: "[\"app1-ns\", \"app2-ns\", \"app3-ns\"]"
# resources to be excluded from backup; if empty, all resources from the specified namespace are included
# for example backupExcludedResources: "[\"secrets\", \"configmaps\"]"
backupExcludedResources: "[]"
###### End Configuration for the oadp-hdr-app-backup policy ###
###########################################################
###### Configuration for the oadp-hdr-app-restore policy ###
####################################
restoreRestorePVs: "true"
# list here all apps ns you do not want to restore from the specified backup
# if empty, all namespaces in this backup are restored
# for example restoreNSToExcludeFromRestore: "[\"box-ns\"]"
restoreNSToExcludeFromRestore: "[]"
## restore storage class mapping ##
restoreStorageConfigName: storage-class-acm-app
restoreStorageConfigMappings: "{
\"managed-csi\": \"thin\",
}"
###### End Configuration for the oadp-hdr-app-restore policy ###
###########################################################