midokura / helm-charts-community

A collection of Helm Charts for open-source programs
https://midokura.github.io/helm-charts-community/
Apache License 2.0
12 stars 12 forks source link

[LibreNMS] Updated chart and dependencies to work with Librenms latest (24.3.0) #74

Open InputObject2 opened 5 months ago

InputObject2 commented 5 months ago

This PR modifies two things (aside from the versions in the chart.yaml)

Changing the disabled commands on Redis

In the default values, I changed the disabled commands list in redis since Librenms needs FLUSHDB on startup and it is in the default bitnami list.

Mounting the config.php file using an init-container

The handling of files in /opt/librenms/config.d seemingly changed between v22 and v24, there is a purge on startup and the config files are autogenerated from /data/config/*.php. There is also a chmod/chown that gets run on /data/config.

This means that the configmap for config.php cannot be placed in /opt/librenms/config.d and it also cannot be placed inside /data/config since a configmap mount is readonly.

In the statefulset template, I added an init-container to mount the configmap into /tmp/config and then perform a copy to /data/config since the librenms startup scripts needs all files to be read-writable in order to chmod them.

I removed the config from the app container since we move it into /data/config/ on startup and from there the templater picks it up and generates the config that gets put into /opt/librenms/config.d.

Same thing for the syslog since it also uses the librenms config and image.

So all this to say, it runs now:

image

InputObject2 commented 3 months ago

@gerardsegarra would you be able to take a look at this PR?