Commit Graph

25780 Commits

Author SHA1 Message Date
yongruilin
39e99b2a2c Add nil OldValue test coverage for union doc_tests
Add tests for Union, DiscriminatedUnion, and ZeroOrOneOfUnion
validating that nil oldObj (new map entry or newly-set pointer
field during update) does not skip validation via ratcheting.
2026-03-18 22:26:00 +00:00
yongruilin
c9e18abca5 Fix union validation ratcheting when oldObj is nil
When oldObj is nil (e.g. new map entry added during update), union
ratcheting incorrectly treats nil old and empty new as unchanged
membership, skipping validation entirely. Fix by checking
reflect.ValueOf(oldObj).IsNil() and disabling ratcheting when
oldObj is nil, so the new value is fully validated.

This affects Union, DiscriminatedUnion, and ZeroOrOneOfUnion
(via unionValidate).
2026-03-18 22:25:32 +00:00
Kubernetes Prow Robot
e7a3b09a03 Merge pull request #131744 from ArangoGutierrez/dra_describe
Add ResourceSlices field to kubectl describe node
2026-03-18 22:04:31 +05:30
Kubernetes Prow Robot
cf09296f9a Merge pull request #137843 from pacoxu/cobra-v1.10.2
bump spf13/cobra to v1.10.2
2026-03-18 20:54:55 +05:30
Kubernetes Prow Robot
0d28578de1 Merge pull request #137795 from ttsuuubasa/dra-binding-conditions-beta
DRA Device Binding Conditions: graduate to beta
2026-03-18 19:18:33 +05:30
Kubernetes Prow Robot
1baff95324 Merge pull request #136988 from pedjak/kubectl-explain-extradocs
kubectl explain: render externalDocs from OpenAPI v3 schemas
2026-03-18 17:56:35 +05:30
Yaroslav Borbat
b9bf406456 DRA ResourceSlice: explicit AllNodes on Pool and placement validation
Signed-off-by: Yaroslav Borbat <yaroslav.752@gmail.com>
2026-03-18 13:27:16 +03:00
Paco Xu
a304826799 bump spf13/cobra to v1.10.2 2026-03-18 16:46:23 +08:00
Yaroslav Borbat
6f89451b0c DRA: add ReconcilePoolWithName to ResourceSlice controller
Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Yaroslav Borbat <yaroslav.752@gmail.com>
2026-03-18 10:53:04 +03:00
Tsubasa Watanabe
6bf9cd5053 DRA Device Binding Conditions: run make update
Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2026-03-18 13:44:11 +09:00
Tsubasa Watanabe
cc2ab58a3a DRA Device Binding Conditions: graduate to beta
Promote DRADeviceBindingConditions feature gate from Alpha to Beta
in v1.36 with default enabled.

