Skip to content

Commit

Permalink
update(falco/templates): add HOST_ROOT env
Browse files Browse the repository at this point in the history
Although HOST_ROOT is already set in all container images consumed by this chart, its default value (i.e. `/host`) is hard-coded in many points across this chart. So for consistency, we also force set it in `env:` for the main container and the initContainer as well.

The alternative would be to make it parametric, but since this is just an implementation detail that does not produce a user-facing effect, there's no compelling reason for the user to modify it.  Moreover, the hard-coded value works since its usage is consistent across and limited to only containers managed by this chart.

Signed-off-by: Leonardo Grasso <[email protected]>
  • Loading branch information
leogr authored and poiana committed Apr 12, 2024
1 parent 8598119 commit b9776c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/falco/templates/pod-template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
env:
- name: HOST_ROOT
value: /host
- name: FALCO_HOSTNAME
valueFrom:
fieldRef:
Expand Down Expand Up @@ -375,6 +377,8 @@ spec:
name: etc-fs
readOnly: true
env:
- name: HOST_ROOT
value: /host
{{- if .Values.driver.loader.initContainer.env }}
{{- include "falco.renderTemplate" ( dict "value" .Values.driver.loader.initContainer.env "context" $) | nindent 4 }}
{{- end }}
Expand Down

0 comments on commit b9776c8

Please sign in to comment.