Skip to content

Commit e63bbc2

Browse files
committed
Doc: Add documentation about customResource API change related to Namespaced interface
We changed `customResource()` typed API to require POJOs to implement `io.fabric8.kubernetes.api.model.Namespaced` for Namespaced resources, but we didn't add any documentation about this breaking change. This PR tries to add documentation regarding this in javadocs and CHANGELOG
1 parent fd12aff commit e63bbc2

File tree

3 files changed

+196
-6
lines changed

3 files changed

+196
-6
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,16 @@ _**Note**_: Some classes have been moved to other packages:
131131
* Add support for Namespaced SharedInformers, fixed probelms with OperationContext argument
132132
* Fix #1821: ListOptions now supported when watching a Kubernetes Resource
133133

134-
_**Note**_: Some classes have been renamed:
135-
- `io.fabric8.tekton.pipeline.v1beta1.WorkspacePipelineDeclaration` is now `io.fabric8.tekton.pipeline.v1beta1.PipelineWorkspaceDeclaration`
134+
_**Note**_:
135+
- Some classes have been renamed:
136+
- `io.fabric8.tekton.pipeline.v1beta1.WorkspacePipelineDeclaration` is now `io.fabric8.tekton.pipeline.v1beta1.PipelineWorkspaceDeclaration`
137+
- Breaking changes in `KubernetesClient` `customResource()` typed API:
138+
- We've introduced a major breaking change in customResource(...) typed API. We have introduced a new interface `io.fabric8.kubernetes.api.model.Namespaced` which needs to
139+
be added to your Custom Types using typed API. For example, for a custom resource named `Animals` which is a [Namespaced](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) resource; It should be declared like this:
140+
```
141+
public class Animals extends CustomResource implements Namespaced { ... }
142+
```
143+
You can also checkout an example in our test suite for this: [PodSet.java](https://github.com/fabric8io/kubernetes-client/blob/master/kubernetes-tests/src/test/java/io/fabric8/kubernetes/client/mock/crd/PodSet.java#L22)
136144
137145
### 4.10.1 (2020-05-06)
138146
#### Bugs

0 commit comments

Comments
 (0)