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 gcp example to expose sourcegraph publically #69

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

michaellzc
Copy link
Member

@michaellzc michaellzc commented Mar 11, 2022

I was testing helm experience on GCP and happened to feel like giving Ingress a try. It turned out to be a lot harder than I was expecting. Also, GCP docs is better than other vendors, but still, it's hard to troubleshoot when you're not on their expected user path.

Our frontend deployment uses a different port 6060 (other than the one severs user traffic 3080) to perform health check. GCP ingress controller (or load balancer) requires the present of health check (readinessProbe) in order to work, but things get complicated when the healthcheck port is different than the port published from the svc. Therefore, it requires a special BackendConfig CR to tell ingress controller where to check. Otherwise, it will just fall back to check / at 80, and the load balancer ends up reporting backed is unhealthy cuz there's nothing listening at 80.

Side note, I don't know why we went down the road of deploying our own nginx ingress controller on GCP with NLB, but using platform built-int just feel like the better choice to me.

Is this something we want to demonstrate to users? This is related to the point we brought up in the planning doc about creating reference architecture and how to support them. For this example, we can potentially go even further including steps of provisioning TLS cert + DNS to get sourcegraph working properly on GKE.

Related: kubernetes/ingress-gce#42

Checklist

Test plan

Deploy at https://console.cloud.google.com/kubernetes/list/overview?project=michael-test-03&supportedpurview=project

http://34.120.16.199/ this works ;)

@michaellzc
Copy link
Member Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@michaellzc michaellzc force-pushed the Add_gcp_example_to_expose_sourcegraph_pu branch from b66329f to a0c59c1 Compare March 11, 2022 20:34
@michaellzc michaellzc marked this pull request as ready for review March 11, 2022 20:35
@michaellzc michaellzc requested a review from a team March 11, 2022 20:43
@michaellzc michaellzc force-pushed the Add_gcp_example_to_expose_sourcegraph_pu branch from a0c59c1 to 1a0551a Compare March 11, 2022 21:16
@michaellzc michaellzc force-pushed the Add_gcp_example_to_expose_sourcegraph_pu branch from 1a0551a to eb36f35 Compare March 11, 2022 21:22
Copy link
Contributor

@daxmc99 daxmc99 left a comment

Choose a reason for hiding this comment

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

LGTM on this approach. Looks like we are essentially adding more docs here as this in the example folder

@michaellzc
Copy link
Member Author

LGTM on this approach. Looks like we are essentially adding more docs here as this in the example folder

docsite should be the single source of truth, but we also need a place to store all these sample override files and some local context is also nice. I am still working out the balance about what to keep in the helm repo and what go to the docsite, here's something WIP https://github.com/sourcegraph/sourcegraph/pull/32463.

The plan for helm page on docsite is to keep it as a one-pager, so we can break it up or move sections around when the new docsite IA is ready (an initiativeive led by Jeff, Director of Technical Writing). Maybe we will move all example to docsite or figure out a way to reference them from docsite after GA.

@michaellzc michaellzc merged commit 8117da9 into main Mar 15, 2022
@michaellzc michaellzc deleted the Add_gcp_example_to_expose_sourcegraph_pu branch March 15, 2022 19:40
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.

2 participants