Commit Graph

108087 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
c0ec0c2a31
Merge pull request #108150 from mangoGoForward/refactor/change-isqualifiedname-to-validatequalifiedname
refactor: Change the uses of IsQualifiedName to ValidateQualifiedName
2022-05-03 17:18:55 -07:00
Kubernetes Prow Robot
743238e951
Merge pull request #108048 from aojea/custom_etcd_integration
integration: custom etcd gracefully termination
2022-05-03 17:18:48 -07:00
Kubernetes Prow Robot
6ffd13f460
Merge pull request #107819 from matthyx/107505
Replace dbus-send for fake PrepareForShutdown message
2022-05-03 17:18:39 -07:00
Kubernetes Prow Robot
19daf9b578
Merge pull request #107471 from danwinship/iptables-tests
packet-flow-based iptables proxy tests
2022-05-03 17:18:30 -07:00
Kubernetes Prow Robot
70ca1dbb81
Merge pull request #107444 from sayaoailun/master
fix comment of e2e test case garbage_collector
2022-05-03 17:18:23 -07:00
Kubernetes Prow Robot
3a2d79cd7a
Merge pull request #107215 from mengjiao-liu/improve-test-securitycontext-accessor
Add missing test cases for `RunAsGroup` and `SetRunAsGroup` methods
2022-05-03 17:18:14 -07:00
Kubernetes Prow Robot
be9ef536cd
Merge pull request #105995 from NoicFank/feature-add-error-handle
Add error handling for Write() function
2022-05-03 17:18:07 -07:00
Kubernetes Prow Robot
1aec0c81b1
Merge pull request #105963 from zhucan/bugfix-95367
csi: add nodeExpandSecret support for CSI client & add unit test
2022-05-03 17:17:58 -07:00
Alexandre Garnier
10eb7092f8
Do not raise an error proposing to use '--overwrite' when labeling with the same value (#105936)
* Do not propose to use '--overwrite' when labeling with the same value

* Check expected error value in label_test.TestLabelFunc
2022-05-03 17:17:49 -07:00
Kubernetes Prow Robot
0401cc2762
Merge pull request #105100 from lauchokyip/addTopSum
Added --sum flag to kubectl top pod
2022-05-03 17:17:41 -07:00
Kubernetes Prow Robot
3c5cc15686
Merge pull request #103911 from swiftslee/log-format
Cleanup: use klog.Info in pkg/volume/util/operationexecutor/operation_generator.go
2022-05-03 17:17:32 -07:00
Kubernetes Prow Robot
9a160ac5fb
Merge pull request #101882 from jackfrancis/kubelet-initialnode-getcapacity
kubelet: more resilient node allocatable ephemeral-storage data getter
2022-05-03 17:17:24 -07:00
Kubernetes Prow Robot
f0cd3725d3
Merge pull request #101835 from sanposhiho/scheduler_perf/feature/op-sleep
scheduler_perf: create sleep operation
2022-05-03 17:17:11 -07:00
Tom Kerkhove
77efbc411a
feat: Provide previous replica count for deployment/replica set scale up/down event (#101142)
* feat: Provide previous replica count for deployment/replica set scale up/down event

Signed-off-by: GitHub <noreply@github.com>

* change format of event

Co-authored-by: Maciej Szulik <soltysh@gmail.com>

Co-authored-by: Maciej Szulik <soltysh@gmail.com>
2022-05-03 17:16:59 -07:00
Kubernetes Prow Robot
ea7c57b2ee
Merge pull request #99685 from yangjunmyfm192085/run-test24
Fix misspelling of success.
2022-05-03 17:16:47 -07:00
Rob Scott
f99e741f71
Adding myself to sig-network reviewers and approvers 2022-05-03 23:38:25 +00:00
Saikat Roychowdhury
c208a7b753 honor the framework delete timeout for pv 2022-05-03 17:20:10 +00:00
Francesco Romani
017998e889 e2e: node: explicit skip for device plugin tests
The device plugin e2e tests where failing lately and to unblock the
release a skip was added in the prow job configuration:
71cf119c84/config/jobs/kubernetes/sig-node/sig-node-presubmit.yaml (L401)

The problem here is not only the broken test which need to be
fixed, but also the fact that this is the only skip (for a specific
test) we do this way, which is surprising (xref:
https://github.com/kubernetes/kubernetes/issues/106635#issuecomment-1105627265)

As next step towards improvement, we add an explicit skip in the tests
proper. This makes at least more obvious these tests need more work,
and allow us to remove the edge case in the prow configuration.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2022-05-03 18:44:11 +02:00
Kubernetes Release Robot
9d278e6224 CHANGELOG: Update directory for v1.24.0 release 2022-05-03 14:35:43 +00:00
Antonio Ojea
00a60426e7 spdyroundtripper: d tlson't verify hostname twice 2022-05-03 16:17:18 +02:00
Antonio Ojea
6d14c8e13f spdyroundrippter: close the connection if tls handshake fails 2022-05-03 16:14:51 +02:00
Kubernetes Prow Robot
70d470e6aa
Merge pull request #109721 from andyzhangx/needresize-windows
fix: NeedResize build failure on Windows
2022-05-03 05:13:55 -07:00
Wojciech Tyczyński
04b77f02ee Minor cleanup to use t.Run() in test/integration 2022-05-02 21:13:32 +02:00
Lukasz Szaszkiewicz
8dea7ea27e hardens integration serviceaccount tests
the serviceAccountController controller used by the tests must wait for the caches to sync
since the tests don't check /readyz there is no way
the tests can tell it is safe to call the server and requests won't be rejected
2022-05-02 17:33:50 +02:00
xin.li
7c93cd4207 update k8s url
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-05-02 20:55:55 +08:00
SataQiu
eb1492bb00 kubeadm: replace *clientset.Clientset with clientset.Interface for join phase 2022-05-02 19:25:47 +08:00
AllenZMC
a5fb9bbd35 Optimize test cases for iptables 2022-05-01 19:33:06 +08:00
AllenZMC
0c23f5093f Optimize test cases for ipvs 2022-05-01 19:29:33 +08:00
Wei Huang
9f2b5018c1
sched: remove unused code 2022-04-29 11:37:35 -07:00
Steve Kuznetsov
ed5fd905f2
pkg/storage/etcd3: validate revision invariant
We must ensure that we notice if the etcd behavior on linearized reads
changes.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-04-29 08:55:21 -07:00
Steve Kuznetsov
eba25cdbbc
pkg/storage/etcd3: correctly validate resourceVersions
In a number of tests, the underlying storage backend interaction will
return the revision (logical clock underpinning the MVCC implementation)
at the call-time of the RPC. Previously, the tests validated that this
returned revision was exactly equal to some previously seen revision.
This assertion is only true in systems where no other events are
advancing the logical clock. For instance, when using a single etcd
cluster as a shared fixture for these tests, the assertion is not valid
any longer. By checking that the returned revision is no older than the
previously seen revision, the validation logic is correct in all cases.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-04-29 08:55:19 -07:00
Kubernetes Prow Robot
e7a2ce75e5
Merge pull request #109722 from soltysh/fix_templater
Do not wrap lines if we can't read term size
2022-04-29 06:41:14 -07:00
Maciej Szulik
a1c90674b5
Do not wrap lines if we can't read term size 2022-04-29 14:01:14 +02:00
andyzhangx
ffca636024 fix: NeedResize build failure on Windows 2022-04-29 11:34:43 +00:00
Kevin Klues
57f8b31b42 Update tests to accommodate devicemanager refactoring
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-04-29 10:52:37 +00:00
Kevin Klues
f6eaa25b71 Move DevicePluginStub implementation into new plugin package
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-04-29 10:52:37 +00:00
Kevin Klues
db88676c20 Refactor all device plugin logic into separate 'plugin' package
This is the first step towards being able to support a new plugin API version
in parallel with the existing one.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-04-29 10:52:37 +00:00
Mike Spreitzer
b4a40cd43e Draft weighted and timing histograms
The following investigation occurred during development.

Add TimingHistogram impl that shares lock with WeightedHistogram

Benchmarking and profiling shows that two layers of locking is
noticeably more expensive than one.

After adding this new alternative, I now get the following benchmark
results.

```
(base) mspreitz@mjs12 kubernetes % go test -benchmem -run=^$ -bench ^BenchmarkTimingHistogram$ k8s.io/component-base/metrics/prometheusextension
goos: darwin
goarch: amd64
pkg: k8s.io/component-base/metrics/prometheusextension
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkTimingHistogram-16    	22232037	        52.79 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	k8s.io/component-base/metrics/prometheusextension	1.404s

(base) mspreitz@mjs12 kubernetes % go test -benchmem -run=^$ -bench ^BenchmarkTimingHistogram$ k8s.io/component-base/metrics/prometheusextension
goos: darwin
goarch: amd64
pkg: k8s.io/component-base/metrics/prometheusextension
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkTimingHistogram-16    	22190997	        54.50 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	k8s.io/component-base/metrics/prometheusextension	1.435s
```

and

```
(base) mspreitz@mjs12 kubernetes % go test -benchmem -run=^$ -bench ^BenchmarkTimingHistogramDirect$ k8s.io/component-base/metrics/prometheusextension
goos: darwin
goarch: amd64
pkg: k8s.io/component-base/metrics/prometheusextension
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkTimingHistogramDirect-16    	28863244	        40.99 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	k8s.io/component-base/metrics/prometheusextension	1.890s
(base) mspreitz@mjs12 kubernetes %
(base) mspreitz@mjs12 kubernetes %
(base) mspreitz@mjs12 kubernetes % go test -benchmem -run=^$ -bench ^BenchmarkTimingHistogramDirect$ k8s.io/component-base/metrics/prometheusextension
goos: darwin
goarch: amd64
pkg: k8s.io/component-base/metrics/prometheusextension
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkTimingHistogramDirect-16    	27994173	        40.37 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	k8s.io/component-base/metrics/prometheusextension	1.384s
```

So the new implementation is roughly 20% faster than the original.

Add overlooked exception, rename timingHistogram to timingHistogramLayered

Use the direct (one mutex) style of TimingHistogram impl

This is about a 20% gain in CPU speed on my development machine, in
benchmarks without lock contention.  Following are two consecutive
trials.

(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
BenchmarkTimingHistogramLayered-16    	21650905	        51.91 ns/op	       0 B/op	       0 allocs/op
BenchmarkTimingHistogramDirect-16     	29876860	        39.33 ns/op	       0 B/op	       0 allocs/op
BenchmarkWeightedHistogram-16         	49227044	        24.13 ns/op	       0 B/op	       0 allocs/op
BenchmarkHistogram-16                 	41063907	        28.82 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	k8s.io/component-base/metrics/prometheusextension	5.432s

(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
BenchmarkTimingHistogramLayered-16    	22483816	        51.72 ns/op	       0 B/op	       0 allocs/op
BenchmarkTimingHistogramDirect-16     	29697291	        39.39 ns/op	       0 B/op	       0 allocs/op
BenchmarkWeightedHistogram-16         	48919845	        24.03 ns/op	       0 B/op	       0 allocs/op
BenchmarkHistogram-16                 	41153044	        29.26 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	k8s.io/component-base/metrics/prometheusextension	5.044s

Remove layered implementation of TimingHistogram
2022-04-28 17:36:06 -04:00
Grant McCloskey
e9346f6b5d
Update Metrics doc as there is a typo in package
Package header typo is very visible looking at docs. 

https://pkg.go.dev/k8s.io/metrics/pkg/apis/metrics
2022-04-28 07:59:09 -07:00
Abirdcfly
a7cfbb3e6c
fix volumebinding test in scheduler
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-04-28 16:22:02 +08:00
Benjamin Elder
5d8f6f1213 fix e2e coverage package for go 1.18 2022-04-27 10:05:51 -07:00
Wei Huang
846ebf7814
Cleanup legacy scheduler perf tests 2022-04-27 09:57:17 -07:00
Steve Kuznetsov
138faa3799
storage/etcd3: continue unifying test setup
Previous work by liggitt in 01760927b8 improved the boilerplate
required to run an embedded etcd server for tests as well as set up the
`*etcd3.store{}` for testing. A number of tests were not ported to use the
new helpers, though, either due to custom setup or due to inconsistent
use of setup options. A follow-up by stevekuznetsov in 6aa37eb062
removed much of the inconsistency, meaning that most callers to
`newStore()` were simply using the default boilerplate and options that
`testSetup()` used.

This patch moves all users to testSetup(), adding options as necessary
to enable some fringe setup use-cases. With a unified setup, new tests
will not copy boilerplate they do not need and it will be immediately
obvious when reading a test if the client or storage setup is *not*
default, improving readability.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-04-26 12:26:17 -07:00
Kubernetes Release Robot
537941765f CHANGELOG: Update directory for v1.24.0-rc.1 release 2022-04-26 16:45:00 +00:00
何庆国10193842
3d14bcb9a4 Log StructuredLog: spelling formatting
Signed-off-by: 何庆国10193842 <he.qingguo@zte.com.cn>
2022-04-26 17:04:06 +08:00
Kubernetes Prow Robot
a83cc51a19
Merge pull request #109658 from bobbypage/cadvisor-044-1
Bump cAdvisor to v0.44.1
2022-04-25 19:44:52 -07:00
David Porter
b0da29dcb8 Bump cAdvisor to v0.44.1
Bump cAdvisor to v0.44.1 to pick up fix for containerd task timeout
which resulted in empty network metrics.

Signed-off-by: David Porter <david@porter.me>
2022-04-25 17:18:38 -07:00
sanposhiho
b7b94b6b39 scheduler_perf: create sleep operation 2022-04-25 23:02:09 +00:00
Claudiu Belu
dc881cbc77 GCE Windows: Copy the CNI binaries from the right folder
A previous commit updated the containerd version used on Windows
nodes from 1.5.4 to 1.6.2. However, the folder structure of the
containerd releases changed since then from:

cni/$binary.exe

to:

cni/bin/$binary.exe

Because of this, the Windows nodes do not have the necessary CNI
binaries needed to setup the pod networks.
2022-04-25 15:06:30 -07:00
Patrick Ohly
2664740043 e2e: move feature gate support from test/e2e to test/e2e_node
The test/e2e suite has never supported feature gates:
- it cannot discover at runtime how the cluster is configured
- its --feature-gates parameter had no effect

Despite that, tests were written that used
e2eskipper.SkipUnlessFeatureGateEnabled even though that function then only
checked the default feature gate state.  To catch such mistakes, e2e tests
suites now must explicitly enable feature gate checking via
e2eskipper.InitFeatureGates. They also must register their own command line
flag. When that is not done, then using SkipUnlessFeatureGateEnabled or
SkipIfFeatureGateEnabled leads to a test failure.

test/e2e_node does both and therefore continues to work as before.
2022-04-25 15:41:41 +02:00