diff --git a/controllers/heat_controller.go b/controllers/heat_controller.go index 73b55cd8..84285e8d 100644 --- a/controllers/heat_controller.go +++ b/controllers/heat_controller.go @@ -358,7 +358,7 @@ func (r *HeatReconciler) reconcileNormal(ctx context.Context, instance *heatv1be condition.SeverityInfo, condition.RabbitMqTransportURLReadyRunningMessage)) - return ctrl.Result{RequeueAfter: time.Duration(10) * time.Second}, nil + return ctrl.Result{RequeueAfter: time.Second * 10}, nil } // @@ -373,7 +373,7 @@ func (r *HeatReconciler) reconcileNormal(ctx context.Context, instance *heatv1be condition.RequestedReason, condition.SeverityInfo, condition.RabbitMqTransportURLReadyRunningMessage)) - return ctrl.Result{RequeueAfter: time.Duration(10) * time.Second}, fmt.Errorf("TransportURL secret %s not found", instance.Status.TransportURLSecret) + return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("TransportURL secret %s not found", instance.Status.TransportURLSecret) } instance.Status.Conditions.Set(condition.FalseCondition( condition.RabbitMqTransportURLReadyCondition, @@ -627,7 +627,7 @@ func (r *HeatReconciler) reconcileInit(ctx context.Context, jobDef, heatv1beta1.DbSyncHash, instance.Spec.PreserveJobs, - time.Duration(5)*time.Second, + time.Second * 10, dbSyncHash, ) ctrlResult, err = dbSyncjob.DoJob( diff --git a/controllers/heatapi_controller.go b/controllers/heatapi_controller.go index 7601a78e..c28cc73a 100644 --- a/controllers/heatapi_controller.go +++ b/controllers/heatapi_controller.go @@ -293,7 +293,7 @@ func (r *HeatAPIReconciler) reconcileInit( heatapi.ServiceName, serviceLabels, data, - time.Duration(5)*time.Second, + time.Second * 5, ) if err != nil { instance.Status.Conditions.Set(condition.FalseCondition( @@ -331,7 +331,7 @@ func (r *HeatAPIReconciler) reconcileInit( PasswordSelector: instance.Spec.PasswordSelectors.Service, } - ksSvcObj := keystonev1.NewKeystoneService(ksSvcSpec, instance.Namespace, serviceLabels, time.Duration(10)*time.Second) + ksSvcObj := keystonev1.NewKeystoneService(ksSvcSpec, instance.Namespace, serviceLabels, time.Second * 10) ctrlResult, err = ksSvcObj.CreateOrPatch(ctx, helper) if err != nil || (ctrlResult != ctrl.Result{}) { return ctrlResult, err @@ -356,7 +356,7 @@ func (r *HeatAPIReconciler) reconcileInit( instance.Namespace, ksEndptSpec, serviceLabels, - time.Duration(10)*time.Second) + time.Second * 10) ctrlResult, err = ksEndpt.CreateOrPatch(ctx, helper) if err != nil || (ctrlResult != ctrl.Result{}) { return ctrlResult, err @@ -526,7 +526,7 @@ func (r *HeatAPIReconciler) reconcileNormal(ctx context.Context, instance *heatv // Define a new Deployment object depl := deployment.NewDeployment( heatapi.Deployment(instance, inputHash, serviceLabels), - time.Duration(5)*time.Second, + time.Second * 5, ) ctrlResult, err = depl.CreateOrPatch(ctx, helper) diff --git a/controllers/heatcfnapi_controller.go b/controllers/heatcfnapi_controller.go index 859facd8..b86c69ec 100644 --- a/controllers/heatcfnapi_controller.go +++ b/controllers/heatcfnapi_controller.go @@ -297,7 +297,7 @@ func (r *HeatCfnAPIReconciler) reconcileInit( heatcfnapi.ServiceName, serviceLabels, data, - time.Duration(5)*time.Second, + time.Second * 5, ) if err != nil { instance.Status.Conditions.Set(condition.FalseCondition( @@ -335,7 +335,7 @@ func (r *HeatCfnAPIReconciler) reconcileInit( PasswordSelector: instance.Spec.PasswordSelectors.Service, } - ksSvcObj := keystonev1.NewKeystoneService(ksSvcSpec, instance.Namespace, serviceLabels, time.Duration(10)*time.Second) + ksSvcObj := keystonev1.NewKeystoneService(ksSvcSpec, instance.Namespace, serviceLabels, time.Second * 10) ctrlResult, err = ksSvcObj.CreateOrPatch(ctx, helper) if err != nil || (ctrlResult != ctrl.Result{}) { return ctrlResult, err @@ -360,7 +360,7 @@ func (r *HeatCfnAPIReconciler) reconcileInit( instance.Namespace, ksEndptSpec, serviceLabels, - time.Duration(10)*time.Second) + time.Second * 10) ctrlResult, err = ksEndpt.CreateOrPatch(ctx, helper) if err != nil || (ctrlResult != ctrl.Result{}) { return ctrlResult, err @@ -530,7 +530,7 @@ func (r *HeatCfnAPIReconciler) reconcileNormal(ctx context.Context, instance *he // Define a new Deployment object depl := deployment.NewDeployment( heatcfnapi.Deployment(instance, inputHash, serviceLabels), - time.Duration(5)*time.Second, + time.Second * 10, ) ctrlResult, err = depl.CreateOrPatch(ctx, helper) diff --git a/controllers/heatengine_controller.go b/controllers/heatengine_controller.go index 0fff3302..84b7d53b 100644 --- a/controllers/heatengine_controller.go +++ b/controllers/heatengine_controller.go @@ -369,7 +369,7 @@ func (r *HeatEngineReconciler) reconcileNormal( depl := deployment.NewDeployment( heatengine.Deployment(instance, inputHash, serviceLabels), - time.Duration(5)*time.Second, + time.Second * 5, ) ctrlResult, err = depl.CreateOrPatch(ctx, helper)