Skip to content

Commit

Permalink
feat: strapi add env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikZed committed Mar 14, 2022
1 parent c3e971a commit d562989
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/strapi/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.30
version: 0.1.31

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 5 additions & 1 deletion charts/strapi/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: STRAPI_API_URL
value: {{ lower .Values.strapiApiUrl | quote }}
value: {{ lower .Values.strapiApiUrl | quote }}
{{- range $key, $val := .Values.additionalEnvVariables }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
envFrom:
- secretRef:
name: {{ include "strapi.fullname" . }}
Expand Down
4 changes: 4 additions & 0 deletions charts/strapi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ affinity: {}
# Just add here secrets, that you want to get mounted
additionalSecretMounts: {}

# Add env variables with key and value, that should be added to the strapi container
additionalEnvVariables:
TESTKEY: value

# You can set a database URL here if you don't want to use the included DB
secrets:
databaseUrl: "postgresql://{{ .Release.Name }}-postgresql"
Expand Down

0 comments on commit d562989

Please sign in to comment.