- Update feature gate definition to set default=true for v1.36 Beta
- Update API documentation comments from "alpha field" to "beta field"
  across all resource API versions (v1, v1beta1, v1beta2)

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2026-03-18 13:44:10 +09:00
Benjamin Elder
0d2c2cf5b2 UPDATE_COMPATIBILITY_FIXTURE_DATA=true go test k8s.io/api -count=1 2026-03-17 20:29:53 -07:00
Benjamin Elder
bf0d191a15 Add v1.35.0 API testdata 2026-03-17 19:54:54 -07:00
Kubernetes Prow Robot
a1293fe6b1 Merge pull request #137836 from BenTheElder/fix-api
Fix API serialization compatibility regression in VolumeMountStatus
2026-03-18 08:23:46 +05:30
Kubernetes Prow Robot
f072e19776 Merge pull request #137835 from BenTheElder/suggest-test
suggest running k8s.io/api tests after adding testdata without test caching
2026-03-18 07:35:46 +05:30
Benjamin Elder
ce9ad95192 UPDATE_COMPATIBILITY_FIXTURE_DATA=true make test WHAT=k8s.io/api 2026-03-17 17:37:24 -07:00
Benjamin Elder
9f60cc3c4e hack/update-codegen.sh 2026-03-17 17:37:23 -07:00
Benjamin Elder
f6d42d302b make VolumeMountStatus.VolumeStatus a pointer to preserve serialization compatibility 2026-03-17 17:37:23 -07:00
Kubernetes Prow Robot
762d386de4 Merge pull request #137783 from enj/enj/t/constrained_impersonation_key
KEP-5284: optimize constrained impersonation cache key construction
2026-03-18 05:20:41 +05:30
Kubernetes Prow Robot
399be52146 Merge pull request #137584 from QiWang19/kcfg-memqos
KEP-2570: Add MemoryReservationPolicy to kubeketconfig for MemoryQoS feature
2026-03-18 05:20:01 +05:30
Kubernetes Prow Robot
299ab0d68a Merge pull request #137271 from brejman/tas-constraints
KEP-5732: Add SchedulingConstraints to PodGroup API and use them in TopologyPlacement plugin
2026-03-18 05:19:47 +05:30
Kubernetes Prow Robot
e2abeef6cd Merge pull request #136657 from Jefftree/sharding-test
[KEP-5866] Sharded List and Watch
2026-03-18 05:19:39 +05:30
Benjamin Elder
608be1252a suggest running tests after adding testdata *without test caching* 2026-03-17 16:06:27 -07:00
Kubernetes Prow Robot
24ca19d980 Merge pull request #136977 from pedjak/allow-extradocs-openapi-schema-response
Preserve externalDocs and example in CRD structural schema conversion
2026-03-18 02:33:40 +05:30
Jefftree
c6b9f3f5b4 sharding: gate MatchesSharding call in Matches() 2026-03-17 16:44:20 -04:00
Jefftree
ab1cfa764e sharding: address review comments (deads2k) 2026-03-17 16:44:17 -04:00
Jefftree
d43dc1abd8 generated: regenerate proto, openapi, deepcopy, conversion, and testdata 2026-03-17 16:44:16 -04:00
Jefftree
b8a17e1ce8 sharding: implement UID-based sharding for list and watch (KEP-5866) 2026-03-17 16:44:15 -04:00
Kubernetes Prow Robot
814c431a00 Merge pull request #136641 from troychiu/dra-devices-order
DRA: Introduce index-based naming in resourceslice controller and sort slices and pools lexicographically
2026-03-17 22:55:43 +05:30
Troy Chiu
761fc9d474 Introduce index-based naming in resourceslice controller and sort slices and pools lexicographically
fix test
2026-03-17 16:32:10 +00:00
Carlos Eduardo Arango Gutierrez
4c40143042 kubectl: Add ResourceSlices to describe node with O(1) query
Add a Node-Exclusive ResourceSlices section to `kubectl describe node`
that displays DRA ResourceSlices assigned exclusively to the node.

Key design decisions per reviewer feedback:

1. Uses indexed field selector (spec.nodeName) for O(1) query performance
   instead of fetching all slices cluster-wide. This is critical for
   large clusters with thousands of ResourceSlices.

2. Shows only node-exclusive slices (where spec.NodeName == thisNode).
   Does NOT show AllNodes, NodeSelector, or PerDeviceNodeSelection slices
   as these could number in the thousands and aren't node-specific.

3. Aggregates by driver/pool instead of listing individual slices:
   - Shows: Driver, Pool, Slices count, Devices count
   - More concise and useful output

4. Caps output at 10 pools with "...and X more pools" message,
   following the existing formatEndpointSlices pattern.

Example output:
  Node-Exclusive ResourceSlices:
    Driver              Pool        Slices  Devices
    ------              ----        ------  -------
    nvidia.com/gpu      gpu-pool    2       8
    intel.com/qat       qat-pool    1       4

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
2026-03-17 15:57:15 +01:00
Bartosz
d9da8c7c4a Add scheduling constraints to v1alpha2 pod group api
Add plugin to generate placements based on scheduling constraints

Co-authored-by: Antoni Zawodny <zawodny@google.com>
2026-03-17 13:27:46 +00:00
Predrag Knezevic
65a2a61868 Preserve externalDocs and example in CRD structural schema conversion
Thread externalDocs and example fields through the structural schema
so they flow to published OpenAPI specs. Previously, both were
intentionally dropped during JSONSchemaProps to Structural conversion,
making them unavailable to clients like kubectl explain.
2026-03-17 14:24:51 +01:00
Maciej Skoczeń
38f536c713 Use CycleState.IsPodGroupSchedulingCycle instead of NeedsPodGroupScheduling for pods 2026-03-17 09:10:52 +00:00
Kubernetes Prow Robot
9cf54337e4 Merge pull request #137689 from jpbetz/fix-reset-fields-and-test
Test that field wiping and field resetting is applied consistently across API
2026-03-17 07:27:43 +05:30
Monis Khan
7052e379e4 KEP-5284: optimize constrained impersonation cache key construction
This change reduces allocations by:

