Commit Graph

132834 Commits

Author SHA1 Message Date
Dan Winship
7b7145a594 Update kubernetes.default endpoints test a bit
Inline the endpointSlicesEqual() method into the test, since despite
its generic-sounding name, it made assumptions specific to this test.

Also, port to generic sets.
2025-10-07 17:32:36 -04:00
Dan Winship
e627b3b2bf Move some network conformance tests around.
Move the Endpoints API test from endpointslice.go to endpoints.go

Move the "kubernetes.default Service exists" and "kubernetes.default
endpoints exist" tests to apiserver.go, since (unlike the rest of
service.go/endpointslice.go) they aren't testing the behavior of the
Service/EndpointSlice/Endpoints APIs.

(No code changes, but fixed a typo in a comment.)
2025-10-07 17:32:34 -04:00
Dan Winship
d46f15bd12 Fix some linter errors before splitting out code
(In particular, fix the wait.PollImmediate calls even in the code
that's staying here, not just the code that's moving.)
2025-10-07 17:32:32 -04:00
Dan Winship
07959fd168 Remove redundant test of "empty EndpointSlice for Service with no Pods"
This was being checked by two different conformance tests.
2025-10-07 17:32:27 -04:00
Dan Winship
ff83235f35 Fix up EndpointSlice conformance test descriptions 2025-10-07 17:32:25 -04:00
Dan Winship
5ae2372f1b Remove a "helper" function that doesn't really help much
While createServiceReportErr could be fixed to use
framework.ExpectNoErrorWithOffset (and, uh, to log "error creating
Service" rather than "error deleting Service"), it's too trivial to
really be all that useful.
2025-10-01 09:24:02 -04:00
Kubernetes Prow Robot
6bb0bd55a3 Merge pull request #134295 from omerap12/hpa-desiredReplicasCount-metric
Add desired_replicas gauge metric to HPA controller
2025-10-01 05:16:17 -07:00
Kubernetes Prow Robot
bded66365e Merge pull request #134258 from mayank-agrwl/apiserver-lease-gc
Make APIServerLeaseGC controller context-aware
2025-10-01 03:34:17 -07:00
Kubernetes Prow Robot
1a54b78999 Merge pull request #134259 from mayank-agrwl/legacy-token-tracking-controller
Make legacytokentracking controller context aware
2025-10-01 02:04:18 -07:00
Kubernetes Prow Robot
c0af084da0 Merge pull request #134308 from chizhang21/cordon_state_enhance
fix(cordonhelper): Avoid mutating local node before API call
2025-09-30 22:56:16 -07:00
Kubernetes Prow Robot
81d7612a53 Merge pull request #134330 from michaelasp/rvCmp
Add resource version comparison function in client-go along with conformance
2025-09-30 20:58:16 -07:00
Michael Aspinwall
9757d8d8ef Document 0 as a special case in RV comparison 2025-10-01 03:09:26 +00:00
Kubernetes Prow Robot
81059575f6 Merge pull request #134208 from n2h9/126379-replace-non-WithContext-functions-to-use-WithContext-functions-instead-of-duplicates
[126379] [client-go] chore: use WithContext functions inside old functions to remove code duplication
2025-09-30 19:32:16 -07:00
Michael Aspinwall
84f85712be feat: Add matcher and conformance tests ensuring that RV is uint128 2025-10-01 00:01:50 +00:00
Kubernetes Prow Robot
6a687c5ddc Merge pull request #133339 from aojea/vap_servicecidr
ServiceCIDR ValidationAdmissionPolicy for implementing previous behavior
2025-09-30 16:20:15 -07:00
Kubernetes Prow Robot
8f372d2ac0 Merge pull request #133972 from pohly/build-data-race-detection-image
build: automatically choose a suitable base image
2025-09-30 12:32:16 -07:00
cz21
c524a5fba2 fix(cordonhelper): Avoid mutating local node before API call
Signed-off-by: cz21 <cz21ok@gmail.com>
2025-10-01 01:53:07 +08:00
Michael Aspinwall
7c24e62d7c Add additional types for resource version comparison testing 2025-09-30 17:16:07 +00:00
Kubernetes Prow Robot
cffecaac55 Merge pull request #134319 from neolit123/1.35-refactor-fetch-init-config-flags
kubeadm: rework the FetchInitConfigurationFromCluster node flags
2025-09-30 09:14:32 -07:00
Kubernetes Prow Robot
2b828fac59 Merge pull request #134297 from ialidzhikov/cleanup/kcm-ks-configmap-leader-election-rbac
Remove configmaps related rules from the kube-controller-manager and kube-scheduler leader election roles
2025-09-30 09:14:25 -07:00
Kubernetes Prow Robot
0f660b5eb4 Merge pull request #133765 from cfryanr/feature-readable-audit-event
restore public func `AuditEventFrom` which was deleted by #129472
2025-09-30 09:14:17 -07:00
Kubernetes Prow Robot
4a1558c545 Merge pull request #133967 from pohly/dra-allocator-selection
DRA: allocator selection
2025-09-30 08:24:18 -07:00
Patrick Ohly
68205ff40c DRA scheduler_perf: run with specific allocator implementations
For some packages (in particular the code DRA), all allocator implementations
can handle the testcases. Some other packages are for less stable features and
work with fewer implementations. Now all unit tests are run with all suitable
implementations, to increase code coverage.

Benchmarks are fixed to the most mature implementation because they would be
costly to run in more than one. When promoting an allocation implementation we
can do before/after comparisons to detect potential performance regressions.

The downside of this approach is that we need to remember to extend the list
of supported implementations when promoting features, otherwise testing will miss
some new supported implementation.
2025-09-30 18:19:57 +02:00
Patrick Ohly
5832c915ac scheduler_perf: apply feature gates in deterministic, alphabetical order
Without this, the effect of the following feature gate config would be random:

    featureGates:
      AllBeta: false
      SomeBetaFeature: true

That's random because the order of iterating of the map is randomized by Go and
`AllBeta: false` would disable `SomeBetaFeature` if (and only if) applied last.

Now by sorting alphabetically, AllAlpha/Beta come first in practice. It's not a
complete solution, some future feature gate name might come before it.
2025-09-30 16:53:39 +02:00
Patrick Ohly
60eeaa6ebd DRA scheduler: add unit test for allocator selection
This prevents the mistake from 1.34 where the default-on
DRAResourceClaimDeviceStatus feature caused the use of the experimental
allocator implementation. The test fails without a fix for that.
2025-09-30 16:53:38 +02:00
Patrick Ohly
7f57730ba4 DRA scheduler: fix selection of "incubating" allocator implementation
In 1.34, the default feature gate selection picked the "experimental" allocator
implementation when it should have used the "incubating" allocator. No harm
came from that because the experimental allocator has all the necessary if
checks to disable the extra code and no bugs were introduced when implementing
it, but it means that our safety net wasn't there when we expected it to be.

The reason is that the "DRAResourceClaimDeviceStatus" feature gate is on by
default and was only listed as supported by the experimental implementation.
This could be fixed by listing it as supported also by the other
implementation, but that would be a bit odd because there is nothing to support
for it (the reason why this was missed in 1.34!). Instead, the allocator
features are now only indirectly related to feature gates, with a single
boolean controlling the implementation of binding conditions.
2025-09-30 16:53:38 +02:00
Patrick Ohly
b5bcac998d DRA scheduler: clean up feature gate handling
Copying from feature.Features to new fields in the plugin got a bit silly with
the long list of features that we have now. Embedding feature.Features is
simpler.

Two fields in feature.Features weren't named according to the feature gate, now
they are named consistently and the fields are sorted.
2025-09-30 16:53:38 +02:00
Kubernetes Prow Robot
e5c04392c0 Merge pull request #134276 from aaron-prindle/allocation-mode-enum
fix: add +enum tag to resource DeviceAllocationMode
2025-09-30 07:14:34 -07:00
Kubernetes Prow Robot
07a5020bfc Merge pull request #134168 from aditigupta96/refactor-naming-controller
refactor(apiextensions-apiserver): Make NamingConditionController context-aware
2025-09-30 07:14:26 -07:00
Kubernetes Prow Robot
14fb5e6481 Merge pull request #133697 from tallclair/feature-deps
Codify feature gate dependencies
2025-09-30 07:14:18 -07:00
Kubernetes Prow Robot
7353b6a93d Merge pull request #134312 from alaypatel07/gc-resourceclaim-extendedresource
fix resource claims deallocation for extended resource when pod is completed
2025-09-30 01:38:20 -07:00
Mayank Agrawal
b0460eedba Make legacytokentracking controller context aware 2025-09-29 21:41:47 -07:00
Michael Aspinwall
37fcfcd29e feat: Add conformance tests for all resources for comparable resource version 2025-09-29 23:32:07 +00:00
Kubernetes Prow Robot
0f8471a6f5 Merge pull request #134237 from aditigupta96/contextual-logging-nonstructural-schema-controller
refactor(apiextensions-apiserver): Make NonStructuralSchema controller context-aware
2025-09-29 16:00:17 -07:00
Kubernetes Prow Robot
e87a447ca2 Merge pull request #134327 from p0lyn0mial/watchlist-e2e-table-improve
test/e2e/apimachinery/watchlist: select only wellknown secrets for table test
2025-09-29 13:46:16 -07:00
Michael Aspinwall
2cef54c145 feat: Add helper function for client-go to compare resource version 2025-09-29 20:41:24 +00:00
Ryan Richard
f5e65af173 add getters for event User and ImpersonatedUser on AuditContext
The ability to get these values was deleted by #129472 which removed
the public function audit.AuditEventFrom. The new getters return copies
of the underlying objects to prevent external mutations of the objects
held by the audit events.
2025-09-29 12:41:59 -07:00
Kubernetes Prow Robot
7f180515d7 Merge pull request #134233 from aaron-prindle/dv-validate-csi-driver-option-support
refactor(DRA validation): Add granular controls to ValidateCSIDriverName for declarative validation migration
2025-09-29 12:20:20 -07:00
Alay Patel
8a03067211 fix resource claims deallocation for extended resource when pod is completed
Signed-off-by: Alay Patel <alayp@nvidia.com>
2025-09-29 15:15:40 -04:00
Kubernetes Prow Robot
1ffdc16b71 Merge pull request #134314 from xigang/node_controller_zone
node_lifecycle_controller: fix ComputeZoneState method comment
2025-09-29 11:30:24 -07:00
Kubernetes Prow Robot
da552ef1d7 Merge pull request #134240 from yongruilin/master_vg_strategy-call
Refactor: Centralize declarative validation logic
2025-09-29 11:30:17 -07:00
Lubomir I. Ivanov
b6afe986c6 kubeadm: rework the FetchInitConfigurationFromCluster node flags
The newControlPlane flag has been historically problematic, since
it implies that the function FetchInitConfigurationFromCluster
cannot handle the cases where a node is worker node but
we still want to fetch its NodeRegistrationOptions conditionally,
in cases such as "upgrade node" for workers.

To fix this issue, replace the flag newControlPlaneNode with
two new flags getNodeRegistration and getAPIEndpoint.

If getNodeRegistration is true, we fetch the NRO, and if
getAPIEndpoint is true, we fetch the API endpoint for
that node.

Additionally, rename skipComponentConfigs to getComponentConfigs
for consistency and flip its value accordingly everywhere.
2025-09-29 19:58:56 +02:00
Kubernetes Prow Robot
8ebc216c59 Merge pull request #134185 from DanBokete/deprecate-caseless-validation
Feat: Adds warnings when ResourceSlice driver names contain uppercase characters
2025-09-29 09:40:18 -07:00
Kubernetes Prow Robot
50cc9905b6 Merge pull request #132059 from jm-franc/configurable-tolerance-e2e-test
Add configurable tolerance e2e test.
2025-09-29 07:40:19 -07:00
Lukasz Szaszkiewicz
212a9c6a60 test/e2e/apimachinery/watchlist: select only wellknown secrets for table test 2025-09-29 13:36:38 +02:00
Kubernetes Prow Robot
5161bf0058 Merge pull request #134268 from joshjms/gce-test-fix-etcd-manifest
gce: Fix etcd manifest
2025-09-28 08:00:16 -07:00
joshjms
6a5d0ef423 gce: fix etcd manifest
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-09-28 22:06:16 +08:00
xigang
574b09b7de nodelifecycle: fix ComputeZoneState method comment
Signed-off-by: xigang <wangxigang2014@gmail.com>
2025-09-28 10:56:56 +08:00
Kubernetes Prow Robot
ed49decb4a Merge pull request #134309 from hakman/npd-1.34.0
Update NPD to v1.34.0
2025-09-27 19:38:16 -07:00
Ciprian Hacman
2b3f1877be Update NPD to v1.34.0 2025-09-27 19:57:47 +03:00