CloudHealth / helm

Apache License 2.0
8 stars 14 forks source link

Additional environment variables support for container specs #46

Closed paunis closed 2 years ago

paunis commented 2 years ago

Now there are only 4 environment variables that can be set in container specs: CHT_API_TOKEN, CHT_CLUSTER_NAME, CHT_INTERVAL and CHT_JVM_MEM. Is it possible to implement support for additional environment variables? Something like :

(values.yaml) ... env: []

(deployment.yaml) ... containers: ... env:

gm-cht commented 2 years ago

Interesting. I am wondering what your use case for env variables is? would it be labels of some sort? Wouldn't the existing customLabels cover that scenario?

paunis commented 2 years ago

We have a centralized cluster which needs to route traffic through a proxy in order to access the clusters in some regions. In order to have that we need to set additional options for JAVA like http.proxyHost / http.proxPort / https.proxyHost / https.proxyPort. For this I modified the deployment.yaml in templates adding ... {{- toYaml .Values.env | nindent 12 }} and in values.yaml we added ... env: - name: JAVA_OPTS value: -Dhttp.proxyHost=xx -Dhttp.proxyPort=xx -Dhttp.nonProxyHosts="xx" -Dhttps.proxyHost=xx -Dhttps.proxyPort=xx -Dhttps.nonProxyHosts="xx"

gm-cht commented 2 years ago

Added support for this in Helm Chart version 1.1.2