Commit Graph

188 Commits

Author SHA1 Message Date
ShaanveerS
d800e7e052 test/images: bump agnhost to v2.61 2026-01-18 12:57:37 +01:00
Davanum Srinivas
d3d78ce0dd Add tmpfs detection to mounttest and unit tests
Refactor fsType() to use a platform-specific formatFsType() helper that
translates filesystem magic numbers to human-readable names. On Linux,
tmpfs filesystems now display as "tmpfs" instead of the raw magic number.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-15 12:02:56 -05:00
ShaanveerS
d1867b4864 agnhost porter add support UDP and SERVE_TCP_PORT 2026-01-10 05:47:25 +01:00
Kubernetes Prow Robot
99e77f8c46 Merge pull request #134243 from lucming/lucming/enhan-stsfs-type
fix: Check Statfs_t type using unix package only
2025-12-20 15:48:31 -08:00
Patrick Ohly
ad79e479c2 build: remove deprecated '// +build' tag
This has been replaced by `//build:...` for a long time now.

Removal of the old build tag was automated with:

    for i in $(git grep -l '^// +build' | grep -v -e '^vendor/'); do if ! grep -q '^// Code generated' "$i"; then sed -i -e '/^\/\/ +build/d' "$i"; fi; done
2025-12-18 12:16:21 +01:00
lucming
9c3167d3cc fix: Check Statfs_t type using unix package only 2025-12-02 12:28:40 +08:00
tinatingyu
3f8444210c Add e2e tests, metrics and events for podcertificaterequests v1beta1 2025-11-05 18:12:39 +00:00
tinatingyu
36654a9ecb --no-edit 2025-10-26 04:01:23 +00:00
tinatingyu
cff8bc8686 fix the unknown flag: --logtostderr error 2025-10-26 03:48:43 +00:00
Lubomir I. Ivanov
9e5b6ad748 fix error checks 2025-10-23 16:18:18 +00:00
Yevhen Dubovskoi
3da372354d add fake-registry-server command to agnhost
* command run the limited subset of OCI API and serve static
images from the registry (which are pre-loaded when building an image)
* add pause version to zeitgeist rule for agnhost
* bump version of agnhost to 2.57
2025-09-10 23:31:22 +00:00
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
yashsingh74
c7fdf6abde Handler will return the server port number instead of address
Signed-off-by: yashsingh74 <yashsingh1774@gmail.com>
2025-06-04 11:47:03 +05:30
yashsingh74
c8f1a65301 agnhost: added server address for conntrack cleanup entries 2025-05-28 12:26:09 +05:30
Manjunath A Kumatagi
96e4cc65fb update baseimage 2025-05-21 09:09:46 +00:00
Davanum Srinivas
d043beb223 HealthChecker has a List method
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-05-18 12:52:13 -04:00
Patrick Ohly
79891eac8b agnhost: bump version to 2.54 2025-05-02 17:27:34 +02:00
Patrick Ohly
c78556fb4b agnhost pause: report signal, support termination message
Which signal really cause the pause command to exit may be relevant to know.

By supporting the default /dev/termination-log, that information also shows up
in the pod status and then is often already shown in output of E2E tests for
unexpected pod failures.
2025-05-02 14:46:56 +02:00
Michal Wozniak
5aa61f8479 Test tooling: fix agnhost pause command 2025-03-24 18:27:50 +01:00
Tim Hockin
e54719bb66 Use randfill, do API renames 2025-03-08 15:18:00 -08:00
mansikulkarni96
2a32b21372 [test] handle ModeIrregular in getFilePerm for Go 1.23 2025-02-21 18:02:28 -05: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
Abhishek Kr Srivastav
95860cff1c Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>
2024-09-20 12:36:38 +05:30
Lan Liang
184c84ba00 Bump alpine to 3.19 for agnhost.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-09-02 05:47:42 +00:00
Kubernetes Prow Robot
9c2302dd3e Merge pull request #126201 from aroradaman/revert-debug-steps
Revert debug steps and logs for #123760
2024-07-23 11:02:38 -07:00
Monis Khan
6a6771b514 svm: set UID and RV on SSA patch to cause conflict on logical create
When a resource gets deleted during migration, the SVM SSA patch
calls are interpreted as a logical create request.  Since the object
from storage is nil, the merged result is just a type meta object,
which lacks a name in the body.  This fails when the API server
checks that the name from the request URL and the body are the same.
Note that a create request is something that SVM controller should
never do.

Once the UID is set on the patch, the API server will fail the
request at a slightly earlier point with an "uid mismatch" conflict
error, which the SVM controller can handle gracefully.

Setting UID by itself is not sufficient.  When a resource gets
deleted and recreated, if RV is not set but UID is set, we would get
an immutable field validation error for attempting to update the
UID.  To address this, we set the resource version on the SSA patch
as well.  This will cause that update request to also fail with a
conflict error.

Added the create verb on all resources for SVM controller RBAC as
otherwise the API server will reject the request before it fails
with a conflict error.

The change addresses a host of other issues with the SVM controller:

1. Include failure message in SVM resource
2. Do not block forever on unsynced GC monitor
3. Do not immediately fail on GC monitor being missing, allow for
   a grace period since discovery may be out of sync
4. Set higher QPS and burst to handle large migrations

Test changes:

1. Clean up CRD webhook convertor logs
2. Allow SVM tests to be run multiple times to make finding flakes easier
3. Create and delete CRs during CRD test to force out any flakes
4. Add a stress test with multiple parallel migrations
5. Enable RBAC on KAS
6. Run KCM directly to exercise wiring and RBAC
7. Better logs during CRD migration
8. Scan audit logs to confirm SVM controller never creates

