kubernetes / kubernetes

Production-Grade Container Scheduling and Management

Home Page:https://kubernetes.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support `env` variables in values from `envFrom`

lesaux opened this issue · comments

What would you like to be added?

Currently if I define environment variables on container in the following way:

env:
  - name: SOME_VAR
     value: SOME_VALUE
  - name: SOME_OTHER_VAR
     value: SOME_OTHER_VALUE-$(SOME_VALUE)
envFrom:
  - secretRef:
      name: some-secret

When one of the values in the secret being set to $(SOME_VAR), that value doesn't get replaced.

SOME_OTHER_VAR gets replaced properly, but the envFrom, wether its a configmap or secret doesn't get replaced.

Why is this needed?

It would be quite nice to simplify very long manifests by removing most env: stanzas in favor of envFrom:

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

/sig node