-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ordered extraEnv interpolation #152
Comments
Can you provide an example since I'm not sure how the chart can be changed to fix anything like that? |
Couple of crude examples. Bare in mind the order that env is rendered in the deployment: minecraft-server-charts/charts/minecraft/templates/deployment.yaml Lines 326 to 337 in b74f8a5
extraEnv:
POD_NAME:
valueFrom:
fieldRef:
fieldPath: metadata.name
minecraftServer:
jvmOpts: >-
-Dserver.name=$(POD_NAME) This doesn't work as extraEnv:
POD_NAME:
valueFrom:
fieldRef:
fieldPath: metadata.name
JVM_OPTS: >-
-Dserver.name=$(POD_NAME)
Sometimes, the range is non-deterministic, this appears to be an issue when installing or upgrading a chart with the Helm CLI as it does some kind of delta, but doesn't seem to occur when using Flux Helm.
Sometimes this is rendered unpredictably, where it appears to be in some pseudo-chronological order following on an upgrade if anything in the map has changed, the dependent values are sometimes rendered after the Ultimately, any method to guarantee the ordering of these values by weight or something would be great, even if it's just a case of ensuring the list is alphabetised entirely. Apparently the recommended pattern is to use Also see https://dastrobu.medium.com/an-advanced-api-for-environment-variables-in-helm-charts-e0bb1e0aa58a |
extraEnv vars sometimes need to be interpolated in a particular order when using variable substitution, as the dependent variables must be specified before their use in the env
The text was updated successfully, but these errors were encountered: