Commit Graph

850 Commits

Author SHA1 Message Date
Benjamin Elder
a60d114402 emeritus logicalhan, rest in peace
https://github.com/cncf/memorials/blob/main/han-kang.md
2026-01-15 12:18:02 -08:00
Lukasz Szaszkiewicz
82d3c07f0e test/e2e/apimachinery/watchlist: run WatchList test on most jobs 2025-11-04 15:19:32 +01:00
Patrick Ohly
d0a2a0d22e e2e: find and fix reuse of test names
This reports and fixes for test/e2e:

    ERROR: E2E suite initialization was faulty, these errors must be fixed:
    ERROR: apimachinery/mutatingadmissionpolicy.go:184: full test name is not unique: "[sig-api-machinery] MutatingAdmissionPolicy [Privileged:ClusterAdmin] [Feature:MutatingAdmissionPolicy] [FeatureGate:MutatingAdmissionPolicy] [Beta] [Feature:OffByDefault] should support MutatingAdmissionPolicy API operations" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/apimachinery/mutatingadmissionpolicy.go:184, /nvme/gopath/src/k8s.io/kubernetes/test/e2e/apimachinery/mutatingadmissionpolicy.go:606)
    ERROR: apimachinery/mutatingadmissionpolicy.go:412: full test name is not unique: "[sig-api-machinery] MutatingAdmissionPolicy [Privileged:ClusterAdmin] [Feature:MutatingAdmissionPolicy] [FeatureGate:MutatingAdmissionPolicy] [Beta] [Feature:OffByDefault] should support MutatingAdmissionPolicyBinding API operations" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/apimachinery/mutatingadmissionpolicy.go:412, /nvme/gopath/src/k8s.io/kubernetes/test/e2e/apimachinery/mutatingadmissionpolicy.go:834)
    ERROR: common/node/pod_level_resources.go:250: full test name is not unique: "[sig-node] Pod Level Resources [Serial] [Feature:PodLevelResources] [FeatureGate:PodLevelResources] [Beta] Guaranteed QoS pod with container resources" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/common/node/pod_level_resources.go:250 (2x))
    ERROR: dra/dra.go:1899: full test name is not unique: "[sig-node] [DRA] kubelet [Feature:DynamicResourceAllocation] [FeatureGate:DRAConsumableCapacity] [Alpha] [Feature:OffByDefault] [FeatureGate:DynamicResourceAllocation] must allow multiple allocations and consume capacity [KubeletMinVersion:1.34]" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/dra/dra.go:1899 (2x))
    ERROR: storage/testsuites/volume_group_snapshottable.go:173: full test name is not unique: "[sig-storage] CSI Volumes [Driver: csi-hostpath] [Testpattern:  (delete policy)] volumegroupsnapshottable [Feature:volumegroupsnapshot] VolumeGroupSnapshottable  should create snapshots for multiple volumes in a pod" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/storage/testsuites/volume_group_snapshottable.go:173 (2x))
    ERROR: storage/testsuites/volume_group_snapshottable.go:173: full test name is not unique: "[sig-storage] CSI Volumes [Driver: pd.csi.storage.gke.io] [Serial] [Testpattern:  (delete policy)] volumegroupsnapshottable [Feature:volumegroupsnapshot] VolumeGroupSnapshottable  should create snapshots for multiple volumes in a pod" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/storage/testsuites/volume_group_snapshottable.go:173 (2x))

And for test/e2e_node:

    ERROR: cpu_manager_test.go:1622: full test name is not unique: "[sig-node] CPU Manager [Serial] [Feature:CPUManager] when checking the CFS quota management should disable for guaranteed pod with exclusive CPUs assigned" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e_node/cpu_manager_test.go:1622, /nvme/gopath/src/k8s.io/kubernetes/test/e2e_node/cpu_manager_test.go:1642)
    ERROR: eviction_test.go:800: full test name is not unique: "[sig-node] LocalStorageCapacityIsolationFSQuotaMonitoring [Slow] [Serial] [Disruptive] [Feature:LocalStorageCapacityIsolationQuota] [Feature:LSCIQuotaMonitoring] [Feature:UserNamespacesSupport] when we run containers that should cause use quotas for LSCI monitoring (quotas enabled: true)  should eventually evict all of the correct pods" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e_node/eviction_test.go:800 (2x))
