Skip to content

Commit

Permalink
Also set resource k8s limits/requests on the apply job (#1553)
Browse files Browse the repository at this point in the history
* [HELM] - Job Label Chart Fix (#1551)

The current helm chart has a typo in the 'controller.jobsLabels', this should have been 'controller.jobLabels', which is what the actual template references

* Also set resource k8s limits/requests on the apply job

---------

Co-authored-by: Rohith Jayawardene <[email protected]>
  • Loading branch information
ronaldvb-k and gambol99 committed Nov 15, 2024
1 parent 0a9a2e5 commit a5df2ac
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions pkg/controller/configuration/ensure.go
Original file line number Diff line number Diff line change
Expand Up @@ -1254,16 +1254,20 @@ func (c *Controller) ensureTerraformApply(configuration *terraformv1alpha1.Confi
terraformv1alpha1.JobTemplateHashLabel: state.jobTemplateHash,
},
),
BackoffLimit: c.BackoffLimit,
EnableInfraCosts: c.EnableInfracosts,
ExecutorImage: c.ExecutorImage,
ExecutorSecrets: c.ExecutorSecrets,
InfracostsImage: c.InfracostsImage,
InfracostsSecret: c.InfracostsSecretName,
Namespace: c.ControllerNamespace,
SaveTerraformState: saveState,
Template: state.jobTemplate,
TerraformImage: GetTerraformImage(configuration, c.TerraformImage),
BackoffLimit: c.BackoffLimit,
DefaultExecutorCPULimit: c.DefaultExecutorCPULimit,
DefaultExecutorCPURequest: c.DefaultExecutorCPURequest,
DefaultExecutorMemoryLimit: c.DefaultExecutorMemoryLimit,
DefaultExecutorMemoryRequest: c.DefaultExecutorMemoryRequest,
EnableInfraCosts: c.EnableInfracosts,
ExecutorImage: c.ExecutorImage,
ExecutorSecrets: c.ExecutorSecrets,
InfracostsImage: c.InfracostsImage,
InfracostsSecret: c.InfracostsSecretName,
Namespace: c.ControllerNamespace,
SaveTerraformState: saveState,
Template: state.jobTemplate,
TerraformImage: GetTerraformImage(configuration, c.TerraformImage),
})
if err != nil {
cond.Failed(err, "Failed to create the terraform apply job")
Expand Down

0 comments on commit a5df2ac

Please sign in to comment.