Commit Graph

46 Commits

Author SHA1 Message Date
David Ashpole
f43b4f1b95
plumb context from CRI calls through kubelet 2022-10-28 02:55:28 +00:00
Kubernetes Prow Robot
126c07604d
Merge pull request #104484 from jackfrancis/prober-duration-metrics
add container probe duration metrics
2022-07-29 13:17:11 -07:00
Sergey Kanzhelev
1df526b3f7 remove TODOs from http package and prober 2022-04-28 16:51:11 +00:00
Jack
7655702313 add container probe duration metrics 2022-01-20 16:50:02 -08:00
Shiming Zhang
6defb3657f Fix startupProbe behaviour changed
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2021-04-16 10:11:52 +08:00
Kubernetes Prow Robot
76b29c4cbb
Merge pull request #99830 from krzysiekg/structured_logging_pkg_kubelet_prober
Migrate pkg/kubelet/prober to structured logging
2021-03-16 14:49:13 -07:00
Krzysztof Gibuła
86b0efcd77 Migrate pkg/kubelet/prober to structured logging 2021-03-05 16:10:09 +01:00
Matthias Bertschy
4870e64ac1 Improve update time of readiness state 2021-03-05 07:02:24 +01:00
Matthias Bertschy
e2edd4a055 Stop probing a pod during graceful shutdown 2021-02-03 19:23:21 +01: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
Matthias Bertschy
66595d54a0 Add startupProbe result handling to kuberuntime 2019-11-13 08:12:54 +01:00
RainbowMango
3b89ade154 Remove direct reference to Prometheus 2019-09-29 11:41:28 +08:00
Matthias Bertschy
323f99ea8c startupProbe: Kubelet changes 2019-08-30 00:40:26 +02:00
danielqsj
6d041abba7 remove metrics prober_probe_result 2019-04-04 17:03:11 +08:00
danielqsj
295d672d54 change kubelet probe metrics to counter type 2019-04-03 17:44:17 +08: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
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
Tony Han
b49e07846f reset resultRun to 0 on pod restart 2018-04-19 22:58:19 +08:00
Rohit Ramkumar
c0c5566c25 Expose kubelet health checks using new prometheus endpoint 2018-03-30 11:08:15 -07:00
Kevin
f50761c9d4 fix prober ticking shift for kubelet restarted cases 2017-09-08 17:31:02 +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
Seth Jennings
2c866a7aaa reset resultRun on pod restart 2017-05-24 14:55:53 -05:00
Chao Xu
4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Clayton Coleman
ce62f3d4a0
ExecProbes should be able to do simple env var substitution
For containers that don't have bash, we should support env substitution
like we do on command and args. However, without major refactoring
valueFrom is not supportable from inside the prober. For now, implement
substitution based on hardcoded env and leave TODOs for future work.
2017-02-28 22:46:04 -05:00
tanshanshan
46b1256d34 fix wrong 2017-02-09 12:19:32 +08:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Chao Xu
5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Daniel Smith
78c02cd052 Stop eating panics 2016-07-13 11:12:59 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Clayton Coleman
fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Yu-Ju Hong
1a3d205faf kubelet: stop probing if liveness check fails
This change puts the worker on hold when the liveness check fails. It will
resume probing when observing a new container ID.
2016-02-26 17:12:27 -08:00
Andy Goldstein
51251ef5c1 Skip probe if container ID not yet set
If the container status exists but the container hasn't been created yet, it won't have an ID.
Have the probe wait for a valid status if the container ID is not yet set; otherwise, you'll see the
following cryptic log message from runtime.go: invalid container ID: "".
2016-02-23 15:32:13 -05:00
k8s-merge-robot
c382943353 Merge pull request #20726 from ingvagabund/jitter-sync-loops-in-kubelet
Auto commit by PR queue bot
2016-02-10 09:06:59 -08:00
Jan Chaloupka
392fc6668f Jittering periods of some kubelet's sync loops:
- pod_workers: pod syncing
- prober workers: container syncing

In order to synchronize the current state of Kubernetes's objects (e.g. pods, containers, etc.),
periodic synch loops are run. When there is a lot of objects to synchronize with,
loops increase communication traffic. At some point when all the traffic interfere cpu usage curve
hits the roof causing 100% cpu utilization.

To distribute the traffic in time, some sync loops can jitter their period in each loop
and help to flatten the curve.
2016-02-09 15:22:22 +01:00
Tim St. Clair
da0d37f1e0 Fix panic from multiple probe cleanup calls. 2016-02-08 11:23:07 -08:00
harry
1032067ff9 Replace runtime reference by pkg 2016-02-01 21:06:44 +08:00
Yu-Ju Hong
a4816b3bcb Make kublet/util/format.go a separate package
The formatting function is used often in logging. This improves the readability
by shortening the length of the call. Also change the fomartted string to
include the pod UID.
2015-12-03 12:47:36 -08:00
Clayton Coleman
1d592e4c28 Unversioned types should not use ambiguous go-int
All external types that are not int64 are now marked as int32,
including
IntOrString. Prober is now int32 (43 years should be enough of an initial
probe time for anyone).

Did not change the metadata fields for now.
2015-11-26 11:45:25 -05:00
Tim St. Clair
1e88a682da Add liveness/readiness probe parameters
- PeriodSeconds - How often to probe
- SuccessThreshold - Number of successful probes to go from failure to success state
- FailureThreshold - Number of failing probes to go from success to failure state

This commit includes to changes in behavior:

1. InitialDelaySeconds now defaults to 10 seconds, rather than the
kubelet sync interval (although that also defaults to 10 seconds).
2. Prober only retries on probe error, not failure. To compensate, the
default FailureThreshold is set to the maxRetries, 3.
2015-11-06 10:46:40 -08:00
Tim St. Clair
07e9892003 Cleanup prober.prober 2015-10-21 15:45:34 -07:00
Tim St. Clair
a263c77b65 Refactor liveness probing
This commit builds on previous work and creates an independent
worker for every liveness probe. Liveness probes behave largely the same
as readiness probes, so much of the code is shared by introducing a
probeType paramater to distinguish the type when it matters. The
circular dependency between the runtime and the prober is broken by
exposing a shared liveness ResultsManager, owned by the
kubelet. Finally, an Updates channel is introduced to the ResultsManager
so the kubelet can react to unhealthy containers immediately.
2015-10-19 15:15:59 -07:00
eulerzgy
ea86e66fbe Del capatical local packagename for kubeletUtil 2015-10-15 09:58:10 +08:00
Tim St. Clair
9b8bc50357 Generalize readinessManager to handle liveness 2015-10-07 16:40:30 -07:00
Tim St. Clair
551eff63b8 Use strong type for container ID
Change all references to the container ID in pkg/kubelet/... to the
strong type defined in pkg/kubelet/container: ContainerID

The motivation for this change is to make the format of the ID
unambiguous, specifically whether or not it includes the runtime
prefix (e.g. "docker://").
2015-10-07 10:58:05 -07:00
Tim St. Clair
52ece0c34e Refactor readiness probing
Each container with a readiness has an individual go-routine which
handles periodic probing for that container. The results are cached, and
written to the status.Manager in the pod sync path.
2015-10-02 15:37:10 -07:00