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: ...@@ -2,3 +2,4 @@ dependencies:
- name: postgresql - name: postgresql
version: 8.4.0 version: 8.4.0
repository: https://kubernetes-charts.storage.googleapis.com repository: https://kubernetes-charts.storage.googleapis.com
condition: postgresql.enabled
...@@ -66,8 +66,8 @@ Create the name of the service account to use ...@@ -66,8 +66,8 @@ Create the name of the service account to use
Return Django Secret Key Return Django Secret Key
*/}} */}}
{{- define "django.secret_key" -}} {{- define "django.secret_key" -}}
{{- if .Values.global.django.secretKey }} {{- if .Values.django.secretKey }}
{{- .Values.global.django.secretKey -}} {{- .Values.django.secretKey -}}
{{- else -}} {{- else -}}
{{- randAlphaNum 72 -}} {{- randAlphaNum 72 -}}
{{- end -}} {{- end -}}
......
...@@ -3,8 +3,9 @@ kind: ConfigMap ...@@ -3,8 +3,9 @@ kind: ConfigMap
metadata: metadata:
name: {{ .Release.Name }}-postgres-config name: {{ .Release.Name }}-postgres-config
data: data:
POSTGRES_DATABASE: {{ .Values.global.postgresql.postgresqlDatabase }} POSTGRES_DATABASE: {{ .Values.postgresql.postgresqlDatabase | default .Release.Name }}
POSTGRES_USER: {{ .Values.global.postgresql.postgresqlUsername }} POSTGRES_DB: {{ .Values.postgresql.postgresqlDatabase | default .Release.Name }}
{{- if .Values.global.postgresql.postgresqlHost }} POSTGRES_USER: {{ .Values.postgresqlUsername | default "django" }}
POSTGRES_HOST: {{ .Values.global.postgresql.postgresqlHost }} {{- if .Values.postgresql.postgresqlHost }}
POSTGRES_HOST: {{ .Values.postgresql.postgresqlHost }}
{{- end }} {{- end }}
...@@ -14,13 +14,13 @@ image: ...@@ -14,13 +14,13 @@ image:
# into django.conf.settings. # into django.conf.settings.
# #
django: django:
secretKey:
config: config:
DJANGO_ALLOWED_HOSTS: "['*']" DJANGO_ALLOWED_HOSTS: "['*']"
# DJANGO_DEBUG: info # DJANGO_DEBUG: 0
# DJANGO_SUPERUSER_USERNAME: admin # DJANGO_SUPERUSER_USERNAME: admin
# DJANGO_SUPERUSER_EMAIL: admin@example.com # DJANGO_SUPERUSER_EMAIL: admin@example.com
# DJANGO_SUPERUSER_PASSWORD: changeit # DJANGO_SUPERUSER_PASSWORD: changeit
imagePullSecrets: [] imagePullSecrets: []
nameOverride: "" nameOverride: ""
...@@ -48,7 +48,7 @@ securityContext: {} ...@@ -48,7 +48,7 @@ securityContext: {}
service: service:
type: ClusterIP type: ClusterIP
port: 80 port: 5000
ingress: ingress:
enabled: false enabled: false
...@@ -97,12 +97,11 @@ tolerations: [] ...@@ -97,12 +97,11 @@ tolerations: []
affinity: {} affinity: {}
global: postgresql:
django: enabled: true
secretKey: extraEnvVarsCM: "{{ .Release.Name }}-postgres-config"
postgresql: postgresqlUsername: django
postgresqlHost: # postgresqlHost:
postgresqlUsername: {{ .Release.name }} # postgresqlDatabase:
postgresqlDatabase: {{ .Release.name }} # postgresqlPassword:
postgresqlPassword: {{ .Release.name }} servicePort: 5432
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