mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 21:23:12 +01:00
feat: support snapshot recovery job (#258)
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
parent
c32ddf1a0c
commit
e00024f136
@ -153,7 +153,9 @@ func reconcileJob(
|
||||
WithValues("jobName", job.Name)
|
||||
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")
|
||||
return nil, nil
|
||||
}
|
||||
@ -163,7 +165,7 @@ func reconcileJob(
|
||||
if err := reconcilePodSpec(
|
||||
cluster,
|
||||
&mutatedJob.Spec.Template.Spec,
|
||||
"full-recovery",
|
||||
jobRole,
|
||||
corev1.Container{
|
||||
Args: []string{"restore"},
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user