def _from_service(service):
    """
    Helper method to build dictionary object out from service
    """
    service_ports = service.spec.ports
    app_ports = {}
    for p in service_ports:
        app_ports[int(p.port)] = int(p.node_port) if p.node_port else -1
    return {
        'name': service.metadata.name,
        'service_ports': app_ports
        #'cluster_ip': service.spec.cluster_ip,
        #'type': service.spec.type
    }