Commit 296a5db0 authored by Evili del Rio's avatar Evili del Rio

Inject correct subchart values

parent f178a35c
Pipeline #751 failed with stage
in 10 seconds
......@@ -2,3 +2,4 @@ dependencies:
- name: postgresql
version: 8.4.0
repository: https://kubernetes-charts.storage.googleapis.com
condition: postgresql.enabled
......@@ -66,8 +66,8 @@ Create the name of the service account to use
Return Django Secret Key
*/}}
{{- define "django.secret_key" -}}
{{- if .Values.global.django.secretKey }}
{{- .Values.global.django.secretKey -}}
{{- if .Values.django.secretKey }}
{{- .Values.django.secretKey -}}
{{- else -}}
{{- randAlphaNum 72 -}}
{{- end -}}
......
......@@ -3,8 +3,9 @@ kind: ConfigMap
metadata:
name: {{ .Release.Name }}-postgres-config
data:
POSTGRES_DATABASE: {{ .Values.global.postgresql.postgresqlDatabase }}
POSTGRES_USER: {{ .Values.global.postgresql.postgresqlUsername }}
{{- if .Values.global.postgresql.postgresqlHost }}
POSTGRES_HOST: {{ .Values.global.postgresql.postgresqlHost }}
POSTGRES_DATABASE: {{ .Values.postgresql.postgresqlDatabase | default .Release.Name }}
POSTGRES_DB: {{ .Values.postgresql.postgresqlDatabase | default .Release.Name }}
POSTGRES_USER: {{ .Values.postgresqlUsername | default "django" }}
{{- if .Values.postgresql.postgresqlHost }}
POSTGRES_HOST: {{ .Values.postgresql.postgresqlHost }}
{{- end }}
......@@ -14,14 +14,14 @@ image:
# into django.conf.settings.
#
django:
secretKey:
config:
DJANGO_ALLOWED_HOSTS: "['*']"
# DJANGO_DEBUG: info
# DJANGO_DEBUG: 0
# DJANGO_SUPERUSER_USERNAME: admin
# DJANGO_SUPERUSER_EMAIL: admin@example.com
# DJANGO_SUPERUSER_PASSWORD: changeit
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
......@@ -48,7 +48,7 @@ securityContext: {}
service:
type: ClusterIP
port: 80
port: 5000
ingress:
enabled: false
......@@ -97,12 +97,11 @@ tolerations: []
affinity: {}
global:
django:
secretKey:
postgresql:
postgresqlHost:
postgresqlUsername: {{ .Release.name }}
postgresqlDatabase: {{ .Release.name }}
postgresqlPassword: {{ .Release.name }}
postgresql:
enabled: true
extraEnvVarsCM: "{{ .Release.Name }}-postgres-config"
postgresqlUsername: django
# postgresqlHost:
# postgresqlDatabase:
# postgresqlPassword:
servicePort: 5432
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment