Add gcp example to expose sourcegraph publically #69
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 traffic3080
) 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 thesvc
. Therefore, it requires a specialBackendConfig
CR to tell ingress controller where to check. Otherwise, it will just fall back to check/
at80
, and the load balancer ends up reporting backed is unhealthy cuz there's nothing listening at80
.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 ;)