lib/kubernetes-deploy/kubernetes_resource/pod.rb in kubernetes-deploy-0.7.3 vs lib/kubernetes-deploy/kubernetes_resource/pod.rb in kubernetes-deploy-0.7.4

- old
+ new

@@ -73,15 +73,17 @@ # } def fetch_logs return {} unless exists? && @containers.present? @containers.each_with_object({}) do |container_name, container_logs| - out, _err, _st = kubectl.run( + cmd = [ "logs", @name, "--container=#{container_name}", - "--since-time=#{@deploy_started.to_datetime.rfc3339}" - ) + "--since-time=#{@deploy_started.to_datetime.rfc3339}", + ] + cmd << "--tail=#{LOG_LINE_COUNT}" unless unmanaged? + out, _err, _st = kubectl.run(*cmd) container_logs["#{id}/#{container_name}"] = out end end private