diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-17 06:24:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-17 06:24:14 -0400 |
commit | 1a929c723669944e37e92932371154c6310d3251 (patch) | |
tree | 21b00c985f17f8357c7e6e3fc648d9e4ed300337 /pkg | |
parent | 8d7e7954546efb344d677e0c3c86d9d045a3de4f (diff) | |
parent | 55dfa7fad205d811b4ade9a2424c49f7e2f7588f (diff) | |
download | podman-1a929c723669944e37e92932371154c6310d3251.tar.gz podman-1a929c723669944e37e92932371154c6310d3251.tar.bz2 podman-1a929c723669944e37e92932371154c6310d3251.zip |
Merge pull request #7648 from xordspar0/kube-play-labels
Add labels to a pod created via play kube
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/domain/infra/abi/play.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go index 6dfb52c63..659cc799c 100644 --- a/pkg/domain/infra/abi/play.go +++ b/pkg/domain/infra/abi/play.go @@ -132,6 +132,11 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY libpod.WithInfraContainer(), libpod.WithPodName(podName), } + + if podYAML.ObjectMeta.Labels != nil { + podOptions = append(podOptions, libpod.WithPodLabels(podYAML.ObjectMeta.Labels)) + } + // TODO we only configure Process namespace. We also need to account for Host{IPC,Network,PID} // which is not currently possible with pod create if podYAML.Spec.ShareProcessNamespace != nil && *podYAML.Spec.ShareProcessNamespace { |