summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorYaron Dayagi <ydayagi@redhat.com>2022-01-30 20:45:30 +0200
committerYaron Dayagi <ydayagi@redhat.com>2022-01-31 21:49:38 +0200
commit2ceab119478502fd06703036bc79953ed6f37f74 (patch)
treed44d98cc7a1b166c9cccf383f8aa6f1cc0440730 /pkg/domain/infra
parentc96aa23adb9f1cb7e195d3585a2c78af7aab2ce5 (diff)
downloadpodman-2ceab119478502fd06703036bc79953ed6f37f74.tar.gz
podman-2ceab119478502fd06703036bc79953ed6f37f74.tar.bz2
podman-2ceab119478502fd06703036bc79953ed6f37f74.zip
play kube envVar.valueFrom.fieldRef
add support for env vars values from pod spec fields see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#envvarsource-v1-core relates to issue https://github.com/containers/podman/issues/12756 Signed-off-by: Yaron Dayagi <ydayagi@redhat.com>
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/abi/play.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index 86a60e92d..cad8c4609 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -365,6 +365,11 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
if err != nil {
return nil, err
}
+
+ for k, v := range podSpec.PodSpecGen.Labels { // add podYAML labels
+ labels[k] = v
+ }
+
specgenOpts := kube.CtrSpecGenOptions{
Annotations: annotations,
Container: initCtr,
@@ -405,7 +410,12 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
return nil, err
}
+ for k, v := range podSpec.PodSpecGen.Labels { // add podYAML labels
+ labels[k] = v
+ }
+
specgenOpts := kube.CtrSpecGenOptions{
+ Annotations: annotations,
Container: container,
Image: pulledImage,
Volumes: volumes,