Commit Graph

108332 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
b91c5263f5
Merge pull request #109947 from alculquicondor/fix-job-orphan-pod-ut
Wait for cache to sync in job's TestWatchOrphanPods
2022-05-11 10:47:13 -07:00
Kubernetes Prow Robot
999b1bbe92
Merge pull request #108414 from aojea/cacher_context
cacher: don't accept requests if stopped
2022-05-11 10:47:02 -07:00
Steve Kuznetsov
fa2a6d6339
storage: isolate the test resource
This test resource only exists to test the versioning logic, but it
cannot live in the general testing package, or import cycles will exist.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-05-11 09:18:15 -07:00
Steve Kuznetsov
eb3aa5be10
storage: move continue token definition to storage
The means by which we encode and decode the continue token during a
paginated LIST call is not specific to etcd3. In order to allow for a
generic suite of tests against any storage.Interface implementation, we
need this logic to live outside of the etcd3 package, or import cycles
will exist.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-05-11 08:59:41 -07:00
Kubernetes Prow Robot
c0f48d2a2e
Merge pull request #109781 from wojtek-t/fix_scheduler_tests
Close events recording sink in integration tests
2022-05-11 08:47:14 -07:00
Kubernetes Prow Robot
3bcbf3de11
Merge pull request #108884 from kerthcet/feature/implement-nodeInclusionPolicy
feat: implement node inclusion policy in scheduler
2022-05-11 08:47:02 -07:00
Steve Kuznetsov
3939f3003e
storage: move the APIObjectVersioner definition to storage
The means by which we extract and parse the version of an API object is
not specific to etcd3. In order to allow for a generic suite of tests
against any storage.Interface imlpementation, we need this logic to live
outside of the etcd3 package, or import cycles will exist.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-05-11 08:19:32 -07:00
Wojciech Tyczyński
1fcc5d9eae Clear shutdown in deployment integration test 2022-05-11 17:05:31 +02:00
Wojciech Tyczyński
ca68691feb Clear shutdown in replicationcontroller integration test 2022-05-11 17:05:31 +02:00
Wojciech Tyczyński
c043535250 Clear shutdown in replicaset integration test 2022-05-11 17:05:31 +02:00
Kubernetes Prow Robot
c50579afb1
Merge pull request #109873 from wojtek-t/migrate_repair_to_new_events
Migrate ipallocator and portallocator to new Events API
2022-05-11 05:01:14 -07:00
Kubernetes Prow Robot
efb62b3538
Merge pull request #108080 from astoycos/issue-132
Fix Panic Condition
2022-05-11 05:01:02 -07:00
Wojciech Tyczyński
cb80082f66 Cleanup etcd healthcheck on shutdown 2022-05-11 12:15:05 +02:00
Patrick Ohly
1aa58532c8 test: enable unit tests under test/e2e
The test/e2e directory contains several unit tests that should run as part of
"make test":

./test/e2e/chaosmonkey/chaosmonkey_test.go
./test/e2e/storage/external/external_test.go
./test/e2e/storage/utils/utils_test.go
./test/e2e/framework/log_test.go
./test/e2e/framework/testfiles/testfiles_test.go
./test/e2e/framework/timer/timer_test.go
./test/e2e/framework/node/wait_test.go
./test/e2e/framework/pod/resource_test.go
./test/e2e/framework/config/config_test.go
./test/e2e/framework/ingress/ingress_utils_test.go
./test/e2e/framework/providers/gce/firewall_test.go

Because they were excluded by "./test/e2e/*", some of them became outdated.

./test/e2e/e2e_test.go is the only test that needs to be excluded because it is
the E2E test suite that depends on a functional cluster.
2022-05-11 11:48:58 +02:00
Patrick Ohly
e198c3a544 e2e: fix node wait test
Because these tests don't run in the CI, the test did not quite match the
actual code anymore. Apparently a retry mechanism was added after the test was
written.
2022-05-11 11:43:55 +02:00
Patrick Ohly
38348532a3 e2e: reformat log test
Using multi-line strings makes the test source code easier to read.
2022-05-11 11:29:56 +02:00
Patrick Ohly
228640ffab e2e: fix logs unit test
The test had two problems:
- the expected line was off by one (probably modified import statements)
- when Gomega failed in TestFailureOutput, Ginkgo panicked because
  its fail handler was called outside of a Ginkgo node

