mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-19 05:08:26 +02:00
fix static check violations
This commit is contained in:
+3
-3
@@ -542,8 +542,8 @@ func (c *Cluster) syncLogicalBackupJob() error {
|
|||||||
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 {
|
||||||
|
|
||||||
desiredJob, err = c.generateLogicalBackupJob()
|
desiredJob, err = c.generateLogicalBackupJob()
|
||||||
if err = c.updateCronJob(desiredJob); err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not generate the desired job state: %v", err)
|
return fmt.Errorf("could not generate the desired cron job state: %v", err)
|
||||||
}
|
}
|
||||||
if match, reason := k8sutil.SameCronJob(job, desiredJob); !match {
|
if match, reason := k8sutil.SameCronJob(job, desiredJob); !match {
|
||||||
c.logCronJobChanges(job, desiredJob, false, reason)
|
c.logCronJobChanges(job, desiredJob, false, reason)
|
||||||
@@ -567,7 +567,7 @@ func (c *Cluster) syncLogicalBackupJob() error {
|
|||||||
return fmt.Errorf("could not create missing logical backup job: %v", err)
|
return fmt.Errorf("could not create missing logical backup job: %v", err)
|
||||||
}
|
}
|
||||||
c.logger.Infof("logical backup job %q already exists", util.NameFromMeta(job.ObjectMeta))
|
c.logger.Infof("logical backup job %q already exists", util.NameFromMeta(job.ObjectMeta))
|
||||||
if job, err = c.KubeClient.CronJobsGetter.CronJobs(c.Namespace).Get(c.logicalBackupJob.Name, metav1.GetOptions{}); err != nil {
|
if _, err = c.KubeClient.CronJobsGetter.CronJobs(c.Namespace).Get(c.logicalBackupJob.Name, metav1.GetOptions{}); err != nil {
|
||||||
return fmt.Errorf("could not fetch existing logical backup job: %v", err)
|
return fmt.Errorf("could not fetch existing logical backup job: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ function main(){
|
|||||||
clean_up
|
clean_up
|
||||||
start_minikube
|
start_minikube
|
||||||
start_operator
|
start_operator
|
||||||
submit_postgresql_manifest
|
# submit_postgresql_manifest
|
||||||
forward_ports
|
forward_ports
|
||||||
check_health
|
check_health
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user