#helm (2021-01)

Archive: https://archive.sweetops.com/helm/

2021-01-25

daveyu avatar

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

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@daveyu did you get resolution to this?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

I can escalate

daveyu avatar

@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

daveyu avatar

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

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Igor Rodionov can you take a look tomorrow (your morning?)

1
Igor Rodionov avatar
Igor Rodionov

@daveyu could you provide example of values with envs

Igor Rodionov avatar
Igor Rodionov

and example of deployment resource that we have after install

Igor Rodionov avatar
Igor Rodionov

Personally, I use configmaps for envs

Igor Rodionov avatar
Igor Rodionov

like

Igor Rodionov avatar
Igor Rodionov

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
cloudposse/charts

The “Cloud Posse” Distribution of Kubernetes Applications - cloudposse/charts

daveyu avatar

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

    keyboard_arrow_up