cetic / helm-zabbix

Helm Chart For Zabbix
https://artifacthub.io/packages/helm/cetic/zabbix
Apache License 2.0
56 stars 57 forks source link

[cetic/zabbix] possibility to configure custom environment variables #25

Closed scoopex closed 3 years ago

scoopex commented 3 years ago

The zabbix docker images provide the possibility to configure environment variables to fine-tune the behavior of zabbix server.

It would be nice to have the possibility to add custom environment variables for all pods.

https://hub.docker.com/r/zabbix/zabbix-server-pgsql

scoopex commented 3 years ago

Solved by https://github.com/cetic/helm-zabbix/pull/26

scoopex commented 3 years ago

Done

ozhuang commented 2 years ago

Can we have an example format of environment variables in Values.yaml ? I'm unable to set it right. Helm keep shouting for errors :(

aeciopires commented 2 years ago

Hi @ozhuang!

Here is an example of how to add the extra variables in values.yaml file:

Example 1:

  ## A list of additional environment variables
  #extraEnv:
    #- name: my_env
    #  value: my_value

Example 2:

  extraEnv:
    - name: ZBX_METADATA_AECIO10
      value: true
    - name: ZBX_METADATA_AECIO11
      value: false
    - name: ZBX_METADATA_AECIO12
      value: surname 

Example 3:

zabbixserver:
  replicaCount: 1
  image:
    repository: zabbix/zabbix-server-pgsql
    tag: ubuntu-5.4.5
    pullPolicy: IfNotPresent
  DB_SERVER_HOST: "zabbix-postgresql"
  DB_SERVER_PORT: "5432"
  POSTGRES_USER: "zabbix"
  POSTGRES_PASSWORD: zabbix
  POSTGRES_DB: "zabbix"
  service:
    type: NodePort
    port: 10051
  extraEnv:
    - name: ZBX_METADATA_AECIO1
      value: true
    - name: ZBX_METADATA_AECIO2
      value: false
    - name: ZBX_METADATA_AECIO3
      value: surname

I'm going to add this information to values.yaml.

Unfortunately, there is a bug in the helm chart. The values of extra variables must to be enclosed in quotes. I'm going to open a Pull Request and generate a new version.

aeciopires commented 2 years ago

Hi @ozhuang!

Fixed issue with this Pull Request https://github.com/cetic/helm-zabbix/pull/36 Generated helm chart version 0.4.1.