Commit Graph

46911 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
fbfc887a09
Merge pull request #116556 from pohly/dra-podschedulingcontext
dra: PodScheduling -> PodSchedulingContext
2023-03-14 15:14:34 -07:00
Kubernetes Prow Robot
715e957084
Merge pull request #115374 from pacoxu/add-net.ipv4.ip_local_reserved_ports
add net.ipv4.ip_local_reserved_ports to safe sysctls
2023-03-14 15:14:14 -07:00
Kubernetes Prow Robot
34acfb877a
Merge pull request #116546 from marosset/winstats-10-seconds
Updating perfCounterUpdatePeriod for Windows to 10 seconds
2023-03-14 14:13:11 -07:00
Kubernetes Prow Robot
f2e1a67c05
Merge pull request #116535 from denkensk/fix-match
feat: forbid to set matchLabelKeys when labelSelector isn’t set in topologySpreadConstraints
2023-03-14 14:13:04 -07:00
Kubernetes Prow Robot
27e23bad7d
Merge pull request #116529 from pohly/controllers-with-name
kube-controller-manager: convert to structured logging
2023-03-14 14:12:55 -07:00
Kubernetes Prow Robot
c0ef73222f
Merge pull request #116522 from robscott/topology-1-27-updates
Introducing Topology Mode Annotation, Deprecating Topology Hints Annotation
2023-03-14 14:12:48 -07:00
Kubernetes Prow Robot
28fa3cbbf1
Merge pull request #115847 from moshe010/pod-resource-api-dra-upstream
Extend the PodResources API to include resources allocated by DRA
2023-03-14 14:12:26 -07:00
Kubernetes Prow Robot
89a9c0c8bb
Merge pull request #96120 from LorbusChris/kubelet-journal-logs
KEP 2258: add node log query
2023-03-14 14:12:14 -07:00
Kubernetes Prow Robot
c47d2ae648
Merge pull request #116561 from mattcary/ss-v1beta1-defaulter
StatefulSet v1beta1 defaulter tests
2023-03-14 12:38:34 -07:00
Kubernetes Prow Robot
1d830156c7
Merge pull request #115299 from danwinship/stale-conntrack-handling
clean up kube-proxy stale-conntrack-entry handling, revert broken code
2023-03-14 12:38:26 -07:00
Ziqi Zhao
d1aa73312c
pkg/controller/util support contextual logging (#115049)
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-03-14 12:38:14 -07:00
Patrick Ohly
99151c39b7 kube-controller-manager: convert to structured logging
Most of the individual controllers were already converted earlier. Some log
calls were missed or added and then not updated during a rebase. Some of those
get updated here to fill those gaps.

Adding of the name to the logger used by each controller gets
consolidated in this commit. By using the name under which the
controller is registered we ensure that the names in the log
are consistent.
2023-03-14 19:16:32 +01:00
Kubernetes Prow Robot
25edb4943a
Merge pull request #116465 from sourcelliu/nodeaffinity
Fix PreFilter logic problem in node affinity
2023-03-14 10:40:52 -07:00
Kubernetes Prow Robot
6a111bebe2
Merge pull request #116377 from kinvolk/rata/userns
KEP-127: user namespace support for stateless pods
2023-03-14 10:40:43 -07:00
Kubernetes Prow Robot
49649c89ea
Merge pull request #113584 from yangjunmyfm192085/volume-contextual-logging
volume: use contextual logging
2023-03-14 10:40:16 -07:00
Moshe Levi
67a71c0bd7 kubelet podresources: add unit tests for DyanmicResource and Get method
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:04 +02:00
Moshe Levi
2a568bcfc8 kubelet podresources: extend List to support Dynamic Resources and implement Get API
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:04 +02:00
Moshe Levi
9c57613912 Add ClassName to chekpoint state and in-memory cache
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:04 +02:00
Moshe Levi
71d6e4d53c kubelet metrics: add pod resources get metrics
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:03 +02:00
Moshe Levi
91234c701e kube features: add KubeletPodResourcesDynamicResources and KubeletPodResourcesGet
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:03 +02:00
Francesco Romani
5e03998991 kubelet: podresources: pack parameters in a struct
To enable rate limiting, needed for GA graduation,
we need to pass more parameters to the already crowded
`ListenAndServePodresources` function.

To tidy up a bit, pack the parameters in a helper struct,
with no intended changes in behavior.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-03-14 19:33:01 +02:00
Kubernetes Prow Robot
e660a1702b
Merge pull request #116571 from mengjiao-liu/scheduler-plugins-defaultbinder
Migrate pkg/scheduler/framework/plugins/defaultbinder to contextual logging
2023-03-14 09:39:59 -07:00
Kubernetes Prow Robot
e192a7dbcc
Merge pull request #116330 from SataQiu/clean-kubelet-20230307
Followup 112643: remove residual code associated with DynamicKubeletConfig
2023-03-14 09:39:51 -07:00
Kensei Nakada
b49b34c03a
HPA: expose the metrics "reconciliations_total" and "reconciliation_duration_seconds" from HPA controller (#116010) 2023-03-14 09:39:42 -07:00
Kubernetes Prow Robot
cb5ad1e044
Merge pull request #115576 from silenceshell/fix-fake-os-files-concurrent-map-write
fix concurrent-map-write of FakeOS.Create
2023-03-14 09:39:26 -07:00
Kubernetes Prow Robot
8bf7805e05
Merge pull request #115397 from sourcelliu/boottime
Add test for pkg/kubelet/util
2023-03-14 09:39:18 -07:00
Kubernetes Prow Robot
af97bb9ac5
Merge pull request #115053 from qingwave/remove-unuse-code
Remove unuse code in pkg/kubelet/util
2023-03-14 09:39:10 -07:00
Kubernetes Prow Robot
898143a96a
Merge pull request #114904 from TommyStarK/kubelet/pod_startup_latency_tracker
kubelet: fix recording when pulling image did finish
2023-03-14 09:39:02 -07:00
Kubernetes Prow Robot
aa49f001bc
Merge pull request #114701 from goushicui/vlm
update comment
2023-03-14 09:38:53 -07:00
Kubernetes Prow Robot
b623fcc181
Merge pull request #114634 from TommyStarK/unit-tests/pkg-kubelet-cloudresource
kubelet/cloudresource: Improving test coverage
2023-03-14 09:38:45 -07:00
kunkunhaohao
a772691165
Update pod_container_manager_linux.go (#114598)
* Update pod_container_manager_linux.go

This is a simple optimization to reduce repeated invoking of the GetPodContainerName function.

* Update pod_container_manager_linux.go

将podContainerName, _ := m.GetPodContainerName(pod)更靠近使用podcontainerName变量的位置
2023-03-14 09:38:36 -07:00
Kubernetes Prow Robot
f769c66aa8
Merge pull request #113622 from 249043822/br-context-logging-daemon
daemonset: use contextual logging
2023-03-14 09:38:28 -07:00
Dan Winship
7696bcd10c Remove some now-obviously-unnecessary checks
Now that the endpoint update fields have names that make it clear that
they only contain UDP objects, it's obvious that the "protocol == UDP"
checks in the iptables and ipvs proxiers were no-ops, so remove them.
2023-03-14 12:18:58 -04:00
Dan Winship
c5c0d9f5bd Make deleteEndpointConnection test use syncProxyRules
Rather than calling fp.deleteEndpointConnection() directly, set up the
proxy to have syncProxyRules() call it, so that we are testing it in
the way that it actually gets called.

Squash the IPv4 and IPv6 unit tests together so we don't need to
duplicate all that code. Fix a tiny bug in NewFakeProxier() found
while doing this...
2023-03-14 12:18:58 -04:00
Dan Winship
dea8e34ea7 Improve the naming of the stale-conntrack-entry-tracking fields
The APIs talked about "stale services" and "stale endpoints", but the
thing that is actually "stale" is the conntrack entries, not the
services/endpoints. Fix the names to indicate what they actual keep
track of.

Also, all three fields (2 in the endpoints update object and 1 in the
service update object) are currently UDP-specific, but only the
service one made that clear. Fix that too.
2023-03-14 12:18:58 -04:00
Dan Winship
4381973a44 Revert (most of) "Issue 70020; Flush Conntrack entities for SCTP"
This commit did not actually work; in between when it was first
written and tested, and when it merged, the code in
pkg/proxy/endpoints.go was changed to only add UDP endpoints to the
"stale endpoints"/"stale services" lists, and so checking for "either
UDP or SCTP" rather than just UDP when processing those lists had no
effect.

This reverts most of commit aa8521df66
(but leaves the changes related to
ipvs.IsRsGracefulTerminationNeeded() since that actually did have the
effect it meant to have).
2023-03-14 12:18:58 -04:00
Aravindh Puthiyaparambil
d12696c20f
kubelet: Expose simple journald and Get-WinEvent shims on the logs endpoint
Provide an administrator a streaming view of journal logs on Linux
systems using journalctl, and event logs on Windows systems using the
Get-WinEvent PowerShell cmdlet without them having to implement a client
side reader.

Only available to cluster admins.

The implementation for journald on Linux was originally done by Clayton
Coleman.

Introduce a heuristics approach to query logs

The logs query for node objects will follow a heuristics approach
when asked to query for logs from a service. If asked to get the
logs from a service foobar, it will first check if foobar logs to the
native OS service log provider. If unable to get logs from these, it
will attempt to get logs from /var/foobar, /var/log/foobar.log or
/var/log/foobar/foobar.log in that order.
The logs sub-command can also directly serve a file if the query looks
like a file.

Co-authored-by: Clayton Coleman <ccoleman@redhat.com>
Co-authored-by: Christian Glombek <cglombek@redhat.com>
2023-03-14 08:54:36 -07:00
Alex Wang
199c37acef feat: update matchLabelKeys comment and code auto-generate
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2023-03-14 23:51:50 +08:00
Aravindh Puthiyaparambil
26279a5282
kubelet: Add validation for EnableNodeLogQuery 2023-03-14 08:45:20 -07:00
Aravindh Puthiyaparambil
aadad09410
api: Add EnableNodeLogQuery to KubeletConfiguration
Added EnableNodeLogQuery field to kubelet/apis/config/types.go and
staging/src/k8s.io/kubelet/config/v1beta1/types.go, then executed.
 `hack/update-codegen.sh`.

This new field will default to off and will need to be explicitly
enabled in addition to the NodeLogQuery gate to use the feature.
2023-03-14 08:45:19 -07:00
Aravindh Puthiyaparambil
d52cbd4a5a
feature: Add NodeLogQuery feature gate
Enable the query endpoint only if this gate is enabled in addition to
the EnableNodeLogQuery kubelet config option.
2023-03-14 08:45:18 -07:00
Kubernetes Prow Robot
a9008b502d
Merge pull request #116577 from jsafrane/fix-standalone-mode
Fix volume reconstruction in standalone mode
2023-03-14 08:37:02 -07:00
Kubernetes Prow Robot
204a9a1f17
Merge pull request #116459 from ffromani/podresources-ratelimit-minimal
add podresources DOS prevention using rate limit
2023-03-14 08:36:45 -07:00
Kubernetes Prow Robot
2bd69db8d7
Merge pull request #116351 from vinaykul/restart-free-pod-vertical-scaling-kubelet-fix-followup
Initialize pod resource allocation checkpoint manager to noop
2023-03-14 08:36:37 -07:00
Alex Wang
8a1f9f43e6 feat: validate matchLabelKeys when labelSelector isn't set
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2023-03-14 22:36:41 +08:00
Jan Safranek
c4f8c3f628 Fix volume reconstruction in standalone mode
Kubelet in standalone mode won't have kubeclient, it cannot get node.status
and get devices from it. Such a kubelet cannot mount attachable volumes
anyway.
2023-03-14 12:32:21 +01:00
Kubernetes Prow Robot
c8f001d798
Merge pull request #114504 from vrutkovs/tracing-kubelet-toplevel
kubelet: create top-level traces for pod sync and GC
2023-03-14 03:12:16 -07:00
Patrick Ohly
2b8a4e8097 api: generated files for PodSchedulingContext 2023-03-14 10:18:08 +01:00
Patrick Ohly
fec5233668 api: resource.k8s.io PodScheduling -> PodSchedulingContext
The name "PodScheduling" was unusual because in contrast to most other names,
it was impossible to put an article in front of it. Now PodSchedulingContext is
used instead.
2023-03-14 10:18:08 +01:00
Kubernetes Prow Robot
0e06be57a6
Merge pull request #116299 from pohly/dra-v1alpha2
api: resource.k8s.io v1alpha1 -> v1alpha2
2023-03-14 02:15:08 -07:00