Commit Graph

23 Commits

Author SHA1 Message Date
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Kubernetes Prow Robot
bebb932bdf
Merge pull request #99479 from mengjiao-liu/migrate_to_structured_logs
Migrate `pkg/kubelet/lifecycle,oom` to structured logging
2021-03-11 17:28:33 -08:00
mengjiao.liu
e557f61784 Migrate pkg/kubelet/lifecycle,oom to structured logging
Co-authored-by: Elana Hashman <ehashman@users.noreply.github.com>
2021-03-11 13:36:48 +08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Jordan Liggitt
f33dc28094 generated: hack/update-hack-tools.sh && hack/update-vendor.sh 2020-07-25 16:45:02 -04:00
Kubernetes Prow Robot
677e8d6871
Merge pull request #86223 from dashpole/owners_changes
Add dashpole as kubelet approver
2020-06-18 22:59:58 -07:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Benjamin Elder
c6c68a73e1 remove oom TestStartingWatcher ""unit"" test 2020-05-08 23:25:28 -07:00
David Ashpole
fc6b4719fd Use the container whose limit is hit for system OOMs 2020-03-06 11:06:16 -08:00
mattjmcnaughton
9077603b97
Add richer unit tests for OomWatcher
Add unit tests for OomWatcher that actually test the logic defined in
the `Start` method. As a result of an earlier refactor, its now trivial
to mock the OOMInstance events which the `oom_watcher` is supposed to be
watching.
2020-01-14 07:57:06 -05:00
Kubernetes Prow Robot
befc371364
Merge pull request #86702 from mattjmcnaughton/mattjmcnaughton/refactor-oom-watcher-to-allow-greater-test-coverage
Refactor oom watcher to allow greater test coverage
2020-01-10 15:43:37 -08:00
mattjmcnaughton
8897c435ad
Refactor oom watcher to allow greater test coverage
This diff contains a strict refactor; there are no behavioral changes.

Address a long standing TODO in `oom_watcher_linux_test.go` around test
coverage. We refactor our `oom.Watcher` so it takes in a struct
fulfulling the `streamer` interface (i.e. defines `StreamOoms` method).
In production, we will continue to use the `oomparser` from `cadvisor`.
However, for testing purposes, we can now create our own `fakeStreamer`,
and control how it streams `oomparser.OomInstance`. With this fake, we
can implement richer unit testing for the `oom.Watcher` itself.

Actually adding the additional unit tests will come in a later commit.
2020-01-07 21:48:14 -05:00
mattjmcnaughton
92940fa80d
Remove recorder.PastEventf method
The `recorder.PastEventf` method wasn't actually working as advertised.
It was supposed to accept a timestamp, which would be used when
generating the event. However, as the
[source code](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/tools/record/event.go#L316)
shows, this `timestamp` was never actually used.

In other words, `PastEventf` is identical to `Eventf`.

We have two options: one would be to fix `PastEventf` so that it works
as advertised. The other would be to delete `PastEventf` and only
support `Eventf`.

Ultimately, I could only find one use of `PastEventf` in the code base,
so I propose we just delete `PastEventf` and convert all uses to
`Eventf`.
2019-12-30 12:00:23 -05:00
David Ashpole
fca84c02bb add dashpole as kubelet approver 2019-12-12 11:10:24 -08:00
Jordan Liggitt
297570e06a hack/update-vendor.sh 2019-11-06 17:42:34 -05:00
Kubernetes Prow Robot
c6a506bb8c
Merge pull request #78174 from gaorong/oom-event
enrich kubelet system oom event message info
2019-08-28 12:01:13 -07:00
David Ashpole
a95cf017e1 add dashpole to kubelet owners files 2019-05-29 13:33:48 -07:00
Rong Gao
2d5020e3b6 enrich oom event message info 2019-05-21 21:24:59 +08:00
obitech
9e35d3d709 Fix golint issues in pkg/kubelet/oom 2019-04-27 10:00:07 +02:00
WanLinghao
611563c913 golint fix 2019-03-06 19:47:54 +08:00
WanLinghao
c16d9193c1 bazel fix 2019-03-05 17:22:35 +08:00
WanLinghao
b2ce446a88 Migrate oom watcher not relying on cAdviosr any more, it is part of plan
of removing cAdvisor from k8s.
For more informations about this plan, please refer:
https://github.com/kubernetes/kubernetes/issues/68522
2019-03-05 17:06:34 +08:00