Commit Graph

42 Commits

Author SHA1 Message Date
David Ashpole
f43b4f1b95
plumb context from CRI calls through kubelet 2022-10-28 02:55:28 +00:00
vikram Jadhav
0de4397490 mockery to mockgen conversion 2021-09-25 16:15:08 +00:00
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
Marek Siarkowicz
7d309e0104 Move Kubelet Summary API to staging repo 2020-09-22 18:23:28 +02:00
Yu-Ju Hong
191666d6a3 Fix computing of cpu nano core usage
CRI runtimes do not supply cpu nano core usage as it is not part of CRI
stats. However, there are upstream components that still rely on such
stats to function. The previous fix was faulty because the multiple
callers could compete and update the stats, causing
inconsistent/incoherent metrics. This change, instead, creates a
separate call for updating the usage, and rely on eviction manager,
which runs periodically, to trigger the updates. The caveat is that if
eviction manager is completley turned off, no one would compute the
usage.
2019-03-05 09:25:40 -08:00
David Ashpole
54e581930c fix node and kubelet start times 2018-12-05 15:07:52 -08:00
Krzysztof Jastrzebski
3b21995c95 Process only CPU and memory stats when Kubelete stats API is called with
only_cpu_and_memory parameter. Before all stats were processed and
removed before returning.
2018-09-20 12:35:56 +02:00
Krzysztof Jastrzebski
138a3c7172 Add "only_cpu_and_memory" GET parameter to /stats/summary http handler in kubelet. If parameter is true then only cpu and memory will be present in response. The parameter will be used by Metric Server to avoid sending/decoding unneeded data. 2018-09-06 21:49:00 +02:00
Pengfei Ni
4272c0fde6 Add unit tests for windows stats 2018-07-20 13:01:23 +08:00
David Ashpole
960856f4e8 collect metrics on the /kubepods cgroup on-demand 2018-02-17 12:32:40 -08:00
Da K. Ma
9a78753144 Updated PID pressure node condition.
Signed-off-by: Da K. Ma <madaxa@cn.ibm.com>
2018-01-14 18:26:00 +08:00
David Ashpole
f6721480f4 enable on-demand metrics for eviction 2018-01-08 10:20:02 -08:00
Rohit Agarwal
9c38abd482 Expose accelerator metrics in the summary API. 2017-11-10 14:59:43 -08:00
Rohit Agarwal
238b4a0d8e Fix TestSummaryProvider.
assert.Contains() checks if its second argument (which is supposed to be
a single element) is contained in its first argument (which is supposed
to be a slice/map etc.) The third and following arguments are supposed
to be message and args for the output in case of failure.

Because of this bad form, a failure was hidden, the system container is
named "misc", not "system".
2017-11-10 14:54:44 -08:00
Yang Guo
f9767d2f71 Change StatsProvider interface to provide container stats from either cadvisor or CRI and implement this interface using cadvisor 2017-08-25 13:11:26 -07:00
Yang Guo
af76564e92 Remove the status of the terminated containers in the summary endpoint 2017-08-14 11:32:07 -07:00
Tim St. Clair
e9795e3742
Cleanup lint errors in the pkg/kubelet/server/... directory 2017-06-29 15:58:07 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Michael Taufen
cbad320205 Reorganize kubelet tree so apis can be independently versioned 2017-05-12 10:02:33 -07:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Chao Xu
5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Tim St. Clair
bd80da5822
Don't report FS stats for system containers 2016-10-17 16:57:17 -07:00
derekwaynecarr
2563696719 Add total inodes to kubelet summary api 2016-08-08 12:20:14 -04:00
bindata-mockuser
e00a35ccad updated cadvisor version 2016-08-02 16:33:03 -07:00
Ron Lai
2c71ce305a Include inode info in container summary 2016-07-11 15:53:55 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
xiangpengzhao
3caebba6d8 Add assert.NotNil for test case 2016-05-24 10:04:36 -04:00
Vishnu kannan
e566948a75 Track image storage usage for docker containers
add image fs info to summary stats API.
Adding node e2e test for image stats.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-04-25 16:00:34 -07:00
k8s-merge-robot
75b49f591a Merge pull request #23948 from derekwaynecarr/memory_available
Automatic merge from submit-queue

Add memory available to summary stats provider

To support out of resource killing when low on memory, we want to let operators specify eviction thresholds based on available memory instead of memory usage for ease of use when working with heterogeneous nodes.  

So for example, a valid eviction threshold would be the following: 
* If node.memory.available < 200Mi for 30s, then evict pod(s)

For the node, `memory.availableBytes` is always known since the `memory.limit_in_bytes` is always known for root cgroup.  For individual containers in pods, we only populate the `availableBytes` if the container was launched with a memory limit specified.  When no memory limit is specified, the cgroupfs sets a value of 1 << 63 in the `memory.limit_in_bytes` so we look for a similar max value to handle unbounded limits, and ignore setting `memory.availableBytes`.

FYI @vishh @timstclair - as discussed on Slack.

/cc @kubernetes/sig-node @kubernetes/rh-cluster-infra
2016-04-17 06:32:36 -07:00
Yu-Ju Hong
388b4ff569 kubele: add RSS memroy to the summary API 2016-04-08 11:05:20 -07:00
derekwaynecarr
a9e362d70c Add memory available to summary stats provider 2016-04-08 12:30:41 -04:00
Tim St. Clair
3b9feb561c Use the default interface for reporting network stats. 2016-03-01 16:17:04 -08:00
Tim St. Clair
225f903ccf Move stats summary types to a new kubelet/api package to avoid unnecessary dependencies 2016-02-17 10:53:25 -08:00
k8s-merge-robot
4a24406579 Merge pull request #20990 from timstclair/summary-api
Auto commit by PR queue bot
2016-02-12 13:25:25 -08:00
Vishnu kannan
575812787d Replace --resource-container and --system-container with
`--kubelet-cgroups` and `--system-cgroups` respectively.
Updated `--runtime-container` to `--runtime-cgroups`.
Cleaned up most of the kubelet code that consumes these flags to match
the flag name changes.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-10 17:33:28 -08:00
Vishnu kannan
38efc837b9 Make container runtime's cgroup configurable.
Use the real cgroups for metrics generation.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-10 16:02:34 -08:00
Tim St. Clair
7a54f94cf4 Make summary timestamps more granular 2016-02-10 15:41:57 -08:00
Phillip Wittrock
3de94cd23c Supply volume fs metrics to server/stats/handler.go
* Metrics will not be expose until they are hooked up to a handler
* Metrics are not cached and expose a dos vector, this must be fixed before release or the stats should not be exposed through an api endpoint
2016-02-05 16:00:24 -08:00
Phillip Wittrock
ba5be34574 Kubelet Metrics Summary Api Implementation 2016-02-04 14:05:28 -08:00