Add id attribute to KubernetesPod
@@ -37,10 +37,11 @@ ROOT_URL = "/api/"
class KubernetesPod(object):
- def __init__(self, name, containers, namespace):
+ def __init__(self, id, name, containers, namespace):
"""
A Kubernetes pod
"""
+ self.id = id
self.name = name
self.containers = containers
self.namespace = namespace
@@ -246,6 +247,7 @@ class KubernetesContainerDriver(KubernetesDriverMixin, ContainerDriver):
spec = container_statuses
containers.append(self._to_container(container, spec, data))
return KubernetesPod(
+ id=data["metadata"]["uid"],
name=data["metadata"]["name"],
namespace=data["metadata"]["namespace"],
containers=containers,