- Replacing cryptobyte.Builder with manual length-prefix encoding into []byte
- Replacing fmt.Sprintf with hex.Encode/hex.AppendEncode
- Using unsafe.String for safe []byte to string conversions

Signed-off-by: Monis Khan <mok@microsoft.com>
2026-03-16 21:32:10 -04:00
Kubernetes Prow Robot
5edaecfa53 Merge pull request #137609 from enj/enj/f/constrained_impersonation_beta
KEP-5284: promote constrained impersonation to beta
2026-03-17 06:35:36 +05:30
Monis Khan
a43c5ce06f KEP-5284: add benchmark for constrained impersonation
Signed-off-by: Monis Khan <mok@microsoft.com>
2026-03-16 16:31:10 -04:00
Monis Khan
5bff98b884 KEP-5284: assert pre-hashed inputs to buildKey
Signed-off-by: Monis Khan <mok@microsoft.com>
2026-03-16 16:29:27 -04:00
Kubernetes Prow Robot
fe37c66436 Merge pull request #137773 from lalitc375/graduate-forbidden
Graduate +k8s:forbidden to beta.
2026-03-17 00:35:37 +05:30
Kubernetes Prow Robot
d763ae8f6f Merge pull request #137073 from iomarsayed/snapshot-podgroup-state-before-scheduling-cycle
Snapshot PodGroup state before initiating scheduling cycle
2026-03-16 23:37:48 +05:30
Kubernetes Prow Robot
6c300757e8 Merge pull request #136314 from petern48/etcd_metrics_beta
Graduate etcd metric 'apiserver_storage_events_received_total' to BETA
2026-03-16 22:23:39 +05:30
Qi Wang
f1ccd2d8aa Add MemoryReservationPolicy to kubeletconfig for MemoryQoS feature
Add MemoryReservationPolicy (None/HardReservation) controls memory.min. This allows
independently of memory.min protection, providing operators more
granular control over memoryQoS behavior.
Signed-off-by: Qi Wang <qiwan@redhat.com>
2026-03-16 11:24:34 -04:00
Kubernetes Prow Robot
9c7e57bb7c Merge pull request #137330 from tico88612/cleanup/test-node-pod-dep-prometheus
Remove dep. Prometheus from test/e2e/node/pods.go
2026-03-16 20:43:49 +05:30
Kubernetes Prow Robot
23e0d392ce Merge pull request #137742 from dims/dsrinivas/issue-137739-drain-timeout
kubectl/drain: widen namespace termination retry timeout
2026-03-16 18:53:39 +05:30
Lalit Chauhan
f9c3cd9db4 Graduate +k8s:forbidden to beta. 2026-03-16 10:59:43 +00:00
Jian Qiu
6c8e5e2d41 Add more unit tests for constrained impersonation (#136737)
* Add more unit tests for constrained impersonation

test cases for large number of groups/extra
test cases for system:masters constrained impersonation is not allowed

Signed-off-by: Jian Qiu <jqiu@redhat.com>

* Validate each authz request in the constrained impersonation unit test

Signed-off-by: Jian Qiu <jqiu@redhat.com>

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2026-03-16 11:03:37 +05:30
Kubernetes Prow Robot
8cfc85428a Merge pull request #137678 from aaron-prindle/flowcontrol-discriminator-and-member-dv-migration
feat: flowcontrol LimitResponse and PriorityLevelConfigurationSpec discriminator and member dv migration
2026-03-16 09:15:37 +05:30
Kubernetes Prow Robot
040ca59611 Merge pull request #137454 from haircommander/proc-mount-ga
KEP-4265: feature: promote ProcMountType to GA
2026-03-15 07:57:34 +05:30
Davanum Srinivas
77f8d7c2a9 kubectl/drain: widen namespace termination retry timeout
TestEvictDuringNamespaceTerminating intentionally exercises the retry path
but only allows 10ms of total time. The production loop sleeps, refreshes
state, and retries under that same deadline, so a single retry plus
scheduler jitter is enough to exhaust the budget under -race or on busy
CI workers.

Keep the retry interval small so the test still covers the retry behavior,
but widen the overall timeout so the assertion measures semantics instead
of machine speed.

Tested:
go test -race ./staging/src/k8s.io/kubectl/pkg/drain -run TestEvictDuringNamespaceTerminating -count=100
2026-03-14 11:58:32 -04:00