address static checks
This commit is contained in:
parent
dc2f7072c7
commit
273c8e3bcb
|
|
@ -540,8 +540,11 @@ func (c *Cluster) syncLogicalBackupJob() error {
|
||||||
c.setProcessName("syncing the logical backup job")
|
c.setProcessName("syncing the logical backup job")
|
||||||
|
|
||||||
// operator pod at startup syncs all clusters, logicalBackupJob will be nil at this point
|
// operator pod at startup syncs all clusters, logicalBackupJob will be nil at this point
|
||||||
if (c.Postgresql.Spec.EnableLogicalBackup == true) && (c.logicalBackupJob == nil) {
|
if c.Postgresql.Spec.EnableLogicalBackup && c.logicalBackupJob == nil {
|
||||||
c.logicalBackupJob, err = c.generateLogicalBackupJob()
|
c.logicalBackupJob, err = c.generateLogicalBackupJob()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("could not generate the desired cron job state, presumably during the first Sync on operator pod start-up: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if job, err = c.KubeClient.CronJobsGetter.CronJobs(c.Namespace).Get(c.logicalBackupJob.Name, metav1.GetOptions{}); err == nil {
|
if job, err = c.KubeClient.CronJobsGetter.CronJobs(c.Namespace).Get(c.logicalBackupJob.Name, metav1.GetOptions{}); err == nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue