#helm (2021-01)
Archive: https://archive.sweetops.com/helm/
2021-01-25

Using cloudposse’s monochart, I’m trying to populate deployment env
values from both Values.env
and Values.envFromFieldRefFieldPath
, but it’s rendering two separate env
values in the chart. when I install the chart, only one of those env
values ends up in the deployment.
is it the case that line 68 here should be removed? https://github.com/cloudposse/charts/blob/master/incubator/monochart/templates/_helpers.tpl#L57-L75

@daveyu did you get resolution to this?

I can escalate

@Erik Osterman (Cloud Posse) thanks for checking in. This seems to take care of it: https://github.com/cloudposse/charts/compare/master...daveyu:merge-envs

not super clean though, as it renders extra blank lines or a dangling env:
if there are no values


@daveyu could you provide example of values
with envs

and example of deployment resource that we have after install

Personally, I use configmaps for envs

like

https://github.com/cloudposse/charts/blob/master/incubator/monochart/values.example.yaml#L30
configMaps:
default:
enabled: true
env:
CONFIG_ENV_NAME: ENV_VALUE
CONFIG_ENV_NAME2: ENV_VALUE2
The “Cloud Posse” Distribution of Kubernetes Applications - cloudposse/charts

thanks, @Igor Rodionov! I’d overlooked configmaps. I’ll give that a try first.