kubernetes/pkg/apis/core
Kunalbehbud 3bd2928d66
pkg/apis/core: allow uint32 Linux UIDs in container status (#138574)
* pkg/apis/core: allow unsigned 32-bit Linux UIDs

Signed-off-by: Kunalbehbud <121988281+Kunalbehbud@users.noreply.github.com>

* apimachinery: fix UID validation on 32-bit platforms

Format UID validation range errors with int64 bounds so accepting Linux UIDs
up to MaxUint32 does not overflow int on 32-bit typecheck targets.

Signed-off-by: Kunalbehbud <121988281+Kunalbehbud@users.noreply.github.com>

* pkg/apis/core: limit uint32 UID validation to pod status

Keep pod spec and kubelet image user validation on the existing int32 UID
range, and only accept the full Linux uint32 UID range for container status
user fields.

Signed-off-by: Kunalbehbud <121988281+Kunalbehbud@users.noreply.github.com>

* pkg/apis/core: inline container status UID range check

Per review, inline the uint32 UID range check directly in
validateLinuxContainerUser and drop the generic-sounding
isValidLinuxContainerUserID helper (and its constants), so the range
that is wider than runAsUser can only ever be applied to container
status validation.

* pkg/apis/core: inline linux user validation into validateContainerStatusUsers

Per review, inline the linux container-user checks directly into
validateContainerStatusUsers and remove the validateLinuxContainerUser
helper, so nothing other than container status validation can reach the
wider-than-runAsUser UID range.

---------

Signed-off-by: Kunalbehbud <121988281+Kunalbehbud@users.noreply.github.com>
2026-07-15 20:53:22 +00:00
..
fuzzer Add PodIP to core.PodStatus to match core/v1 2026-06-22 11:11:46 -04:00
helper Fix handling of empty pod-level resources 2026-07-14 23:34:53 +00:00
install lavalamp is taking a long break 2023-05-11 16:43:38 +00:00
pods Add status.hostIPs in ConvertDownwardAPIFieldLabel 2023-07-14 09:35:30 +08:00
v1 Fix handling of empty pod-level resources 2026-07-14 23:34:53 +00:00
validation pkg/apis/core: allow uint32 Linux UIDs in container status (#138574) 2026-07-15 20:53:22 +00:00
annotation_key_constants.go Rename AppArmor annotation constants with Deprecated 2024-03-06 10:46:31 -08:00
doc.go remove import doc comments 2024-12-02 16:59:34 +01:00
json.go
objectreference.go
OWNERS Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
register.go cleanup: Remove unused PodStatusResult type 2026-04-30 11:49:57 +05:30
resource.go Downward API hugepages 2020-11-10 16:09:13 -05:00
taint.go
taint_test.go
toleration.go
toleration_test.go
types.go Merge pull request #140368 from michaelasp/coreMemIdentical 2026-07-09 19:44:40 +00:00
types_test.go Add test for EphemeralContainerCommon struct tags 2021-10-19 23:01:07 -04:00
zz_generated.deepcopy.go core: enable instant cast for types in core 2026-07-09 17:48:27 +00:00