From e44464d3b8f5cee108bc479f8beb66fdcd40956b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Muzik=C3=A1=C5=99?= Date: Tue, 2 May 2023 18:35:51 +0200 Subject: [PATCH] Remove OkHttp Client from the Operator Closes #19573 --- operator/pom.xml | 34 ++++++++------- .../kubernetes/client/HttpClientFactory.java | 42 ------------------- ....kubernetes.client.http.HttpClient$Factory | 18 -------- 3 files changed, 20 insertions(+), 74 deletions(-) delete mode 100644 operator/src/main/java/org/keycloak/kubernetes/client/HttpClientFactory.java delete mode 100644 operator/src/main/resources/META-INF/services/io.fabric8.kubernetes.client.http.HttpClient$Factory diff --git a/operator/pom.xml b/operator/pom.xml index 27ed986104..e359e4b085 100644 --- a/operator/pom.xml +++ b/operator/pom.xml @@ -21,8 +21,12 @@ See https://github.com/quarkusio/quarkus/blob//bom/application/pom.xml for reference --> - 6.5.1 1.5.4.Final-format-001 + + 6.6.0 3.8.1 true @@ -37,14 +41,22 @@ + - - io.quarkiverse.operatorsdk - quarkus-operator-sdk-bom - ${quarkus.operator.sdk.version} - pom - import - + + io.fabric8 + kubernetes-client-bom + ${kubernetes-client.version} + pom + import + + + io.quarkiverse.operatorsdk + quarkus-operator-sdk-bom + ${quarkus.operator.sdk.version} + pom + import + @@ -95,12 +107,6 @@ io.quarkus quarkus-container-image-docker - - - io.fabric8 - kubernetes-httpclient-okhttp - ${kubernetes-client.version} - diff --git a/operator/src/main/java/org/keycloak/kubernetes/client/HttpClientFactory.java b/operator/src/main/java/org/keycloak/kubernetes/client/HttpClientFactory.java deleted file mode 100644 index 52abcc7b2a..0000000000 --- a/operator/src/main/java/org/keycloak/kubernetes/client/HttpClientFactory.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2023 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.kubernetes.client; - -import io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory; - -/** - * FIXME: This Factory is meant to force Fabric8 to use OKHttp Client. We should not normally do that as it is not aligned with Quarkus. - * Remove once the following are resolved: - * https://github.com/fabric8io/kubernetes-client/issues/5036 - * https://github.com/fabric8io/kubernetes-client/issues/5033 (only needed by tests) - * - * Tracked by: https://github.com/keycloak/keycloak/issues/19573 - * - * @author Vaclav Muzikar - */ -public class HttpClientFactory extends OkHttpClientFactory { - @Override - public boolean isDefault() { - return false; - } - - @Override - public int priority() { - return 10000; - } -} diff --git a/operator/src/main/resources/META-INF/services/io.fabric8.kubernetes.client.http.HttpClient$Factory b/operator/src/main/resources/META-INF/services/io.fabric8.kubernetes.client.http.HttpClient$Factory deleted file mode 100644 index c38d28eb0a..0000000000 --- a/operator/src/main/resources/META-INF/services/io.fabric8.kubernetes.client.http.HttpClient$Factory +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2023 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -org.keycloak.kubernetes.client.HttpClientFactory \ No newline at end of file