Skip to content

Commit

Permalink
Bump fabric8 kubernetes-client from 4.1.3 to 4.5.2
Browse files Browse the repository at this point in the history
* Bump sundrio.version from 0.16.4 to 0.17.2
* Remove KubernetesDeserializer thread safety workaround.
* Simplify code used to turn off HTTP/2, utilizing new method in KC 4.4.0
* Remove generic parameter from KubernetesResource (relates to fabric8io/kubernetes-client#1661)
  • Loading branch information
k-wall committed Sep 18, 2019
1 parent 7d32594 commit b026f2c
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 204 deletions.
6 changes: 0 additions & 6 deletions address-space-controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,6 @@
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
<filter>
<artifact>io.fabric8:kubernetes-model</artifact>
<excludes>
<exclude>io/fabric8/kubernetes/internal/KubernetesDeserializer**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
Expand Down
1 change: 1 addition & 0 deletions api-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@SuppressWarnings("serial")
public abstract class AbstractList<T extends HasMetadata> extends AbstractResource<T>
implements KubernetesResource<T>, KubernetesResourceList<T> {
implements KubernetesResource, KubernetesResourceList<T> {

@Valid
private ListMeta metadata = new ListMeta();
Expand Down

This file was deleted.

6 changes: 0 additions & 6 deletions api-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,6 @@
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
<filter>
<artifact>io.fabric8:kubernetes-model</artifact>
<excludes>
<exclude>io/fabric8/kubernetes/internal/KubernetesDeserializer**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<maven.compiler.target>11</maven.compiler.target>

<avro.version>1.9.0</avro.version>
<fabric8.kubernetes-client.version>4.1.3</fabric8.kubernetes-client.version>
<sundrio.version>0.16.4</sundrio.version>
<fabric8.kubernetes-client.version>4.5.2</fabric8.kubernetes-client.version>
<sundrio.version>0.17.2</sundrio.version>
<vertx.version>3.7.1</vertx.version>
<slf4j.version>1.7.21</slf4j.version>
<logback.version>1.2.3</logback.version>
Expand Down
6 changes: 0 additions & 6 deletions service-broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,6 @@
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
<filter>
<artifact>io.fabric8:kubernetes-model</artifact>
<excludes>
<exclude>io/fabric8/kubernetes/internal/KubernetesDeserializer**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
Expand Down
8 changes: 0 additions & 8 deletions standard-controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,6 @@
<mainClass>io.enmasse.controller.standard.StandardController</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>io.fabric8:kubernetes-model</artifact>
<excludes>
<exclude>io/fabric8/kubernetes/internal/KubernetesDeserializer**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,20 @@
import io.fabric8.kubernetes.client.Config;
import io.fabric8.kubernetes.client.ConfigBuilder;
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
import io.fabric8.kubernetes.client.utils.HttpClientUtils;
import okhttp3.OkHttpClient;
import okhttp3.Protocol;
import org.slf4j.Logger;

import java.util.Arrays;
import java.util.Collections;

public class Minikube extends Kubernetes {
private static Logger log = CustomLogger.getLogger();

protected Minikube(String globalNamespace) {
super(globalNamespace, () -> {
Config config = new ConfigBuilder().build();
Config config = new ConfigBuilder()
.withHttp2Disable(true) // Workaround https://github.com/square/okhttp/issues/3146
.build();

OkHttpClient httpClient = HttpClientUtils.createHttpClient(config);
// Workaround https://github.com/square/okhttp/issues/3146
httpClient = httpClient.newBuilder().protocols(Collections.singletonList(Protocol.HTTP_1_1)).build();

return new DefaultKubernetesClient(httpClient, config);
return new DefaultKubernetesClient(config);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@
import io.enmasse.systemtest.utils.TestUtils;
import io.fabric8.kubernetes.client.Config;
import io.fabric8.kubernetes.client.ConfigBuilder;
import io.fabric8.kubernetes.client.utils.HttpClientUtils;
import io.fabric8.openshift.api.model.Route;
import io.fabric8.openshift.client.DefaultOpenShiftClient;
import io.fabric8.openshift.client.OpenShiftClient;
import io.fabric8.openshift.client.OpenShiftConfig;
import okhttp3.OkHttpClient;
import okhttp3.Protocol;
import org.slf4j.Logger;

import java.util.Collections;

/**
* Handles interaction with openshift cluster
*/
Expand All @@ -34,12 +29,10 @@ public OpenShift(Environment environment, String globalNamespace) {
super(globalNamespace, () -> {
Config config = new ConfigBuilder().withMasterUrl(environment.getApiUrl())
.withOauthToken(environment.getApiToken())
.withHttp2Disable(true) // // Workaround https://github.com/square/okhttp/issues/3146
.build();

OkHttpClient httpClient = HttpClientUtils.createHttpClient(config);
// Workaround https://github.com/square/okhttp/issues/3146
httpClient = httpClient.newBuilder().protocols(Collections.singletonList(Protocol.HTTP_1_1)).build();
return new DefaultOpenShiftClient(httpClient, new OpenShiftConfig(config));
return new DefaultOpenShiftClient(new OpenShiftConfig(config));
});
}

Expand Down

0 comments on commit b026f2c

Please sign in to comment.