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

Condense health checkers into one health checker for all backends. #264

Merged
merged 1 commit into from
May 14, 2018

Conversation

rramkumar1
Copy link
Contributor

This PR should wait on #262

TODOs before merge:

  1. Manually test case of ingress using system default backend w/ other backends and verify health checks.
  2. Verify that users can still modify health check settings for all backends and that the controller will not reconcile.

/assign @nicksardo

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 11, 2018
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)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@@ -32,6 +33,9 @@ import (
)

const (
// DefaultBackendHealthCheckPath defines the path that the system default
// backend should serve 200's on.
DefaultBackendHealthCheckPath = "/healthz"
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@nicksardo
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 14, 2018
@nicksardo nicksardo merged commit 4de682e into kubernetes:master May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants