-
Notifications
You must be signed in to change notification settings - Fork 24
sourcegraph: do not include frontend env var in migrator container #559
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
Conversation
|
@eseliger this is what caused the broken |
| {{- range $name, $item := .Values.frontend.env }} | ||
| - name: {{ $name }} | ||
| {{- $item | toYaml | nindent 10 }} | ||
| {{- end }} |
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 have no clue about this - are there any env vars in frontend that migrator would also need? I think in the MVU case it might need things like "where's the KMS secrets" etc 🤔 But not exactly sure there. I could see this being used at customers .. 🤔
cc @sourcegraph/release
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 think this is fine.
for db connection string, we don't read from frontend.env, it's always computed from the partial template
deploy-sourcegraph-helm/charts/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml
Lines 52 to 61 in fde5020
| - name: migrator | |
| image: {{ include "sourcegraph.image" (list . "migrator") }} | |
| imagePullPolicy: {{ .Values.sourcegraph.image.pullPolicy }} | |
| args: {{- default (list "up") .Values.migrator.args | toYaml | nindent 8 }} | |
| env: | |
| {{- if not .Values.migrator.databaseAuthOverrideEnvVars }} | |
| {{- include "sourcegraph.databaseAuth" (list . "pgsql" "PG") | nindent 8 }} | |
| {{- include "sourcegraph.databaseAuth" (list . "codeIntelDB" "CODEINTEL_PG") | nindent 8 }} | |
| {{- include "sourcegraph.databaseAuth" (list . "codeInsightsDB" "CODEINSIGHTS_PG") | nindent 8 }} | |
| {{- end }} |
not sure about the KMS example?
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'm concerned this might be used in autoupgrade -- reading 👀 brain is cooked from the release stuff
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.
Alright I think these are all we need:
- PGHOST=pgsql
- PGPORT=5432
- PGUSER=sg
- PGPASSWORD=sg
- PGDATABASE=sg
- PGSSLMODE=disable
- CODEINTEL_PGHOST=codeintel-db
- CODEINTEL_PGPORT=5432
- CODEINTEL_PGUSER=sg
- CODEINTEL_PGPASSWORD=sg
- CODEINTEL_PGDATABASE=sg
- CODEINTEL_PGSSLMODE=disable
- CODEINSIGHTS_PGHOST=codeinsights-db
- CODEINSIGHTS_PGPORT=5432
- CODEINSIGHTS_PGUSER=postgres
- CODEINSIGHTS_PGPASSWORD=password
- CODEINSIGHTS_PGDATABASE=postgres
- CODEINSIGHTS_PGSSLMODE=disable
And those should all be generated by this
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.
yes, thank you
|
This was a breaking change, which impacted self-hosted customers upgrading, which should have been communicated to them in advance of upgrading >= v5.8 |
this can result in duplicated env var and cause weird behaviour.
Checklist
Test plan
n/a