feat: support snapshot recovery job (#258)

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
Marco Nenciarini 2025-04-16 11:45:52 +02:00 committed by GitHub
parent c32ddf1a0c
commit e00024f136
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"},
},