Skip to content

Commit aea809b

Browse files
authored
fix: added fix for bug where tolerations were not being applied correctly (#164)
1 parent cba4dde commit aea809b

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

main.tf

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -203,25 +203,15 @@ resource "helm_release" "cloud_monitoring_agent" {
203203
"ebpf":
204204
"enabled": ${var.enable_universal_ebpf}
205205
"kind": "universal_ebpf"
206-
"sysdig":
207-
"tolerations":
206+
"tolerations":
208207
%{for toleration in var.tolerations~}
209-
%{if toleration.key != null~}
210-
- "key": ${toleration.key}
211-
%{endif~}
212-
%{if toleration.operator != null~}
213-
- "operator": ${toleration.operator}
214-
%{endif~}
215-
%{if toleration.value != null~}
216-
- "value": ${toleration.value}
217-
%{endif~}
218-
%{if toleration.effect != null~}
219-
- "effect": ${toleration.effect}
220-
%{endif~}
221-
%{if toleration.tolerationSeconds != null~}
222-
- "tolerationSeconds": ${toleration.tolerationSeconds}
223-
%{endif~}
208+
-%{if toleration.key != null} key: "${toleration.key}"%{endif}
209+
%{if toleration.operator != null} operator: "${toleration.operator}"%{endif}
210+
%{if toleration.value != null} value: "${toleration.value}"%{endif}
211+
%{if toleration.effect != null} effect: "${toleration.effect}"%{endif}
212+
%{if toleration.tolerationSeconds != null} tolerationSeconds: ${toleration.tolerationSeconds}%{endif}
224213
%{endfor~}
214+
"sysdig":
225215
"settings":
226216
"host_scanner":
227217
"enabled": ${var.enable_host_scanner}

tests/pr_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ func TestRunAgentClassicKubernetes(t *testing.T) {
264264
})
265265
options.TerraformVars = map[string]interface{}{
266266
"datacenter": "syd01",
267+
"prefix": options.Prefix,
267268
}
268269

269270
output, err := options.RunTestConsistency()

0 commit comments

Comments
 (0)