874 Commits

Author SHA1 Message Date
Anish Ramasekar
48eef9ce9a test: fix TestStructuredAuthenticationConfigReload flake by handling expected network errors
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-07-29 08:06:39 +00:00
Patrick Ohly
21d929f599 integration: use --runtime-config-emulation-forward-compatible
Some tests do version emulation and need the DRA feature. In that combination
the --runtime-config-emulation-forward-compatible option is needed to allow
enabling the V1 API although it's only available in 1.34.
2025-07-24 08:33:56 +02:00
Patrick Ohly
5c4f81743c DRA: use v1 API
As before when adding v1beta2, DRA drivers built using the
k8s.io/dynamic-resource-allocation helper packages remain compatible with all
Kubernetes release >= 1.32. The helper code picks whatever API version is
enabled from v1beta1/v1beta2/v1.

However, the control plane now depends on v1, so a cluster configuration where
only v1beta1 or v1beta2 are enabled without the v1 won't work.
2025-07-24 08:33:45 +02:00
Patrick Ohly
cff91579e8 DRA API: v1 registration + tests 2025-07-24 08:30:25 +02:00
Kubernetes Prow Robot
9827205bfe Merge pull request #132340 from dashpole/graduate_tracing
Graduate API Server Tracing to GA
2025-07-21 14:14:33 -07:00
Anish Ramasekar
2e756e7412 fix data race in OIDC integration tests by serializing test server starts
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-07-20 15:17:04 -05:00
Kubernetes Prow Robot
033ffc73d6 Merge pull request #132299 from aramase/aramase/f/authn_config_hash_metric
Add `last_config_info` metric for authn, authz and encryption config
2025-07-17 18:24:24 -07:00
Anish Ramasekar
21e2fcea9e Add automatic_reload_last_config_info metric for auth configs
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-07-17 17:47:51 -05:00
Kubernetes Prow Robot
3dd0e86190 Merge pull request #132821 from cici37/mapBeta
[KEP-3962]Promote MutatingAdmissionPolicy to Beta
2025-07-17 14:18:24 -07:00
Kubernetes Prow Robot
e55e75f6d9 Merge pull request #132768 from enj/enj/f/authn_egress
Add egress selector support to JWT authenticator
2025-07-15 17:48:29 -07:00
Monis Khan
b69fd9d42c Add egress selector support to JWT authenticator
This change adds the StructuredAuthenticationConfigurationEgressSelector
beta feature (default on).  When enabled, each JWT authenticator
specified via the AuthenticationConfiguration.jwt array can
optionally specify either the controlplane or cluster egress
selector by setting the issuer.egressSelectorType field.  When
unset, the prior behavior of using no egress selector is retained.

Egress selection is valuable when the persona configuring the JWT
authenticator and the persona managing the control plane are
different individuals.  This change allows the latter to protect
control plane network services from unexpected connections.

Signed-off-by: Monis Khan <mok@microsoft.com>
2025-07-15 16:03:07 -04:00
Cici Huang
a3ecea296c manual change 2025-07-15 01:44:13 +00:00
Kubernetes Prow Robot
3430e34d88 Merge pull request #132656 from liggitt/selector-authz
KEP-4601: Graduate selector authorization to stable
2025-07-14 16:42:38 -07:00
Jordan Liggitt
a04e7cf5eb KEP-4601: Graduate selector authorization to stable 2025-07-14 16:19:52 -04:00
Kubernetes Prow Robot
12dc894f80 Merge pull request #127322 from vrutkovs/tracing-set-audit-id
tracing: set audit-id on incoming requests
2025-07-13 17:58:23 -07:00
ylink-lfs
e0f9914ef7 chore: replace int32Ptr usage with ptr.To 2025-07-13 08:12:55 +08:00
Jefftree
adb71d041d Forcefully expire lease in integration test to fix flake 2025-07-08 17:51:59 +00:00
PatrickLaabs
1802c55652 chore: depr. pointer pkg replacement for test integration 2025-07-06 22:02:04 +02:00
Kubernetes Prow Robot
201325e869 Merge pull request #132433 from michaelasp/configurablecle
feat: make CLE timers configurable
2025-06-30 12:08:31 -07:00
David Ashpole
75fc2b1cf6 promote TracingConfiguration to v1 2025-06-30 12:31:23 +00:00
Kubernetes Prow Robot
28e4f3f6a3 Merge pull request #131350 from pohly/etcd-output
etcd output interception
2025-06-26 04:46:29 -07:00
Michael Aspinwall
1a59c250ea feat: make CLE timers configurable 2025-06-25 16:38:50 +00:00
Ben Luddy
190c8c7abc Use per-policy marker names for VAP integration tests.
Writes to policy resources don't instantaneously take effect in admission. ValidatingAdmissionPolicy
integration tests determine that the policies under test have taken effect by adding a sentinel
policy rule and polling until that rule is applied to a request.

If the marker resource names are the same for each test case in a series of test cases, then
observing a policy's effect on a marker request only indicates that _any_ test policy is in effect,
but it's not necessarily the policy the current test case is waiting for. For example:

1. Test 1 creates a policy and binding.

2. The policy and binding are observed by the admission plugin and take effect.

3. Test 1 observes that a policy is in effect via marker requests.

4. Test 1 exercises the behavior under test and successfully deletes the policy and binding it
created.

5. Test 2 creates a policy and binding.

6. Test 2 observes that a policy is in effect via marker requests, but the policy in effect is still
the one created by Test 1.

7. Test 2 exercises the behavior under test, which fails because it was evaluated against Test 1's
policy.

Generating a per-policy name for the marker resource in each test resolves the timing issue. In the
example, step (6) will not proceed until the admission plugin has observed the policy and binding
created in (5).
2025-06-25 11:17:20 -04:00
Kubernetes Prow Robot
5e33c00e37 Merge pull request #132336 from dashpole/fix_apiserver_tracing_race
Fix APIServerTracing test data race
2025-06-22 20:26:56 -07:00
Kubernetes Prow Robot
b569406b79 Merge pull request #129438 from pacoxu/apiserver-probe-etcd
add etcd server overrides to etcd probe factory for healthz and readyz
2025-06-19 11:30:52 -07:00
Paco Xu
891e7fec6e add seperate health check/probe for multi etcd override servers
- grouping health checks for exclusion purposes & add exclude integration test

Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2025-06-17 09:30:41 +08:00
David Ashpole
f4a4586255 fix APIServerTracing test data race 2025-06-16 17:36:23 +00:00
Kubernetes Prow Robot
7e94ec9eac Merge pull request #132000 from pohly/dra-api-alpha3-removal
DRA API: remove obsolete types from v1alpha3
2025-06-12 09:39:12 -07:00
Anish Ramasekar
512f000d0f Update tests for StructuredAuthenticationConfiguration feature gate GA
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-06-10 14:11:30 -07:00
Vinayak Goyal
26b188aaa8 KEP-4633: Graduate to Stable. 2025-06-10 17:13:15 +00:00
Patrick Ohly
10de6780cf DRA API: remove obsolete types from v1alpha3
The v1alpha3 version is still needed for DeviceTaintRule, but the rest of the
types and most structs became obsolete in v1.32 when we introduced v1beta1 and
bumped the storage version to v1beta1.

Removing them now simplifies adding new features because new fields don't need
to be added to these obsolete types. This could have been done already in 1.33,
but wasn't to minimize disrupting on-going work.
2025-06-06 12:06:28 +02:00
Anish Ramasekar
67345417c0 Update tests to use v1 for AuthenticationConfiguration
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-05-20 16:42:23 -07:00
Patrick Ohly
f74424bd7c etcd: better logging
Previously, etcd wrote to stderr in JSON format:

   {"level":"warn","ts":"2025-04-11T03:32:06.676527Z","caller":"embed/config.go:689","msg":"Running http and grpc server on single port. This is not recommended for production."}
   {"level":"warn","ts":"2025-04-11T03:32:06.676707Z","caller":"embed/config.go:689","msg":"Running http and grpc server on single port. This is not recommended for production."}
   {"level":"warn","ts":"2025-04-11T03:32:06.677056Z","caller":"etcdmain/etcd.go:146","msg":"failed to start etcd","error":"listen tcp 127.0.0.1:37803: bind: address already in use"}
   {"level":"fatal","ts":"2025-04-11T03:32:06.677104Z","caller":"etcdmain/etcd.go:204","msg":"discovery failed","error":"listen tcp 127.0.0.1:37803: bind: address already in use","stacktrace":"go.etcd.io/etcd/server/v3/etcdmain.startEtcdOrProxyV2\n\tgo.etcd.io/etcd/server/v3/etcdmain/etcd.go:204\ngo.etcd.io/etcd/server/v3/etcdmain.Main\n\tgo.etcd.io/etcd/server/v3/etcdmain/main.go:40\nmain.main\n\tgo.etcd.io/etcd/server/v3/main.go:31\nruntime.main\n\truntime/proc.go:272"}

This has several drawbacks:
- Not very readable.
- When used in tests which start etcd themselves (for example, scheduler_perf),
  the output is not associated with the current test.
- Contains warnings that are confusing for developers who don't know that they
  are harmless.

Intercepting output, parsing it and reformating makes the output nicer. Instead
of a mixture of JSON messages (see above) and normal test output, we now get
the etcd output embedded inside the test output. We can also filter out some
known harmless messages. Cleaning up more output or avoiding it in the first
place might be a good next step.

With `go test -v ./test/integration/scheduler_perf/dra`:

    === RUN   TestSchedulerPerf
    === RUN   TestSchedulerPerf/SchedulingWithResourceClaimTemplate
    === RUN   TestSchedulerPerf/SchedulingWithResourceClaimTemplate/fast
    I0411 13:21:03.353458   65212 feature_gate.go:385] feature gates: {map[SchedulerQueueingHints:false]}
    ...
    I0411 13:21:10.552975   65212 cidrallocator.go:210] stopping ServiceCIDR Allocator Controller
    I0411 13:21:10.567327   65212 etcd.go:210] "etcd output" logger="TestSchedulerPerf/SchedulingWithResourceClaimTemplate/fast" error="accept tcp 127.0.0.1:42245: use of closed network connection" level="warn" ts="2025-04-11T13:21:10.567045+0200" caller="embed/serve.go:160" msg="stopping insecure grpc server due to error"
    I0411 13:21:10.567398   65212 etcd.go:210] "etcd output" logger="TestSchedulerPerf/SchedulingWithResourceClaimTemplate/fast" ts="2025-04-11T13:21:10.567198+0200" caller="embed/serve.go:162" msg="stopped insecure grpc server due to error" error="accept tcp 127.0.0.1:42245: use of closed network connection" level="warn"
    I0411 13:21:15.567917   65212 etcd.go:227] "etcd didn't exit in 5 seconds, killing it" logger="TestSchedulerPerf/SchedulingWithResourceClaimTemplate/fast"
    I0411 13:21:15.567964   65212 etcd.go:234] "etcd exited" logger="TestSchedulerPerf/SchedulingWithResourceClaimTemplate/fast" err="signal: terminated"

With per-test output `go test -v ./test/integration/scheduler_perf/dra -args -use-testing-log`:

    === RUN   TestSchedulerPerf
    === RUN   TestSchedulerPerf/SchedulingWithResourceClaimTemplate
    === RUN   TestSchedulerPerf/SchedulingWithResourceClaimTemplate/fast
    I0411 13:19:03.540497   28645 feature_gate.go:385] feature gates: {map[DynamicResourceAllocation:true]}
    ...
    I0411 13:19:10.519994   28645 cidrallocator.go:210] stopping ServiceCIDR Allocator Controller
        etcd.go:210: I0411 13:19:10.533131] etcd output msg="stopping insecure grpc server due to error" error="accept tcp 127.0.0.1:46637: use of closed network connection" level="warn" ts="2025-04-11T13:19:10.532900+0200" caller="embed/serve.go:160"
        etcd.go:210: I0411 13:19:10.533274] etcd output msg="stopped insecure grpc server due to error" error="accept tcp 127.0.0.1:46637: use of closed network connection" level="warn" ts="2025-04-11T13:19:10.533022+0200" caller="embed/serve.go:162"
        etcd.go:227: I0411 13:19:15.533715] etcd didn't exit in 5 seconds, killing it
        etcd.go:234: I0411 13:19:15.533803] etcd exited err="signal: terminated"
2025-04-24 08:54:13 +02:00
Jefftree
c21f26895c Fix VAP test for v1.34 2025-04-21 17:34:41 +00:00
Paco Xu
b82fd6c288 add e2e test for healthz/ 2025-04-11 16:42:44 +08:00
Kubernetes Prow Robot
070f0ad3bd Merge pull request #129970 from mortent/AddResourceV1beta2API
Add resource v1beta2 API
2025-03-26 09:10:47 -07:00
Morten Torkildsen
39507d911f Add resource v1beta2 API 2025-03-26 14:41:09 +00:00
Kubernetes Prow Robot
b2b6c4d023 Merge pull request #127053 from dashpole/tracing_context_propagation
APIServerTracing: Respect trace context only for privileged users
2025-03-20 17:10:31 -07:00
Kubernetes Prow Robot
aa35eff1b6 Merge pull request #130423 from serathius/watchcache-continue
Serve LISTs with exact RV and continuations from cache
2025-03-20 06:18:32 -07:00
Marek Siarkowicz
f82c9e56d9 Serve LISTs with exact RV and continuations from cache 2025-03-20 09:42:18 +01:00
Kubernetes Prow Robot
ab3cec0701 Merge pull request #130447 from pohly/dra-device-taints
device taints and tolerations (KEP 5055)
2025-03-19 13:00:32 -07:00
Kubernetes Prow Robot
a6227695ab Merge pull request #128402 from richabanker/mvp-agg-discovery
KEP 4020: Replace StorageVersionAPI with aggregated discovery to fetch served resources by a peer apiserver
2025-03-18 21:43:49 -07:00
Richa Banker
8b2cee83c1 Replace StorageVersion API with aggregated discovery to fetch served resources by a peer for MVP
Co-authored-by: Joe Betz <jpbetz@google.com>

Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
2025-03-18 13:27:27 -07:00
Patrick Ohly
797475e113 DRA: add device taints API
This adds the "DeviceTaint" top-level type to v1alpha3 and related fields to
ResourceSlice and ResourceClaim. It's complete enough bring up an API server
and generate files.
2025-03-18 20:52:54 +01:00
Kubernetes Prow Robot
d367e0b326 Merge pull request #130865 from serathius/integration-refactor
Split subfunction to allow adding more subtests
2025-03-17 08:18:27 -07:00
Marek Siarkowicz
414bfc707f Split subfunction to allow adding more subtests 2025-03-17 12:43:17 +01:00
Jefftree
95d3d4a22d Gate apidiscovery/v2beta1 serving with a feature gate 2025-03-14 19:35:20 +00:00
Kubernetes Prow Robot
46aba9dcba Merge pull request #130805 from Jefftree/cle-int-test-enable-api
Enable proper API in CLE integration test
2025-03-13 20:09:46 -07:00
Jefftree
6979567c44 Enable proper API in CLE integration test 2025-03-14 01:59:02 +00:00
Kubernetes Prow Robot
8b08487283 Merge pull request #130354 from siyuanfoundation/forward-api
KEP-4330: add forward compatibility for compatibility mode
2025-03-13 18:55:57 -07:00