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

internal: Enable Envoy healthchecks #759

Merged
merged 1 commit into from
Oct 23, 2018

Conversation

stevesloka
Copy link
Member

Fixes #695 by enabling a /healthz endpoint in Envoy to enable Kubernetes readiness probes. This also removes the ability to enable metrics since I'm reusing the same port to reduce the number of ports that we need to configure for Envoy.

Signed-off-by: Steve Sloka steves@heptio.com

@stevesloka stevesloka added this to the 0.7.0 milestone Oct 16, 2018
@@ -50,8 +56,6 @@ spec:
command: ["contour"]
args:
- bootstrap
# Uncomment the statsd-enable to enable prometheus metrics
#- --statsd-enable
# Uncomment to set a custom stats emission address and port
#- --stats-address=0.0.0.0
#- --stats-port=8002
Copy link
Contributor

Choose a reason for hiding this comment

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

@stevesloka should we change the commented out stats-port to something besides 8002?

Copy link
Member Author

Choose a reason for hiding this comment

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

We should actually remove those values, those are the defaults if nothing is specified.

@@ -9,9 +9,6 @@ avoid exposing the entire admin interface to Prometheus (and other workloads in
the cluster), Contour configures a static listener that sends traffic to the
stats endpoint and nowhere else.

To enable the static listener, set the `--statsd-enabled` flag on the Contour
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 add docs here for --stats-address and --stats-port?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup good point @rosskukulinski, I think we missed those docs when this was introduced initally.

@rosskukulinski
Copy link
Contributor

@stevesloka metrics can still be enabled, just that the end-user must now specify an address & port. Right?

@alexbrand
Copy link
Contributor

Will this cause issues if statsd is not deployed? I believe that flag was introduced when we added the ability to configure a statsd sink.

@alexbrand
Copy link
Contributor

Although it seems like it was controlling more than just the statsd piece.

@stevesloka
Copy link
Member Author

My idea to reuse the stats listener was to reduce the number of listeners. I could rever this and introduce another port if folks think that makes sense.

This now "enables" the stats listener, if the forwarder isn't turned on then its sort of a no-op. Specifying the the IP/Port is a way to override the default (if someone would like to).

@alexbrand
Copy link
Contributor

I think reusing the port is fine. What might be an issue is unconditionally enabling Envoy's statsd feature where it pushes metrics to a statsd sink. What if statsd is not running? Does envoy error out? Is it just going to continue trying to push metrics even though nothing is listening for them?

An alternative would be to move the "if statsdEnabledcheck from old line 120 to old line 145 ininternal/envoy/config.go`.

@stevesloka
Copy link
Member Author

Yeah, we could do that. Right now just enabling the statsd interface will send UDP to nowhere. But if you don't want that turned on then I agree we should probably allow it to be disabled, however, the Prometheus stats interface is still available.

@alexbrand
Copy link
Contributor

I think my vote would go towards having the ability to enable the statsd-sink feature, instead of always blasting packets at a potentially non-existent statsd.

@rosskukulinski
Copy link
Contributor

+1 for disabling statsd-sink feature. It's a CPU hog at scale.

@stevesloka stevesloka force-pushed the healthcheck branch 2 times, most recently from 35859a7 to 193a4ce Compare October 18, 2018 20:50
@stevesloka
Copy link
Member Author

@alexbrand @rosskukulinski I'm retesting this now, but should be updated so that the --enable-statsd now just enables the statsd piece.

@davecheney
Copy link
Contributor

@stevesloka ping, is this ready to merge?

Signed-off-by: Steve Sloka <steves@heptio.com>
@stevesloka
Copy link
Member Author

yeah should be good now @davecheney, I just rebased it against master.

@davecheney
Copy link
Contributor

LGTM. Thank you.

@davecheney davecheney merged commit 9d82639 into projectcontour:master Oct 23, 2018
@stevesloka stevesloka deleted the healthcheck branch October 23, 2018 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants