Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Kubernetes: fix retrieval of local ip address (#169)
Browse files Browse the repository at this point in the history
* Call the namespaced log reading with the timestamps set to false.

* kubernetes.py: fix container_run_command to return string

---------

Co-authored-by: Lionel <schaubl@users.noreply.github.com>
  • Loading branch information
giovannibianco and schaubl committed Jun 1, 2023
1 parent b44563f commit 48fd618
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/agent/orchestrator/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ def container_run_command(self, image, name, command: str = None,
except TimeoutException as ex:
log.warning(ex)
return ''
output = self.client.read_namespaced_pod_log(name, namespace)
output = self.client.read_namespaced_pod_log(name, namespace, _preload_content=False,
timestamps=False).data.decode('utf8')
if remove:
self.container_remove(name, **kwargs)
return output
Expand Down

0 comments on commit 48fd618

Please sign in to comment.