-
Notifications
You must be signed in to change notification settings - Fork 303
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
Condense health checkers into one health checker for all backends. #264
Conversation
cmd/glbc/main.go
Outdated
@@ -90,15 +90,15 @@ func main() { | |||
|
|||
cloud := app.NewGCEClient() | |||
defaultBackendServicePort := app.DefaultBackendServicePort(kubeClient) | |||
clusterManager, err := controller.NewClusterManager(cloud, namer, flags.F.HealthCheckPath) | |||
clusterManager, err := controller.NewClusterManager(cloud, namer, *defaultBackendServicePort, flags.F.HealthCheckPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we get rid of the app.DefaultBackendServicePort
call. We don't really care that the service exists until an ingress sync. Using the client to fetch it now seems racey for new clusters.
Maybe create a utility function that converts strings of "namespace/name" to types.NamespacedName and use that to convert the flag value. Then pass that value to the LBC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, can I do this in a follow up PR? It's slightly more involved than just removing that call so I want to spend more time thinking about it.
pkg/healthchecks/healthchecks.go
Outdated
@@ -32,6 +33,9 @@ import ( | |||
) | |||
|
|||
const ( | |||
// DefaultBackendHealthCheckPath defines the path that the system default | |||
// backend should serve 200's on. | |||
DefaultBackendHealthCheckPath = "/healthz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something tells me that we should make this a flag that defaults to '/healthz'. Since the default backend is modifiable, this should probably be too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
f203295
to
8ae3af9
Compare
8ae3af9
to
04b548e
Compare
/lgtm |
This PR should wait on #262
TODOs before merge:
/assign @nicksardo