Signed-off-by: Monis Khan <mok@microsoft.com>
2024-07-18 17:19:11 -04:00
Daman Arora
f6676a2c0e Revert "agnhost/netexec: log hostname"
This reverts commit 90561cb9d9.
2024-07-18 19:52:14 +05:30
Stephen Kitt
5300466a5c Use canonical json-patch v4 import
The canonical import for json-patch v4 is
gopkg.in/evanphx/json-patch.v4 (see
https://github.com/evanphx/json-patch/blob/master/README.md#get-it for
reference).

Using the v4-specific path should also reduce the risk of unwanted v5
upgrade attempts, because they won't be offered as automated upgrades
by dependency upgrade management tools, and they won't happen through
indirect dependencies (see
https://github.com/kubernetes/kubernetes/pull/120327 for context).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-05-28 10:48:22 +02:00
Daman Arora
5aaa37521f agnhost: version bump to v2.52
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-04-28 16:44:00 +05:30
Daman Arora
90561cb9d9 agnhost/netexec: log hostname
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-04-28 16:44:00 +05:30
John Riendeau
62191f637e Bump base images for agnhost 2024-04-24 04:54:06 -05:00
Daman Arora
ce41bc849f agnhost: version bump to v2.50
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-04-22 16:35:13 +05:30
Daman Arora
1c8799f814 agnhost/connect: send and recv data from SCTP server
If the client immediately closes connection after SCTP handshake,
the server will die with EOF, adding send and recv calls in the
client to make sure server client handling loop exits gracefully.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-04-22 16:31:48 +05:30
Daman Arora
8cf4567f3c agnhost/netexec: handle nil pointer dereference for SCTP server
If the client immediately closes connection after SCTP handshake, the
remote-addr fetched by SCTP server can be nil, causing the server to crash.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-04-22 16:31:48 +05:30
Sergey Kanzhelev
e9424f34ed allow agnhost to set TLS gRPC 2024-04-19 21:25:10 +00:00
huweiwen
c134bfe9eb agnhost/mounttest: add new line to output
make the output easier to read.
2024-03-03 23:46:22 +08:00
Akihiro Suda
9c726b015c agnhost: v2.47
agnhost was updated to v2.46 in PR 123258, but the image was not
published due to the failue of `post-kubernetes-push-e2e-agnhost-test-images`
(issue 123266).

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-14 15:11:31 +09:00
Akihiro Suda
7ee89440c3 agnhost: v2.46
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-13 23:21:52 +09:00
Akihiro Suda
07c701fecb agnhost: merge registry.k8s.io/stress:v1 (github.com/vishh/stress)
Merge vishh/stress@eab4e3384b into
agnhost.

Old usage: `stress -mem-alloc-size 12Mi -mem-alloc-sleep 10s -mem-total 4Gi`
New usage: `agnhost stress --mem-alloc-size 12Mi --mem-alloc-sleep 10s --mem-total 4Gi`

This is a part of the steps to migrate from legacy Schema 1 images
(issue 123146)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-13 23:21:05 +09:00
Kubernetes Prow Robot
da0a1a05b9 Merge pull request #118125 from humblec/json-serializerwithoptions
test/e2e: Use json.NewSerializerWithOptions in place of json/yaml newSerializers
2023-05-22 07:12:32 -07:00
Humble Chirammal
ad9e264c3c test/e2e: Use json.NewSerializerWithOptions in place of json/yaml newSerializers.
condidering NewSerializer* funcs are deprecated with
NewSerializerWithOptions(), the test functions are adjusted to the same.

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-05-22 18:44:30 +05:30
Humble Chirammal
c74790e266 remove redundunt type conversion, unused variable...etc
`Framework` variable has been removed from test/*
unwanted `[]byte` conversion has been removed
import alias has been avoided

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-05-19 11:16:11 +05:30
Antonio Ojea
19f7cb23c8 e2e agnhost functionality to RST TCP connections
add a new functionality to the agnhost image to run a server that
closes the connections received by sending a RST.

If a TCP servers closes the connection before all the socket is read,
it sends a RST. This implementations just reads only one byte from the
connection and closes it after that, that means that in order for this
to work the client has to send at least 2 bytes of data.

Using a simple curl is enough to trigger a RST:

curl http://127.0.0.1:8080
curl: (56) Recv failure: Connection reset by peer

Change-Id: I238fba0f790f2c92b37c732f51910a8b125f65db
2023-05-04 08:33:59 +00:00
Tim Hockin
bc302fa414 Replace uses of ObjectReflectDiff with cmp.Diff
ObjectReflectDiff is already a shim over cmp.Diff, so no actual output
or behavior changes
2023-04-12 08:48:03 -07:00
cc
d49bff855f refine: the server-side http Request Body is always non-nil (#115908)
* refine: the server-side http Request Body is always non-nil

* revert changes under vendor

* Update staging/src/k8s.io/pod-security-admission/cmd/webhook/server/server.go

Co-authored-by: Jordan Liggitt <jordan@liggitt.net>

* Update main.go

---------

Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
2023-02-22 07:18:09 -08:00
Shingo Omura
d59af27d69 change the username in the image that is aligned with the group name 2022-10-21 10:18:30 +09:00
Shingo Omura
5beae0c4dc test/images/agnhost: Adds a test user and group in the image for a E2E test case of SupplementalGroups with pre-defined group in the image 2022-10-20 11:17:59 +09:00
Shiming Zhang
0005364363 Fix NPE (#112999)
* Fix NPE

* bump version
2022-10-15 10:43:05 -07:00
Mark Rossetti
ecd543be04 Remove out-of-support Windows 20H2 images
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-10-12 14:43:51 -07:00
Davanum Srinivas
a9593d634c Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00