-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
we don't have container_name here
kubernetes/contents/pods-read-logs.py
Line 42 in ebd553f
| container=data["container_name"], |
it must be reverted, removing it and adding to
kubernetes/contents/pods-read-logs.py
Line 34 in ebd553f
| namespace=data["namespace"], |
suggestion
if data["container_name"]:
w = watch.Watch()
for line in w.stream(v1.read_namespaced_pod_log,
namespace=data["namespace"],
name=data["name"],
tail_lines=os.environ.get('RD_CONFIG_NUMBER_OF_LINES'),
follow=False):
print(line.encode('ascii', 'ignore'))
else:
w = watch.Watch()
for line in w.stream(v1.read_namespaced_pod_log,
container=data["container_name"],
namespace=data["namespace"],
name=data["name"],
tail_lines=os.environ.get('RD_CONFIG_NUMBER_OF_LINES'),
follow=False):
print(line.encode('ascii', 'ignore'))
Metadata
Metadata
Assignees
Labels
No labels