Commit Graph

74 Commits

Author SHA1 Message Date
TommyStarK
1fcc8fbf59 kubelet: Replace deprecated pointer function
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-01-08 13:44:09 +01:00
jinxu
0064010cdd Promote Local storage capacity isolation feature to GA
This change is to promote local storage capacity isolation feature to GA

At the same time, to allow rootless system disable this feature due to
unable to get root fs, this change introduced a new kubelet config
"localStorageCapacityIsolation". By default it is set to true. For
rootless systems, they can set this configuration to false to disable
the feature. Once it is set, user cannot set ephemeral-storage
request/limit because capacity and allocatable will not be set.

Change-Id: I48a52e737c6a09e9131454db6ad31247b56c000a
2022-08-02 23:45:48 -07:00
Jorik Jonker
27b8f13763 kubelet: expose OOM metrics
cAdvisor has code to expose OOM metrics since 0.40.0, but this was not
included in Kubelet so far. This commit enables it.

Signed-off-by: Jorik Jonker <jorik.jonker@eu.equinix.com>
2022-02-08 12:24:25 +01:00
David Porter
b6269ce5de kubelet: update cAdvisor usage for v0.43
* Change cAdvisor manager constructor
* Change call to adding AcceleratorUsageMetrics

Signed-off-by: David Porter <david@porter.me>
2021-11-09 17:09:12 -08: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
Sergey Kanzhelev
e8ae653c1d disable collecting of accelerator metrics and exposing it for containerd 2021-04-30 22:16:34 +00:00
Davanum Srinivas
ba56884d91
Ensure providerless kubelet does not pull cloud providers
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-03-21 21:36:38 -04:00
afrouz
8f2e927b4a Migrate cmd/kubelet, image, cadvisor and cri to structured logging 2021-03-09 23:12:10 +03:30
Giuseppe Scrivano
5d6dc8d19c
cadvisor: add Disk metrics with LocalStorageCapacityIsolation
needed for cadvisor commit e3affc1b79faa2901d7210948e92a5416166eb28

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-06-24 18:39:52 +02: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
Davanum Srinivas
9006b2db69
Fix for API change in cadvisor
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:53:03 -04:00
mattjmcnaughton
49fc82f7ab
Ensure we only run the cadvisor/docker init in !dockerless
We do not want to run the `cadvisor/docker` init when we are using the
dockerless build tags. We can ensure this by isolating into a separate
file with the proper build tag constraints.
2020-05-07 17:18:51 -04:00
David Ashpole
b4ed7273da add comment explaining when to remove the --enable-cadvisor-json-endpoints 2020-03-23 12:52:00 -07:00
zouyee
cc35d588a7 Enable cAdvisor ProcessMetrics collecting
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-25 12:19:38 +08:00
Carlos de Paula
8cd98fbd60 Bump gonvml module and remove CGO dependency.
Signed-off-by: Carlos de Paula <me@carlosedp.com>
2019-09-04 15:27:57 -03:00
Aldo Culquicondor
a626a2972e Fix/Add comments on cadvisor implementations
Fix lint issues.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-07-29 09:31:35 -04:00
David Ashpole
f8dff6bd5b only collect metrics for cgroups required by the summary API 2019-05-10 12:12:41 -07:00
Tim Allclair
c12b053390 Reregister cAdvisor cloud info providers in Kubelet 2019-04-22 15:43:45 -07:00
Davanum Srinivas
1707144b0d
Adjust our use of cadvisor to pull in just runtimes we need
- We drop mesos and rkt support in cadvisor

Change-Id: Id4dcafdecc97802b2def95a572e67842e7507f7b
2019-04-11 14:59:48 -04:00
WanLinghao
ce7003262f Improve pkg/kubelet/cadvisor package:
1. Perfect unit test code
2. Clean unused function&&test file
2019-01-14 09:39:22 +08:00
WanLinghao
08a4ee006e Update a comment in cadvisor boot function 2018-12-04 11:29:58 +08:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
David Ashpole
788196e45b update cadvisor to v0.31.0 2018-09-10 10:31:56 -07:00
Davanum Srinivas
5feab86329
Remove --cadvisor-port - has been deprecated since v1.10
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2018-07-02 08:54:14 -04:00
David Ashpole
4afcccd225 disable process scheduler metrics 2018-06-05 17:12:56 -07:00
David Ashpole
65394fe18c update cadvisor godeps and ignore per-cpu metrics 2018-02-22 09:17:02 -08:00
Lantao Liu
68dadcfd15 Make eviction manager work with CRI container runtime.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-30 17:57:46 +00:00
David Ashpole
220edbc6e3 disable container disk metrics when using the CRI stats integration 2017-11-14 11:43:08 -08:00
Derek Carr
566f411b08 Support remote runtimes with native cAdvisor support 2017-08-31 16:41:53 -04:00
Bryan Boreham
c193bbc7c2 Make Prometheus cAdvisor metrics labels consistent
Prometheus requires that all metrics in the same family have the same
labels, so we arrange to supply blank strings for missing labels

See https://github.com/google/cadvisor/issues/1704
2017-08-28 19:53:18 +00:00
Davanum Srinivas
ca2d5178aa Create the directory for cadvisor if needed
In 6c7245d464, code was added to
bail out if the directory that cadvisor monitored did not exist.

However, this breaks the earlier assumption that kubelet created
directories when needed in pkg/kubelet/kubelet.go's setupDataDirs()
method. setupDataDirs() happens much later, so basically kubelet
exits now.

So since cadvisor really needs this directory, let us just create
it

Fixes #50709
2017-08-19 20:42:50 -04:00
Kubernetes Submit Queue
e0089bcf8f Merge pull request #49885 from dashpole/ignore_udp
Automatic merge from submit-queue (batch tested with PRs 49885, 49751, 49441, 49952, 49945)

Ignore UDP metrics in kubelet

Updating cadvisor godeps to 0.26.0 for the 1.7 release (#46658) added udp metrics.  However, they were not disabled in the kubelet.
This PR disables collection of UDP metrics in the kubelet.
This should be cherrypicked to the 1.7 branch.

cc @dchen1107
2017-08-07 12:56:05 -07:00
David Ashpole
376b5f8079 ignore udp metrics in k8s 2017-07-31 10:40:13 -07:00
Di Xu
6c7245d464 validate cadvisor rootpath 2017-07-26 10:05:29 +08:00
Vishnu kannan
82f7820066 Kubelet:
Centralize Capacity discovery of standard resources in Container manager.
Have storage derive node capacity from container manager.
Move certain cAdvisor interfaces to the cAdvisor package in the process.

This patch fixes a bug in container manager where it was writing to a map without synchronization.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-06-27 18:45:02 -07:00
Davanum Srinivas
7e5c43a042 Run cAdvisor on the same interface as kubelet
cAdvisor currently binds to all interfaces. Currently the only
solution is to use iptables to block access to the port. We
are better off making cAdvisor to bind to the interface that
kubelet uses for better security.

Fixes #11710
2017-06-08 16:43:38 -04:00
Manjunath A Kumatagi
f8063879a0 Use Docker API Version instead of docker version 2017-04-27 10:05:22 -04:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Pengfei Ni
f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
David Ashpole
eb19713486 kubelet calls GetDirFsInfo(root directory) instead of using GetFsInfo(root label). Reverted #33520, and changed e2e test context to use nodefs 2016-10-27 08:04:59 -07:00
Tobias Schmidt
12c248315f Filter internal Kubernetes labels from Prometheus metrics
Kubernetes uses Docker labels as storage for some internal labels. The
majority of these labels are not meaningful metric labels and a few of
them are even harmful as they're not static and cause wrong aggregation
results.

This change provides a custom labels func to only attach meaningful
labels to cAdvisor exported metrics.
2016-08-22 19:44:27 -04:00
bindata-mockuser
e00a35ccad updated cadvisor version 2016-08-02 16:33:03 -07:00
Jimmi Dyson
21231e1e83
Remove duplicate prometheus metrics 2016-07-20 16:00:21 +01:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Alex Robinson
cddf564f3c Merge pull request #24771 from timstclair/event-store
Disable cAdvisor event storage by default
2016-05-27 15:56:13 -07:00
k8s-merge-robot
f1e528eab6 Merge pull request #25933 from timstclair/subcontainers
Automatic merge from submit-queue

Handle cAdvisor partial failures

Kubernetes side of https://github.com/google/cadvisor/issues/1286

Partially fixes https://github.com/kubernetes/kubernetes/issues/25131

(Depends on cAdvisor Godeps bump https://github.com/kubernetes/kubernetes/pull/25914)

/cc @kubernetes/sig-node
2016-05-22 04:50:01 -07:00
Tim St. Clair
b05b419c25 Handle cAdvisor partial failures 2016-05-19 19:29:31 -07:00
Shaya Potter
ae08ef38d7 kubelet/cadvisor: Refactor cadvisor disk stat/usage interfaces 2016-05-19 11:13:47 -07:00
Tim St. Clair
2201554b3f Disable cAdvisor event storage by default 2016-04-25 17:32:16 -07:00
Vishnu kannan
d269775929 Update cadvisor linux module to work with the cadvisor v0.22.2
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-03-15 16:02:05 -07:00