Skip to content

Commit

Permalink
fix fabric8io#3865: using just a single builder
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins authored and manusa committed Mar 8, 2022
1 parent 850044a commit f7bba41
Show file tree
Hide file tree
Showing 9 changed files with 456 additions and 372 deletions.
13 changes: 12 additions & 1 deletion doc/MIGRATION-v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,16 @@ This release introduces kubernetes-client-api and openshift-client-api modules.

If you are directly relying on classes in the -client jars other than DefaultKubernetesClient and DefaultOpenShiftClient, please let us know your usage scenario. Moving forward we'd like consider all classes in the -client jars internal.

When you rely solely on a compile dependency to the respective -api dependencies you will not be able to use DefaultKubernetesClient nor DefaultOpenShiftClient directly to create your client instances. You should instead - TBD
When you rely solely on a compile dependency to the respective -api dependencies you will not be able to use DefaultKubernetesClient nor DefaultOpenShiftClient directly to create your client instances. You should instead use KubernetesClientBuilder. Passing a configuration of HttpClient is instead done through builder methods - withConfig and withHttpClientFactory. For example:

```java
KubernetesClient client = new KubernetesClientBuilder().build();
...
```
```java
OpenShiftClient openShiftClient = new new KubernetesClientBuilder().withConfig(new OpenShiftConfigBuilder()...build()).build().adapt(OpenShiftClient.class);
...
```

### OkHttp HttpClient

Expand Down Expand Up @@ -87,6 +96,7 @@ The group on the object being deserialized is not required to match the prospect
- Removed HttpClientUtils.createHttpClient(final Config config, final Consumer<OkHttpClient.Builder> additionalConfig), please use the OkHttpClientFactory instead
- Removed methods on SharedInformerFactory dealing with the OperationContext
- Removed DefaultKubernetesClient and DefaultOpenShiftClient constructors directly referencing OkHttp - use OkHttpClientImpl to wrap the OkHttpClient, or the OkHttpClientFactory instead.
- Removed OpenShiftConfig OpenshiftApiGroupsEnabled methods

### Extension Development

Expand Down Expand Up @@ -163,6 +173,7 @@ Client.isAdaptable and Client.adapt will check first if the existing instance is
## Deprecations

- ApiVersionUtil classes in each extension have been deprecated, you should use io.fabric8.kubernetes.client.utils.ApiVersionUtil instead.
- HttpClientUtils.createHttpClient has been deprecated, you should create your own client factory instead.

- Extension specific EnableXXXMockClient and XXXMockServer classes have been deprecated. You can simply use EnableKubernetesMockClient and KubernetesMockServer instead. Dependencies on the xxx-mock jar are then no longer needed, just a dependency to kubernetes-server-mock.

Expand Down

This file was deleted.

Loading

0 comments on commit f7bba41

Please sign in to comment.