diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-07 18:39:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 18:39:45 +0200 |
commit | 30d0cc3cca1e36ee43839aad7d8b9dd6d051e6a0 (patch) | |
tree | f9a677f1b146bccac32b6d21ade06fe7b9ecac26 /pkg/domain/infra/tunnel | |
parent | b07e735661ccebb529d2719516809ce602fd56da (diff) | |
parent | 11fc0e55401a21a88c90a2fa646f2624541711fe (diff) | |
download | podman-30d0cc3cca1e36ee43839aad7d8b9dd6d051e6a0.tar.gz podman-30d0cc3cca1e36ee43839aad7d8b9dd6d051e6a0.tar.bz2 podman-30d0cc3cca1e36ee43839aad7d8b9dd6d051e6a0.zip |
Merge pull request #11427 from flouthoc/kube-pod-logs
kube: Add support for `podman pod logs`.
Diffstat (limited to 'pkg/domain/infra/tunnel')
-rw-r--r-- | pkg/domain/infra/tunnel/pods.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/pods.go b/pkg/domain/infra/tunnel/pods.go index 480adb88a..8139216b3 100644 --- a/pkg/domain/infra/tunnel/pods.go +++ b/pkg/domain/infra/tunnel/pods.go @@ -42,6 +42,16 @@ func (ic *ContainerEngine) PodKill(ctx context.Context, namesOrIds []string, opt return reports, nil } +func (ic *ContainerEngine) PodLogs(_ context.Context, nameOrIDs string, options entities.PodLogsOptions) error { + // PodLogsOptions are similar but contains few extra fields like ctrName + // So cast other values as is so we can re-use the code + containerLogsOpts := entities.PodLogsOptionsToContainerLogsOptions(options) + + // interface only accepts slice, keep everything consistent + name := []string{options.ContainerName} + return ic.ContainerLogs(nil, name, containerLogsOpts) +} + func (ic *ContainerEngine) PodPause(ctx context.Context, namesOrIds []string, options entities.PodPauseOptions) ([]*entities.PodPauseReport, error) { foundPods, err := getPodsByContext(ic.ClientCtx, options.All, namesOrIds) if err != nil { |