falcosecurity / charts

Community managed Helm charts for running Falco with Kubernetes
Apache License 2.0
246 stars 291 forks source link

fix(falcosidekick): customConfig template fix for webui redis #751

Closed krkjack closed 2 months ago

krkjack commented 2 months ago

What type of PR is this?

/kind bug

/kind chart-release

Any specific area of the project related to this PR?

/area falcosidekick-chart

What this PR does / why we need it:

Currently defining falcosidekick.webui.redis.customConfigin values.yaml results in templating error:

Error: YAML parse error on falco/charts/falco/charts/falcosidekick/templates/configmap-ui.yaml: error converting YAML to JSON: yaml: line 17: 
did not find expected key

Using --debug switch shows us that one line is unnecessary suppressed (the key data is joined with redis-stack.config):

data:redis-stack.config: |-
    maxmemory-policy allkeys-lfu
    maxmemory 4096mb

Tested with values.yaml:

falcosidekick:
  webui:
    redis:
      customConfig: 
        - maxmemory-policy allkeys-lfu
        - maxmemory 4096mb

Which issue(s) this PR fixes:

Special notes for your reviewer:

Checklist

poiana commented 2 months ago

Welcome @krkjack! It looks like this is your first PR to falcosecurity/charts 🎉

poiana commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Issif, krkjack

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/falcosecurity/charts/blob/master/OWNERS)~~ [Issif] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
poiana commented 2 months ago

LGTM label has been added.

Git tree hash: ad4d3cd51b7c770b789f53ed9d3889961fc074d1