From a5df2ac612fd06d223889610e063aa0bae1af109 Mon Sep 17 00:00:00 2001 From: ronaldvb-k <157349919+ronaldvb-k@users.noreply.github.com> Date: Wed, 13 Nov 2024 19:51:03 +0100 Subject: [PATCH] Also set resource k8s limits/requests on the apply job (#1553) * [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 --- pkg/controller/configuration/ensure.go | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkg/controller/configuration/ensure.go b/pkg/controller/configuration/ensure.go index 4c8e94cc5..2f44c54cb 100644 --- a/pkg/controller/configuration/ensure.go +++ b/pkg/controller/configuration/ensure.go @@ -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")