Commit Graph

210 Commits

Author SHA1 Message Date
Sergey Kanzhelev
e360de48b2 GRPCContainerProbe is GA 2023-03-02 22:07:59 +00:00
Chen Wang
7db339dba2 This commit contains the following:
1. Scheduler bug-fix + scheduler-focussed E2E tests
2. Add cgroup v2 support for in-place pod resize
3. Enable full E2E pod resize test for containerd>=1.6.9 and EventedPLEG related changes.

Co-Authored-By: Vinay Kulkarni <vskibum@gmail.com>
2023-02-24 18:21:21 +00:00
Vinay Kulkarni
f2bd94a0de In-place Pod Vertical Scaling - core implementation
1. Core Kubelet changes to implement In-place Pod Vertical Scaling.
2. E2E tests for In-place Pod Vertical Scaling.
3. Refactor kubelet code and add missing tests (Derek's kubelet review)
4. Add a new hash over container fields without Resources field to allow feature gate toggling without restarting containers not using the feature.
5. Fix corner-case where resize A->B->A gets ignored
6. Add cgroup v2 support to pod resize E2E test.
KEP: /enhancements/keps/sig-node/1287-in-place-update-pod-resources

Co-authored-by: Chen Wang <Chen.Wang1@ibm.com>
2023-02-24 18:21:21 +00:00
Antonio Ojea
3fb4edb257 skip scale test for probes
Change-Id: I215e2cf9211348aadcc0d262da01953d6523794a
2023-01-26 00:02:30 +00:00
Antonio Ojea
dbf178a8d1 add scale test for probes
Change-Id: I1e49943531b569b5e02f82369750a9ca899ae726
2023-01-22 16:57:41 +00:00
arrowfeng
6a57404e28 kubelet: cleanup secretManager and configManager in podManager
Signed-off-by: arrowfeng <289716347@qq.com>
2022-11-14 23:05:32 +08:00
Kubernetes Prow Robot
b3082c5e5b
Merge pull request #113582 from wzshiming/fix/grpc-probe-log
Fix grpc probe log
2022-11-08 12:42:56 -08:00
David Ashpole
64af1adace
Second attempt: Plumb context to Kubelet CRI calls (#113591)
* plumb context from CRI calls through kubelet

* clean up extra timeouts

* try fixing incorrectly cancelled context
2022-11-05 06:02:13 -07:00
Shiming Zhang
101bfb5522 Fix grpc probe log 2022-11-03 18:05:39 +08:00
Antonio Ojea
9c2b333925 Revert "plumb context from CRI calls through kubelet"
This reverts commit f43b4f1b95.
2022-11-02 13:37:23 +00:00
David Ashpole
f43b4f1b95
plumb context from CRI calls through kubelet 2022-10-28 02:55:28 +00:00
Artur Żyliński
9f31669a53 New histogram: Pod start SLI duration 2022-10-26 11:28:17 +02:00
Jason Simmons
5a6acf85fa Align lifecycle handlers and probes
Align the behavior of HTTP-based lifecycle handlers and HTTP-based
probers, converging on the probers implementation. This fixes multiple
deficiencies in the current implementation of lifecycle handlers
surrounding what functionality is available.

The functionality is gated by the features.ConsistentHTTPGetHandlers feature gate.
2022-10-19 09:51:52 -07: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
Ryan Phillips
230124f3d4 kubelet: add e2e test to verify probe readiness 2022-06-06 17:00:55 -05:00
Ryan Phillips
f25ca15e1c kubelet: only shutdown probes for pods that are terminated
This fixes a bug where terminating pods would not run their readiness
probes. Terminating pods are found within the possiblyRunningPods map.
2022-06-06 17:00:54 -05:00
Clayton Coleman
1d518adb76 kubelet: Pod probes should be handled by pod worker
The pod worker is the owner of when a container is running or not,
and the start and stop of the probes for a given pod should be
handled during the pod sync loop. This ensures that probes do not
continue running even after eviction.

Because the pod semantics allow lifecycle probes to shorten grace
period, the probe is removed after the containers in a pod are
terminated successfully. As an optimization, if the pod will have
a very short grace period (0 or 1 seconds) we stop the probes
immediately to reduce resource usage during eviction slightly.

After this change, the probe manager is only called by the pod
worker or by the reconcile loop.
2022-06-06 17:00:54 -05:00
Kubernetes Prow Robot
737f706b1c
Merge pull request #108803 from SergeyKanzhelev/httpProbeMinorCleanup
remove TODOs from http package and prober
2022-06-01 12:03:28 -07:00
Kubernetes Prow Robot
be9ef536cd
Merge pull request #105995 from NoicFank/feature-add-error-handle
Add error handling for Write() function
2022-05-03 17:18:07 -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
Dingzhu Lurong
1de2f3cc7d add writer error handler 2022-01-11 11:47:25 +08:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Sergey Kanzhelev
a11453efbc remove ReallyCrashForTesting and cleaned up some references to HandleCrash behavior 2021-11-29 20:00:10 +00:00
Sergey Kanzhelev
b7affcced1 implement :grpc probe action 2021-11-17 17:31:23 +00:00
yxxhero
4211826c3c add more msg when exec probe timeout
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-11-06 15:59:22 +08:00
Tim Hockin
11a25bfeb6
De-share the Handler struct in core API (#105979)
* De-share the Handler struct in core API

An upcoming PR adds a handler that only applies on one of these paths.
Having fields that don't work seems bad.

This never should have been shared.  Lifecycle hooks are like a "write"
while probes are more like a "read". HTTPGet and TCPSocket don't really
make sense as lifecycle hooks (but I can't take that back). When we add
gRPC, it is EXPLICITLY a health check (defined by gRPC) not an arbitrary
RPC - so a probe makes sense but a hook does not.

In the future I can also see adding lifecycle hooks that don't make
sense as probes.  E.g. 'sleep' is a common lifecycle request. The only
option is `exec`, which requires having a sleep binary in your image.

* Run update scripts
2021-10-29 13:15:11 -07:00
wojtekt
53ce79a18a Migrate to k8s.io/utils/clock in pkg/kubelet 2021-09-10 12:20:09 +02:00
Matthias Bertschy
3916c00955 fix manual trigger of readinessProbe on startupProbe success 2021-05-05 11:21:40 +02:00
Shiming Zhang
6defb3657f Fix startupProbe behaviour changed
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2021-04-16 10:11:52 +08:00
Shiming Zhang
44e9f6175d Fix test
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2021-04-14 17:02:27 +08:00
Elana Hashman
6af7eb6d49
Migrate missed log entries in kubelet
Co-Authored-By: pacoxu <paco.xu@daocloud.io>
2021-03-18 14:26:26 -07: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
Kubernetes Prow Robot
11e9c32e4b
Merge pull request #97093 from aldudko/migrate-kubelet-logs
Migrate prober.probe logs to structured logging
2021-03-09 04:26:59 -08:00
Kubernetes Prow Robot
b48e7f1e7b
Merge pull request #99859 from krzysiekg/replace_klog_in_pkg_kubelet_tests
Replace klog with with testing.T logging in pkg/kubelet tests
2021-03-08 19:24:02 -08:00
Krzysztof Gibuła
e46b280f96 Replace klog with with testing.T logging in pkg/kubelet tests 2021-03-07 23:10:02 +01:00
Krzysztof Gibuła
86b0efcd77 Migrate pkg/kubelet/prober to structured logging 2021-03-05 16:10:09 +01:00
Matthias Bertschy
431e6a7044 Move readinessManager updates handling to kubelet 2021-03-05 07:02:25 +01:00
Matthias Bertschy
eed218a3a2 Move startupManager updates handling to kubelet 2021-03-05 07:02:25 +01:00
Matthias Bertschy
4870e64ac1 Improve update time of readiness state 2021-03-05 07:02:24 +01:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Matthias Bertschy
e2edd4a055 Stop probing a pod during graceful shutdown 2021-02-03 19:23:21 +01:00
Alex Dudko
088030a4d1 Migrate prober.probe logs to structured logging 2020-12-15 18:12:20 -08:00
Matthias Bertschy
ea14585500 Remove StartupProbe featuregate and related logic 2020-08-22 15:09:52 +02:00
Kubernetes Prow Robot
1e3eeba9fa
Merge pull request #91577 from knabben/kubelet-bootstrap
kubelet: remove the --bootstrap-checkpoint-path feature
2020-07-09 00:03:41 -07:00
Kubernetes Prow Robot
4ee555252c
Merge pull request #83710 from edwardstudy/ed/typo
Fix comment typos in pkg/kubelet/prober
2020-07-09 00:02:58 -07:00
Kubernetes Prow Robot
b0e974e1aa
Merge pull request #92239 from matthyx/more-tests
Add tests covering startup probe without readiness
2020-06-24 10:32:13 -07:00
Sergey Kanzhelev
ee53488f19 fix golint issues in pkg/kubelet/container 2020-06-19 15:48:08 +00:00
Matthias Bertschy
681202abd0 Add tests covering startup probe without readiness 2020-06-18 22:13:20 +02:00
Tim Hockin
64d4254217 Pods which have not "started" can not be "ready"
Before this commit, containers which have both a `startupProbe` and a
`readinessProbe` are marked as `ready=false` during stratup, but
containers which have only a `startupProbe` are marked `ready=true`.
This doesn't make sense.

This commit only considers readiness if the container is considered to
have "started", which leaves `ready=false` while starting up.
2020-06-16 21:34:51 -07:00