k8s-at-home / charts

⚠️ Deprecated : Helm charts for applications you run at home
https://docs.k8s-at-home.com
Apache License 2.0
1.45k stars 621 forks source link

[Icinga2] ini files get overwritten #1739

Open DaVukovic opened 2 years ago

DaVukovic commented 2 years ago

Helm chart name

Icinga2

Helm chart version

4.1.2

Container name

jordan/icinga2

Container tag

latest

Description

First...thanks for the great work you are doing :+1:

Probably I´m doing this wrong, but let's see....

Let´s say I have an existing roles.ini file for Icingaweb2 and I want that to be mounted during the creation of the helm chart.

I edited the values.yaml to:

persistence:
  # -- Icinga2 configuration folder
  # @default -- Disabled
  roles:
    enabled: true
    type: hostPath
    hostPath: /data/etc-icingaweb/roles.ini
    mountPath: /etc/icingaweb2/roles.ini

The file gets mounted fine as it exists on the hostPath. The problem is, that those files do not exist at creation of the pod, but Icinga will create the same file and will overwrite the content from the given one as that's already mounted. So my own roles.ini file doesn't exist anymore.

I´ve tried to mount it readOnly but then the pod doesn't start.

Not sure if that's really an issue or a limitation of the chart. In the end I would love to achieve a fully pre-configured Icinga instance.

Thanks for either pointing me into the right direction or improve the chart if possible.

Expected result

Mounted files should not be overwritten

Helm values to reproduce

See above. If needed I'll provide the full values.yaml

Additional Information

No response

Repo link

No response