@@ -205,40 +205,50 @@ There are several more JS and TS examples in the [examples](https://github.com/k
205205
206206# Compatibility
207207
208- Prior to the ` 0.13.0 ` release, release versions did not track Kubernetes versions. Starting with the ` 0.13.0 `
209- release, we will increment the minor version whenever we update the minor Kubernetes API version
210- (e.g. ` 1.19.x ` ) that this library is generated from.
211-
212- ` request ` was migrated to ` node-fetch ` as the HTTP(S) backend for release ` 1.0.0 ` tracked in #754
213-
214- ` node-fetch ` was migrated to ` undici ` which is the native node.js fetch package for release ` 2.0.0 ` tracked in #2306
215-
216- Generally speaking newer clients will work with older Kubernetes, but compatibility isn't 100% guaranteed.
217-
218- | client version | older versions | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 |
219- | -------------- | -------------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
220- | 0.19.x | - | ✓ | x | x | x | x | x | x |
221- | 0.20.x | - | + | ✓ | x | x | x | x | x |
222- | 0.21.x | - | + | + | ✓ | x | x | x | x |
223- | 0.22.x | - | + | + | + | ✓ | x | x | x |
224- | 1.0.x | - | + | + | + | + | ✓ | x | x |
225- | 1.1.x | - | + | + | + | + | ✓ | x | x |
226- | 1.2.x | - | + | + | + | + | + | ✓ | x |
227- | 1.3.x | - | + | + | + | + | + | ✓ | x |
228- | 1.4.x | - | + | + | + | + | + | + | ✓ |
229-
230- Key:
231-
232- - ` ✓ ` Exactly the same features / API objects in both javascript-client and the Kubernetes
233- version.
234- - ` + ` javascript-client has features or api objects that may not be present in the
235- Kubernetes cluster, but everything they have in common will work.
236- - ` - ` The Kubernetes cluster has features the javascript-client library can't use
237- (additional API objects, etc).
238- - ` x ` The Kubernetes cluster has no guarantees to support the API client of
239- this version, as it only promises _ n_ -2 version support. It is not tested,
240- and operations using API versions that have been deprecated and removed in
241- later server versions won't function correctly.
208+ ## Package versioning
209+
210+ Client releases follow [ Semantic Versioning] ( https://semver.org/ ) :
211+
212+ - ** Major:** new Kubernetes API targets and incompatible client changes. Regeneration may remove
213+ exported clients or models and change existing TypeScript types.
214+ - ** Minor:** backward-compatible features.
215+ - ** Patch:** backward-compatible bug and security fixes.
216+
217+ We align major client releases with new Kubernetes API targets, as discussed in
218+ [ #2582 ] ( https://github.com/kubernetes-client/javascript/issues/2582#issuecomment-3145057737 ) .
219+ Client and Kubernetes version numbers do not match. Check the release notes when upgrading majors.
220+
221+ The [ 1.0.0 release] ( https://github.com/kubernetes-client/javascript/releases/tag/1.0.0 ) migrated from
222+ ` request ` to ` node-fetch ` and became ESM-only. The
223+ [ 2.0.0 release] ( https://github.com/kubernetes-client/javascript/releases/tag/2.0.0 ) migrated from
224+ ` node-fetch ` to the npm ` undici ` package and changed supported Node.js versions.
225+
226+ ## Generated Kubernetes API targets
227+
228+ This table lists the Kubernetes API specification used to generate each client version.
229+
230+ | Client version | Generated Kubernetes API target |
231+ | -------------- | ------------------------------- |
232+ | 0.19.0 | 1.27 |
233+ | 0.20.0 | 1.28 |
234+ | 0.21.0 | 1.29 |
235+ | 0.22.0 | 1.30 |
236+ | 1.0.0 | 1.32 |
237+ | 1.1.2 | 1.32 |
238+ | 1.2.0 | 1.33 |
239+ | 1.3.0 | 1.33 |
240+ | 1.4.0 | 1.34 |
241+ | 2.0.0–2.0.2 | 1.36 |
242+ | 3.0.0 | 1.37 |
243+
244+ ## Compatibility with clusters
245+
246+ Clients generally work with older or newer clusters when both support the APIs your application
247+ uses. New APIs may be unavailable on older clusters, and deprecated APIs may be removed from newer
248+ clusters or clients. The generation targets above do not guarantee compatibility with every cluster.
249+
250+ See the [ Kubernetes API deprecation policy] ( https://kubernetes.io/docs/reference/using-api/deprecation-policy/ )
251+ and client release notes, and test against the cluster versions your application supports.
242252
243253# Known Issues
244254
0 commit comments