summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/kube/kube.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-09 08:44:47 -0500
committerGitHub <noreply@github.com>2020-12-09 08:44:47 -0500
commitae7f601649fd9d5e57ee0f6b0d35283bc4485259 (patch)
tree71254fc41309faca4f24bce15b44972f32f8e743 /pkg/specgen/generate/kube/kube.go
parent247260081a5cdc4065009bcd1080c987974327e5 (diff)
parentb13ae2b6dce38b9f4daa97ff9151ed3e9427195d (diff)
downloadpodman-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.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)