diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-09 08:44:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-09 08:44:47 -0500 |
commit | ae7f601649fd9d5e57ee0f6b0d35283bc4485259 (patch) | |
tree | 71254fc41309faca4f24bce15b44972f32f8e743 /pkg/specgen/generate/kube/kube.go | |
parent | 247260081a5cdc4065009bcd1080c987974327e5 (diff) | |
parent | b13ae2b6dce38b9f4daa97ff9151ed3e9427195d (diff) | |
download | podman-ae7f601649fd9d5e57ee0f6b0d35283bc4485259.tar.gz podman-ae7f601649fd9d5e57ee0f6b0d35283bc4485259.tar.bz2 podman-ae7f601649fd9d5e57ee0f6b0d35283bc4485259.zip |
Merge pull request #8654 from cruwe/cjr/bugfix-8608-take-envs-from-img
make podman play use ENVs from image
Diffstat (limited to 'pkg/specgen/generate/kube/kube.go')
-rw-r--r-- | pkg/specgen/generate/kube/kube.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go index 5f72d28bb..5cc7891ac 100644 --- a/pkg/specgen/generate/kube/kube.go +++ b/pkg/specgen/generate/kube/kube.go @@ -148,6 +148,11 @@ func ToSpecGen(ctx context.Context, containerYAML v1.Container, iid string, newI // Environment Variables envs := map[string]string{} + for _, env := range imageData.Config.Env { + keyval := strings.Split(env, "=") + envs[keyval[0]] = keyval[1] + } + for _, env := range containerYAML.Env { value := envVarValue(env, configMaps) |