Trying this out
This commit is contained in:
parent
0079a1dcb9
commit
7b0ec0c33f
5 changed files with 17 additions and 36 deletions
|
@ -107,7 +107,7 @@ Set redis url
|
|||
*/}}
|
||||
{{- define "django.redis.url" -}}
|
||||
{{- if .Values.redis.enabled -}}
|
||||
redis://{{- template "django.redis.password" -}}{{- template "django.redis.fullname" . -}}-master
|
||||
redis://:{{ .Values.redis.password }}@{{- template "django.redis.fullname" . -}}-redis-master:{{- template "django.redis.port" . -}}/0
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@ -116,8 +116,8 @@ Set redis port
|
|||
*/}}
|
||||
{{- define "django.redis.port" -}}
|
||||
{{- if .Values.redis.enabled -}}
|
||||
"6379"
|
||||
6379
|
||||
{{- else -}}
|
||||
{{- default "6379" .Values.redis.port | quote -}}
|
||||
{{- default "6379" .Values.redis.port -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -7,6 +7,7 @@ metadata:
|
|||
annotations:
|
||||
"helm.sh/hook-weight": "-1"
|
||||
data:
|
||||
{{- range $k, $v := .Values.environmentVariables }}
|
||||
{{- range $k, $v := .Values.env.normal }}
|
||||
{{ $k }}: {{ $v | quote }}
|
||||
{{- end }}
|
||||
REDIS_URL: {{ template "django.redis.url" . }}
|
||||
|
|
|
@ -6,12 +6,10 @@ metadata:
|
|||
{{- include "django.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
data:
|
||||
DATABASE_URL: {{ required "databaseURL is a required value." .Values.databaseURL | b64enc | quote }}
|
||||
{{- range $k, $v := .Values.env.secret }}
|
||||
{{ $k }}: {{ $v | b64enc | quote }}
|
||||
{{- end }}
|
||||
SECRET_KEY: {{ required "secretKey is a required value." .Values.secretKey | b64enc | quote }}
|
||||
REDIS_URL: {{ printf "redis://:@glitchtip-staging-redis-master:6379/0" | b64enc | quote }}
|
||||
{{- if .Values.stripeLiveSecretKey }}
|
||||
STRIPE_LIVE_SECRET_KEY: {{ .Values.stripeLiveSecretKey | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.djstripeWebhookSecret }}
|
||||
DJSTRIPE_WEBHOOK_SECRET: {{ .Values.djstripeWebhookSecret | b64enc | quote }}
|
||||
{{- if .Values.redis.enabled }}
|
||||
REDIS_URL: {{ template "django.redis.url" . | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
|
|
@ -57,21 +57,6 @@ spec:
|
|||
resources:
|
||||
{{- toYaml .Values.web.resources | nindent 12 }}
|
||||
env:
|
||||
{{- if .Values.redisURL }}
|
||||
- name: REDIS_URL
|
||||
value: {{ .Values.redisURL }}
|
||||
{{- end }}
|
||||
{{- if .Values.redis.enabled }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: redis-password
|
||||
name: {{ include "django.fullname" . }}-redis
|
||||
- name: REDIS_HOST
|
||||
value: {{ template "django.redis.host" . }}
|
||||
- name: REDIS_PORT
|
||||
value: {{ template "django.redis.port" . }}
|
||||
{{- end }}
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue