From ccd576504e7fb578add8f5390fa8ceb41dd1d9d4 Mon Sep 17 00:00:00 2001 From: Niall Crowe Date: Fri, 29 Apr 2022 11:42:20 +0100 Subject: play kube default log driver The default log driver is not used when using play kube without --log-driver. The LogDriver function needs to be called in order to use the default log driver. fixes #13781 Signed-off-by: Niall Crowe --- pkg/api/handlers/libpod/play.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pkg/api') diff --git a/pkg/api/handlers/libpod/play.go b/pkg/api/handlers/libpod/play.go index ca9ada761..b71afc28c 100644 --- a/pkg/api/handlers/libpod/play.go +++ b/pkg/api/handlers/libpod/play.go @@ -70,6 +70,16 @@ func PlayKube(w http.ResponseWriter, r *http.Request) { password = authConf.Password } + logDriver := query.LogDriver + if logDriver == "" { + config, err := runtime.GetConfig() + if err != nil { + utils.Error(w, http.StatusInternalServerError, err) + return + } + query.LogDriver = config.Containers.LogDriver + } + containerEngine := abi.ContainerEngine{Libpod: runtime} options := entities.PlayKubeOptions{ Annotations: query.Annotations, -- cgit v1.2.3-54-g00ecf