minore changes

This commit is contained in:
Sergey Dudoladov
2019-04-08 15:03:56 +02:00
parent 76c00f3fa6
commit 6f855d5190
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -1316,11 +1316,12 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1beta1.CronJob, error) {
return nil, fmt.Errorf("could not generate pod template for logical backup cron job: %v", err)
}
// pods of k8s jobs support only "OnFailure" or "Never"
// but the default is "Always"
podTemplate.Spec.RestartPolicy = "OnFailure"
podTemplate.Spec.Affinity = &podAffinity
// affects containers within a pod on the same node
// pods of k8s jobs support only "OnFailure" or "Never"
podTemplate.Spec.RestartPolicy = "Never"
jobSpec := batchv1.JobSpec{Template: *podTemplate}
jobTemplateSpec := batchv1beta1.JobTemplateSpec{