Skip to content

Commit

Permalink
add pvc label to the pvc config
Browse files Browse the repository at this point in the history
Signed-off-by: Valentina Birsan <[email protected]>
  • Loading branch information
birsanv authored and openshift-merge-bot[bot] committed Jan 22, 2024
1 parent 3c330eb commit a5518e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ spec:
{{- $acm_restore_name_fixed := split $backup_name_prefix $restore_name }}
{{- $acm_restore_name := (cat $acm_restore_name_fixed._0 $backup_name) | replace " " "" }}
{{- $acm_restore_name_active := (cat $acm_restore_name "-active") | replace " " "" }}
{{- $acm_restore := lookup $velero_api $kind_restore $ns $acm_restore_name }}
{{- $acm_restore_active := lookup $velero_api $kind_restore $ns $acm_restore_name_active }}
{{- /* the acm restore should exist, so this is the passive hub */ -}}
{{ if and (eq $acm_restore.metadata.name $acm_restore_name) }}
{{ if or (eq $acm_restore.metadata.name $acm_restore_name) (eq $acm_restore_active.metadata.name $acm_restore_name_active) }}
{{- range $pvc_data := split "##" (fromConfigMap $ns $volsync_pvcs "pvcs") }}
{{- $pvc_list := splitn "#" 2 $pvc_data }}
Expand Down Expand Up @@ -243,15 +245,6 @@ spec:
status:
latestMoverStatus:
result: Successful
- complianceType: musthave
objectDefinition:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: {{ $rd.metadata.namespace }}
name: {{ $rd.spec.restic.destinationPVC }}
status:
phase: Bound
{{- end }}
{{- end }}
remediationAction: inform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ spec:
namespace: {{ $pvc.metadata.namespace }}
labels:
cluster.open-cluster-management.io/backup: cluster-activation
cluster.open-cluster-management.io/volsync-pvc: {{ $pvc.metadata.name }}
data:
{{- if not ( eq $pvc.spec.storageClassName "") }}
storageClassName: {{ $pvc.spec.storageClassName }}
Expand Down

0 comments on commit a5518e9

Please sign in to comment.