CrowdStrike / falcon-helm

Helm Charts for running CrowdStrike Falcon with Kubernetes
https://artifacthub.io/packages/helm/falcon-helm/falcon-sensor
Apache License 2.0
76 stars 72 forks source link

Conditional templating broken for confirm_instance #300

Closed mkeats-clumio closed 4 months ago

mkeats-clumio commented 4 months ago

https://github.com/CrowdStrike/falcon-helm/pull/297 added conditional templating for several values in the config. However the check is not valid when the variable is a boolean:

#confirm_instance = true
{{- if .Values.push.aws_security_hub.confirm_instance }}
confirm_instance = {{ .Values.push.aws_security_hub.confirm_instance }}
{{- end }}

{{- if .Values.push.aws_security_hub.confirm_instance }} is only evaluated as true if confirm_instance is set to true. So it makes it impossible to ever override the default true value and set it to false. It should check the value is defined, not if it is true.