Icinga / docker-icingaweb2

GNU General Public License v2.0
16 stars 11 forks source link

problem with environment settings in K8s #88

Closed verboEse closed 7 months ago

verboEse commented 2 years ago

I use this image in our kubernetes setup and it worked quite well, until I tried to configure some roles for Icinga Director. Those have key/value pairs in roles.ini like: director/service/set/filter-by-name = somename

which leads to an error when deploying to Kubernetes, as:

The keys of data and stringData must consist of alphanumeric characters, -, _ or .

(See: https://kubernetes.io/docs/concepts/configuration/secret/) which doesn't contain the '/' ...

Any ideas how to get around this problem?

verboEse commented 1 year ago

Bumping this by adding: this does not only affect director settings, but roles in general. It's still possible to give permissions, but it's not possible to e. g. set a filter, like icingaweb.roles.MyRole.icingadb/filter/services: service.vars.owner=MyValue is NOT possible. For now, to not loose these settings, I replaced the '/' by an underscore '_'.

Best solution in my opinion would be to move role settings to the database. I don't understand why these are still in config files. My programming skills are limited though :-(

Al2Klimov commented 7 months ago

Hello!

Would mounting roles.ini as whole be a reasonable alternative for you?

Best, A/K

verboEse commented 7 months ago

Hi. Probably, yes. Imo configuring this with ini files is fairly outdated. I wonder why this information isn't stored in the database? Meanwhile for now I discarded the approach to run Icinga in docker/k8s, mainly due to further similar issues (jira addon also uses files for it's configuration, but those are used by icingaweb as well as the icinga daemon (for notifications with icingacli). Maybe, if time allows, I will retry this approach.