Commit Graph

57 Commits (06bc7e3e0026ea25065f59f4bd305c0b7dbbc145)

Author SHA1 Message Date
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
Phillip Wittrock ba5be34574 Kubelet Metrics Summary Api Implementation 2016-02-04 14:05:28 -08:00
harry 1032067ff9 Replace runtime reference by pkg 2016-02-01 21:06:44 +08:00
Tim St. Clair 1fd72a7871 Change default cAdvisor housekeeping interval to 10s
Change the default interval cAdvisor uses to gather stats to 10
seconds.
2016-01-07 11:29:15 -08:00
Steve Milner 8da2d4002f Fixes remaining imports per #15319 2015-10-20 07:13:13 -04:00
k8s-merge-robot 48ced9de86 Merge pull request #15612 from jimmidyson/cadvisor-kubelet
Auto commit by PR queue bot
2015-10-19 20:10:21 -07:00
eulerzgy 31c09bdcb8 Del capatical local packagename for cadvisorApi 2015-10-16 11:03:50 +08:00
Jimmi Dyson a5421270e5 cadvisor bump 2015-10-15 21:06:45 +01:00
Jimmi Dyson 3a6701c85f Ensure container metrics are registered with prometheus even without
cadvisor http server

Fixes #13200
2015-08-26 13:35:32 +01:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Piotr Szczesniak 7e305c43f0 Set maxHousekeepingInterval to 15 seconds. 2015-07-30 16:44:45 +02:00
Rohit Jnagal 6849b381dc Update cadvisor dependency.
Godep also decided to remove unused appengine dependency.
2015-06-15 19:11:55 +00:00
Dawn Chen 85ca8506bb Wait for docker to start cadvisor. 2015-05-15 13:24:24 -07:00
Rohit Jnagal 2cf0dfb79d Handle out of disk situation on kubelets.
Kubelet will stop accepting new pods if it detects low disk space on root fs or fs holding docker images.
Running pods are not affected. low-diskspace-threshold-mb is used to configure the low diskspace threshold.
2015-05-12 18:23:09 +00:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Vishnu Kannan 2f68cddbd2 Adding events API to cadvisor interface. 2015-04-28 16:13:29 -07:00
Victor Marmol 270d8aec8b Raise cAdvisor stats cache to 2m.
This used to be 60ns which was a bug from when we switched from number
of stats to duration. Seems like the type was silently
converted/ignored.
2015-04-24 14:44:13 -07:00