2025-10-17 20:19:52 +02:00
joshjms
ae3605d109 mark aggregator test LinuxOnly
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-10-16 23:07:28 +08: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
84f85712be feat: Add matcher and conformance tests ensuring that RV is uint128 2025-10-01 00:01:50 +00:00
Michael Aspinwall
7c24e62d7c Add additional types for resource version comparison testing 2025-09-30 17:16:07 +00:00
Michael Aspinwall
37fcfcd29e feat: Add conformance tests for all resources for comparable resource version 2025-09-29 23:32:07 +00: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
38e21c91b9 Merge pull request #133324 from adrianmoisey/replace-deprecated-WaitForServiceEndpointsNum
Replace deprecated WaitForServiceEndpointsNum with WaitForEndpointCount
2025-09-10 14:13:56 -07:00
Kubernetes Prow Robot
9c9c5168c7 Merge pull request #133509 from xuzhenglun/fix-e2e-race
fix flake race in VAP e2e case
2025-08-27 18:30:23 -07:00
xuzhenglun
f0e52c1c47 add known example API group suffix to avoid race 2025-08-14 03:01:09 +08:00
Lukasz Szaszkiewicz
7f4462398a e2e/watchlist: normalize dynamic 'Age' column in Table test to prevent test flake 2025-08-12 08:56:48 +02:00
Adrian Moisey
531fdc67e2 Replace deprecated WaitForServiceEndpointsNum
with WaitForEndpointCount
2025-07-30 21:51:08 +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
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
Lukasz Szaszkiewicz
9c0e65b085 test/apimachinery/watchlist: server supports sending resources in Table format 2025-07-15 10:11:23 +02:00
Cici Huang
a3ecea296c manual change 2025-07-15 01:44:13 +00:00
Kubernetes Prow Robot
3bab7bccd3 Merge pull request #132219 from BenTheElder/conformance-ordered
Promote OrderedNamespaceDeletion test to Conformance
2025-07-14 16:42:30 -07:00
Lukasz Szaszkiewicz
7d9eb2b3d0 test/apimachinery/watchlist: update tests that receive resources in Table format 2025-07-14 16:09:29 +02:00
ylink-lfs
26f54e5c0e chore: replace int64ptr with ptr.To 2025-07-09 21:35:45 +08:00
ylink-lfs
830a088d1b chore: remove strPtr usage with ptr.To instead 2025-07-08 09:03:38 +08:00
PatrickLaabs
bc72fb81c3 chore: depr. pointer pkg replacement for test/e2e 2025-07-07 12:25:55 +02:00
Federico Bongiovanni
43b22a2439 Apply fix to namespace deletion test (#132691)
* Apply fix to namespace deletion test

* Update test/e2e/apimachinery/namespace.go

Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>

* Update namespace.go

oops

---------

Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2025-07-03 05:07:24 -07:00
Benjamin Elder
952d2727a6 Add OrderedNamespaceDeletion to conformance.
This is a critical security fix that users should be able to depend on.
2025-07-01 11:47:29 -07:00
Davanum Srinivas
31667cc741 Avoid killing kops etcd-manager
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-26 09:15:02 -04:00
Marek Siarkowicz
d6d186ece0 Activly poll for namespace termination instead of sleeping 2025-06-24 20:56:44 +02:00
Lukasz Szaszkiewicz
fe84377458 e2e/watchlist: new test for checking metadata informer 2025-06-20 08:28:04 +02:00
Lukasz Szaszkiewicz
de2f22ee8e e2e/watchlist: intro verifyStoreFor 2025-06-18 17:43:58 +02:00
Lukasz Szaszkiewicz
017c9b94da e2e/watchlist: rename toSecretPointerSlice 2025-06-18 17:34:05 +02:00
Lukasz Szaszkiewicz
7f1dde2a0f test/apimachinery/watchlist: properly wire modified config to informer for fallback case 2025-06-13 17:23:16 +02:00
Lukasz Szaszkiewicz
d8bfafe07a test/apimachinery/watchlist: prove typed client's List method not streaming 2025-06-12 16:02:10 +02:00
Kubernetes Prow Robot
5abd2ac2e3 Merge pull request #132229 from p0lyn0mial/upstream-watchlist-dynamic-client-rm
dynamic client: remove support for API streaming
2025-06-12 00:45:03 -07:00
Lukasz Szaszkiewicz
edadfee47d test/apimachinery/watchlist: prove dynamic client's List method not streaming 2025-06-11 12:04:48 +02:00
cici37
eb3c9a3184 Promote feature OrderedNamespaceDeletion to GA. 2025-06-10 15:41:50 +00:00
Lukasz Szaszkiewicz
0d5578b839 test/apimachinery/watchlist: prove metadata client's List method not streaming 2025-06-06 16:46:15 +02:00
Fabio Bertinatto
466fb81528 test/e2e/apimachinery/namespace.go: make OrderedNamespaceDeletion test serial
With OrderedNamespaceDeletion enabled by default, the namespace
controller now deletes resources before deleting the namespace itself.
At the same time, some existing tests create many resources. When
those tests finish around the same time, the namespace controller can
become overloaded. As a result, it may take longer to start deleting
resources created by this test.

Initially, this patch increased the test timeout to account for that
delay. However, the test still flaked in 1 out of 10 jobs, which
suggests increasing the timeouts isn't enough.
Once the test was made serial, no flakes were observed.
2025-06-03 15:58:41 -03:00
carlory
f6fafba424 fix flacky test: ResourceQuota should verify ResourceQuota with terminating scopes through scope selectors
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-05-20 21:57:44 +08:00
Patrick Ohly
3878f7e748 E2E ResourceQuota: ensure consistent ResourceQuote during scope selector test
When expectation is that something does *not* happen, the test has to check for
a certain time. Checking just once is not sufficient because it might not have
happened immediately.
2025-05-19 18:23:49 +02:00
Patrick Ohly
4a353d07e4 E2E ResourceQuota: fix pod creation flake
As can be seen in the output of a test failure in the CI, the test waits for
"quota-not-terminating" to be updated, but then fails because creating the pod
exceeds the "quota-terminating" quota which has not been updated yet. As both
ResourceQuotas apply, it needs to wait for both of them to be updated.

    STEP: Deleting the pod - k8s.io/kubernetes/test/e2e/apimachinery/resource_quota.go:1597 @ 05/18/25 07:50:46.531
    STEP: Ensuring resource quota status released the pod usage - k8s.io/kubernetes/test/e2e/apimachinery/resource_quota.go:1601 @ 05/18/25 07:50:46.547
    I0518 07:50:46.551520 75078 resource_quota.go:2508] Got expected ResourceQuota:
    ...
              name: quota-not-terminating
              namespace: scope-selectors-1836
              resourceVersion: "15914"
              uid: db72668e-2fe0-4543-ada2-a3ff0ac77dd5
            spec:
              hard:
                limits.cpu: "2"
                limits.memory: 1Gi
                pods: "1"
                requests.cpu: "1"
                requests.memory: 500Mi
              scopeSelector:
                matchExpressions:
                - operator: Exists
                  scopeName: NotTerminating
            status:
              hard:
                limits.cpu: "2"
                limits.memory: 1Gi
                pods: "1"
                requests.cpu: "1"
                requests.memory: 500Mi
              used:
                limits.cpu: "0"
                limits.memory: "0"
                pods: "0"
                requests.cpu: "0"
                requests.memory: "0"
    STEP: Creating a terminating pod - k8s.io/kubernetes/test/e2e/apimachinery/resource_quota.go:1610 @ 05/18/25 07:50:46.551
    I0518 07:50:46.560944 75078 resource_quota.go:1612] Unexpected error:
        <*errors.StatusError | 0xc002dba500>:
        pods "terminating-pod" is forbidden: exceeded quota: quota-terminating, requested: pods=1, used: pods=1, limited: pods=1
        {
            ErrStatus:
                code: 403
                details:
                  kind: pods
                  name: terminating-pod
                message: 'pods "terminating-pod" is forbidden: exceeded quota: quota-terminating,
                  requested: pods=1, used: pods=1, limited: pods=1'
                metadata: {}
                reason: Forbidden
                status: Failure,
        }
    [FAILED] pods "terminating-pod" is forbidden: exceeded quota: quota-terminating, requested: pods=1, used: pods=1, limited: pods=1
