diff --git a/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/client/K8sClient.groovy b/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/client/K8sClient.groovy index 48c9592..e38fb83 100644 --- a/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/client/K8sClient.groovy +++ b/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/client/K8sClient.groovy @@ -523,6 +523,17 @@ class K8sClient { throw new K8sResponseException("K8s undetermined status conditions for pod $podName", resp) } + /** + * Get list of all nodes in the cluster + * @return Response object. + */ + K8sResponseJson nodeList() { + final action = "/api/v1/nodes" + final resp = get(action) + trace('GET', action, resp.text) + new K8sResponseJson(resp.text) + } + protected void checkInvalidWaitingState( Map waiting, K8sResponseJson resp ) { if( waiting.reason == 'ErrImagePull' || waiting.reason == 'ImagePullBackOff') { def message = "K8s pod image cannot be pulled"