Commit Graph

117 Commits

Author SHA1 Message Date
Dr. Stefan Schimanski
e848eaa566 apiserver: store httplog in context 2019-06-26 18:33:19 +02:00
Kubernetes Prow Robot
6602f61596
Merge pull request #79002 from jiayingz/add-cadvisor-metrics
Enable cadvisor ProcessMetrics collecting.
2019-06-15 08:53:04 -07:00
Jiaying Zhang
edcfdc4cbf Enable cadvisor ProcessMetrics collecting. 2019-06-13 16:21:24 -07:00
Kubernetes Prow Robot
6b6bdc760a
Merge pull request #78504 from dashpole/deprecate_cadvisor_json
Add kubelet flag to disable cadvisor json apis, and mark it deprecrated
2019-06-01 04:44:55 -07:00
David Ashpole
785d40923a add kubelet flag to disable cadvisor json apis, and mark it deprecrated 2019-05-30 10:39:45 -07:00
Han Kang
2d48b3e81e add process start time metric to metric probes since they use counters 2019-05-16 08:19:29 -07:00
Haiyan Meng
4751f40319
Remove the host label from the kubelet http traffic metrics
Signed-off-by: Haiyan Meng <haiyanmeng@google.com>
2019-05-10 13:46:35 -07:00
Kubernetes Prow Robot
b7dc0124a0
Merge pull request #77379 from tedyu/http-stat-map
Use map to check whether stack trace is needed
2019-05-09 14:13:34 -07:00
Ted Yu
85fc089855 Use map to check whether stack trace is needed
Signed-off-by: Ted Yu <yute@vmware.com>
2019-05-08 14:31:50 -07:00
Ted Yu
fe6e50df3d Use map to check for long-running request
Signed-off-by: Ted Yu <yute@vmware.com>
2019-04-30 19:32:35 -07:00
Haiyan Meng
538cd87864
Add metrics to monitor the kubelet http server
Signed-off-by: Haiyan Meng <haiyanmeng@google.com>
2019-04-11 14:16:57 -07:00
Kubernetes Prow Robot
535064773a
Merge pull request #73946 from dashpole/prometheus_core_metrics
Add kubelet resource metrics v1alpha1 endpoint
2019-03-07 22:43:28 -08:00
David Ashpole
6051664c0f add kubelet prometheus resource metrics endpoint 2019-03-07 15:39:37 -08:00
Kubernetes Prow Robot
272d78f1d9
Merge pull request #73966 from alculquicondor/fix/lint-kubelet-server
Fix lint on pkg/kubelet/server/...
2019-02-25 20:27:48 -08:00
Aldo Culquicondor
e61cd68bf3 Fix lint on pkg/kubelet/server/... 2019-02-21 10:31:41 -05:00
Elana Hashman
3539e89af2 Rename labels to match instrumentation guidelines
For the next release, we include both sets of labels for pods and
containers: "container_name" and "container", "pod_name" and "pod".
In future releases, the "*_name" metrics will be deprecated.
2019-01-28 12:36:20 -05:00
Marek Counts
ba81a5409a move logs into component-base
all the code changes to move move /apiserver/pkg/util/logs into /component-base/logs
2019-01-17 09:16:21 -05:00
David Ashpole
630cb53f82 add kubelet grpc server for pod-resources service 2018-11-15 09:43:20 -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
Mike Danese
e5227216c0 rebase authenticators onto new interface. 2018-10-22 10:16:59 -07:00
David Ashpole
788196e45b update cadvisor to v0.31.0 2018-09-10 10:31:56 -07:00
Kubernetes Submit Queue
cffa2aed0e
Merge pull request #64601 from hzxuzhonghu/cm-dynamic-loglevel-set
Automatic merge from submit-queue. 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>.

Other components support set log level dynamically

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

#63777 introduced a way to set glog.logging.verbosity dynamically. 
We should enable this for all other components, which is specially useful in debugging. 


**Release note**:

```release-note
Expose `/debug/flags/v` to allow kubelet dynamically set glog logging level.  If want to change glog level to 3, you only have to send a PUT request like `curl -X PUT http://127.0.0.1:8080/debug/flags/v -d "3"`.
```
2018-08-15 21:32:46 -07:00
xuzhonghu
c867bf9cab kubelet support dynamically set glog log level --v 2018-08-15 17:18:25 +08:00
Yu-Ju Hong
390b158db9 kubelet: plumb context for log requests
This allows kubelets to stop the necessary work when the context has
been canceled (e.g., connection closed), and not leaking a goroutine
and inotify watcher waiting indefinitely.
2018-08-10 17:35:46 -07:00
Jordan Liggitt
b7b4b84afe
Add healthz check to ensure logging is not blocked 2018-07-03 22:27:23 -04:00
Lantao Liu
9677616eaf Address comments in #64006.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-06-01 17:25:56 -07:00
Lantao Liu
174b6d0e2f Proxy container streaming in kubelet. 2018-05-31 15:26:32 -07:00
Lantao Liu
7c17ee25ec Remove unused limit writer.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-05-25 16:55:08 -07:00
Derek Carr
a09990cd43 Apply pod name and namespace labels for pod cgroup for cadvisor metrics 2018-05-07 14:51:12 -04:00
Rohit Ramkumar
c0c5566c25 Expose kubelet health checks using new prometheus endpoint 2018-03-30 11:08:15 -07:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Mike Danese
12125455d8 move authorizers over to new interface 2017-11-03 13:46:28 -07:00
Chen Li
a4a6076924 Improve kubectl error messages
Fixes https://github.com/kubernetes/kubernetes/issues/34457
Part of work on https://github.com/kubernetes/kubernetes/issues/31267
2017-10-30 20:09:43 -05:00
Dr. Stefan Schimanski
7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Kubernetes Submit Queue
cc557e61cc Merge pull request #51473 from bboreham/cadvisor-consistent-labels
Automatic merge from submit-queue (batch tested with PRs 51471, 50561, 50435, 51473, 51436)

Fix inconsistent Prometheus cAdvisor metrics

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

We need this because otherwise kubelet is exposing different sets of Prometheus metrics that randomly include or do not include containers.

See also https://github.com/google/cadvisor/issues/1704; quoting here:

Prometheus requires that all metrics in the same family have the same labels, so we arrange to supply blank strings for missing labels

The function `containerPrometheusLabels()` conditionally adds various metric labels from container labels - pod name, image, etc. However, when it receives the metrics, Prometheus [checks](https://github.com/prometheus/client_golang/blob/master/prometheus/registry.go#L665) that all metrics in the same family have the same label set, and [rejects](https://github.com/prometheus/client_golang/blob/master/prometheus/registry.go#L497) those that do not.

Since containers are collected in (somewhat) random order, depending on which kind is seen first you get one set of metrics or the other.

Changing the container labels function to always add the same set of labels, adding `""` when it doesn't have a real value, eliminates the issue in my testing.

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

Fixes #50151

**Special notes for your reviewer**:

I have made the same fix in two places.  I am 98% sure the one in `cadvisor_linux.go` isn't used and indeed cannot be used, but have not gone fully down that rabbit-hole.

**Release note**:
```release-note
Fix inconsistent Prometheus cAdvisor metrics
```
2017-08-29 02:22:16 -07: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
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
Clayton Coleman
d3be1ac92e
Update generic errors with the new http package codes
All of these errors are now part of the standard HTTP method. Formalize
those into our error types and remove duplication and unclear
separation.
2017-07-28 19:13:11 -04:00
Clayton Coleman
f5f9893824
Restore cAdvisor prometheus metrics to the main port
But under a new path - `/metrics/cadvisor`. This ensures a secure port
still exists for metrics while getting the benefit of separating out
container metrics from the kubelet's metrics.
2017-07-18 08:58:14 -04:00
Lee Verberne
786e993338 Fix typo in ExecCommandParam 2017-07-14 13:54:51 +00:00
Tim St. Clair
e9795e3742
Cleanup lint errors in the pkg/kubelet/server/... directory 2017-06-29 15:58:07 -07:00
Kubernetes Submit Queue
cf15b17319 Merge pull request #47484 from allencloud/fix-nit-in-kubelet-server
Automatic merge from submit-queue (batch tested with PRs 47484, 47904, 48034)

fix nits in kubelet server

Signed-off-by: allencloud <allen.sun@daocloud.io>

**What this PR does / why we need it**:
fix nits in kubelet server

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

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-06-26 22:21:57 -07:00
allencloud
25881fe30e fix nits in kubelet server
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-23 08:21:09 +08: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
Jacob Simpson
4c22e6bc6a Certificate rotation for kubelet server certs.
Replaces the current kubelet server side self signed certs with certs
signed by the Certificate Request Signing API on the API server. Also
renews expiring kubelet server certs as expiration approaches.
2017-05-29 12:28:01 -07:00
Dmitry Shulyak
2612e0c78a Move client/unversioned/remotecommand to client-go
Module remotecommand originally part of kubernetes/pkg/client/unversioned was moved
to client-go/tools, and will be used as authoritative in kubectl, e2e and other places.

Module remotecommand relies on util/exec module which will be copied to client-go/pkg/util
2017-05-15 16:28:56 +03:00
Dmitry Shulyak
f50480c714 Decouple remotecommand client from term/kubelet dependencies
In order to move client/unversioned/remotecommand to client-go as a followup
for this change we have to decouple it from tons of dependencies
2017-04-13 15:56:40 +03:00
Andy Goldstein
b011529d8a Add pprof trace support
Add pprof trace support and --enable-contention-profiling to those
components that don't already have it.
2017-03-07 10:10:42 -05:00
Tim Hockin
98d693e9d2 Merge pull request #39837 from foxyriver/modify-comment
modify-comment
2017-02-21 16:33:47 -06:00