2025-05-19 15:36:57 +02:00
Patrick Ohly
4b10ba9eef E2E ResourceQuota: dump last ResourceQuota
This is meant to help debug this flake:

   [It] [sig-api-machinery] ResourceQuota should verify ResourceQuota with terminating scopes through scope selectors.

   [FAILED] pods "test-pod" is forbidden: exceeded quota: quota-terminating, requested: pods=1, used: pods=1, limited: pods=1
   In [It] at: k8s.io/kubernetes/test/e2e/apimachinery/resource_quota.go:1572 @ 05/14/25 08:49:07.456

Dumping the ResourceQuota object each time the test progresses will
help with understanding the test and the actual behavior.
2025-05-19 15:36:57 +02:00
Patrick Ohly
88b2360540 ResourceQuota E2E: more informative failure message
When the usage information in the ResourceQuota status doesn't get updated as
expected, the previous log output and failure message didn't explain why:

    ...
    I0515 23:29:57.361485 75251 resource_quota.go:2497] resource count/resourceclaims.resource.k8s.io, expected 0, actual 1
    I0515 23:29:59.363848 75251 resource_quota.go:2497] resource count/resourceclaims.resource.k8s.io, expected 0, actual 1
    I0515 23:30:01.357948 75251 resource_quota.go:2497] resource count/resourceclaims.resource.k8s.io, expected 0, actual 1
    I0515 23:30:03.345999 75251 resource_quota.go:544] Unexpected error:
        <*fmt.wrapError | 0xc0048578a0>:
        client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
        {
            msg: "client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline",
            err: <*errors.errorString | 0xc004b028a0>{
                s: "rate: Wait(n=1) would exceed context deadline",
            },
        }
    [FAILED] client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
    In [It] at: k8s.io/kubernetes/test/e2e/apimachinery/resource_quota.go:544 @ 05/13/25 08:59:21.152

The actual failure is also unpredictable, preventing proper clustering in the triage
tool. Depending on where the context is checked, it can also fail with:

    [FAILED] context deadline exceeded
    In [It] at: k8s.io/kubernetes/test/e2e/apimachinery/resource_quota.go:544 @ 05/14/25 00:08:34.258

After converting to a GomegaMatcher with gomega.Eventually, it fails like
this (manually truncated a bit and triggered by changing the expected value):

    [FAILED] Timed out after 300.001s.
    Expected:
        <*v1.ResourceQuota | 0xc0035c3e00>:
            metadata:
              creationTimestamp: "2025-05-09T20:00:28Z"
              managedFields:
              - apiVersion: v1
                fieldsType: FieldsV1
                fieldsV1:
                  f:spec:
                ...
                manager: e2e.test
                operation: Update
                time: "2025-05-09T20:00:28Z"
              - apiVersion: v1
                fieldsType: FieldsV1
                fieldsV1:
                  f:status:
                    f:hard:
                      .: {}
                      f:configmaps: {}
                      f:count/replicasets.apps: {}
                      f:count/resourceclaims.resource.k8s.io: {}
                      f:cpu: {}
                      f:ephemeral-storage: {}
                      f:gold.deviceclass.resource.k8s.io/devices: {}
                      f:gold.storageclass.storage.k8s.io/persistentvolumeclaims: {}
                      f:gold.storageclass.storage.k8s.io/requests.storage: {}
                      f:memory: {}
                      f:persistentvolumeclaims: {}
                      f:pods: {}
                      f:replicationcontrollers: {}
                      f:requests.example.com/dongle: {}
                      f:requests.storage: {}
                      f:resourcequotas: {}
                      f:secrets: {}
                      f:services: {}
                      f:services.loadbalancers: {}
                      f:services.nodeports: {}
                    f:used:
                      .: {}
                      f:configmaps: {}
                      f:count/replicasets.apps: {}
                      f:count/resourceclaims.resource.k8s.io: {}
                      f:cpu: {}
                      f:ephemeral-storage: {}
                      f:gold.deviceclass.resource.k8s.io/devices: {}
                      f:gold.storageclass.storage.k8s.io/persistentvolumeclaims: {}
                      f:gold.storageclass.storage.k8s.io/requests.storage: {}
                      f:memory: {}
                      f:persistentvolumeclaims: {}
                      f:pods: {}
                      f:replicationcontrollers: {}
                      f:requests.example.com/dongle: {}
                      f:requests.storage: {}
                      f:resourcequotas: {}
                      f:secrets: {}
                      f:services: {}
                      f:services.loadbalancers: {}
                      f:services.nodeports: {}
                manager: kube-controller-manager
                operation: Update
                subresource: status
                time: "2025-05-09T20:00:28Z"
                ...
            status:
              hard:
                configmaps: "10"
                count/replicasets.apps: "5"
                count/resourceclaims.resource.k8s.io: "1"
                cpu: "1"
                ephemeral-storage: 50Gi
                gold.deviceclass.resource.k8s.io/devices: "1"
                gold.storageclass.storage.k8s.io/persistentvolumeclaims: "10"
                gold.storageclass.storage.k8s.io/requests.storage: 10Gi
                memory: 500Mi
                persistentvolumeclaims: "10"
                pods: "5"
                replicationcontrollers: "10"
                requests.example.com/dongle: "3"
                requests.storage: 10Gi
                resourcequotas: "1"
                secrets: "10"
                services: "10"
                services.loadbalancers: "1"
                services.nodeports: "1"
              used:
                configmaps: "1"
                count/replicasets.apps: "0"
                count/resourceclaims.resource.k8s.io: "0"
                cpu: "0"
                ephemeral-storage: "0"
                gold.deviceclass.resource.k8s.io/devices: "0"
                gold.storageclass.storage.k8s.io/persistentvolumeclaims: "0"
                gold.storageclass.storage.k8s.io/requests.storage: "0"
                memory: "0"
                persistentvolumeclaims: "0"
                pods: "0"
                replicationcontrollers: "0"
                requests.example.com/dongle: "0"
                requests.storage: "0"
                resourcequotas: "1"
                secrets: "0"
                services: "0"
                services.loadbalancers: "0"
                services.nodeports: "0"
    to have the following .status.used entries:
        count/resourceclaims.resource.k8s.io: "1"
        gold.deviceclass.resource.k8s.io/devices: "0"
        resourcequotas: "0"
    In [It] at: k8s.io/kubernetes/test/e2e/apimachinery/resource_quota.go:523 @ 05/09/25 20:05:28.325

