Commit Graph

68 Commits (7ffa2faeacb213d25c86ab91a2ce5b67f30b9c33)

Author SHA1 Message Date
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
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
Tim St. Clair 7b6d843309 Move test-only files to test-only packages 2016-03-01 09:11:32 -08:00
Wojciech Tyczynski 4a7af87984 Set requests in scalability tests 2016-03-01 12:15:23 +01: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
Jimmi Dyson 1c289943f5 Ensure kubelet pid is not moved to system container 2016-01-29 09:30:20 +00: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
Vishnu kannan b1770537ab Make cadvisor startup synchronous with container runtime initialization.
This is hopefully a temporary workaround.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2015-11-11 15:20:13 -08:00
Vishnu kannan 4ad3d6f5fe Move container manager into a separate package.
Inject container manager into Kubelet. This lets us stub out container
manager during integration testing.
2015-11-11 15:00:37 -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