From 1683894cf0dddcabde72f34b96da80c61becda4d Mon Sep 17 00:00:00 2001 From: Kevin Trogant Date: Thu, 30 Apr 2026 11:49:40 +0200 Subject: [PATCH] feat: get nodeList from k8s --- .../src/main/nextflow/k8s/client/K8sClient.groovy | 11 +++++++++++ 1 file changed, 11 insertions(+) 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"