Commit Graph

117 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
2505053b27
Merge pull request #115708 from my-git9/ut-util
[UT] increase ut coverage for probe/util.go
2023-03-10 00:06:40 -08:00
Kubernetes Prow Robot
7da203f60d
Merge pull request #116306 from nilskch/add-unit-tests
add unit tests for probe errors and ExecProbeTimeout
2023-03-09 22:43:55 -08:00
xin.li
406b4d4401 [UT] add increase coverage for probe/util.go
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-03-10 14:14:41 +08:00
Kubernetes Prow Robot
78fe7c0dbc
Merge pull request #114426 from my-git9/ut/request_
[UT] add test for pkg/probe/http/request.go
2023-03-09 21:33:45 -08:00
Kubernetes Prow Robot
8745423a7a
Merge pull request #114397 from my-git9/ut/util
[UT]And test for pkg/probe/util.go
2023-03-09 21:33:30 -08:00
nilskch
0c11171b7e add tests for probe errors and ExecProbeTimeout 2023-03-08 11:59:59 +01:00
Tim Allclair
67f72d0e90 Document risk of HTTP response body in probe failure msg 2023-02-09 16:37:32 -08:00
Ryan Phillips
12b8944702 kubelet: use custom dialer for grpc probes 2023-01-25 13:28:03 -06:00
Antonio Ojea
bfd8f5178e use custom dialer for http probes 2023-01-22 16:57:41 +00:00
Antonio Ojea
d21f98c6f9 use custom dialer for tcp probes
Change-Id: I323b472606eaf3242b665022afe2a79ecf3b8358
2023-01-22 16:57:41 +00:00
Antonio Ojea
1978008c8f add custom dialer optimized for probes
probe util dial set linger to 1s
2023-01-22 16:57:32 +00:00
xin.li
8848f848db [ut] add test for pkg/probe/http/request.go
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-12-30 10:13:54 +08:00
Jordan Liggitt
78cb3862f1
Fix indentation/spacing in comments to render correctly in godoc 2022-12-17 23:27:38 -05:00
xin.li
b766505653 [UT]And test for pkg/probe/util.go
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-12-10 17:04:40 +08: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
3ffdfbe286
Merge pull request #111254 from dims/update-to-golang-1.19-rc2
[golang] Update to 1.19rc2 (from 1.18.3)
2022-07-26 14:25:09 -07:00
Kubernetes Prow Robot
631a5a849a
Merge pull request #109778 from mythi/grpc-go-update
grpc: move to use grpc.WithTransportCredentials()
2022-07-26 12:45:09 -07:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Mikko Ylinen
2c8bfad910 grpc: move to use grpc.WithTransportCredentials()
v1.43.0 marked grpc.WithInsecure() deprecated so this commit moves to use
what is the recommended replacement:

grpc.WithTransportCredentials(insecure.NewCredentials())

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-05-30 21:41:47 +03:00
Sergey Kanzhelev
1df526b3f7 remove TODOs from http package and prober 2022-04-28 16:51:11 +00:00
Kubernetes Prow Robot
a18b0272e6
Merge pull request #103967 from pacoxu/probe-warning
add probe warning message body for terminated redirect
2022-01-06 08:57:01 -08:00
Paco Xu
3c06ef9c0c probe: add test case for redirect terminating cases 2021-12-16 13:04:56 +08:00
Paco Xu
65529fe6e9 add probe warning event body like 'Probe terminated redirects' 2021-12-16 13:04:51 +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
f390d49e24 fix the grpc probes 2021-11-20 00:23:53 +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
刁浩 10284789
d8e91ab727 Fix test order in /pkg/probe/http/http_test.go 2021-06-05 07:27:34 +00:00
Kubernetes Prow Robot
52e42d3ca7
Merge pull request #99702 from wzshiming/fix/http-probe
Fix HTTPProbe initialize header
2021-04-08 15:59:09 -07:00
Shiming Zhang
b152001f45 Fix HTTPProbe initialize header 2021-03-03 19:42:31 +08:00
Elana Hashman
3b6156e08c
Clean up OWNERS for pkg/probe 2021-03-02 16:38:32 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Kubernetes Prow Robot
87ed842fa3
Merge pull request #96127 from fonsecas72/header-accept-encoding
HTTP Probe: Removes Accept-Encoding header from http probe
2020-11-10 19:49:48 -08:00
Hugo Fonseca
ba514718da HTTP Prove: Removes Accept-Encoding header from http probe
The Accept-Encoding header is added by default because compression is enabled by default. By removing it we are reducing the sent payload.
2020-11-09 22:20:56 +00:00
Andrew Sy Kim
4bb30c3b0e kubelet: add feature gate check for exec probe timeouts
This change also involves adding a custom error type for probe timeouts
so that the kubelet exec prober can distinguish between failed probes
that have exited or probes that have timed out.

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-09 13:05:09 -05:00
Hugo Fonseca
0794bf65bc HTTP Probe: Add 'Accept' header by default
When using a HTTP probe, the request will now have a "Accept" header by default with the "*/*" (accept all)
Most tools do add this header (see curl) so it's a reasonable expectation that http probe has it as well
2020-10-30 00:32:49 +00:00
Jordan Liggitt
fdf9cab843 Deflake TestHTTPProbeProxy 2020-09-04 11:22:11 -04:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04: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
SataQiu
68ba2fecc1 fix staticcheck failures of pkg/probe/http 2020-04-10 12:14:25 +08:00
Han Kang
866ea74326 remove pkg/version and some of redundant copies of it
Change-Id: Ia58367c1b1274bfb49c8a4784051463abaf795de
2019-09-16 16:24:35 -07:00
Ryan Phillips
1065add75e fix kubelet status http calls with truncation
PR#76518 introduced a change to limit the the read on various calls with
utilio.ReadAtMost.  By design, ReadAtMost will return an error if there
is a truncation, but the calling code needs to know to handle it.
2019-09-12 19:55:27 -05:00
Davanum Srinivas
5706a13bd6
Exec probes should not be unbounded
In 1f270ef4e2, we added 10KB as the read
limit for http probes. we should do the same for exec probes as well.

Change-Id: If154c5c4e669829ab94839c56260a894a6714f0f
2019-09-11 10:15:35 -04:00
Haiyan Meng
1f270ef4e2
Limit the read length of ioutil.ReadAll in pkg/kubelet and pkg/probe
Signed-off-by: Haiyan Meng <haiyanmeng@google.com>
2019-07-11 13:18:06 -07:00
mattjmcnaughton
46267759bc
Code cleanup for for probe/http
Two small code cleanup changes for `probe/http`.

- Tests name the `followNonLocalRedirects` variable before passing to
`New`, so its clear what the boolean flag in the construct impacts.
- Change import name from `httprobe` to `httpprobe` when used by
`pkg/kubelet/prober/prober.go`. Establishes consistency with other uses
in the repo.
2019-06-15 12:09:00 -04:00
yutachaos
051d5afa19 fix typo in probe.go 2019-06-06 12:20:50 +09:00
Abdullah Gharaibeh
ef2e5bb8ed Addressed reviewers comments. 2019-05-17 10:48:43 -04:00
Abdullah Gharaibeh
71b1565f2e Fixed the unit test and added a failure case. 2019-05-16 18:21:51 -04:00
Abdullah Gharaibeh
792ab9d3d0 Added a unit test to verify that host header is preserved after probe redirect. 2019-05-16 10:37:56 -04:00
Tim Allclair
e6ea4f0538 Don't follow non-local redirects for http probes 2019-03-15 11:04:30 -07:00