Now github.com/stretchr/testify/assert is used for comparing the output because
it works in a unit test without further customization and because the failure
messages are more useful.
2022-05-11 10:50:51 +02:00
kerthcet
41e46a1bb4 cleanup: remove unnecessary codes
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-05-11 16:07:12 +08:00
Mikhail Mazurskiy
1dda915659 Pass context for TLS dial 2022-05-11 15:14:30 +10:00
Kubernetes Prow Robot
b74d023e70
Merge pull request #109694 from RyanAoh/fix-108837
Be sure to update the status of StatefulSet even if the new replica creation fails
2022-05-10 21:28:50 -07:00
Kubernetes Prow Robot
5ebf1e8d93
Merge pull request #109950 from swetharepakula/fix-glbc-rbac
Add leases permissions to glbc rbac
2022-05-10 17:28:49 -07:00
kerthcet
790d983867 feat: implement NodeInclusionPolicy in TopologySpreadConstraint
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-05-11 07:51:18 +08:00
kerthcet
5e3df9a155 amend comment of NodeInclusionPolicy
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-05-11 07:48:46 +08:00
Swetha Repakula
2fcbb92681 Add leases permissions to glbc rbac
* required for leader election for ingress-gce
2022-05-10 15:49:15 -07:00
Kubernetes Prow Robot
cf64022a0f
Merge pull request #109896 from superbrothers/kubectl-delete-fix-discovery-cache-ttl
Fix discovery cache TTL to 6 hours
2022-05-10 14:33:36 -07:00
Kubernetes Prow Robot
517dd4ccfe
Merge pull request #109822 from claudiubelu/windows-node-name
tests: Include the Windows node name in the exception
2022-05-10 14:33:25 -07:00
David Eads
afb6c68d63 generated: remove no longer served APIs 2022-05-10 14:41:14 -04:00
Aldo Culquicondor
a5f5eab5fd Wait for cache to sync in job's TestWatchOrphanPods
Otherwise the event handler might not be called.

Change-Id: I23c93c2251b411430a0f2469686db6355d84af2f
2022-05-10 14:18:21 -04:00
David Eads
d323a30f60 remove PDB v1beta1 usage where v1 is equivalent 2022-05-10 13:32:07 -04:00
David Eads
233e0cb8c3 enforce strict alpha handling for API serving 2022-05-10 13:32:07 -04:00
Kubernetes Prow Robot
33b2e16372
Merge pull request #107213 from mk46/portname_validation
Fixed port name validation error message.
2022-05-10 10:03:42 -07:00
Kubernetes Prow Robot
cc66198570
Merge pull request #108492 from kerthcet/feature/add-NodeInclustionPolicies
Add NodeInclusionPolicy to TopologySpreadConstraint in PodSpec
2022-05-10 08:41:43 -07:00
Andrew Stoycos
6aa779f4ed Fix Panic Condition
Currenlty an event recorder can send an event to a
broadcaster that is already stopped, resulting
in a panic.  This ensures the broadcaster holds
a lock while it is shutting down and then forces
any senders to drop queued events following
broadcaster shutdown.

It also updates the Action, ActionOrDrop,  Watch,
and WatchWithPrefix functions to return an error
in the case where data is sent on the closed bradcaster
channel rather than panicing.

Lastly it updates unit tests to ensure the fix works correctly

fixes: https://github.com/kubernetes/kubernetes/issues/108518

Signed-off-by: Andrew Stoycos <astoycos@redhat.com>
2022-05-10 09:52:08 -04:00
Kubernetes Prow Robot
aa4150cc44
Merge pull request #109928 from zlabjp/fix-reserved-allocator-dup
Fix ServiceIPStaticSubrange assigns duplicate IP addresses
2022-05-10 05:18:15 -07:00
Kubernetes Prow Robot
e38dba7a15
Merge pull request #109925 from MikeSpreitzer/more-better-bench
Simplify and extend the benchmarks of prometheusextension timing histograms
2022-05-10 05:18:08 -07:00
Kubernetes Prow Robot
8245695028
Merge pull request #109919 from stevekuznetsov/skuznets/clarify-integration-namespace
test/integration: clarify namespace utilities
2022-05-10 05:17:56 -07:00
Kubernetes Prow Robot
ccb7118c22
Merge pull request #109914 from stevekuznetsov/skuznets/generic-watch-cancel-test
storage/testing: move cancelled watch test to generic package
2022-05-10 05:17:44 -07:00
Kubernetes Prow Robot
0ee7906524
Merge pull request #109909 from stevekuznetsov/skuznets/generic-create-test
storage/testing: move creation test to generic package
2022-05-10 04:05:43 -07:00
Takashi Kusumi
15fac8ab96 Fix ServiceIPStaticSubrange assigns duplicate IP addresses 2022-05-10 17:56:31 +09:00
Jiawei Wang
9d01f0bf52 Count inline volume for NodeVolumeLimit when CSI migration enabled
Previsouly, when kube-scheduler schedule a pod, it does
not take inline intree volume into account when CSI
migration is enabled. This could lead to failures where
pod scheduled to a node but volume attachment fails.
2022-05-10 07:43:28 +00:00
Kubernetes Prow Robot
d60fb258d9
Merge pull request #109874 from jackfrancis/IPv6DualStack-ga-rm-featuregate
azure: remove GA IPv6DualStack feature-gate
2022-05-09 23:33:44 -07:00
Mike Spreitzer
4df968ae1c Make more ordinary and add benchmarks of wrapped timing histograms 2022-05-10 01:07:00 -04:00
kerthcet
02f0a3ee91 feat: add NodeInclusionPolicy to TopologySpreadConstraint in PodSpec
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-05-10 12:54:49 +08:00
Mike Spreitzer
f3068efcfb Simplify and extend the benchmarks of timing histograms
Replace the use of a clock abstraction with direct provision of the
time-reading function.

Add benchmarks of two ways to fetch and use a vector member.

Following are the results using the revised benchmark suite.

(base) mspreitz@mjs12 prometheusextension % go test  -benchmem -run=^$ -bench Histogram .
goos: darwin
goarch: amd64
pkg: k8s.io/component-base/metrics/prometheusextension
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkTimingHistogramDirect-16           	28562178	        39.47 ns/op	       0 B/op	       0 allocs/op
BenchmarkTimingHistogramVecEltCached-16     	29268819	        39.41 ns/op	       0 B/op	       0 allocs/op
BenchmarkTimingHistogramVecEltFetched-16    	 8345041	       142.5 ns/op	      32 B/op	       1 allocs/op
BenchmarkWeightedHistogram-16               	49803134	        24.22 ns/op	       0 B/op	       0 allocs/op
BenchmarkHistogram-16                       	41756210	        29.40 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	k8s.io/component-base/metrics/prometheusextension	6.488s

(base) mspreitz@mjs12 prometheusextension % go test  -benchmem -run=^$ -bench Histogram .
goos: darwin
goarch: amd64
pkg: k8s.io/component-base/metrics/prometheusextension
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkTimingHistogramDirect-16           	28246786	        39.60 ns/op	       0 B/op	       0 allocs/op
BenchmarkTimingHistogramVecEltCached-16     	29318173	        39.44 ns/op	       0 B/op	       0 allocs/op
BenchmarkTimingHistogramVecEltFetched-16    	 8441341	       142.5 ns/op	      32 B/op	       1 allocs/op
BenchmarkWeightedHistogram-16               	48469184	        24.21 ns/op	       0 B/op	       0 allocs/op
BenchmarkHistogram-16                       	41001742	        29.51 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	k8s.io/component-base/metrics/prometheusextension	6.340s

(base) mspreitz@mjs12 prometheusextension % go test  -benchmem -run=^$ -bench Histogram .
goos: darwin
goarch: amd64
pkg: k8s.io/component-base/metrics/prometheusextension
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkTimingHistogramDirect-16           	28983674	        40.82 ns/op	       0 B/op	       0 allocs/op
BenchmarkTimingHistogramVecEltCached-16     	29527742	        43.83 ns/op	       0 B/op	       0 allocs/op
BenchmarkTimingHistogramVecEltFetched-16    	 8238685	       143.8 ns/op	      32 B/op	       1 allocs/op
BenchmarkWeightedHistogram-16               	49594070	        24.24 ns/op	       0 B/op	       0 allocs/op
BenchmarkHistogram-16                       	41100378	        29.35 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	k8s.io/component-base/metrics/prometheusextension	6.554s
2022-05-09 23:21:49 -04:00
Aohan Yang
774df1b0af Be sure to update the status of StatefulSet even if the new replica creation fails 2022-05-10 10:25:26 +08:00
Kubernetes Prow Robot
5fdbfbcd4a
Merge pull request #109921 from endocrimes/dani/use-newer-tf-image
node-perf: use tf-wide-deep:1.2
2022-05-09 19:07:42 -07:00
Kubernetes Prow Robot
8a4f82c6de
Merge pull request #109852 from pacoxu/DownwardAPIHugePages
do not skip DownwardAPIHugePages
2022-05-09 16:29:42 -07:00
Steve Kuznetsov
2e118f4246
storage/testing: move creation test to generic package
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-05-09 13:46:24 -07:00
Steve Kuznetsov
6d25e96ced
etcd3/store: make creation test validation generic
Different callers to this test may need to do different backend-specific
validation on the stored data, so we allow them a callback for this.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-05-09 13:46:22 -07:00
Kubernetes Prow Robot
685b55e88b
Merge pull request #109843 from BenTheElder/sigh
correct coverage MainStart argument order
2022-05-09 13:42:33 -07:00