feat(appliance): local developer mode#63417
Conversation
ca4f157 to
4b91680
Compare
d53b5ae to
64ce31e
Compare
4b91680 to
1104857
Compare
- Expose a toggle in the web UI to enable dev mode - dev mode is currently defined as: no container resource requests/limits
Gitserver: the configured probe timeouts were too aggressive. Indexed-search: the image name was wrong Both of these were drift from Helm that we didn't catch. Luckily the appliance is still pre-release!
1104857 to
80e6a2c
Compare
|
Fun fact: if we apply the following patch on top of this PR, the appliance can deploy all resources with the dev-mode toggle switched on without errors! diff --git a/internal/appliance/reconciler/frontend.go b/internal/appliance/reconciler/frontend.go
index fdb5bcbd528..6f41191da55 100644
--- a/internal/appliance/reconciler/frontend.go
+++ b/internal/appliance/reconciler/frontend.go
@@ -269,7 +269,7 @@ func (r *Reconciler) reconcileFrontendIngress(ctx context.Context, sg *config.So
func frontendEnvVars(sg *config.Sourcegraph) []corev1.EnvVar {
vars := []corev1.EnvVar{
- {Name: "DEPLOY_TYPE", Value: "appliance"},
+ {Name: "DEPLOY_TYPE", Value: "helm"},
}
if !sg.Spec.Grafana.Disabled {
vars = append(vars, corev1.EnvVar{Name: "GRAFANA_SERVER_URL", Value: "http://grafana:30070"})Why do we need the patch, I hear you say? Because the error preventing startup without it is fixed by the first commit in https://github.com/sourcegraph/sourcegraph/pull/63158, and we've not cut a release from main since. I probably can't easily backport it due to the fact that it's squash-merged with the other commit in the same PR, which is larger and would probably cause cherry-pick conflicts 🙈 We'll be cutting a minor release in July, so I'm not too worried. Just a note to fellow developers for testing. cc @sourcegraph/release - please kick the tires on the appliance! |
| // the BestEffortQOS flag to influence the behavior in that file. | ||
| // While this is admittedly a bit of a confusing leaky abstraction, | ||
| // the golden tests should catch any regressions in the interactions | ||
| // between these 2 bits of code. |
There was a problem hiding this comment.
Yeah, real comment of last resort. The tl;dr is "I'm sorry for writing confusing code. In this case, I can't figure out how to make it easier to understand without making something else significantly worse" 😂
feat(appliance): local developer mode
requests/limits
fix(appliance): fix misconfigurations to 2 services
Gitserver: the configured probe timeouts were too aggressive.
Indexed-search: the image name was wrong
Both of these were drift from Helm that we didn't catch. Luckily the
appliance is still pre-release!
Closes https://linear.app/sourcegraph/issue/REL-199/populate-accurate-list-of-versions-to-install
Draft until base branch merged, but should be reviewable independentlyTest plan
The behavior of the dev mode toggle is unit tested and golden tests cover its integration with the reconcile loop.
Changelog