zabbix-community / helm-zabbix

Helm chart for Zabbix
https://artifacthub.io/packages/helm/zabbix-community/zabbix
Apache License 2.0
79 stars 45 forks source link

Ability to deploy arbitrary number of files into containers #24

Closed BGmot closed 1 year ago

BGmot commented 1 year ago

Zabbix Server might require additional files to be deployed in these locations (locations might differ depending on compile options): /usr/lib/zabbix/alertscripts /usr/lib/zabbix/externalscripts /usr/share/zabbix/ssl/certs /usr/share/zabbix/ssl/keys /usr/lib/zabbix/modules

Also files to handle TLS to specify in these configuration parameters: TLSCAFile TLSCRLFile TLSCertFile TLSKeyFile DBTLSCAFile DBTLSCertFile DBTLSKeyFile

Also files with UserParamter's and TLS* to Zabbix Agent.

Some of the above bight be required for Zabbix Proxy too. We need a mechanism to deliver the files to containers.

Sorry if all this can be achieved via extraVolumeMounts, I just can't see how I can create these "additional" ConfigMaps. I'd be grateful if you described an approach here.

Is your feature request related to a problem? Please describe. Zabbix server deployed with this helm chart can't use "custom" alert scripts, external scripts, certs/keys to be validated in HTTP check, cert/key to be validated to connect to DB.

Describe the solution you'd like I am too new to k8s to propose a solution, Configmaps maybe? I saw https://github.com/zabbix-community/helm-zabbix/issues/14 but it partly solved the stated problem and what if we don't use Hashicorp Vault?

Describe alternatives you've considered As of now the only alternative is not to use this Helm chart to deploy Zabbix components but I really like this project and would love this feature to be implemented.

Additional context N/A

aeciopires commented 1 year ago

Hello @BGmot!

Thanks for your question. You have described your need very well. Thanks also to appreciate this helm chart.

The creation of the additional configmap must be done without using this helm chart. Read the documentation:

You can to create a shell script for automated configmap creation before installing this helm chart.

After creating the additional configmap, you configure the values with the names of configmap and with the destination path of files in zabbix-server and zabbix-proxy using:

  # -- additional volumeMounts to the zabbix server container
  extraVolumeMounts: [ ]
  # -- additional volumes to make available to the zabbix server pod
  extraVolumes: [ ]

Examples:

BGmot commented 1 year ago

Thank you.