Use app-config.development.yaml to provide configuration instead of local

The app-config.yaml file that comes inside the docker image for the
backend contains configuration for the key `scaffolder.azure`. This
automatically enables the use of azure and it is not possible to set its
values to dummy ones because it will fail when it tries to validate
them.

To avoid the backend throwing an exception for this, the charts are
using the "development" mode (via setting NODE_ENV=development).

This means that the app-config.development.yaml file that ships in the
container woud have higher precedence than the app-config.local.yaml
file that the charts tried to create before. For that reason, for now,
they will override the development file.

A better solution would be to ship the docker images with a minimal
app-config.yaml or even without any config. And then have these charts
provide said file.
This commit is contained in:
Martina Iglesias Fernandez
2020-10-08 15:28:58 +02:00
parent 6289cea398
commit 797ac6a450
3 changed files with 10 additions and 6 deletions
@@ -35,12 +35,16 @@ catalog:
locations: []
{{- end }}
sentry:
organization: {{ .Values.appConfig.sentry.organization | quote }}
auth:
providers:
microsoft: null
scaffolder:
azure:
baseUrl: https://dev.azure.com/some-org
azure: null
sentry:
organization: {{ .Values.appConfig.sentry.organization | quote }}
techdocs:
generators:
@@ -282,5 +282,5 @@ Postgres password for lighthouse
app-config file name
*/}}
{{- define "backstage.appConfigFilename" -}}
{{- "app-config.local.yaml" -}}
{{- "app-config.development.yaml" -}}
{{- end -}}
@@ -4,7 +4,7 @@ metadata:
name: {{ include "backstage.fullname" . }}-app-config
data:
{{ include "backstage.appConfigFilename" . | indent 2 }}: |
{{ tpl (.Files.Get "files/app-config.local.yaml.tpl") . | indent 4 }}
{{ tpl (.Files.Get "files/app-config.development.yaml.tpl") . | indent 4 }}
---
apiVersion: v1
kind: ConfigMap