fix(dispatch) correct init command after manual test
This commit is contained in:
parent
930313722f
commit
a42bb2072d
3 changed files with 44 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: dispatch
|
name: dispatch
|
||||||
description: Netflix Dispatch incident management system
|
description: Netflix Dispatch incident management system
|
||||||
version: 0.2.8
|
version: 0.2.9
|
36
charts/dispatch/templates/dispatch-db-init.yaml
Normal file
36
charts/dispatch/templates/dispatch-db-init.yaml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ include "dispatch.fullname" . }}-web-db-init
|
||||||
|
labels:
|
||||||
|
{{- include "dispatch.labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": pre-install
|
||||||
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
|
containers:
|
||||||
|
- name: general-db-init
|
||||||
|
image: "{{ .Values.initContainers.dbInit.image.repository }}:{{ .Values.initContainers.dbInit.image.tag }}"
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: {{ .Values.postgres.secretName }}
|
||||||
|
- name: dispatch-db-init
|
||||||
|
image: "{{ .Values.initContainers.dbInit.image.repository }}:{{ .Values.initContainers.dbInit.image.tag }}"
|
||||||
|
command: ["dispatch", "database", "init"]
|
||||||
|
env: &dispatchEnv
|
||||||
|
- name: DISPATCH_UI_URL
|
||||||
|
value: "{{ .Values.url }}"
|
||||||
|
- name: DATABASE_HOSTNAME
|
||||||
|
value: "{{ .Values.postgres.hostname }}"
|
||||||
|
- name: DATABASE_PORT
|
||||||
|
value: "{{ .Values.postgres.port }}"
|
||||||
|
- name: DATABASE_NAME
|
||||||
|
value: "{{ .Values.postgres.database_name }}"
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: {{ .Values.envFromSecret }}
|
||||||
|
# Tolerate a few failures, adjust the number as needed
|
||||||
|
backoffLimit: 3
|
|
@ -16,9 +16,9 @@ spec:
|
||||||
app: {{ include "dispatch.fullname" . }}-web
|
app: {{ include "dispatch.fullname" . }}-web
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: web-db-init
|
- name: web-db-upgrade
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
command: ["dispatch", "database", "init"]
|
command: ["dispatch", "database", "upgrade"]
|
||||||
env: &dispatchEnv
|
env: &dispatchEnv
|
||||||
- name: DISPATCH_UI_URL
|
- name: DISPATCH_UI_URL
|
||||||
value: "{{ .Values.url }}"
|
value: "{{ .Values.url }}"
|
||||||
|
@ -31,6 +31,11 @@ spec:
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ .Values.envFromSecret }}
|
name: {{ .Values.envFromSecret }}
|
||||||
|
|
||||||
|
- name: web-plugin-install
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
command: ["dispatch", "plugins", "install"]
|
||||||
|
env: *dispatchEnv
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: web
|
- name: web
|
||||||
|
|
Loading…
Reference in a new issue