Commit Graph

88 Commits (f34a24e98e7c837b567b78be3af958ac1156cd80)

Author SHA1 Message Date
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue 441f674c60 Merge pull request #50396 from bobbypage/stats
Automatic merge from submit-queue (batch tested with PRs 52168, 48939, 51889, 52051, 50396). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Add Windows Server Containers Stats and Metrics to Kubelet

**What this PR does / why we need it**:

This PR implements stats for Windows Server Containers. This adds the ability to monitor Windows Server containers via the existing stats/summary endpoint inside the kubelet. Windows metrics can now be ingested into heapster and monitored using existing tools (like Grafana). 

Previously, the /stats/summary api would consistently crash the kubelet on Windows server containers. This PR implements a new package "winstats" which reads windows server metrics from a combination of windows specific perf counters as well as docker stats. The "winstats" package exports functions that return CAdvisor data structures, which the existing summary api can read. 


**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49398

This PR addresses my plan to implement windows server container stats https://github.com/kubernetes/kubernetes/issues/49398 .


**Release note**:

```release-note
Add monitoring of Windows Server containers metrics in the kubelet via the stats/summary endpoint.
```
2017-09-23 13:40:56 -07:00
David Porter a854ddb358 Implement metrics for Windows Nodes
This implements stats for windows nodes in a new package, winstats.
WinStats exports methods to get cadvisor like datastructures, however
with windows specific metrics. WinStats only gets node level metrics and
information, container stats will go via the CRI. This enables the
use of the summary api to get metrics for windows nodes.
2017-09-14 06:32:51 +00:00
Yu-Ju Hong 2c415cc506 kubelet: enable CRI container metrics 2017-09-13 15:09:35 -07:00
Derek Carr cf2c688385 Use cAdvisor constant for crio imagefs 2017-09-11 14:08:00 -04:00
Derek Carr 27365eb900 Fix cross-build 2017-09-07 09:53:52 -04:00
Kubernetes Submit Queue b6545a086c Merge pull request #51728 from derekwaynecarr/cadvisor-stats
Automatic merge from submit-queue (batch tested with PRs 51728, 49202)

Enable CRI-O stats from cAdvisor

**What this PR does / why we need it**:
cAdvisor may support multiple container runtimes (docker, rkt, cri-o, systemd, etc.)

As long as the kubelet continues to run cAdvisor, runtimes with native cAdvisor support may not want to run multiple monitoring agents to avoid performance regression in production.  Pending kubelet running a more light-weight monitoring solution, this PR allows remote runtimes to have their stats pulled from cAdvisor when cAdvisor is registered stats provider by introspection of the runtime endpoint.

See issue https://github.com/kubernetes/kubernetes/issues/51798

**Special notes for your reviewer**:
cAdvisor will be bumped to pick up https://github.com/google/cadvisor/pull/1741

At that time, CRI-O will support fetching stats from cAdvisor.

**Release note**:
```release-note
NONE
```
2017-09-06 20:00:57 -07:00
Yang Guo dfea03d920 Implement StatsProvider using CRI stats 2017-09-06 09:11:56 -07:00
Derek Carr 1ec2a69d9a Kubelet changes to support hugepages 2017-09-05 09:46:08 -04: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
NickrenREN 27901ad5df Change eviction policy to manage one single local storage resource 2017-08-26 05:14:49 +08: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
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Jeff Grafton cf55f9ed45 Autogenerate BUILD files 2017-08-11 09:30:23 -07: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
Aleksandra Malinowska c174625116 add InstanceID to fake cadvisor (used in Kubemark) 2017-07-18 12:10:54 +02: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
Kubernetes Submit Queue 467705be00 Merge pull request #47195 from dims/bind-cadvisor-on-kubelet-interface
Automatic merge from submit-queue (batch tested with PRs 47922, 47195, 47241, 47095, 47401)

Run cAdvisor on the same interface as kubelet

**What this PR does / why we need it**:

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.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Fixes #11710

**Special notes for your reviewer**:

**Release note**:

```release-note
cAdvisor binds only to the interface that kubelet is running on instead of all interfaces.
```
2017-06-22 21:33:27 -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
Cheng Xing de3bf36b61 Fixing node statuses related to local storage capacity isolation.
- Wrapping all node statuses from local storage capacity isolation under an alpha feature check. Currently there should not be any storage statuses.
- Replaced all "storage" statuses with "storage.kubernetes.io/scratch". "storage" should never be exposed as a status.
2017-06-20 17:34:59 -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
Jing Xu 943fc53bf7 Add predicates check for local storage request
This PR adds the check for local storage request when admitting pods. If
the local storage request exceeds the available resource, pod will be
rejected.
2017-06-01 15:57:50 -07:00
Jing Xu dd67e96c01 Add local storage (scratch space) allocatable support
This PR adds the support for allocatable local storage (scratch space).
This feature is only for root file system which is shared by kubernetes
componenets, users' containers and/or images. User could use
--kube-reserved flag to reserve the storage for kube system components.
If the allocatable storage for user's pods is used up, some pods will be
evicted to free the storage resource.
2017-06-01 15:57:50 -07:00
Manjunath A Kumatagi f8063879a0 Use Docker API Version instead of docker version 2017-04-27 10:05:22 -04:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Kubernetes Submit Queue 3fa44312ad Merge pull request #38631 from ncdc/fix-kubelet-cadvisor-build-tags
Automatic merge from submit-queue

Fix cadvisor_unsupported.go build tags

Make it so cadvisor_unsupported.go is used for linux without cgo or
non-linux/windows OSes.
2017-01-12 21:32:39 -08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Andy Goldstein 92a429887a Fix cadvisor_unsupported.go build tags
Make it so cadvisor_unsupported.go is used for linux without cgo or
non-linux/windows OSes.
2017-01-03 13:06:10 -05:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu 5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Paulo Pires 9e6815e7c7
Fixed kubelet build. 2016-11-01 16:34:47 -04:00
Cesar Wong 09285864db
Initial windows container runtime 2016-10-31 14:20:49 -04:00
Lucas Käldström 00fda67931 Fix cadvisor_unsupported and the crossbuild 2016-10-28 22:57:16 +03: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
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -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
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00