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 committed Mar 4, 2022
1 parent a476c10 commit 462d82d
Show file tree
Hide file tree
Showing 9 changed files with 454 additions and 367 deletions.
13 changes: 12 additions & 1 deletion doc/MIGRATION-v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,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 @@ -85,6 +94,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 @@ -159,6 +169,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.

## Object Sorting

Expand Down

This file was deleted.

Loading

0 comments on commit 462d82d

Please sign in to comment.