You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{- with .Values.artifactory.extraEnvironmentVariables }}
{{ tpl (toYaml .) $ | indent 8 }}
{{- end }}
The Artifactory chart supports all types of environment variables, so you can set them in your values file exactly as they would turn up in the manifest.
How to reproduce it (as minimally and precisely as possible):
Is this a request for help?:
YES
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
FEATURE REQUEST
Version of Helm and Kubernetes:
Kubernetes: 1.21.2
Helm: 3.10.3
Which chart:
Distribution
Which product license (Enterprise/Pro/oss):
Entreprise+
JFrog support reference (if already raised with support team):
N/A
What happened:
I tried to set an environment variable using the extraEnvironmentVariables property of the Distribution chart. This was not a simple value but a 'valueFrom' with a fieldRef. Specifically this was to support Dynatrace version detection strategies (https://www.dynatrace.com/support/help/platform-modules/cloud-automation/release-monitoring/version-detection-strategies) but really this is for any environment variable that is not a simple value based one.
What you expected to happen:
I expected the environment variable to be set in the resulting manifest for the stateful set, but it wasn't, and instead Helm through an error.
The explanation is quite simple - the way the Distribution chart works is that the extraEnvironmentVariables property always expects a key and a value, and when it gets templated out it is very specific about this, see https://github.com/jfrog/charts/blob/master/stable/distribution/templates/distribution-statefulset.yaml#L339-L342.
This is different to the way this works within the Artifactory chart:
https://github.com/jfrog/charts/blob/master/stable/artifactory/templates/artifactory-statefulset.yaml#L442C1-L444C11
The Artifactory chart supports all types of environment variables, so you can set them in your values file exactly as they would turn up in the manifest.
How to reproduce it (as minimally and precisely as possible):
Set the extraEnvironmentVariables within the Distribution Helm chart to use a pod field (https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/#use-pod-fields-as-values-for-environment-variables)
Anything else we need to know:
The text was updated successfully, but these errors were encountered: