Skip to content

Commit 25615be

Browse files
committed
Clarify that resource versions in Kubernetes are now comparable as monotonically increasing integers starting from K8s 1.35
1 parent 0fcc949 commit 25615be

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

content/en/docs/reference/using-api/api-concepts.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,9 +1367,12 @@ changed, or to express data consistency requirements when getting, listing and
13671367
watching resources. Resource versions must be treated as opaque by clients and passed
13681368
unmodified back to the server.
13691369

1370-
You must not assume resource versions are numeric or collatable. API clients may
1371-
only compare two resource versions for equality (this means that you must not compare
1372-
resource versions for greater-than or less-than relationships).
1370+
Starting with K8s 1.35, it can be assumed that resource versions of all Kubernetes
1371+
resources and CRDs are comparable. Resource versions are considered monotonically
1372+
increasing integers and can be compared as such. Clients can not make assumptions
1373+
on the size of the resource version and comparisons must be only between a single
1374+
resource. See [KEP-5504](https://github.com/kubernetes/enhancements/issues/5504)
1375+
for more details on how to use this.
13731376

13741377
### `resourceVersion` fields in metadata {#resourceversion-in-metadata}
13751378

0 commit comments

Comments
 (0)