@@ -99,7 +99,7 @@ func (r *ConfigurationReconciler) Reconcile(ctx context.Context, req ctrl.Reques
99
99
klog .InfoS ("performing Configuration Destroy" , "Namespace" , req .Namespace , "Name" , req .Name , "JobName" , meta .DestroyJobName )
100
100
// if allow to delete halfway, we will not check the status of the apply job.
101
101
102
- _ , err := terraform .GetTerraformStatus (ctx , meta .ControllerNamespace , meta .DestroyJobName , process .TerraformContainerName , process .TerraformInitContainerName )
102
+ _ , err := terraform .GetTerraformStatus (ctx , meta .ControllerNamespace , meta .DestroyJobName , types .TerraformContainerName , types .TerraformInitContainerName )
103
103
if err != nil {
104
104
klog .ErrorS (err , "Terraform destroy failed" )
105
105
if updateErr := meta .UpdateDestroyStatus (ctx , r .Client , types .ConfigurationDestroyFailed , err .Error ()); updateErr != nil {
@@ -151,7 +151,7 @@ func (r *ConfigurationReconciler) Reconcile(ctx context.Context, req ctrl.Reques
151
151
}
152
152
return ctrl.Result {RequeueAfter : 3 * time .Second }, errors .Wrap (err , "failed to create/update cloud resource" )
153
153
}
154
- state , err := terraform .GetTerraformStatus (ctx , meta .ControllerNamespace , meta .ApplyJobName , process .TerraformContainerName , process .TerraformInitContainerName )
154
+ state , err := terraform .GetTerraformStatus (ctx , meta .ControllerNamespace , meta .ApplyJobName , types .TerraformContainerName , types .TerraformInitContainerName )
155
155
if err != nil {
156
156
klog .ErrorS (err , "Terraform apply failed" )
157
157
if updateErr := meta .UpdateApplyStatus (ctx , r .Client , state , err .Error ()); updateErr != nil {
@@ -173,7 +173,7 @@ func (r *ConfigurationReconciler) terraformApply(ctx context.Context, configurat
173
173
174
174
if err := meta .GetApplyJob (ctx , k8sClient , & tfExecutionJob ); err != nil {
175
175
if kerrors .IsNotFound (err ) {
176
- return meta .AssembleAndTriggerJob (ctx , k8sClient , process .TerraformApply )
176
+ return meta .AssembleAndTriggerJob (ctx , k8sClient , types .TerraformApply )
177
177
}
178
178
}
179
179
klog .InfoS ("terraform apply job" , "Namespace" , tfExecutionJob .Namespace , "Name" , tfExecutionJob .Name )
@@ -229,7 +229,7 @@ func (r *ConfigurationReconciler) terraformDestroy(ctx context.Context, configur
229
229
if err := k8sClient .Get (ctx , client.ObjectKey {Name : meta .DestroyJobName , Namespace : meta .ControllerNamespace }, & destroyJob ); err != nil {
230
230
if kerrors .IsNotFound (err ) {
231
231
if err := r .Client .Get (ctx , client.ObjectKey {Name : configuration .Name , Namespace : configuration .Namespace }, & v1beta2.Configuration {}); err == nil {
232
- if err = meta .AssembleAndTriggerJob (ctx , k8sClient , process .TerraformDestroy ); err != nil {
232
+ if err = meta .AssembleAndTriggerJob (ctx , k8sClient , types .TerraformDestroy ); err != nil {
233
233
return err
234
234
}
235
235
}
@@ -480,7 +480,7 @@ func (r *ConfigurationReconciler) preCheck(ctx context.Context, configuration *v
480
480
return err
481
481
}
482
482
483
- return util .CreateTerraformExecutorClusterRole (ctx , k8sClient , fmt .Sprintf ("%s-%s" , meta .ControllerNamespace , process .ClusterRoleName ))
483
+ return util .CreateTerraformExecutorClusterRole (ctx , k8sClient , fmt .Sprintf ("%s-%s" , meta .ControllerNamespace , types .ClusterRoleName ))
484
484
}
485
485
486
486
// SetupWithManager setups with a manager
0 commit comments