diff --git a/community/CM-Configuration-Management/acm-hub-pvc-backup/README.md b/community/CM-Configuration-Management/acm-hub-pvc-backup/README.md index bbd131bd..5816795b 100644 --- a/community/CM-Configuration-Management/acm-hub-pvc-backup/README.md +++ b/community/CM-Configuration-Management/acm-hub-pvc-backup/README.md @@ -114,7 +114,7 @@ spec: ### Created by the ACM user -#### acm-hub-pvc-backup-config +#### hub-pvc-backup - Created by the user on the backup hub. @@ -125,7 +125,7 @@ spec: kind: ConfigMap apiVersion: v1 metadata: - name: acm-hub-pvc-backup-config + name: hub-pvc-backup namespace: open-cluster-management-backup labels: cluster.open-cluster-management.io/backup: cluster-activation @@ -141,7 +141,7 @@ data: ``` The above ConfigMap defines global options for all hub PVCs that need to be backed up with the policy. If you want to provide custom -properties for a PVC, you should define a ConfigMap using this name convention : `acm-hub-pvc-backup-config--` +properties for a PVC, you should define a ConfigMap using this name convention : `hub-pvc-backup--` For example, if the PVC `my-pvc` created in namespace `ns-1` should be backed up every 5 hours, create this ConfigMap under the `open-cluster-management-backup` namespace : @@ -149,7 +149,7 @@ For example, if the PVC `my-pvc` created in namespace `ns-1` should be backed up kind: ConfigMap apiVersion: v1 metadata: - name: acm-hub-pvc-backup-config-ns-1-my-pvc + name: hub-pvc-backup-ns-1-my-pvc namespace: open-cluster-management-backup labels: cluster.open-cluster-management.io/backup: cluster-activation @@ -191,7 +191,7 @@ type: Opaque ### Generated by the policy -#### acm-hub-pvc-backup-config-info- +#### hub-pvc-backup- Created by the volsync policy on the backup hub for each PVC using the PVC's settings This resource is backed up and used by the volsync ReplicationDestination to recreate the PV on the restore hub. @@ -200,7 +200,7 @@ This resource is backed up and used by the volsync ReplicationDestination to rec kind: ConfigMap apiVersion: v1 metadata: - name: acm-hub-pvc-backup-config-info-mongo-storage + name: hub-pvc-backup-mongo-storage namespace: pacman-ns labels: cluster.open-cluster-management.io/backup: cluster-activation @@ -212,7 +212,7 @@ data: ``` -#### acm-hub-pvc-backup-config-pvcs +#### hub-pvc-backup-pvcs Created by the policy on the backup hub; lists all PVCs that need to be restored. This resource is backed up @@ -220,10 +220,10 @@ Created by the policy on the backup hub; lists all PVCs that need to be restored kind: ConfigMap apiVersion: v1 metadata: - name: acm-hub-pvc-backup-config-pvcs + name: hub-pvc-backup-pvcs namespace: open-cluster-management-backup labels: - app: acm-hub-pvc-backup-config-pvcs + app: hub-pvc-backup-pvcs cluster.open-cluster-management.io/backup: cluster-activation data: pvcs: 'pacman-restore#mongo-storage##pacman-vb#mongo-storage##pacman#mongo-storage' diff --git a/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-config.yaml b/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-config.yaml index 24cbca22..b0117b8e 100644 --- a/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-config.yaml +++ b/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-config.yaml @@ -1,5 +1,5 @@ -# The acm-hub-pvc-backup-config ConfigMap and secret must be defined under the open-cluster-management-backup ns, -# if a BackupSchedule is running and there are PVCs with the volsync label. +# The hub-pvc-backup ConfigMap and acm-hub-pvc-backup-restic-secret Secret must be defined under the open-cluster-management-backup ns, +# when a BackupSchedule is running and there are PVCs with the cluster.open-cluster-management.io/backup-hub-pvc label. # The volsync ConfigMap is in this format: ## #kind: ConfigMap diff --git a/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-destination.yaml b/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-destination.yaml index 698a1c76..675b12ac 100644 --- a/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-destination.yaml +++ b/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-destination.yaml @@ -31,7 +31,7 @@ spec: {{- $ns := "open-cluster-management-backup" }} {{- $volsync_secret := "acm-hub-pvc-backup-restic-secret" }} - {{- /* common volsync config; to define different config for a PVC, create a acm-hub-pvc-backup-config-pvc-ns-pvcname configMap */ -}} + {{- /* common volsync config; to define different config for a PVC, create a hub-pvc-backup-pvc-ns-pvcname configMap */ -}} {{- $volsync_map := "hub-pvc-backup" }} {{- $volsync_label := "cluster.open-cluster-management.io/backup-hub-pvc" }} @@ -41,7 +41,7 @@ spec: {{- $volsync_pvcs := "hub-pvc-backup-pvcs" }} {{- /* Create the volsync ReplicationDestination and secret - if Restore exists, PVC is created by a Restore and no Backup is running */ -}} - {{- /* Use the hub-pvc-backup-pvcs-pvcns-pvcname config instead of the default acm-hub-pvc-backup-config map, if such map exists under the $ns */ -}} + {{- /* Use the hub-pvc-backup-pvcs-pvcns-pvcname config instead of the default hub-pvc-backup-pvcs map, if such map exists under the $ns */ -}} {{- /* hub-pvc-backup-pvcs map should exist and have a backup-name label */ -}} {{- $volsync_pvcs_map := lookup "v1" "ConfigMap" $ns $volsync_pvcs }} @@ -194,7 +194,7 @@ spec: {{- $schedule_label := "cluster.open-cluster-management.io/backup-schedule-type, cluster.open-cluster-management.io/backup-schedule-type in (resources)"}} {{- $volsync_backup_cond := gt (len ( lookup $velero_api $kind_schedule $ns "" $schedule_label).items ) 0 }} - {{- /* acm-hub-pvc-backup-config-pvcs map should exist */ -}} + {{- /* hub-pvc-backup-pvcs map should exist */ -}} {{- $volsync_pvcs := "hub-pvc-backup-pvcs" }} {{- $volsync_pvcs_map := lookup "v1" "ConfigMap" $ns $volsync_pvcs }} {{- $volsync_restore_cond := eq $volsync_pvcs_map.metadata.name $volsync_pvcs }} @@ -236,7 +236,7 @@ spec: {{- $schedule_label := "cluster.open-cluster-management.io/backup-schedule-type, cluster.open-cluster-management.io/backup-schedule-type in (resources)"}} {{- $volsync_backup_cond := gt (len ( lookup $velero_api $kind_schedule $ns "" $schedule_label).items ) 0 }} {{- $volsync_label := "cluster.open-cluster-management.io/backup-hub-pvc" }} - {{- /* acm-hub-pvc-backup-config-pvcs map should exist */ -}} + {{- /* hub-pvc-backup-pvcs map should exist */ -}} {{- $volsync_pvcs := "hub-pvc-backup-pvcs" }} {{- $volsync_pvcs_map := lookup "v1" "ConfigMap" $ns $volsync_pvcs }} {{- $volsync_restore_cond := eq $volsync_pvcs_map.metadata.name $volsync_pvcs }} diff --git a/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-source.yaml b/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-source.yaml index 328aa10e..0888dd1c 100644 --- a/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-source.yaml +++ b/community/CM-Configuration-Management/acm-hub-pvc-backup/acm-hub-pvc-backup-source.yaml @@ -65,7 +65,7 @@ spec: {{- range $pvc := (lookup "v1" "PersistentVolumeClaim" "" "" $volsync_label).items }} {{- if eq $pvc.status.phase "Bound" }} - {{- /* Use the hub-pvc-backup-pvcns-pvcname config instead of the default acm-hub-pvc-backup-config map, if such map exists under the $ns */ -}} + {{- /* Use the hub-pvc-backup-pvcns-pvcname config instead of the default hub-pvc-backup map, if such map exists under the $ns */ -}} {{- $pvc_config_name := ( (cat $volsync_map "-" $pvc.metadata.namespace "-" $pvc.metadata.name ) | replace " " "" ) }} {{- $pvc_config_info_name := ( (cat $volsync_map "-" $pvc.metadata.name ) | replace " " "" ) }}