Skip to content

Commit 812033e

Browse files
committed
use full resource name
1 parent e53831e commit 812033e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/main/java/tech/stackable/hadoop/StackableTopologyProvider.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,13 @@ private List<Pod> fetchDataNodes() {
188188

189189
private String getListenerVersion() {
190190
try {
191-
var crd = client.apiextensions().v1().customResourceDefinitions().withName("listeners").get();
191+
var crd =
192+
client
193+
.apiextensions()
194+
.v1()
195+
.customResourceDefinitions()
196+
.withName("listeners.listeners.stackable.tech")
197+
.get();
192198

193199
if (crd != null && !crd.getSpec().getVersions().isEmpty()) {
194200
// Select the version that is served and used for storage (the "stable" version)
@@ -205,7 +211,8 @@ private String getListenerVersion() {
205211
}
206212
}
207213
}
208-
throw new RuntimeException("Unable to fetch CRD version for listeners");
214+
LOG.error("Unable to fetch CRD version for listeners. Returning default value.");
215+
return "v1alpha1";
209216
} catch (KubernetesClientException e) {
210217
LOG.error("Unable to fetch CRD version for listeners. Failed with {}", e);
211218
throw new RuntimeException("Unable to fetch CRD version for listeners");

0 commit comments

Comments
 (0)