use of io.fabric8.arquillian.kubernetes.Session in project fabric8 by fabric8io.
the class ServiceListResourceProvider method lookup.
@Override
public Object lookup(ArquillianResource resource, Annotation... qualifiers) {
KubernetesClient client = this.clientInstance.get();
Session session = sessionInstance.get();
Map<String, String> labels = getLabels(qualifiers);
if (labels.isEmpty()) {
return client.services().inNamespace(session.getNamespace()).list();
} else {
return client.services().inNamespace(session.getNamespace()).withLabels(labels).list();
}
}
Aggregations