summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorChristopher J. Ruwe <cjr@cruwe.de>2020-12-09 09:09:01 +0100
committerChristopher J. Ruwe <cjr@cruwe.de>2020-12-09 10:04:21 +0100
commitb13ae2b6dce38b9f4daa97ff9151ed3e9427195d (patch)
treeaac97a6bcde4714c4859a216957d02afb82d20fe /pkg
parentdd295f297b6dd51d22c64c75f4ef4f80f953bbde (diff)
downloadpodman-b13ae2b6dce38b9f4daa97ff9151ed3e9427195d.tar.gz
podman-b13ae2b6dce38b9f4daa97ff9151ed3e9427195d.tar.bz2
podman-b13ae2b6dce38b9f4daa97ff9151ed3e9427195d.zip
make podman play use ENVs from image
fixes #8608. Signed-off-by: Christopher J. Ruwe <cjr@cruwe.de>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/specgen/generate/kube/kube.go5
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)