Commit Graph

105850 Commits

Author SHA1 Message Date
Patrick Ohly
a5a241e0df logs: update expected output for multi-line test case
The multiline support has been merged while this benchmark was written. We now
get the output that we want, with line breaks.
2022-01-11 09:57:03 +01:00
Patrick Ohly
25c646cbdd json: never call fsync for stdout or stderr
We don't need to worry about data loss once the data has been written to an
output stream. Calling fsync unnecessarily has been the reason for performance
issues in the past.
2022-01-11 09:56:22 +01:00
Patrick Ohly
9a867c555c logs: benchmark write performance
The recent regression https://github.com/kubernetes/kubernetes/issues/107033
shows that we need a way to automatically measure different logging
configurations (structured text, JSON with and without split streams) under
realistic conditions (time stamping, caller identification).

System calls may affect the performance and thus writing into actual files is
useful. A temp dir under /tmp (usually a tmpfs) is used, so the actual IO
bandwidth shouldn't affect the outcome. The "normal" json.Factory code is used
to construct the JSON logger when we have actual files that can be set as
os.Stderr and os.Stdout, thus making this as realistic as possible.

When discarding the output instead of writing it, the focus is more on the rest
of the pipeline and changes there can be investigated more reliably.

The benchmarks automatically gather "log entries per second" and "bytes per
second", which is useful to know when considering requirements like the ones
from https://github.com/kubernetes/kubernetes/issues/107029.
2022-01-11 09:56:22 +01:00
Patrick Ohly
b8501fc10b logs: work around logcheck
logcheck complains:
Additional arguments to ErrorS should always be Key Value pairs. Please check if there is any key or value missing.

That check is intentional, but not applicable here. The check can be worked
around by calling the functions through variables.
2022-01-11 09:56:22 +01:00
Patrick Ohly
072859c967 logs: create separate test/integration directory
The benchmark depends on k8s.io/api (for v1.Container). Such a dependency is
not desirable for k8s.io/component-base/logs, even if it's just for
testing. The solution is to create a separate directory where such a dependency
isn't a problem.

The alternative, a separate package with its own go.mod file under
k8s.io/component-base/logs wouldd have been more complicated to maintain (yet
another go.mod file and different whitelisted dependencies).
2022-01-11 09:56:22 +01:00
Patrick Ohly
8e2f03d336 logs: add benchmark
The benchmark reads a JSON log file and measures how long it takes to re-encode
it. The focus is on the encoding of message and values, therefore additional
work (time stamping, caller, writing to file) gets avoided.
2022-01-11 09:56:21 +01:00
Patrick Ohly
40b38f09d9 json: more flexible constructor
The encoder configuration can now be chosen by the caller. This will be used by
a benchmark to write messages without caller and time stamp.

While at it, some places where the logger was unnecessarily tested with split
output streams writing into the same actual stream were replaced with writing
as single stream. This is a leftover from a previous incarnation of the split
output stream patch where identical streams were used instead of nil for the
error stream to indicate "single stream".
2022-01-11 09:56:21 +01:00
Kubernetes Prow Robot
a0dfd958d5
Merge pull request #107163 from cyclinder/fix_leak_goroutine
fix goroutine leaks in TestConfigurationChannels
2022-01-10 17:23:16 -08:00
Kubernetes Prow Robot
ca4af7a981
Merge pull request #104716 from sanposhiho/feature/scheduler_perf/unused-template-params
test/integration/scheduler_perf: check for unused template parameters
2022-01-10 16:21:16 -08:00
Kubernetes Prow Robot
3cec1d1a13
Merge pull request #107452 from liggitt/timeout_headers
Fix header mutation race in timeout filter
2022-01-10 14:36:37 -08:00
Kubernetes Prow Robot
5d950ceee4
Merge pull request #104669 from arekkusu/patch-3
Update GKE kubernetes sources download link
2022-01-10 14:36:25 -08:00
Kubernetes Prow Robot
e9e9bd0bf0
Merge pull request #107455 from aojea/invalid.com
use a community owned domain for the invalid registry
2022-01-10 13:34:48 -08:00
Kubernetes Prow Robot
10ded7501a
Merge pull request #107402 from anguslees/proxyzero
Reject proxy requests to 0.0.0.0 as well
2022-01-10 13:34:36 -08:00
Kubernetes Prow Robot
ccccd90bbc
Merge pull request #107389 from jlsong01/refine_comments_quota_monitor
refine comments of quota monitor
2022-01-10 13:34:25 -08:00
Mikhail Mazurskiy
0b8d725f5a
Close HTTP response body on failed GET attempts (#105591)
* Close response body when it's not needed

* Code cleanups
2022-01-10 11:40:26 -08:00
Antonio Ojea
742dd6b9c7 use a community owned domain for the invalid registry 2022-01-10 19:37:46 +01:00
Kubernetes Prow Robot
cc16e7792f
Merge pull request #106029 from astraw99/fix-workqueue-forget
Add GC workqueue `Forget` to stop the rate limiter
2022-01-10 10:07:24 -08:00
Kubernetes Prow Robot
0f84fa1e61
Merge pull request #104927 from zc2638/fix/in-tree-volume-test
fix the problem of using `%w` incorrectly
2022-01-10 10:07:12 -08:00
Jordan Liggitt
5b2a31f375 Fix header mutation race in timeout filter 2022-01-10 12:24:48 -05:00
Kubernetes Prow Robot
d1f559711d
Merge pull request #107441 from humblec/more-pv-source
correct struct fields in VolumeSource and PersistentVolumeSource
2022-01-10 09:07:24 -08:00
Kubernetes Prow Robot
d2fb197653
Merge pull request #99099 from eltociear/patch-3
Fix typo in empty_dir.go
2022-01-10 09:07:13 -08:00
Kubernetes Prow Robot
eb64a3e13a
Merge pull request #107384 from sanposhiho/math-round-in-pod-topology-spread
Use `math.Round` when convert float to int in PodTopologySpread
2022-01-10 07:13:24 -08:00
Kubernetes Prow Robot
20a5b335c5
Merge pull request #105853 from caden2016/master
restore NumPDBViolations info of nodes, when HTTPExtender ProcessPree…
2022-01-10 07:13:12 -08:00
cyclinder
928e686877 fix goroutine leaks in TestConfigurationChannels
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
2022-01-10 19:51:16 +08:00
Kubernetes Prow Robot
ba82add41a
Merge pull request #107420 from 21kyu/fix-typos
fix typos in comment
2022-01-10 00:07:11 -08:00
caden
f84c07e8f4 restore NumPDBViolations info of nodes, when HTTPExtender ProcessPreemption. This info will be used in subsequent filtering steps - pick OneNodeForPreemption.
add unit tests for HTTPExtender.ProcessPreemption - make sure the NumPDBViolations info of node is return as it is.
2022-01-10 13:37:46 +08:00
Humble Chirammal
ba7c4a9411 correct struct fields in VolumeSource and PersistentVolumeSource
The field names in godoc for PersistentVolumeSource and
VolumeSource have been corrected with this commit.

Additional Ref# #105963 (comment)

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-10 10:41:14 +05:30
Kubernetes Prow Robot
559091ba4f
Merge pull request #107339 from andrewsykim/internal-traffic-policy-external-name-validation
Add Service integration tests for internalTrafficPolicy when Type=ExternalName
2022-01-09 02:47:12 -08:00
Kubernetes Prow Robot
13a06cc479
Merge pull request #107427 from NikhilSharmaWe/remLog
removed unnecessary log line
2022-01-09 01:35:11 -08:00
astraw99
a5a54754d5 refactor garbagecollection controllers to make forget impossible to forget 2022-01-09 15:19:10 +08:00
Nikhil Sharma
c58fec6ccf removed unnecessary log line 2022-01-09 11:48:03 +05:30
Kubernetes Prow Robot
d2c9456963
Merge pull request #106287 from Dragoncell/update_cadvisor_version
update cadvisor version in test
2022-01-08 15:50:19 -08:00
wq
4f38d4aaa1 fix a typo in the comment of ImageCredentialProviderConfigFile 2022-01-09 00:07:43 +09:00
wq
3e29321790 fix typos in comment 2022-01-08 23:39:23 +09:00
Kubernetes Prow Robot
9bbc5b15e7
Merge pull request #105870 from cyclinder/kube_scheduler_MarkFlagFilename
kube-scheduler: log possible error
2022-01-07 19:05:04 -08:00
Kubernetes Prow Robot
cd02a3035f
Merge pull request #106021 from ahrtr/replace_ioutil_with_io_os_pkg_api
Replace ioutil with io and os for pkg/api
2022-01-07 18:01:05 -08:00
Jiaming Xu
d6d63b44fa update cadvisor version in test
update NodePrePullImageList

fix conflicts

fix conflicts

remove script

add cadvisor as dependency

address comments
2022-01-07 22:29:12 +00:00
Kubernetes Prow Robot
de83db2a08
Merge pull request #107413 from tnqn/fix-open-port-error
kube-proxy: fix duplicate port opening
2022-01-07 14:27:55 -08:00
Kubernetes Prow Robot
2b32b4b352
Merge pull request #106739 from kebe7jun/feature/add-completion-for-set-context
Add completion for `kubectl config set-context`
2022-01-07 13:02:32 -08:00
Kubernetes Prow Robot
8691d6e1eb
Merge pull request #107330 from wojtek-t/simplify_storage_interface_tests_readability
Slightly improve reliability of storage List tests.
2022-01-07 11:26:33 -08:00
Quan Tian
6ce612ef65 kube-proxy: fix duplicate port opening
When nodePortAddresses is not specified for kube-proxy, it tried to open
the node port for a NodePort service twice, triggered by IPv4ZeroCIDR
and IPv6ZeroCIDR separately. The first attempt would succeed and the
second one would always generate an error log like below:

"listen tcp4 :30522: bind: address already in use"

This patch fixes it by ensuring nodeAddresses of a proxier only contain
the addresses for its IP family.
2022-01-08 02:35:35 +08:00
Kubernetes Prow Robot
7846bbbda0
Merge pull request #107385 from humblec/csipvsource
csi: correct struct fields in CSI{Persistent}VolumeSource.
2022-01-07 10:24:33 -08:00
Kubernetes Prow Robot
aa1be30828
Merge pull request #107152 from mengjiao-liu/remove-feature-gate-ImmutableEphemeralVolumes
Remove feature gate `ImmutableEphemeralVolumes`
2022-01-07 08:58:57 -08:00
Kubernetes Prow Robot
ac318a6518
Merge pull request #106865 from jonyhy96/cleanup-scheduler-flag
[scheduler] cleanup: remove insecure flag
2022-01-07 08:58:45 -08:00
Kubernetes Prow Robot
abdcd21902
Merge pull request #106152 from tklauser/kubectl-version-unnecessary-sprintf
kubectl: remove unnecessary `fmt.Sprintf`
2022-01-07 08:58:33 -08:00
Kubernetes Prow Robot
475644ccd8
Merge pull request #106073 from ping035627/k8s-21110202
Cleanup FindPluginByName() in VolumePluginMgr
2022-01-07 07:52:29 -08:00
Kubernetes Prow Robot
d1a5513cb0
Merge pull request #107006 from gnufied/add-total-mount-time-metrics
Add metric for reporting total end-to-end mount time
2022-01-07 06:19:31 -08:00
Humble Chirammal
e01753a938 csi: correct struct fields in CSI{Persistent}VolumeSource.
The field names in godoc for CSIPersistentVolumeSource and
CSIVolumeSource has been corrected with this commit.

Additional Ref# https://github.com/kubernetes/kubernetes/pull/105963#discussion_r751340196

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-07 19:25:28 +05:30
Kubernetes Prow Robot
9d0d2e8ece
Merge pull request #107171 from ltagliamonte-dd/add_failopen_metrics
add failopen metric
2022-01-07 03:02:29 -08:00
cyclinder
1a16de783b kube-scheduler: log the unhandled error
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
2022-01-07 18:21:11 +08:00