summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-01 19:41:30 +0200
committerGitHub <noreply@github.com>2020-06-01 19:41:30 +0200
commit5f1c23dba9f6e02ed2551aabda371d007e9057e2 (patch)
tree8ba9db4d111bd7379ac09780533d304154b69658 /cmd
parentf559cec6c0d1694cca9530004aaba3c138f621e3 (diff)
parent990514ea92b9b50dfb95dc0e505e11a21578a649 (diff)
downloadpodman-5f1c23dba9f6e02ed2551aabda371d007e9057e2.tar.gz
podman-5f1c23dba9f6e02ed2551aabda371d007e9057e2.tar.bz2
podman-5f1c23dba9f6e02ed2551aabda371d007e9057e2.zip
Merge pull request #6449 from baude/v2podlabels
Add support for format {{.Label}}
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/pods/ps.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/pods/ps.go b/cmd/podman/pods/ps.go
index 5703bd172..1385ff270 100644
--- a/cmd/podman/pods/ps.go
+++ b/cmd/podman/pods/ps.go
@@ -178,6 +178,11 @@ func (l ListPodReporter) Created() string {
return units.HumanDuration(time.Since(l.ListPodsReport.Created)) + " ago"
}
+// Labels returns a map of the pod's labels
+func (l ListPodReporter) Labels() map[string]string {
+ return l.ListPodsReport.Labels
+}
+
// NumberofContainers returns an int representation for
// the number of containers belonging to the pod
func (l ListPodReporter) NumberOfContainers() int {