Skip to content

Commit

Permalink
Fix Knative client environment check
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Sep 23, 2022
1 parent a09fdca commit 9db9481
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.util.List;
import java.util.Optional;

import io.fabric8.knative.client.KnativeClient;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.kubernetes.client.spi.KubernetesClientBuildItem;
Expand All @@ -23,7 +22,7 @@ public void checkEnvironment(Optional<SelectedKubernetesDeploymentTargetBuildIte
return;
}
if (target.getEntry().getName().equals(KNATIVE)) {
if (client.getClient().isAdaptable(KnativeClient.class)) {
if (client.getClient().hasApiGroup("knative.dev", false)) {
deploymentCluster.produce(new KubernetesDeploymentClusterBuildItem(KNATIVE));
} else {
throw new IllegalStateException(
Expand Down

0 comments on commit 9db9481

Please sign in to comment.