Moving chart from glitchtip-frontend to here
This commit is contained in:
parent
308366ca60
commit
0d5033171a
15 changed files with 87 additions and 27 deletions
|
@ -96,7 +96,7 @@ Set redis host
|
|||
*/}}
|
||||
{{- define "glitchtip.redis.host" -}}
|
||||
{{- if .Values.redis.enabled -}}
|
||||
{{- template "glitchtip.redis.fullname" . -}}-master
|
||||
{{- template "glitchtip.redis.fullname" . -}}-redis-master
|
||||
{{- else -}}
|
||||
{{- .Values.redis.host | quote -}}
|
||||
{{- end -}}
|
||||
|
@ -109,4 +109,15 @@ Set redis url
|
|||
{{- if .Values.redis.enabled -}}
|
||||
redis://{{- template "glitchtip.redis.password" -}}{{- template "glitchtip.redis.fullname" . -}}-master
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Set redis port
|
||||
*/}}
|
||||
{{- define "glitchtip.redis.port" -}}
|
||||
{{- if .Values.redis.enabled -}}
|
||||
"6379"
|
||||
{{- else -}}
|
||||
{{- default "6379" .Values.redis.port | quote -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
12
templates/configmap.yaml
Normal file
12
templates/configmap.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "glitchtip.fullname" . }}
|
||||
labels:
|
||||
{{- include "glitchtip.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook-weight": "-1"
|
||||
data:
|
||||
{{- range $k, $v := .Values.environmentVariables }}
|
||||
{{ $k }}: {{ $v | quote }}
|
||||
{{- end }}
|
|
@ -13,6 +13,8 @@ spec:
|
|||
metadata:
|
||||
annotations:
|
||||
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
tag: {{ .Values.image.tag }}
|
||||
labels:
|
||||
{{- include "glitchtip.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
|
@ -51,7 +53,7 @@ spec:
|
|||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: redis-password
|
||||
name: {{ include "glitchtip.fullname" . }}-glitchtip-redis
|
||||
name: {{ include "glitchtip.fullname" . }}-redis
|
||||
- name: REDIS_HOST
|
||||
value: {{ template "glitchtip.redis.host" . }}
|
||||
- name: REDIS_PORT
|
||||
|
@ -60,3 +62,5 @@ spec:
|
|||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "glitchtip.fullname" . }}
|
||||
- configMapRef:
|
||||
name: {{ include "glitchtip.fullname" . }}
|
||||
|
|
|
@ -13,6 +13,8 @@ spec:
|
|||
metadata:
|
||||
annotations:
|
||||
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
tag: {{ .Values.image.tag }}
|
||||
labels:
|
||||
{{- include "glitchtip.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
|
@ -46,7 +48,7 @@ spec:
|
|||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: redis-password
|
||||
name: {{ include "glitchtip.fullname" . }}-glitchtip-redis
|
||||
name: {{ include "glitchtip.fullname" . }}-redis
|
||||
- name: REDIS_HOST
|
||||
value: {{ template "glitchtip.redis.host" . }}
|
||||
- name: REDIS_PORT
|
||||
|
@ -55,6 +57,8 @@ spec:
|
|||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "glitchtip.fullname" . }}
|
||||
- configMapRef:
|
||||
name: {{ include "glitchtip.fullname" . }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
|
|
@ -14,6 +14,8 @@ spec:
|
|||
metadata:
|
||||
annotations:
|
||||
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
tag: {{ .Values.image.tag }}
|
||||
labels:
|
||||
{{- include "glitchtip.selectorLabels" . | nindent 8 }}
|
||||
role: web
|
||||
|
@ -56,8 +58,6 @@ spec:
|
|||
value: "False"
|
||||
- name: STATIC_URL
|
||||
value: /
|
||||
- name: ENABLE_SOCIAL_AUTH
|
||||
value: {{ .Values.enableSocialAuth | quote }}
|
||||
{{- if .Values.redisURL }}
|
||||
- name: REDIS_URL
|
||||
value: {{ .Values.redisURL }}
|
||||
|
@ -67,15 +67,21 @@ spec:
|
|||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: redis-password
|
||||
name: {{ include "glitchtip.fullname" . }}-glitchtip-redis
|
||||
name: {{ include "glitchtip.fullname" . }}-redis
|
||||
- name: REDIS_HOST
|
||||
value: {{ template "glitchtip.redis.host" . }}
|
||||
- name: REDIS_PORT
|
||||
value: {{ template "glitchtip.redis.port" . }}
|
||||
{{- end }}
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "glitchtip.fullname" . }}
|
||||
- configMapRef:
|
||||
name: {{ include "glitchtip.fullname" . }}
|
||||
{{- with .Values.web.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
|
|
@ -7,6 +7,10 @@ metadata:
|
|||
annotations:
|
||||
"helm.sh/hook": post-install,pre-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
"helm.sh/hook-weight": "0"
|
||||
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
tag: {{ .Values.image.tag }}
|
||||
spec:
|
||||
activeDeadlineSeconds: 180
|
||||
template:
|
||||
|
@ -15,6 +19,7 @@ spec:
|
|||
containers:
|
||||
- name: pre-install-job
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: ["./manage.py","migrate"]
|
||||
env:
|
||||
- name: DEBUG
|
||||
|
@ -22,6 +27,6 @@ spec:
|
|||
- name: STATIC_URL
|
||||
value: /
|
||||
- name: DATABASE_URL
|
||||
value: {{ required "databaseURL is a required value." .Values.databaseURL | quote }}
|
||||
value: {{ required "databaseURL is a required value." .Values.databaseURL }}
|
||||
- name: SECRET_KEY
|
||||
value: {{ required "secretKey is a required value." .Values.secretKey | quote }}
|
||||
value: {{ required "secretKey is a required value." .Values.secretKey }}
|
||||
|
|
|
@ -8,4 +8,10 @@ type: Opaque
|
|||
data:
|
||||
DATABASE_URL: {{ required "databaseURL is a required value." .Values.databaseURL | b64enc | quote }}
|
||||
SECRET_KEY: {{ required "secretKey is a required value." .Values.secretKey | b64enc | quote }}
|
||||
REDIS_URL: {{ printf "redis://:@glitchtip-staging-glitchtip-redis-master:6379/0" | 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 }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue