Commit Graph

686 Commits

Author SHA1 Message Date
Taahir Ahmed
4624cb9bb9 Pod Certificates: Basic implementation
* Define feature gate
* Define and serve PodCertificateRequest
* Implement Kubelet projected volume source
* kube-controller-manager GCs PodCertificateRequests
* Add agnhost subcommand that implements a toy signer for testing

Change-Id: Id7ed030d449806410a4fa28aab0f2ce4e01d3b10
2025-07-21 21:49:57 +00:00
Kubernetes Prow Robot
c44bf18b9b Merge pull request #130713 from ArkaSaha30/bump-pause-version
dependency: update pause version to registry.k8s.io/pause:3.10.1
2025-07-20 20:16:26 -07:00
Patrick Ohly
c8ca9249ac DRA integration: add upgrade/downgrade testing with local-up-cluster.sh
The test brings up the cluster and uses that power to run through
an upgrade/downgrade scenario. Version skew testing (running tests while the cluster
is partially up- or downgraded) could be added.

The new helper code for managing the cluster is written so that it could be
used both in an integration test and an E2E
test. https://github.com/kubernetes/kubernetes/pull/122481 could make that a
bit easier in an E2E test, but is not absolutely required.

In contrast to running on a normal cluster, pods need no privileges.
Instead, the caller has to make sure that the test itself can write
into system directories used by the cluster.
2025-07-15 12:54:40 +02:00
Patrick Ohly
e5f57d2cfa ktesting: add WithoutCancel
This closes a gap compared to the context package. It's useful when combined
with Ginkgo to keep something running beyond the end of the Ginkgo BeforeEach
or It node.
2025-07-15 12:52:27 +02:00
Patrick Ohly
e01603b2e3 ktesting: document side effect of SetDefaultVerbosity during init 2025-07-15 12:52:27 +02:00
Patrick Ohly
0b1bed1a1e ktesting: WithCancel does not cancel on test completion anymore
That WithCancel added a deferred cleanup which cancels on test termination was
unexpected. This automatic cancellation makes sense only for the initial root
TContext.
2025-07-15 12:52:27 +02:00
Patrick Ohly
906505281f ktesting: add step Begin/End
This allows declaring a code region as one step without having to use
an anonymous callback function, which has the advantage that variables
set during the step are visible afterwards.

In Python, this would be done as

    with ktesting.Step(tctx) as tcxt:
        // some code code inside step
    // code not in the same step

But Go has no such construct.

In contrast to WithStep, the start and end of the step are logged, including
timing information.
2025-07-15 12:52:27 +02:00
Patrick Ohly
b7c2d6aba5 ktesting: skip logging error when capturing it
Hiding the error in WithError is the right choice for example
when it is used inside ktesting.Eventually. Most callers probably want to deal
with the unexpected error themselves. For those who don't, WithErrorLogging
continues to log it.
2025-07-15 12:52:27 +02:00
Carlos Panato
a06b3d356c Bump dependencies, images and versions used to Go 1.24.5 and distroless iptables
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-07-11 20:30:39 +02:00
ArkaSaha30
621482d68b update pause version to 3.10.1
This commit will update the pause version to 3.10.1 as per thread: https://kubernetes.slack.com/archives/CJH2GBF7Y/p1741674313893029

Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2025-07-09 16:38:14 +05:30
PatrickLaabs
2f7148782b chore: depr. pointer pkg replacement for test/e2e and utils 2025-07-06 22:18:03 +02:00
Kubernetes Prow Robot
c6539bc785 Merge pull request #132284 from ArkaSaha30/bump-etcd-3.6.1
Bump etcd to v3.6.1
2025-06-30 11:00:35 -07:00
ArkaSaha30
e1d74f1d33 Update etcd image revision to 3.6.1-1
This commit will update etcd image revision from 3.6.1-0 to 3.6.1-1
Ref Discussion: https://github.com/kubernetes/kubernetes/pull/132395/files#r2156576606

Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2025-06-23 23:00:38 +05:30
Davanum Srinivas
3827d3bc4f Drop usage of forked copies of goyaml.v2 and goyaml.v3
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-17 11:00:27 -04:00
ArkaSaha30
e09b042d34 Bump etcd to v3.6.1
This commit will bump etcd to v3.6.1
Release: https://github.com/etcd-io/etcd/releases/tag/v3.6.1
Issue: https://github.com/etcd-io/etcd/issues/20047

Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2025-06-13 16:28:35 +05:30
Carlos Panato
e5f36796e3 Bump dependencies, images and versions used to Go 1.24.4 and distroless iptables
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-06-11 08:24:35 +02:00
yashsingh74
1d1d0c154c promote agnhost to v2.56
Signed-off-by: yashsingh74 <yashsingh1774@gmail.com>
2025-06-05 14:45:00 +05:30
joshjms
b461d80f3d etcd: update etcd image to v3.6.0
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-05-26 15:06:50 +08:00
Carlos Panato
488c94735c Bump dependencies, images and versions used to Go 1.24.3 and distroless iptables
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-05-23 08:58:13 -04:00
Manjunath Kumatagi
671d1a07a5 Bump the busybox image 2025-05-16 13:28:37 +05:30
Patrick Ohly
5af026120a test: bump agnhost image to 2.54
YAML files were patched with:
   sed -i -e 's;registry.k8s.io/e2e-test-images/agnhost:2...;registry.k8s.io/e2e-test-images/agnhost:2.54;' $(git grep -l agnhost:2 test/e2e/testing-manifests/ test/fixtures/)

The test/images/kitten and test/images/nautilus base images are still on an
older agnhost because updating those is better left to the owners.
2025-05-05 08:25:20 +02:00
Jordan Liggitt
6bb6c99342 Drop null creationTimestamp from test fixtures 2025-05-02 15:38:40 -04:00
Kubernetes Prow Robot
15f8e91f03 Merge pull request #131342 from carlory/fix131329
deflake e2e tests: CustomResourcePublishOpenAPI works for multiple CRDs of same group and version but different kinds
2025-04-30 10:13:55 -07:00
Kubernetes Prow Robot
077a382170 Merge pull request #131242 from zhifei92/update-mockery-version
Upgrade the mockery version to v2.53.3
2025-04-23 17:09:43 -07:00
Arnaud Meukam
e467c9530b [Go] Bump dependencies, images and versions used to Go 1.24.2 and distroless-iptables
Signed-off-by: Arnaud Meukam <ameukam@gmail.com>
2025-04-18 15:49:48 +02:00
carlory
091d09b447 deflake e2e tests: CustomResourcePublishOpenAPI works for multiple CRDs of same group and version but different kinds
Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-04-17 16:40:27 +08:00
zhangzhifei16
c1ff9cf4e8 chore: Upgrade the mockery version to v2.53.3. 2025-04-10 21:16:47 +08:00
joshjms
24edc6e90f Update etcd to 3.5.21
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-04-02 02:16:38 +08:00
Patrick Ohly
6478ca5859 ktesting: fix per-test logging in TContext.Run and WithTB
WithTB was originally defined as "uses the existing logger". But what we want
there and in the newer TContext.Run is the usual per-test logging, now for the
sub-test.
2025-03-18 20:52:54 +01:00
cpanato
597b54720e Bump images, dependencies and versions to go 1.24.0
Signed-off-by: cpanato <ctadeu@gmail.com>
2025-02-26 11:26:54 +01:00
Kubernetes Prow Robot
06d81cfc7a Merge pull request #130359 from my-git9/assertion1
fix wrong assertion on tests
2025-02-24 05:18:34 -08:00
xin.li
bc4ae15d77 fix wrong assertion on tests
Signed-off-by: xin.li <xin.li@daocloud.io>
2025-02-23 16:53:50 +08:00
Patrick Ohly
f9e7b15c00 ktesting: add Run
This is useful in Go unit tests because it directly replaces the corresponding
testing.T/B.Run.
2025-02-20 14:41:06 +01:00
Patrick Ohly
c2ad724e9a ktesting: add Parallel
It's useful for writing parallel unit tests.
2025-02-20 14:35:40 +01:00
cpanato
8ee64ba6b5 Bump images, dependencies and versions to go 1.23.6 and distroless iptables
Signed-off-by: cpanato <ctadeu@gmail.com>
2025-02-10 14:04:37 -06:00
cpanato
0ca45bd4f8 Bump images, dependencies and versions to go 1.23.5 and distroless iptables
Signed-off-by: cpanato <ctadeu@gmail.com>
2025-02-03 18:26:38 +01:00
Davanum Srinivas
c9e81cd84c Switch to gopkg.in/go-jose/go-jose.v2 @ v2.6.3
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-21 09:21:27 -05:00
bzsuni
df503e54c8 Update etcd from v3.5.16 to v3.5.17
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2025-01-02 10:20:42 +00:00
cpanato
2cb1cc9e3a Bump images, dependencies and versions to go 1.23.4 and distroless iptables
Signed-off-by: cpanato <ctadeu@gmail.com>
2024-12-30 09:05:16 +01:00
cpanato
cb42224952 Bump images, dependencies and versions to go 1.23.3 and distroless iptables
Signed-off-by: cpanato <ctadeu@gmail.com>
2024-11-19 09:57:41 +01:00
ndixita
99a6153a4f e2e tests
Signed-off-by: ndixita <ndixita@google.com>
2024-11-08 03:00:54 +00:00
Omer Aplatony
9d816f1587 Replace PollImmediate with PollUntilContextTimeout (#128147)
* Replace PollImmediate with PollUntilContextTimeout

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

* Add context to RetryErrorCondition function

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

* lint: fix error comparison in scale package

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

* Fix RetryErrorCondition function signature

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

* revert to if err statement

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

---------

Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2024-11-07 14:57:29 +00:00
Kubernetes Prow Robot
2002023a4e Merge pull request #127656 from jdtuhui/testifylint/formatter@test/utils
fix: enable formatter rule from testifylint in module test/utils
2024-10-23 07:26:52 +01:00
Kubernetes Prow Robot
fdc61b8fa2 Merge pull request #128116 from pohly/ktesting-context-timeout-warning
ktesting: improve context message
2024-10-23 00:12:53 +01:00
Patrick Ohly
4526b28606 ktesting: improve context message
This is not necessarily a problem, some code might use a timeout and expect it
to trigger. Therefore this should only be an info message, not a
warning. Long-term it might be useful to have an API where the caller decides
whether this gets logged.

The caller should use short messages and leave it to the user of those to
provide more context (no pun intended...). When logging, "canceling context" is
that context.

Before:

    scheduler_perf.go:1431: FATAL ERROR: op 7: delete scheduled pods: client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
    contexthelper.go:69:
        WARNING: the operation ran for the configured 2s

After:

    scheduler_perf.go:1431: FATAL ERROR: op 7: delete scheduled pods: client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
    contexthelper.go:69:
        INFO: canceling context: the operation ran for the configured 2s
2024-10-16 10:46:24 +02:00
Haitao Chen
e9cbbc7886 bump golang to 1.23.2
from 1.23.0
2024-10-15 18:43:50 -07:00
Kubernetes Prow Robot
dd87bc0646 Merge pull request #127901 from skitt/k8s-sigs-yaml
Use sigs.k8s.io/yaml instead of gopkg.in/yaml
2024-10-09 19:38:29 +01:00
Stephen Kitt
f1fa4086b3 Use sigs.k8s.io/yaml instead of gopkg.in/yaml
Since we have a Kubernetes-specific fork of go-yaml, use that
consistently throughout the project. This doesn't eliminate the
dependencies on gopkg.in/yaml, which are still used indirectly; but it
ensures that the whole project benefits from fixes or changes to
sigs.k8s.io/yaml.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-10-07 15:32:00 +02:00
Marko Mudrinić
5572625d87 Revert "Merge pull request #127611 from haitch/haitao/k132-on-go123p1"
This reverts commit 37004f89b0, reversing
changes made to af879aebb1.
2024-10-04 19:11:07 +02:00
Maciej Skoczeń
2a08ce5c68 Add scheduler_perf test case for AssignedPodDelete event handling 2024-10-02 09:16:28 +00:00