Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing probes #1029

Merged
merged 3 commits into from
Apr 25, 2023
Merged

Conversation

skonto
Copy link
Contributor

@skonto skonto commented Apr 13, 2023

Changes

  • Adds missing probes for net-kourier-controller and the gateway,

@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 13, 2023
@skonto skonto requested review from nak3 and ReToCode April 13, 2023 13:48
@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Merging #1029 (a5fa3a1) into main (a6297c1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1029   +/-   ##
=======================================
  Coverage   80.78%   80.78%           
=======================================
  Files          18       18           
  Lines        1343     1343           
=======================================
  Hits         1085     1085           
  Misses        205      205           
  Partials       53       53           
Impacted Files Coverage Δ
pkg/generator/status_vhost.go 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@skonto
Copy link
Contributor Author

skonto commented Apr 13, 2023

/retest

Copy link
Member

@ReToCode ReToCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/hold for @nak3 to review.

I'd assume the same comments apply like in knative-extensions/net-istio#1095 (review)?

@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 14, 2023
@knative-prow
Copy link

knative-prow bot commented Apr 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ReToCode, skonto

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 14, 2023
@@ -54,7 +54,7 @@ func readyRoute() *route.Route {
cluster := envoy.NewWeightedCluster("service_stats", 100, nil)
var wrs []*route.WeightedCluster_ClusterWeight
wrs = append(wrs, cluster)
route := envoy.NewRoute("gateway_ready", nil, "/ready", wrs, 1*time.Second, nil, "")
route := envoy.NewRoute("gateway_ready", nil, "/", wrs, 1*time.Second, nil, "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use /probe, /kprobe, /health or /khealth or something else for both readiness and liveness?
Using the root path should be fine as long as the header matching is used but I am not 100% confident if it is no side effect at all. (e.g. the total number of access to / cannot be counted anymore.)

Copy link
Contributor Author

@skonto skonto Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I had it like that. There is no other path to use for liveness other than ready. Right now this is using the one that envoy provide /ready.

@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 14, 2023
@skonto
Copy link
Contributor Author

skonto commented Apr 14, 2023

@nak3 I update the path. Now both readiness and liveness probes use the /ready path at the admin interface.
I dont think there is anything else to use there (it is the same path to check envoy liveness that you get at the admin ui).

I tried to use a different path like "/health" by doing:

  • add the subpath to the regex in the boostrap.yaml
  • create a new route with:
eroute.Action = &route.Route_Redirect{
  Redirect: &route.RedirectAction{
    PathRewriteSpecifier: &route.RedirectAction_PathRedirect{
      PathRedirect: "/ready",
    },
  },
}

and although K8s allows redirects: https://github.com/kubernetes/kubernetes/blob/master/pkg/probe/http/http.go#L113
I get a warning from that line:

$ k get events -n kourier-system | grep warning
4m46s       Warning   ProbeWarning                   pod/3scale-kourier-gateway-6c9ddb7b68-kgjhd      Liveness probe warning: Probe terminated redirects, Response body:

So although it works due to the warning I decided not to go that path because users may not be aware of what codes K8s allows for probes.

I have also fixed the settings for the readiness, liveness so they are not the same to avoid the known issues.

@nak3
Copy link
Contributor

nak3 commented Apr 17, 2023

Thank you. My intention was not used the same path (/) with applications so /ready should be fine. Let's wait for serving's PR if there is any additional feedback if we can apply.

@dprotaso
Copy link
Contributor

FYI Serving's PR merged

@nak3
Copy link
Contributor

nak3 commented Apr 25, 2023

/lgtm
/hold cancel

Thank you!

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2023
@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 25, 2023
@knative-prow knative-prow bot merged commit 28aa7dc into knative-extensions:main Apr 25, 2023
skonto added a commit to skonto/net-kourier that referenced this pull request Apr 25, 2023
* add missing probes

* fixes

* cleanup
skonto added a commit to skonto/net-kourier that referenced this pull request Apr 26, 2023
* add missing probes

* fixes

* cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants