Commit Graph

119149 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
87611b10db
Merge pull request #121072 from danwinship/kube-proxy-unit-tests
Fix regression in cmd/kube-proxy/app unit test speed
2023-10-10 19:07:16 +02:00
Kubernetes Prow Robot
46c307868f
Merge pull request #119176 from carlory/fix-118893-2
nodeports: scheduler queueing hints
2023-10-10 19:07:07 +02:00
Alexander Zielenski
30cf9ed567 refactor: directly implement ValueValidator
inlineValidator unnecessary, since we already have access to the `new` object
2023-10-10 10:00:31 -07:00
Alexander Zielenski
4fb5f1a611 refactor: remove unnecessary lambda (noop) 2023-10-10 09:48:28 -07:00
Patrick Ohly
19ecf93ec3 e2e: define features and node features
The list is based on the -list-tests output.
2023-10-10 18:15:49 +02:00
Patrick Ohly
f2d34426f8 e2e: enhance SIGDescribe
framework.SIGDescribe is better because:
- Ginkgo uses the source code location of the test, not of the wrapper,
  when reporting progress.
- Additional annotations can be passed.

To make this a drop-in replacement, framework.SIGDescribe generates a function
that can be used instead of the former SIGDescribe functions.

windows.SIGDescribe contained some additional code to ensure that tests are
skipped when not running with a suitable node OS. This gets moved into a
separate wrapper generator, to allow using framework.SIGDescribe as intended.
To ensure that all callers were modified, the windows.sigDescribe isn't
exported anymore (wasn't necessary in the first place!).
2023-10-10 18:15:49 +02:00
Patrick Ohly
39b6916cbc e2e: add wrapper functions to annotate tests
These wrapper functions set labels in addition to injecting the annotation into
the test text. It then becomes possible to select tests in different ways:

    ginkgo -v --focus="should respect internalTrafficPolicy.*\[FeatureGate:ServiceInternalTrafficPolicy\]"

    ginkgo -v --label-filter="FeatureGate:ServiceInternalTrafficPolicy"

    ginkgo -v --label-filter="Beta"

When a test runs, ginkgo shows it as:

    [It] should respect internalTrafficPolicy=Local Pod to Pod [FeatureGate:ServiceInternalTrafficPolicy] [Beta] [FeatureGate:ServiceInternalTrafficPolicy, Beta]

The test name and the labels at the end are in different colors. Embedding the
annotations inside the text is redundant and only done because users of the e2e
suite might expect it. Also, our tooling that consumes test results currently
doesn't know about ginkgo labels.

Environments, features and node features as described by
https://github.com/kubernetes/enhancements/tree/master/keps/sig-testing/3041-node-conformance-and-features
are also supported.

The framework and thus (at the moment) test/e2e do not have any pre-defined
environments and features. Adding those and modifying tests will follow in
a separate commit.
2023-10-10 18:15:49 +02:00
Patrick Ohly
535ab74346 e2e framework: track and report internal bugs
If something goes wrong during the test registration phase, the only solution
so far was to panic. This is not user-friendly and only allows to report one
problem at a time.

If initialization can continue, then a better solution is to record a bug,
continue, and then report all bugs together.

This also works when just listing tests. The new verify-e2e-suites.sh uses that
to check all test suites (identified as "packages that call
framework.AfterReadingAllFlags", with some exceptions) as part of
pull-kubernetes-verify.

Example output for a fake

    framework.RecordBug(framework.NewBug("fake bug during SIGDescribe", 0))

in test/e2e/storage/volume_metrics.go:
```
$ hack/verify-e2e-suites.sh
go version go1.21.1 linux/amd64
ERROR: E2E test suite invocation failed for test/e2e.
   ERROR: E2E suite initialization was faulty, these errors must be fixed:
   ERROR: test/e2e/storage/volume_metrics.go:49: fake bug during SIGDescribe
E2E suite test/e2e_kubeadm passed.
E2E suite test/e2e_node passed.
```
2023-10-10 18:15:46 +02:00
Kubernetes Prow Robot
a6b8954de1
Merge pull request #120868 from pohly/dra-helper-name-lookup
k8s.io/dynamic-resource-allocation: fix compatibility with Kubernetes 1.27
2023-10-10 17:59:50 +02:00
Patrick Ohly
3afdcc03ea e2e framework: list specs and labels
-list-tests is a more concise alternative for `ginkgo --dry-run` with one line
per test. In contrast to `--dry-run`, it really lists all tests. `--dry-run`
without additional parameters uses the default skip expression from the E2E
context, which filters out flaky and feature-gated tests. The output includes
the source code location where each test is defined. It is sorted by test
name (not source code location) because that order is independent of
reorganizing the source code and ordering by location can be achieved with
"sort".

-list-labels has no corresponding feature in Ginkgo.

One possible usage is to figure out what values might make sense for
-focus/skip/label-filter.

Unit tests will follow in a future commit.
2023-10-10 17:15:59 +02:00
Patrick Ohly
aa4d2fc5ed e2e storage: remove useless info message
Always printing "Enabling in-tree volume drivers" whenever the E2E suite is
initializing doesn't provide any useful information and makes output of the
upcoming -list-tests look weird.
2023-10-10 17:15:59 +02:00
Dr. Stefan Schimanski
581af9ba6d
kube-apiserver: use only one client in apiserver controllers
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2023-10-10 16:49:56 +02:00
Craig Ingram
215c4627ef Update SECURITY_CONTACTS
Update the SECURITY_CONTACTS to point to the SRC
2023-10-10 14:45:43 +00:00
Kubernetes Prow Robot
755644a169
Merge pull request #121082 from pohly/ginkgo-gomega-update
dependencies: ginkgo v2.13.0, gomega v1.28.0
2023-10-10 15:50:41 +02:00
Kubernetes Prow Robot
09edfe4ebb
Merge pull request #121067 from carlory/cleanup-e2enode-framework-equal
e2e_node: stop using deprecated framework.ExpectEqual
2023-10-10 14:44:55 +02:00
Kubernetes Prow Robot
38c6bd810f
Merge pull request #120871 from pohly/dra-unsuitable-nodes-selected-node
k8s.io/dynamic-resource-allocation: fix potential scheduling deadlock
2023-10-10 14:44:46 +02:00
Kubernetes Prow Robot
4a92b00db9
Merge pull request #121064 from carlory/cleanup-e2e-apimachinery-framework-equal
e2e_apimachinery: stop using deprecated framework.ExpectEqual
2023-10-10 13:33:02 +02:00
Kubernetes Prow Robot
4b9e15e0fe
Merge pull request #120873 from pohly/dra-e2e-test-driver-enhancements
e2e dra: enhance test driver
2023-10-10 13:32:55 +02:00
Antonio Ojea
e9957d79aa make update
Change-Id: I61be34cff942264acb2f45fe7e1c8538f807cb4e
2023-10-10 11:03:19 +00:00
Antonio Ojea
0eacff0baf compatibility (adapt testdata)
Change-Id: I6ea0dfed5df7864ff7f1a1ca10daa9126901881c
2023-10-10 11:03:19 +00:00
Antonio Ojea
b7ee8e8422 drop UID from the IPAddress.Spec.ParentRef
This field is not needed, IPAddresses are unique and
the name is canonicalized to avoid duplicates.

Change-Id: Iccaaf5d55e2af61fea7af9abd39584a80ed4054e
2023-10-10 11:03:19 +00:00
Kubernetes Prow Robot
69c3b23abd
Merge pull request #121101 from pohly/golangci-lint-scripts
hack: fix update of golangci-lint verify scripts
2023-10-10 11:19:47 +02:00
Patrick Ohly
f538be659c hack: fix update of golangci-lint verify scripts
b190ea0c9 accidentally enabled verify-golangci-lint-pr-hints.sh (non-blocking!)
in the normal "make verify" (blocking!).
2023-10-10 09:03:20 +02:00
Dan Winship
6c395eb098 Fix "Endpoint" vs "Endpoints" in proxy type names
The use of "Endpoint" vs "Endpoints" in these type names is tricky
because it doesn't always make sense to use the same singular/plural
convention as the corresonding service-related types, since often the
service-related type is referring to a single service while the
endpoint-related type is referring to multiple endpoint IPs.

The "endpointsInfo" types in the iptables and winkernel proxiers are
now "endpointInfo" because they describe a single endpoint IP (and
wrap proxy.BaseEndpointInfo).

"UpdateEndpointMapResult" is now "UpdateEndpointsMapResult", because
it is the result of EndpointsMap.Update (and it's clearly correct for
EndpointsMap to have plural "Endpoints" because it's a map to an array
of proxy.Endpoint objects.)

"EndpointChangeTracker" is now "EndpointsChangeTracker" because it
tracks changes to the full set of endpoints for a particular service
(and the new name matches the existing "endpointsChange" type and
"Proxier.endpointsChanges" fields.)
2023-10-09 17:21:12 -04:00
Kubernetes Prow Robot
e4d473cd00
Merge pull request #121086 from pohly/golangci-lint-scripts
hack: update golangci-lint verify scripts
2023-10-09 22:54:29 +02:00
Stephen Heywood
00ae26cda8 Create e2e test for PV/PVC status endpoints
e2e test validates the following 6 endpoints
- patchCoreV1PersistentVolumeStatus
- readCoreV1PersistentVolumeStatus
- replaceCoreV1PersistentVolumeStatus
- patchCoreV1NamespacedPersistentVolumeClaimStatus
- readCoreV1NamespacedPersistentVolumeClaimStatus
- replaceCoreV1NamespacedPersistentVolumeClaimStatus
2023-10-10 09:38:16 +13:00
Kubernetes Prow Robot
e1788034c6
Merge pull request #120046 from chansuke/feature/update-the-function-to-get-nodes
Optimize test for scalability by using `GetBoundedReadySchedulableNodes()`
2023-10-09 21:44:21 +02:00
Kubernetes Prow Robot
46860a27cc
Merge pull request #119443 from SataQiu/fix-kubectl-20230719
kubectl: ensure '--duration' must be positive for 'kubectl create token' command
2023-10-09 21:44:12 +02:00
Kubernetes Prow Robot
2b5d2cf910
Merge pull request #120338 from pohly/dra-helper-unsuitablenodes-fix
dra helper: skip allocated claims during UnsuitableNodes calculation
2023-10-09 20:32:58 +02:00
Kubernetes Prow Robot
e224fc75ca
Merge pull request #116885 from mengjiao-liu/contextual-logging-scheduler-plugin-examples
Migrated  `pkg/scheduler/framework/plugins/examples/` to use contextual logging
2023-10-09 20:32:46 +02:00
Patrick Ohly
b190ea0c96 hack: update golangci-lint verify scripts
Instead of invoking verify-golangci-lint.sh directly from Prow jobs,
those Prow jobs should use "make verify WHAT=...". The advantage is
that the common code for running verify targets will be used, which
includes producing JUnit files.

Providing simple wrappers for strict linting of PRs (=
verify-golangci-lint-pr.sh) and event stricter linting of PRs with hints
enabled (= verify-golangci-lint-pr-hints.sh) enables those WHAT targets.
2023-10-09 20:14:47 +02:00
Jiahui Feng
302d350e88 set maxLength to longest enum. 2023-10-09 11:00:45 -07:00
matte21
d4a5a085a8 Improve error message in cpu assignment logic
Include number of requested and available CPUs in the error message
when the assignment of CPUs fails because there are less available
CPUs than requested.
2023-10-09 13:31:37 -04:00
Patrick Ohly
79355caa56 dependencies: ginkgo v2.13.0, gomega v1.28.0
Besides simply staying up-to-date, ginkgo v2.13.0 adds a `PreviewSpecs` which
will be used for introspection of the E2E test suites.
2023-10-09 19:27:06 +02:00
Kubernetes Prow Robot
246aba8912
Merge pull request #121073 from cpanato/update-distroless-ip
Bump distroless-iptables to v0.3.3
2023-10-09 17:58:58 +02:00
Abu Kashem
52c58d970e
fix data race in apf unit test 2023-10-09 11:07:21 -04:00
Kubernetes Prow Robot
57d3cc6605
Merge pull request #121054 from SataQiu/clean-crisocket-20231008
kubeadm: clean up unnecessary references to UnknownCRISocket
2023-10-09 15:37:35 +02:00
Kubernetes Prow Robot
59424358cc
Merge pull request #121071 from cpanato/update-bot
Update publishing-bot rules for active release branches that uses go1.20 to Go 1.20.9
2023-10-09 13:23:43 +02:00
cpanato
a6b0a6c484
Bump distroless-iptables to v0.3.3
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-10-09 13:18:46 +02:00
Dan Winship
f3c786cbda Fix regression in cmd/kube-proxy/app unit test speed 2023-10-09 07:08:22 -04:00
cpanato
e86e756c27
Update publishing-bot rules for active release branches that uses go1.20 to Go 1.20.9
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-10-09 11:38:01 +02:00
carlory
137ad9bf2b clean up deprecated funcs in e2e framework 2023-10-09 16:51:53 +08:00
carlory
d5d7fb595e e2e_node: stop using deprecated framework.ExpectEqual 2023-10-09 16:42:42 +08:00
carlory
5f74461bcd e2e_apimachinery: stop using deprecated framework.ExpectEqual 2023-10-09 15:44:20 +08:00
Katarzyna Lach
122ff5a212 Move grpc rate limitter from podresource folder
Rate limitter.go file is a generic file implementing
grpc Limiter interface. This file can be reuse by other gRPC
API not only by podresource.

Change-Id: I905a46b5b605fbb175eb9ad6c15019ffdc7f2563
2023-10-09 07:22:23 +00:00
Mengjiao Liu
9cca527c4b Migrated pkg/scheduler/framework/plugins/examples/ to use contextual logging 2023-10-09 11:43:17 +08:00
Kubernetes Prow Robot
cdc026fad1
Merge pull request #119915 from AxeZhan/rollout_e2e
Add a kubectl rollout undo e2e test
2023-10-09 04:53:29 +02:00
Kubernetes Prow Robot
3fc8c32425
Merge pull request #121051 from carlory/cleanup-e2e-apps-framework-equal
fix incorrect Consistently due to missing assignment when create a newAsyncAssertion
2023-10-08 21:53:52 +02:00
Daman Arora
62683c8d95 pkg/proxy/ipvs: hardening lb source ranges filtering
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2023-10-08 20:57:17 +05:30
charles-chenzz
ccc6458683 e2e_node: add testcase to check status of pod ready to start condition are set to false after terminating 2023-10-08 20:40:36 +08:00