Restore job has duplicate labels
Restore jobs and job templates were using "global" labels and
annotations twice in the ObjectMeta. This changes updates the second
definiton to use "pgbackrest" labels (defined in
`spec.Backups.PGBackRest.Metadata`)
@@ -1030,11 +1030,11 @@ func (r *Reconciler) reconcileRestoreJob(ctx context.Context,
annotations := naming.Merge(
cluster.Spec.Metadata.GetAnnotationsOrNil(),
- cluster.Spec.Metadata.GetAnnotationsOrNil(),
+ cluster.Spec.Backups.PGBackRest.Metadata.GetAnnotationsOrNil(),
map[string]string{naming.PGBackRestConfigHash: configHash})
labels := naming.Merge(
cluster.Spec.Metadata.GetLabelsOrNil(),
- cluster.Spec.Metadata.GetLabelsOrNil(),
+ cluster.Spec.Backups.PGBackRest.Metadata.GetLabelsOrNil(),
naming.PGBackRestRestoreJobLabels(cluster.Name),
map[string]string{naming.LabelStartupInstance: instanceName},
)
