Commit Graph

73 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
7d0b8f979c Merge pull request #135629 from jsafrane/selinux-fix-completed-pods
selinux: Fix the controller to ignore finished pods
2025-12-19 11:52:33 -08:00
Jan Safranek
02d4c11b00 Added e2e tests with disabled SELinux
Added few tests with a CSI driver that does not support SELinux and has it
disabled in its CSIDriver instance
2025-12-19 14:45:38 +01:00
hongkang
be9b3d5a46 Add e2e test for VolumeAttachment cleanup when CSIDriver AttachRequired changes
Signed-off-by: hongkang <mzhkcj50@gmail.com>
2025-12-19 15:56:33 +08:00
Jan Safranek
4999d9a9e4 selinux: add e2e test with a completed pod
Add a test that checks the SELinux controller does not report conflicts
with Succeeded pods.
2025-12-12 11:17:54 +01:00
Kubernetes Prow Robot
4c04786f74 Merge pull request #135131 from Dev1622/sig-storage/mock-expand-flake-fix
e2e/storage: deflake CSI Mock volume expansion quota validation
2025-11-26 09:10:36 -08:00
Dev1622
d80e73c0a9 cleanup: removed uncached client plumbing, keeping the sequencing fix for quota validation 2025-11-26 19:56:42 +05:30
Dev1622
f76d0e5aa4 test/e2e: replace forbidden gomega.BeTrue usage with Eventually(...).Should(Succeed()) 2025-11-13 12:39:17 +05:30
Surya Dev
cee5b837da Resolve lint restriction on BeTrue by introducing Succeed() with contextual error messages 2025-11-13 12:39:16 +05:30
Surya
c68b35c4c7 Update vendored dependencies 2025-11-12 22:06:10 +05:30
Surya Dev
2c81b6e8ad fix: replace BeTrue with BeTrueBecause for better failure message 2025-11-11 07:59:48 +05:30
Kubernetes Prow Robot
478617a559 Merge pull request #135135 from jsafrane/update-csi-manifests
Update CSI manifests from csi-driver-hostpath master
2025-11-06 06:50:54 -08:00
Jan Safranek
6b764d555f test: update MutableCSINodeAllocatableCount tests for the new attacher
The new external-attacher already sets (or clears) VolumeAttachment
Status.Status.AttachError.ErrorCode, based on its feature gate.

Stop patching the VolumeAttachment in an e2e test, but pass the right
feature gate to the external-attacher instead.

And remove local createMergePatch() that's now unused.
2025-11-06 12:31:53 +01:00
Surya Deev
a2dfa0fd73 run gofmt to fix formatting issue 2025-11-06 08:23:23 +05:30
Surya Deev
326b7eaa52 e2e/storage: deflake CSI Mock volume expansion quota validation 2025-11-05 14:36:48 +05:30
Hemant Kumar
002774c315 Address review comments 2025-11-04 11:16:43 -05:00
Hemant Kumar
713b7231d8 Merely check for presence of CSIdriver object 2025-11-03 17:46:19 -05:00
Hemant Kumar
4bbe8f0cfb Add test that verifies scheduler behaviour 2025-11-03 16:27:01 -05:00
Anish Ramasekar
30a6d4b389 Add CSI driver opt-in for service account tokens via secrets field
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-10-24 11:04:02 -07:00
Jan Safranek
7930c2db4c Fix SELinux e2e tests waiting for "container created" event
A recent PR has changed the content of "Started container" event to "Container started".
Instead of checking the exact event message, check the event source
("kubelet") and reason ("Started"), that should uniquely identify the
event.
2025-09-23 18:08:50 +02:00
Hemant Kumar
f99cb99a1b Wait for quota to report used before creating pvc
This should avoid races between pvc creation and quota creation
2025-09-15 13:16:22 -04:00
Jan Safranek
9a8a4a3b44 Add missing cases to SELinuxMount tests 2025-08-07 17:24:53 +02:00
Eddie
727a6e6db5 Reject pod when attachment limit is exceeded (#132933)
* Reject pod when attachment limit is exceeded

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Record admission rejection

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Fix pull-kubernetes-linter-hints

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Fix AD Controller unit test failure

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Consolidate error handling logic in WaitForAttachAndMount

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Improve error context

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Update admissionRejectionReasons to include VolumeAttachmentLimitExceededReason

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Update status message

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Add TestWaitForAttachAndMountVolumeAttachLimitExceededError unit test

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Add e2e test

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Fix pull-kubernetes-linter-hints

Signed-off-by: Eddie Torres <torredil@amazon.com>

---------

Signed-off-by: Eddie Torres <torredil@amazon.com>
2025-07-24 17:58:54 -07:00
PatrickLaabs
e74bbd5db4 chore: depr. pointer pkg replacement for test/e2e 2025-07-06 22:32:21 +02:00
Kubernetes Prow Robot
3fdc11cbe0 Merge pull request #130230 from carlory/cleanup-CSIDriverRegistry
clean up CSIDriverRegistry
2025-07-04 15:25:31 -07:00
Hemant Kumar
d67e7937e6 Remove recovery related featuregates 2025-06-27 17:57:16 -04:00
Hemant Kumar
fa6f27c8f7 Add extra validations for newer resizing related fields 2025-06-27 17:52:46 -04:00
Eddie Torres
6f97f5bbf8 Use Mock CSI Driver for MutableCSINodeAllocatableCount storage e2e test (#132373)
* Refactor MutableCSINodeAllocatableCount storage e2e test

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Update var names and formatting

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Update function names

Signed-off-by: Eddie Torres <torredil@amazon.com>

---------

Signed-off-by: Eddie Torres <torredil@amazon.com>
2025-06-18 14:02:57 -07:00
Jan Safranek
e5a5f726dd Tag SELinux tests that require SELinux warning controller
The controller is available only with SELinuxChangePolicy FG enabled.
Kubernetes e2e jobs do the right --focus & --skip explicitly in the SELinux
jobs, this just helps other test runners to figure out what FGs are needed
to run the tests.

When at it, I noticed SELinuxMountReadWriteOncePod tag is always required, so
add it on the common level and not in each test.
2025-04-10 14:36:02 +02:00
carlory
21f7026c25 clean up CSIDriverRegistry 2025-03-19 14:54:12 +08:00
carlory
8c9452f4ca e2e tests: remove unneeded storage feature label 2025-03-17 11:57:18 +08:00
Kubernetes Prow Robot
5227bad0df Merge pull request #130335 from carlory/fix-handle-terminating-pvc-when-kubelet-rebuild-dsw
Fix kubelet restart unmounts volumes of running pods if the referenced PVC is being deleted by the user
2025-03-10 03:09:47 -07:00
carlory
aab083972d fix handle terminating pvc when kubelet rebuild dsw
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-03-10 15:39:18 +08:00
Kubernetes Prow Robot
df030f3851 Merge pull request #130472 from jsafrane/selinux-controller-ignore-recursive
selinux: Ignore pods with Recursive policy
2025-03-03 14:29:56 -08:00
Jan Safranek
052f1fe820 Update tests 2025-02-28 16:42:20 +01:00
Jan Safranek
a86cca4e18 Improve error reporting of KCM metrics
Show what is a test waiting for and make sure the metric name + label
appears in the timeout error.
2025-02-28 13:01:00 +01:00
carlory
28d359beec promote HonorPVReclaimPolicy to GA
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-02-27 14:01:22 +08:00
carlory
f904c6f46c fix e2e
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-02-21 18:04:06 +08:00
carlory
0f40600b31 add e2e test to reproduce unexpected unmount after kubelet is restarted
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-02-21 15:16:11 +08:00
Jan Safranek
bf63e0046c selinux: rename allMetrics
To indicate they're all _SELinux_ metrics
2025-02-20 12:19:07 +01:00
Jan Safranek
d3eb639313 selinux: add tests for SELinuxController
Squeeze them into existing kubelet metric tests. The tests would have very
similar setup + cleanup.
2025-02-18 17:44:13 +01:00
Jan Safranek
992c8e9479 selinux: explicitly specify NodeMetrics in function names
This is just refactoring / renaming.

The SELinux e2e tests grab node metrics so far, so mention `Node` in the
function names. Kube-controller-metrics will follow in a subsequent commit.
2025-02-18 11:48:36 +01:00
Kubernetes Prow Robot
1b79b8952a Merge pull request #129997 from carlory/HonorPVReclaimPolicy-e2e
HonorPVReclaimPolicy: add more e2e tests
2025-02-17 04:08:22 -08:00
carlory
c83a5e0ad2 HonorPVReclaimPolicy: add more e2e tests
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-02-12 11:01:39 +08:00
Jan Safranek
9ebe4422a9 Add support for Debian and Ubuntu
Both Debian and Ubuntu + containerd can run with SELinux enabled. Add their
defaults to the SELinux e2e tests.
2025-02-07 14:42:27 +01:00
Kubernetes Prow Robot
3d2ee2fbb7 Merge pull request #129609 from carlory/cleanup-exec-utils
Move some exec helper functions from framework/volume to framework/pod
2025-01-21 09:00:37 -08:00
Kubernetes Prow Robot
ddfd02d568 Merge pull request #129687 from carlory/cleanup-gke
remove gke
2025-01-20 08:46:43 -08:00
carlory
aaac13fc6a remove gke from e2e 2025-01-20 21:50:46 +08:00
carlory
8b4eae24ab Move some exec helper functions from framework/volume to framework/pod 2025-01-18 21:42:42 +08:00
Kubernetes Prow Robot
5d478a6227 Merge pull request #129581 from carlory/e2e-honor-pv-relaim-policy
storage e2e tests: add more tests for pv relaim policy
2025-01-17 17:52:56 -08:00
Kubernetes Prow Robot
b66142831a Merge pull request #128700 from jsafrane/selinux-changepolicy-e2e
selinux: Add e2e tests for SElinuxChangePolicy
2025-01-17 12:22:35 -08:00