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 <gambol99@gmail.com>
  • Loading branch information
ronaldvb-k and gambol99 authored Nov 13, 2024
1 parent 89ddaf2 commit d039b61
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/terranetes-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
name: terranetes-controller
description: Controller used to provision a terraform workflow within kubernetes
type: application
version: v0.7.22
version: v0.7.23
appVersion: v0.4.16
sources:
- https://github.com/appvia/terranetes-controller
Expand Down
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 d039b61

Please sign in to comment.