Commit Graph

22623 Commits

Author SHA1 Message Date
Fabian Fulga
407bd6a4af
Revert "Add e2e tests for node log viewer" (#114636)
This reverts commit ff92963551.
2022-12-21 08:07:27 -08:00
Wojciech Tyczyński
cbbc8ec69e Add microbenchmark for listing from watchcache 2022-12-21 08:45:27 +01:00
Arda Güçlü
a5698efff2 Ignore api-resources not found error until it's ready 2022-12-21 10:34:53 +03:00
Patrick Ohly
cbb6ea5ca4 e2e: remove deprecated SuppressProgressReporting
It's not needed anymore and ginkgo warns about it.
2022-12-21 07:55:07 +01:00
Patrick Ohly
766e7e07da e2e framework: verify JUnit result, not the in-memory structs
The old tests were no longer passing with Ginkgo v2.5.0. Instead of keeping the
old approach of checking recorded spec results, now the tests actually cover
what we care about most: the results recorded in JUnit.

This also gets rid of having to repeat the stack backtrace twice (once as part
of the output, once for the separate backtrace field).
2022-12-21 07:55:07 +01:00
Patrick Ohly
f6cdd37046 e2e framework: move JUnit write function
This makes it possible to unit test it.
2022-12-21 07:55:07 +01:00
Patrick Ohly
a53753575a e2e framework: stop overriding ginkgo verbosity/progress
The default settings from Ginkgo are useful enough for Kubernetes since
timeline support was added (https://github.com/onsi/ginkgo/issues/1069).
2022-12-21 07:55:07 +01:00
Patrick Ohly
463d42aebf e2e framework: remove injection of failures and skips into GinkgoWriter
Ginkgo's timeline support will do that for us now.
2022-12-21 07:55:07 +01:00
Patrick Ohly
f4a837affb e2e framework: avoid storing redundant failure message string
All information that we want will be written into the failure XML element's
data. We don't need the message tag and don't want it because our
tools (kettle, testgrid, spyglass) would then just concatenate the two strings.

This gets implemented for us by Ginkgo. However, truncating the failure message
is not supported there at the moment. It's unclear how important that is,
therefore this (recently added feature) gets removed.
2022-12-21 07:55:07 +01:00
Patrick Ohly
6db4b741dd e2e: dump full report information
The Ginkgo CLI output no longer has the full output. We need the reports
generated by Ginkgo for that.
2022-12-21 07:55:07 +01:00
Kubernetes Prow Robot
55181b72a2
Merge pull request #113799 from r4f4/nettest-priv-ip
tests: network: Prefer internal IPs first
2022-12-20 17:37:24 -08:00
Kubernetes Prow Robot
7814d10882
Merge pull request #114611 from soltysh/wait_timeout
Fix wait test timeout
2022-12-20 13:17:25 -08:00
Jefftree
6b443c2304 Add jefftree to OWNERS 2022-12-20 19:30:42 +00:00
Kubernetes Prow Robot
ff23a12e64
Merge pull request #112019 from antoninbas/use-framework-helpers-to-create-namespaces
e2e: Use framework helpers to create namespaces
2022-12-20 10:17:56 -08:00
Maciej Szulik
132f8127a3
Fix wait test timeout 2022-12-20 17:02:23 +01:00
Antonio Ojea
f333e5b4c5 e2e NodePorts should be tested within the cluster
The NodePort functionality can be tested within the cluster.

Testing from outside the cluster assumes that there is connectivity
between the e2e.test binary and the cluster under test, that is not
always true, and in some cases is exposed to external factors  or
misconfigurations like wrong routes or firewall rules that impact
on the test.

Change-Id: Ie2fc8929723e80273c0933dbaeb6a42729c819d0
2022-12-20 10:21:59 +00:00
Antonin Bas
0194705db3 Indicate that manual Namespace creation for local ingress scale tests is intentional
Signed-off-by: Antonin Bas <abas@vmware.com>
2022-12-19 12:44:04 -08:00
Antonin Bas
62b77b7c01 e2e: Use framework helpers to create namespaces for webhook tests
Signed-off-by: Antonin Bas <abas@vmware.com>
2022-12-19 12:43:59 -08:00
Arda Güçlü
369534c6ec
kubectl wait: wire generic context (#114574)
* Wire generic context to better handle timeout

* Add integration test for wait timeout

* kubectl wait: Fix integration test always passing issue

Currently, `kubectl wait` integration test always passes even if
it gets an error. Problem is object check is done after errexit is
turned off.

This PR redirects error to output and correctly assures that
object is expected status and if it is not, test should fail.
2022-12-19 09:21:56 -08:00
Antonio Ojea
e0a23577d2 pass context to gomega
Change-Id: Ibef02a52d8922984a09efa48361b9876fc91287c
2022-12-19 13:14:02 +00:00
Kubernetes Prow Robot
a864583905
Merge pull request #114573 from pohly/e2e-ginkgo-timeout-fixes
e2e ginkgo timeout fixes, II
2022-12-19 04:43:44 -08:00
Kubernetes Prow Robot
c2eb6e69c4
Merge pull request #114576 from pohly/e2e-ginkgo-timeout-fixes-III
e2e storage: fix "Stress with local volumes [Serial] should be able to process many pods and reuse local volumes"
2022-12-19 03:37:44 -08:00
Patrick Ohly
4d7e2894b2 e2e storage: fix "Stress with local volumes [Serial] should be able to process many pods and reuse local volumes"
The background goroutine was started with the context from ginkgo.BeforeEach,
which then led to "context canceled" errors. While at it, the entire goroutine
start/stop gets moved into the BeforeEach and simplified.
2022-12-19 11:23:53 +01:00
Kubernetes Prow Robot
cbd16cf131
Merge pull request #114569 from aojea/e2e_taint_informer
e2e node taints stop controller with context
2022-12-19 01:57:43 -08:00
Patrick Ohly
1bc24630da e2e scheduling: remove redundant stopCh
The ctx.Done() channel associated with the current test can be used
instead. This is a simplification, both approaches work.
2022-12-19 10:00:00 +01:00
Patrick Ohly
29d6d03a3c e2e scheduling: fix scope of context.WithTimeout
The original intend from v1.26.0 was to only apply the timeout to the following
cache.WaitForCacheSync.
2022-12-19 10:00:00 +01:00
Kubernetes Prow Robot
789dc88fd5
Merge pull request #114567 from aojea/e2e_dns_context
e2e dns don't fail if configmap does not exist
2022-12-18 16:05:53 -08:00
Kubernetes Prow Robot
948d5b8d52
Merge pull request #114565 from aojea/fix_e2e_after_contexts
cleanup e2e kubectl  cli tests
2022-12-18 16:05:42 -08:00
Antonio Ojea
8357eead06 e2e node tains stop controller with context
Informers controllers must use the stop channel, and not
cancel the context of the List/Watch.

Change-Id: I42e4ae4bad4fe6ad0da6fe1b3990ebe56c8eabd9
2022-12-18 22:44:20 +00:00
Antonio Ojea
5d8f745e86 e2e dns don't fail if configmap does not exist
don't fail on cleanup if the configmap for kube-dns does not exist

Change-Id: Ia56d9f590baba374e0b687aeda71d547899b1713
2022-12-18 19:23:36 +00:00
Antonio Ojea
e05e96bfdd e2e kubect run tests
These tests create their own pods, however, they were inside a block
that was always creating a pod, that was not used later on the tests,
but can influence on the conditions asserted to succeed the test.

Change-Id: I3bb9a0f123fb0766d75934ef8e197f92e3f5f3b8
2022-12-18 16:22:15 +00:00
Patrick Ohly
2296fc4b1f e2e apps: fix "context canceled" error
Using the ctx of the ginkgo.BeforeEach in callbacks that are invoked after the
BeforeEach is done causes "context canceled" errors. Previously, this code used
context.TODO(). The best solution is to create a new context and cancel it
during test cleanup, then that context can be used for the API calls and as
stop channel.
2022-12-18 16:10:15 +01:00
Patrick Ohly
02b6b6520a e2e kubectl: increase wait timeout
After adding error checking in df5d84ae81, the "[sig-cli] Kubectl client
Simple pod should return command exit codes [Slow] running a failing command
without --restart=Never, but with --rm" test was found to time out.

Doubling the timeout might help. Alternatively, the entire
WaitForPodToDisappear could get removed, which would make this scenario similar
to the others which also don't wait.
2022-12-18 16:10:15 +01:00
Antonio Ojea
c1580e960d e2e kubectl test cleanup
the test uses a BeforeEach block to create a pod with the name defined
but the simplePodName variables, however, some test use the value of
the variable directly.

To avoid future problems use the variable name instead of the value on
all tests.

Change-Id: I21a01019d91fe5ae7e35566184420001978ce355
2022-12-18 13:57:41 +00:00
Kubernetes Prow Robot
7f7bf68c7c
Merge pull request #111178 from lucming/cleanup
clean up code
2022-12-16 19:17:52 -08:00
Kubernetes Prow Robot
a93eda9db3
Merge pull request #112923 from pohly/e2e-ginkgo-timeouts
e2e: ginkgo timeouts: use context provided by ginkgo
2022-12-16 16:59:52 -08:00
Patrick Ohly
2f6c4f5eab e2e: use Ginkgo context
All code must use the context from Ginkgo when doing API calls or polling for a
change, otherwise the code would not return immediately when the test gets
aborted.
2022-12-16 20:14:04 +01:00
Shihang Zhang
4fd09a06d6 lock LegacyServiceAccountTokenNoAutoGeneration 2022-12-16 10:45:35 -08:00
Patrick Ohly
bf1d1dfd0f e2e storage: pass around topologyTest pointer
Copying the instance makes no sense because the fields are meant to be shared
between test and cleanup code.
2022-12-16 19:42:26 +01:00
Kubernetes Prow Robot
093c5964f7
Merge pull request #114289 from gnufied/add-recovery-expansion-tests
Add recovery expansion tests
2022-12-16 06:16:28 -08:00
Kubernetes Prow Robot
64b6cec843
Merge pull request #114533 from songxiao-wang87/runwxs-test7
don't assert error inside wait.Poll loops
2022-12-16 04:52:36 -08:00
Kubernetes Prow Robot
6577fd2203
Merge pull request #114217 from jingxu97/snapshotfix
Fix issues in volumesnapshot test for ephemeral storage
2022-12-16 04:52:17 -08:00
songxiao-wang87
16c813d9b8 Making a run test.
Signed-off-by: songxiao-wang87 <wang.xiaosong23@zte.com.cn>
2022-12-16 08:30:45 +00:00
Kubernetes Prow Robot
8c23f06aaa
Merge pull request #114345 from ii/create-subjectaccessreview-test
Write e2e test for SubjectAccessReview & createAuthorizationV1NamespacedLocalSubjectAccessReview +2 Endpoints
2022-12-15 13:21:47 -08:00
Kubernetes Prow Robot
843b40aeb4
Merge pull request #113985 from lavalamp/improved-has-synced
Propagate HasSynced properly
2022-12-15 12:15:47 -08:00
Kubernetes Prow Robot
c43e83ceed
Merge pull request #110014 from claudiubelu/windows-tests/fix-long-hostname
tests Windows: Fixes test failures related to COMPUTERNAMEs being truncated
2022-12-15 12:15:35 -08:00
Stephen Heywood
247c23abaf Create e2e test for SubjectAccessReview endpoints
e2e test validates the following 2 endpoints
- createAuthorizationV1SubjectAccessReview
- createAuthorizationV1NamespacedLocalSubjectAccessReview
2022-12-16 07:42:50 +13:00
Kubernetes Prow Robot
3d3a180713
Merge pull request #113942 from mengjiao-liu/remove-feature-gate-expansion
Remove volume expansion feature gates
2022-12-15 10:05:38 -08:00
Kubernetes Prow Robot
b30a6a3fc5
Merge pull request #114355 from dengyufeng2206/pr1208
fix msg in /test/e2e/apps/daemon_set.go
2022-12-15 03:27:35 -08:00
Mengjiao Liu
a3d00c15b6 Remove ExpandPersistentVolumes feature gate 2022-12-15 11:43:50 +08:00
Kubernetes Prow Robot
69fe066adc
Merge pull request #114477 from chendave/kubeadm_reviewer
kubeadm: add chendave as kubeadm reviewer
2022-12-14 13:01:36 -08:00
Hemant Kumar
3d33178dab Start adding e2e for recovery from expansion failure 2022-12-14 15:28:05 -05:00
Kubernetes Prow Robot
770b39c65b
Merge pull request #114072 from Tal-or/deflake_e2e_cpumanager_metrics_tests
e2e: cpumanager: proper test clean-up
2022-12-14 11:55:45 -08:00
Kubernetes Prow Robot
7403090e40
Merge pull request #113309 from swatisehgal/devicemgr-e2e-remove-flakiness
node: e2e: device plugins: Deflake e2e tests
2022-12-14 10:47:34 -08:00
Daniel Smith
8100efc7b3 Enable propagration of HasSynced
* Add tracker types and tests
* Modify ResourceEventHandler interface's OnAdd member
* Add additional ResourceEventHandlerDetailedFuncs struct
* Fix SharedInformer to let users track HasSynced for their handlers
* Fix in-tree controllers which weren't computing HasSynced correctly
* Deprecate the cache.Pop function
2022-12-14 18:43:33 +00:00
jinxu
e46172014c Fix issues in volumesnapshot test for ephemeral storage
Make sure snapshot and restored volumes are cleaned up concurrently
without strict ordiering

Change-Id: Id7e567861fa3618e142915b7cd6991526e4eb6a4
2022-12-14 10:21:15 -08:00
Patrick Ohly
fdc03dd2f8 e2e kubectl: improve Gomega check
gomega.Succeed is the recommend way of checking for an error. gomega.BeNil
prints a less useful failure message.
2022-12-14 07:39:51 +01:00
Patrick Ohly
2695ed6a0a e2e: add missing error checks
Not checking for some error conditions must have been an oversight.
2022-12-14 07:39:51 +01:00
Patrick Ohly
8168434f0c e2e storage: explain why cleanup is done inside the function
This code must run during the test and thus cannot be moved into DeferCleanup.
2022-12-14 07:39:51 +01:00
Patrick Ohly
f30d1867e6 e2e storage: remove obsolete testCleanups 2022-12-14 07:39:48 +01:00
Dave Chen
8995346259 kubeadm: add chendave as kubeadm reviewer
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-12-14 10:54:03 +08:00
Kubernetes Prow Robot
fa8ef76a8b
Merge pull request #113335 from danwinship/cleanup-sctp-tests
Clean up SCTP tests
2022-12-13 18:33:34 -08:00
Kubernetes Prow Robot
546d4054ac
Merge pull request #113930 from gnufied/refactor-mock-tests
Refactor mock tests in different files
2022-12-13 17:27:34 -08:00
Kubernetes Prow Robot
3ceb213fc1
Merge pull request #113508 from p-slavcheva/fix-diff-osexit
Replace os.Exit in diff
2022-12-13 15:59:34 -08:00
Kubernetes Prow Robot
c2b5457dfa
Merge pull request #109877 from yibozhuang/local-pv-prefilter-result
scheduler volumebinding: leverage PreFilterResult for bound local PVs
2022-12-13 14:53:34 -08:00
Dan Winship
41e1435d97 Remove [Disruptive] from Feature:SCTPConnectivity tests
The Feature:SCTPConnectivity tests cannot run at the same time as the
"X doesn't cause sctp.ko to be loaded" tests, since they may cause
sctp.ko to be loaded. We had dealt with this in the past by marking
them [Disruptive], but this isn't really fair; the problem is more
with the sctp.ko-checking tests than it is with the SCTPConnectivity
tests. So make them not [Disruptive] and instead make the
sctp.ko-checking tests be [Serial].
2022-12-13 16:24:42 -05:00
Dan Winship
4cee7197eb Move two SCTP tests
There were two SCTP tests grouped together in
test/e2e/network/service.go, but one of them wasn't a service test...
so move the SCTP service test to be grouped with the other service
tests, and the SCTP hostport tests to be grouped with other
non-service tests.
2022-12-13 16:24:40 -05:00
Dan Winship
d9981065dd Drop iptables-specific test from SCTP HostPort test
The SCTP HostPort test was checking that creating a pod with an SCTP
HostPort would create a certain iptables rule, but the handling of
HostPorts is now up to CRI, not kubelet, so kubernetes e2e cannot
assume it will implement the feature in any specific way.

(The test still ensures that (a) the apiserver accepts SCTP HostPorts,
and (b) neither kubelet nor the runtime causes the SCTP kernel module
to be loaded as part of creating a pod with an SCTP HostPort.)
2022-12-13 16:22:06 -05:00
Dan Winship
c6cc056675 Replace iptables-proxy-specific SCTP e2e test with a unit test
We had a test that creating a Service with an SCTP port would create
an iptables rule with "-p sctp" in it, which let us test that
kube-proxy was doing vaguely the right thing with SCTP even if the e2e
environment didn't have SCTP support. But this would really make much
more sense as a unit test.
2022-12-13 16:21:12 -05:00
Hemant Kumar
9e5d0828e0 use defercleanup in all the places 2022-12-13 15:54:55 -05:00
Kubernetes Prow Robot
233f9c210a
Merge pull request #114092 from anggao/update_method_name
e2e: Update GetExternalIP and GetInternalIP method name to make them more explicit.
2022-12-13 12:39:46 -08:00
Kubernetes Prow Robot
cffc7a1391
Merge pull request #110473 from lzhecheng/disruptive-skip-ssh-not-working
Skip tests if SSH not working
2022-12-13 12:39:35 -08:00
Hemant Kumar
6dd94f5663 Refactor mock tests in different files
Change code to use pointer for mock driver setup
2022-12-13 14:26:07 -05:00
Kubernetes Prow Robot
bb6edfb96b
Merge pull request #114454 from pohly/e2e-framework-output-test-flake
e2e framework: fix unit test flake
2022-12-13 10:28:15 -08:00
Kubernetes Prow Robot
2df02b3ef5
Merge pull request #114425 from pohly/e2e-ginkgo-timeouts-defer-cleanup
e2e ginkgo timeouts: simplify code
2022-12-13 10:28:09 -08:00
Kubernetes Prow Robot
8280fd9671
Merge pull request #114171 from aojea/loadbalancer_mutability
e2e loadbalancer test connectivity within cluster first
2022-12-13 10:27:45 -08:00
Kubernetes Prow Robot
e6bc669227
Merge pull request #113795 from DangerOnTheRanger/validatingadmissionpolicy-crd-integration-tests
Add CRD integration tests for ValidatingAdmissionPolicy
2022-12-13 10:27:34 -08:00
Kubernetes Prow Robot
19a0aaaaa0
Merge pull request #114261 from alculquicondor/reduce-job-test-load
Reduce load of Job integration test
2022-12-13 08:39:33 -08:00
Claudiu Belu
9b8b378782 tests Windows: Fixes test failures related to COMPUTERNAMEs being truncated
Windows ComputerNames cannot exceed 15 characters. This causes a few tests to fail
when the node names exceed that limit. Additionally, the checks should be case
insensitive.
2022-12-13 08:37:39 -08:00
Swati Sehgal
213a6edc57 node: e2e: Add descriptive messages for operation/error checks
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-13 14:54:48 +00:00
Zhecheng Li
21c41e79e5 Skip tests if SSH not working
Functions involves TestVolumeUnmountsFromDeletedPodWithForceOption
need to check if SSH works.

Signed-off-by: Zhecheng Li <zhechengli@microsoft.com>
2022-12-13 14:38:21 +00:00
Patrick Ohly
0df49542b1 e2e framework: fix unit test flake
The Gingo v2 time suffix is hh:mm:ss without the .xyz sub-second details if the
time stamp happens to land exactly on a second.

This change fixes test flakes like the following:

    -STEP: Building a namespace api object, basename test-namespace
    +STEP: Building a namespace api object, basename test-namespace 12/13/22 11:43:53

    --- FAIL: TestCleanup (36.79s)
2022-12-13 15:29:18 +01:00
petya.slavcheva1
2dce194e16 Replace os.exit in diff 2022-12-13 14:27:35 +01:00
Antonio Ojea
2b0372f873 e2e loadbalancer test connectivity within cluster first
Change-Id: Iaced995e5e0433c9095cb522aa3e1de2105c931e
2022-12-13 12:26:13 +00:00
Patrick Ohly
d4729008ef e2e: simplify test cleanup
ginkgo.DeferCleanup has multiple advantages:
- The cleanup operation can get registered if and only if needed.
- No need to return a cleanup function that the caller must invoke.
- Automatically determines whether a context is needed, which will
  simplify the introduction of context parameters.
- Ginkgo's timeline shows when it executes the cleanup operation.
2022-12-13 08:09:01 +01:00
Kubernetes Prow Robot
dc1e77143f
Merge pull request #114082 from kidddddddddddddddddddddd/refactor_handleSchedulingFailure
pass status to handleSchedulingFailure
2022-12-12 22:05:34 -08:00
kidddddddddddddddddddddd
6ca62eb2cb refactor 2022-12-13 11:36:12 +08:00
Kubernetes Prow Robot
73ed9e70ed
Merge pull request #114052 from ionutbalutoiu/tests/lb-rolling-update
tests: Add DaemonSet with LB rolling update test
2022-12-12 18:47:52 -08:00
Kubernetes Prow Robot
923ee203f3
Merge pull request #110991 from thockin/svc-typenames-starTrafficPolicyType
Svc typenames star traffic policy type
2022-12-12 18:47:33 -08:00
Ang Gao
3540f948e9 Update method name to make it more explicit 2022-12-12 21:50:07 +00:00
Kubernetes Prow Robot
60274a1a0a
Merge pull request #114131 from aojea/noflaky_lb
remove flaky tag for GCE NEG tests
2022-12-12 11:43:33 -08:00
Swati Sehgal
62e4d39c2f node: e2e: address review comments (2022/12/12)
- use `ginkgo.DeferCleanup` instead of clean up in the AfterEach block
- encourage use of ginkgo by not extending expect.go

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 16:31:40 +00:00
Ionut Balutoiu
3feea9db7c tests: Add DaemonSet with LB rolling update test
Add a test case with a DaemonSet behind a simple load balancer whose
address is being constantly hit via HTTP requests.

The test passes if there are no errors when doing HTTP requests to the
load balancer address, during DaemonSet `RollingUpdate` operations.

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2022-12-12 17:16:12 +02:00
Swati Sehgal
a9e3689e63 node: e2e: ensure clean cluster state before e2e tests are run
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 14:50:36 +00:00
Swati Sehgal
7e880d1bab node: e2e: ensure log rotation pod is deleted after test
Some node e2e tests check for expected number of pods running
on the node to verify the correct state of that node after running
test scenarios. An example of such a check is in the device plugin
end to end test here: [1].

If the node is not left in a clean state after an e2e test finishes
running, it can lead to flaky tests because the node might have
unexpected pods running on the node.

In order to avoid that, we make sure that the test pods are
cleaned up after the test runs.

[1]: https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/device_plugin_test.go#L189-L190

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 14:50:32 +00:00
Patrick Ohly
5c09ca57ff e2e storage: remove context.WithCancel
The context provided by Ginkgo will get cancelled automatically.
2022-12-12 11:30:07 +01:00
Patrick Ohly
896c6fa082 e2e framework: add AnnotatedLocationWithOffset
This is useful in helper functions which themselves don't need to be recorded.
2022-12-12 11:30:07 +01:00
Patrick Ohly
c466c49682 e2e apps: avoid assertions in wait.Until callback
wait.Until catches panics and logs them, which leads to confusing
output. Besides, the test is written so that failures must get reported to the
main goroutine.
2022-12-12 11:30:07 +01:00
Patrick Ohly
2168dd5334 e2e apps: capture expected state before making changes
Looking up the expected nodes in the goroutine raced with the test making
changes to the configuration. When doing (unrelated?) changes, the test started
to fail:

Oct 23 15:47:03.092: INFO: Unexpected error:
    <*errors.errorString | 0xc001154c70>: {
        s: "no subset of available IP address found for the endpoint test-rolling-update-with-lb within timeout 2m0s",
    }
Oct 23 15:47:03.092: FAIL: no subset of available IP address found for the endpoint test-rolling-update-with-lb within timeout 2m0s
2022-12-12 11:30:07 +01:00
Patrick Ohly
7454c3ff81 e2e metrics: remove incorrect comment
The "should report resource usage through the resource metrics api" E2E test
calls getResourceMetrics, which calls GrabKubeletMetricsWithoutProxy.
2022-12-12 11:30:07 +01:00
Patrick Ohly
8c27313cfd e2e storage: don't panic when server stops
Now that everything is connected to a per-test context, the gRPC server might
encounter an error before it gets shut down normally. We must not panic in that
case because it would kill the entire Ginkgo worker process. This is not even
an error, so just log it as info message.
2022-12-12 11:30:07 +01:00
Patrick Ohly
f897c86119 e2e framework: support ignoring "not found" errors during DeferCleanup
The wrapper can be used in combination with ginkgo.DeferCleanup to ignore
harmless "not found" errors during delete operations.

Original code suggested by Onsi Fakhouri.
2022-12-12 11:30:07 +01:00
Patrick Ohly
73b60ba769 e2e framework: don't fail when DumpAllNamespaceInfo is nil
It is set in all of the test/e2e* suites, but not in the ginkgo output
tests. This check is needed before adding a test case there which would trigger
this nil pointer access.
2022-12-12 11:30:07 +01:00
Ang Gao
1931494333 make GetSubnetPrefix IP family agnostic 2022-12-12 01:26:42 +00:00
Tim Hockin
d0e2b06850
ServiceExternalTrafficPolicyType: s/Type//
Rename ServiceExternalTrafficPolicyType => ServiceExternalTrafficPolicy
2022-12-11 13:48:27 -08:00
Kubernetes Prow Robot
23c65ec590
Merge pull request #114411 from aojea/e2e_panic
don't assert error inside goroutines
2022-12-11 10:13:32 -08:00
Kubernetes Prow Robot
f256321e76
Merge pull request #114401 from pohly/e2e-ginkgo-timeouts-callbacks
e2e: accept context from Ginkgo
2022-12-11 09:07:14 -08:00
Antonio Ojea
2956bb39a1 don't assert error inside goroutines
Change-Id: Ifed741d1973e96063378620daf7b8b22647bc2fb
2022-12-11 15:34:17 +00:00
SataQiu
40a6d6306a autoscaling: advance v2 as the preferred API version over v1 2022-12-11 13:09:39 +08:00
Patrick Ohly
a4e6fea164 e2e: fix line numbering in unit tests
Adding the "context" import in the previous commit must get compensated by
removing one of the blank lines in the output unit tests, otherwise the stack
backtrace don't match expectations.
2022-12-10 21:49:05 +01:00
Patrick Ohly
16f05373f4 e2e framework internal: normalize anonymous functions with parameters
This will become relevant for

   ginkgo.BeforeEach(func(ctx context.Context) { ... })
2022-12-10 21:47:17 +01:00
Patrick Ohly
0d73c0d0e5 e2e: fix linter errors
Adding "ctx" as parameter in the previous commit led to some linter errors
about code that overwrites "ctx" without using it.

This gets fixed by replacing context.Background or context.TODO in those code
lines with the new ctx parameter.

Two context.WithCancel calls can get removed completely because the context
automatically gets cancelled by Ginkgo when the test returns.
2022-12-10 20:35:46 +01:00
Patrick Ohly
df5d84ae81 e2e: accept context from Ginkgo
Every ginkgo callback should return immediately when a timeout occurs or the
test run manually gets aborted with CTRL-C. To do that, they must take a ctx
parameter and pass it through to all code which might block.

This is a first automated step towards that: the additional parameter got added
with

    sed -i 's/\(framework.ConformanceIt\|ginkgo.It\)\(.*\)func() {$/\1\2func(ctx context.Context) {/' \
        $(git grep -l -e framework.ConformanceIt -e ginkgo.It )
    $GOPATH/bin/goimports -w $(git status | grep modified: | sed -e 's/.* //')

log_test.go was left unchanged.
2022-12-10 19:50:18 +01:00
Kubernetes Prow Robot
63ff4a2659
Merge pull request #114392 from pohly/e2e-apimachinery-cleanup
e2e apimachinery: simplify cleanup
2022-12-10 09:06:31 -08:00
Kubernetes Prow Robot
a40111cdd0
Merge pull request #114350 from Huang-Wei/fix-flaky-test
Deflake a preemption test that may patch Node incorrectly
2022-12-10 09:06:02 -08:00
Kubernetes Prow Robot
9758911fd5
Merge pull request #114252 from ardaguclu/scale-piped-input
kubectl scale: Use visitor only once
2022-12-10 07:55:19 -08:00
Kubernetes Prow Robot
9f85f6d1f1
Merge pull request #114249 from ardaguclu/improve-exec-multi-error
kubectl exec: return descriptive error message when multi resource passed
2022-12-10 07:55:12 -08:00
Kubernetes Prow Robot
4f28854c09
Merge pull request #114223 from sathyanarays/improve_scheduler_test_coverage
Improving scheduler extender unit tests
2022-12-10 07:54:44 -08:00
Kubernetes Prow Robot
e23139d487
Merge pull request #114196 from elmiko/spellfix-for-daemonset-test
fix spelling error in e2e upgrade apps daemonset test
2022-12-10 07:54:17 -08:00
Kubernetes Prow Robot
2118bc8aec
Merge pull request #114155 from aojea/mirroring_repack
endpointslicemirroring handle endpoints with multiple subsets
2022-12-10 07:53:42 -08:00
Kubernetes Prow Robot
9f46fa2004
Merge pull request #114156 from Riaankl/update-ineligible-endpoints-yaml
update ineligible_endpoints.yaml to include getResourceAPIGroup
2022-12-10 06:04:56 -08:00
Kubernetes Prow Robot
ce9b912ca6
Merge pull request #114085 from saschagrunert/gcb-docker-gcloud-bump
Bump gcb-docker-gcloud to `v20221007-69e0da97ef`
2022-12-10 06:04:33 -08:00
Kubernetes Prow Robot
75b67bf0d3
Merge pull request #114054 from brianpursley/kubectl-1327
i18n: Fix bug where package-level variables are not translated.
2022-12-10 06:04:02 -08:00
Antonio Ojea
ef6d9edea5 endpointslicemirroring handle endpoints with multiple subsets
Endpoints generated by the endpoints controller are in the canonical
form, however, custom endpoints can not be in canonical format
(there was a time they were canonicalized in the apiserver, but this
caused performance issues because the endpoint controller kept
updating them since the created endpoint were different than the
stored one due to the canonicalization)

There are cases where a custom endpoint may generate multiple slices
due to the controller, per example, when the same address is present
in different subsets.

The endpointslice mirroring controller should canonicalize the
endpoints subsets before start processing them to be consistent
on the slices generated, there is no risk of hotlooping because
the endpoint is only used as input.

Change-Id: I2a8cd53c658a640aea559a88ce33e857fa98cc5c
2022-12-10 11:44:10 +00:00
Kubernetes Prow Robot
0cd13e573c
Merge pull request #113196 from mimowo/job-controller-reviewer
Self-nominate mimowo as a reviewer for pkg/controller/job & test/integration/job packages
2022-12-10 02:01:39 -08:00
Gunju Kim
69fcde750a
Update daemonSet status even if syncDaemonSet fails
This ensures that the daemonset controller updates daemonset statuses in
a best-effort manner even if syncDaemonSet fails.

In order to add an integration test, this also replaces
`cmd/kube-apiserver/app/testing.StartTestServer` with
`test/integration/framework.StartTestServer` and adds
`setupWithServerSetup` to configure the admission control of the
apiserver.
2022-12-10 11:45:56 +09:00
Kubernetes Prow Robot
bc5c898b65
Merge pull request #112955 from deads2k/ingress-wait
wait for ingress admission to catch up to the cache during testing
2022-12-09 18:15:39 -08:00
Kubernetes Prow Robot
e1709e59d1
Merge pull request #113922 from alexzielenski/owners-alexzielenski
add alexzielenski to OWNERS
2022-12-09 14:35:24 -08:00
Kubernetes Prow Robot
a8b2f4b695
Merge pull request #113564 from tallclair/audit-config
Combine RequestAuditConfig with RequestAuditConfigWithLevel
2022-12-09 14:34:08 -08:00
Patrick Ohly
d3ad61aa01 e2e apimachiner: simplify cleanup
This is in preparation for
https://github.com/kubernetes/kubernetes/pull/112923: DeferCleanup will
automatically do the right thing when testCleanup gets changed to require a
context parameter.
2022-12-09 20:31:08 +01:00
dengyufeng2206
206669d2ed fix msg in /test/e2e/apps/daemon_set.go 2022-12-08 10:33:17 +08:00
Wei Huang
a75c0709d0
Deflake a preemption test that may patch Node incorrectly 2022-12-07 14:30:34 -08:00
Marko Mudrinić
4f1a51719b
releng: Update images, dependencies and version to Go 1.19.4
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-12-05 12:33:55 +01:00
Sathyanarayanan Saravanamuthu
bf4f907bfa Improving schedule extender test coverage
Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>
2022-12-05 12:10:10 +05:30
Aldo Culquicondor
61fe6114b3
Reduce load of Job integration test
Change-Id: If99856aa6640375a8a9feff13fa213d4f974a99a
2022-12-02 12:58:28 -05:00
Antonio Ojea
5eb30f2762 be more strict on network timeouts
Change-Id: Ic4044af837047f31e6d60368b79d34dde1adbb98
2022-12-02 16:31:20 +00:00
Arda Güçlü
76ee3788cc kubectl scale: Add dry-run prefix to indicate result is not applied
Currently, if user executes `kubectl scale --dry-run`, output has no
indicator showing that this is not applied in reality.

This PR adds dry run suffix to the output as well as more integration
tests to verify it.
2022-12-02 16:27:18 +03:00
Arda Güçlü
13be899b42 kubectl scale: Use visitor only once
`kubectl scale` calls visitor two times. Second call fails when
the piped input is passed by returning an
`error: no objects passed to scale` error.

This PR uses the result of first visitor and fixes that piped
input problem. In addition to that, this PR also adds new
scale test to verify.
2022-12-02 16:00:22 +03:00
Arda Güçlü
832644f0b3 kubectl exec: return descriptive error message when multi resource passed
`kubectl exec` command supports getting files as inputs. However,
if the file contains multiple resources, it returns unclear error message;
`cannot attach to *v1.List: selector for *v1.List not implemented`.

Since `exec` command does not support multi resources, this PR
handles that and returns descriptive error message earlier.
2022-12-02 14:05:11 +03:00
David Eads
ffec39cb27 wait for ingress admission to catch up to the cache during testing 2022-12-01 13:16:39 -05:00
Brian Pursley
c0dea5e31a i18n: Fix bug where package-level variables are not translated.
Change i18n.T() to load translations if they have not yet been loaded.

Added new integration tests to test help output translation.
2022-11-29 23:09:57 -05:00
michael mccune
6981a1acf5 fix spelling error in e2e upgrade apps daemonset test 2022-11-29 15:56:15 -05:00
Riaan Kleinhans
0545a0a988
update ineligible endpoints yaml 2022-11-28 08:57:21 +13:00
Antonio Ojea
b89f42be26 remove flaky tag for GCE NEG tests
Fixed by

https://github.com/kubernetes/kubernetes/pull/113858
https://github.com/kubernetes/kubernetes/pull/113562
2022-11-25 08:52:35 +00:00
Paco Xu
75f89875f8 use etcd 3.5.6-0 after promotion 2022-11-24 09:45:56 +08:00
Kubernetes Prow Robot
7530baa9a1
Merge pull request #114044 from andrewsykim/fix-node-proxy-tests
test/e2e_node: set apiserver kubelet preferred addresses
2022-11-23 14:16:03 -08:00
Sascha Grunert
c032d7993a
Bump gcb-docker-gcloud to v20221007-69e0da97ef
Update the container images used in cloudbuild to their latest version.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-11-23 16:03:28 +01:00
Talor Itzhak
56c5a95849 e2e: cpumanager: proper test clean-up
One of the cpumanager tests doesn't remove the pod
that got created during the test.

This causes pollution of other tests and failures
from time to time (depends on the test execution order).

In order to defalke the tests, we should delete the pod
and wait for it to be completely remove.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-22 17:25:52 +02:00
Andrew Sy Kim
6c8eacb157 test/e2e_node: set apiserver kubelet preferred addresses
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-11-21 15:09:04 -05:00
Arda Güçlü
43a889fc65 Add integration test to test singularnames for all resources 2022-11-21 09:59:37 +03:00