Search in sources :

Example 1 with PodStatus

use of io.fabric8.kubernetes.api.model.PodStatus in project load-balancer by RestComm.

the class ServerControllerKube method getNodeFromPod.

private Node getNodeFromPod(Pod pod) {
    Map<String, String> labels = pod.getMetadata().getLabels();
    PodStatus status = pod.getStatus();
    Node node = new Node(labels.remove(Protocol.HOST_NAME), status.getPodIP());
    node.getProperties().putAll(labels);
    return node;
}
Also used : PodStatus(io.fabric8.kubernetes.api.model.PodStatus) Node(org.mobicents.tools.heartbeat.api.Node)

Aggregations

PodStatus (io.fabric8.kubernetes.api.model.PodStatus)1 Node (org.mobicents.tools.heartbeat.api.Node)1