Skip to content

Commit 9daba4f

Browse files
authored
Merge pull request #31833 from marcnuri-forks/fix/knative
Knative deployer uses hasApiGroup to check for Knative support
2 parents 50c7638 + c542d57 commit 9daba4f

File tree

1 file changed

+3
-3
lines changed
  • extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment

1 file changed

+3
-3
lines changed

extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KnativeDeployer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.util.List;
66
import java.util.Optional;
77

8-
import io.fabric8.knative.client.DefaultKnativeClient;
8+
import io.fabric8.knative.client.KnativeClient;
99
import io.quarkus.deployment.annotations.BuildProducer;
1010
import io.quarkus.deployment.annotations.BuildStep;
1111
import io.quarkus.kubernetes.client.spi.KubernetesClientBuildItem;
@@ -24,8 +24,8 @@ public void checkEnvironment(Optional<SelectedKubernetesDeploymentTargetBuildIte
2424
return;
2525
}
2626
if (target.getEntry().getName().equals(KNATIVE)) {
27-
try (DefaultKnativeClient client = kubernetesClientBuilder.buildClient().adapt(DefaultKnativeClient.class)) {
28-
if (client.isSupported()) {
27+
try (KnativeClient client = kubernetesClientBuilder.buildClient().adapt(KnativeClient.class)) {
28+
if (client.hasApiGroup("knative.dev", false)) {
2929
deploymentCluster.produce(new KubernetesDeploymentClusterBuildItem(KNATIVE));
3030
} else {
3131
throw new IllegalStateException(

0 commit comments

Comments
 (0)