This is more useful because the failure is predictable and includes the managed
fields. Those are important in this case because both kube-apiserver
and kube-controller-manager update the status. One of them is not doing its
job.
2025-05-16 08:15:35 +02:00
Patrick Ohly
b09d034a57 DRA E2E: revise test labeling
We only need one special "DynamicResourceAllocation" feature for the optional
node support of DRA (plugin registration, CDI support in the container
runtime). For individual features, the automatic labeling through
WithFeatureGate is sufficient.

To find DRA-related tests in a label filter, instead of plain-text "DRA" a
"DRA" label now gets added.

This change depends on an update of the DRA jobs.
2025-05-09 11:33:04 +02:00
Jordan Liggitt
95b926c93a Feature-gate watchlist e2e 2025-04-19 17:18:31 -04:00
Benjamin Elder
1eab3036b6 mark tests that use estimateMaxPods as serial 2025-04-08 14:46:38 -07:00
Benjamin Elder
b2933c0ada estimate some system daemonset overhead for max pods 2025-04-08 14:46:06 -07:00
carlory
3e70a1bc9c remove unneeded e2e features
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-03-14 14:50:35 +08:00
Kubernetes Prow Robot
4666b8cdf6 Merge pull request #130783 from jpbetz/versioned-formats
Support emulation versioning of custom resource formats
2025-03-13 11:55:55 -07:00
Kubernetes Prow Robot
be127ae0e2 Merge pull request #130751 from Jefftree/cle-promote-beta
[KEP-4355] Promote Coordinated Leader Election to Beta
2025-03-13 11:55:47 -07:00
Joe Betz
e0011c7236 Support emulation versioning of formats
We plan to add more formats in upcoming releases.
This tracks which formats are introduced at a version.

Unrecognized formats remain ignored. That is,
if a format is not supported at the emulated version,
the format is not enforced. This differs from typical
field handling, where unsupported field values are
forbidden. This is pre-existing behavior and is
in compliance with JSON Schema's format handling.

Ratcheting of custom resources helps with the introduction
of new formats. When a cluster is upgraded to a version
of Kubernetes that supports a format already set (but not enforced)
in a custom resource definition, the format will start
being enforced against custom resources. Ratcheting will
tolerate unchanged values of custom resources, even
if the value is not valid according to the format.
2025-03-13 11:09:12 -04:00