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'))
we don't have container_name here
kubernetes/contents/pods-read-logs.py
Line 42 in ebd553f
it must be reverted, removing it and adding to
kubernetes/contents/pods-read-logs.py
Line 34 in ebd553f
suggestion