mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-13 14:13:10 +01:00
feat: support snapshot recovery job
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
parent
c32ddf1a0c
commit
725a90e0d9
@ -153,7 +153,9 @@ func reconcileJob(
|
|||||||
WithValues("jobName", job.Name)
|
WithValues("jobName", job.Name)
|
||||||
contextLogger.Debug("starting job reconciliation")
|
contextLogger.Debug("starting job reconciliation")
|
||||||
|
|
||||||
if getCNPGJobRole(&job) != "full-recovery" {
|
jobRole := getCNPGJobRole(&job)
|
||||||
|
if jobRole != "full-recovery" &&
|
||||||
|
jobRole != "snapshot-recovery" {
|
||||||
contextLogger.Debug("job is not a recovery job, skipping")
|
contextLogger.Debug("job is not a recovery job, skipping")
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
@ -163,7 +165,7 @@ func reconcileJob(
|
|||||||
if err := reconcilePodSpec(
|
if err := reconcilePodSpec(
|
||||||
cluster,
|
cluster,
|
||||||
&mutatedJob.Spec.Template.Spec,
|
&mutatedJob.Spec.Template.Spec,
|
||||||
"full-recovery",
|
jobRole,
|
||||||
corev1.Container{
|
corev1.Container{
|
||||||
Args: []string{"restore"},
|
Args: []string{"restore"},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user